南骏 池
2025-03-01 fb7b8b58c8ad502d93b2c53c24418bc360709faf
1.销售出库PDA
已添加3个文件
375 ■■■■■ 文件已修改
H5/Js/Xsck.js 262 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
H5/Xsck.aspx 99 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
H5/Xsck.aspx.cs 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
H5/Js/Xsck.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,262 @@
var vm = new Vue({
    el: '#app',
    data: function () {
        return {
            isLoading: false,
            userInfo: {
                "loginGuid": '',
                "loginAccount": '',
            },
            splitNum: "",
            num: "",
            //type: "",
            billNo: "",
            selectType: "",
            daa001: "",
            barcode: "",
            ItemBlDetail:[],
            modeInfo: [],
            active: 0,
            show: false,
            actions: [],
        }
    },
    mounted() {
        var that = this;
        this.userInfo = {
            loginGuid: this.GetLoginInfor().loginGuid,
            loginAccount: this.GetLoginInfor().loginAccount,
        };
    },
    methods: {
        getInfo() {
            this.show = true;
            var that = this;
            that.isLoading = true
            that.AxiosHttp("post", 'MesXsck/GetFHTZBillNo', {
               // type: "selectType",
            }, false)
                .then(function (res) {
                    var json = res;
                    if (json.status == 0) {
                        if (json.data.tbBillList.length <= 0) {
                            that.$toast.fail("没有可用的数据");
                            that.show = false;
                        } else {
                            that.actions = json.data.tbBillList.map(item => {
                                return { name: item }
                            });
                        }
                    }
                    else {
                        that.$toast.fail(json.message);
                    }
                    that.isLoading = false;
                })
                .catch(function (error) {
                    that.isLoading = false;
                    that.$toast.fail("网络错误,请重试!");
                    console.log(error);
                    that.show = false;
                });
        },
        //onClick(index, title) {
        //    this.$toast(`${index} ${title}`);
        //    this.$notify({ type: 'success', message: '某某物料扫码成功某某物料扫码成功某某物料扫码成功某某物料扫码成功' });
        //},
        onSelect(item) {
            // é»˜è®¤æƒ…况下点击选项时不会自动收起
            // å¯ä»¥é€šè¿‡ close-on-click-action å±žæ€§å¼€å¯è‡ªåŠ¨æ”¶èµ·
            this.show = false;
            this.billNo = item.name;
            this.GetMesItemDetailByBillNo();
            //this.$toast(item.name);
        },
        GetMesItemDetailByBillNo() {
            var that = this;
            that.isLoading = true;
            that.AxiosHttp("post", 'MesXsck/GetMesItemFHTZetailByBillNo', {
                billNo: that.billNo,
                //type: selectType
            }, false)
                .then(function (res) {
                    var json = res;
                    if (json.status == 0) {
                        that.ItemBlDetail = json.data.tbBillList;
                        //that.daa001 = json.data.tbBillList.item1;
                        that.$refs.barcode.focus();
                    }
                    else {
                        that.$toast.fail(json.message);
                        that.$refs.billNo.focus();
                        that.billNo = "";
                        that.daa001 = "";
                        that.ItemBlDetail = [];
                    }
                    that.isLoading = false;
                })
                .catch(function (error) {
                    that.isLoading = false;
                    that.$toast.fail("网络错误,请重试!");
                    //console.log(error);
                    tthat.$refs.billNo.focus();
                    that.billNo = "";
                    that.daa001 = "";
                    that.ItemBlDetail = [];
                });
        },
        getBarcode() {
            //this.barcode = value;
            var that = this;
            that.isLoading = true;
            if (!that.userInfo.loginAccount) {
                this.$toast.fail("请重新检查登录状态");
                that.isLoading = false;
                return;
            }
            if (!that.barcode) {
                this.$toast.fail("条码不能为空");
                that.isLoading = false;
                return;
            }
            if (!that.billNo) {
                this.$toast.fail("发货通知单号不能为空");
                that.isLoading = false;
                return;
            }
            //if (!that.daa001) {
            //    this.$toast.fail("工单号不能为空");
            //    that.isLoading = false;
            //    return;
            //}
            that.AxiosHttp("post", 'MesXsck/XSCKScanBarcode', {
                userName: that.userInfo.loginAccount,
                barcode: that.barcode,
                daa001: that.billNo,
                //type: selectType
            }, false)
                .then(function (res) {
                    var json = res;
                    if (json.status == 0) {
                        that.barcode = null;
                        that.sms = null;
                        that.num = null;
                        //that.ItemBlDetail = json.data.tbBillList.item2
                        that.$notify({ type: 'success', message: '扫描成功' });
                        that.GetMesItemDetailByBillNo();
                        that.$refs.barcode.focus();
                        that.barcode = "";
                        that.num = "";
                        that.splitNum = "";
                    } else if (json.status == 2) {
                        that.$refs.splitNum.focus();
                        that.splitNum = json.data.cfNum;
                        that.num = json.data.num;
                    }
                    else {
                        that.$toast.fail(json.message);
                        that.$refs.barcode.focus();
                        that.barcode = "";
                        that.num = "";
                        that.splitNum = "";
                    }
                    that.isLoading = false;
                })
                .catch(function (error) {
                    that.isLoading = false;
                    that.$toast.fail("网络错误,请重试!");
                    //console.log(error);
                    that.$refs.barcode.focus();
                    that.barcode = "";
                    that.num = "";
                    that.splitNum = "";
                });
        },
        tmcf() {
            //this.show = true;
            var that = this;
            that.isLoading = true;
            if (!that.userInfo.loginAccount) {
                this.$toast.fail("请重新检查登录状态");
                that.isLoading = false;
                return;
            }
            if (!that.barcode) {
                this.$toast.fail("条码不能为空");
                that.isLoading = false;
                return;
            }
            if (!that.billNo) {
                this.$toast.fail("补料单号不能为空");
                that.isLoading = false;
                return;
            }
            if (!that.daa001) {
                this.$toast.fail("工单号不能为空");
                that.isLoading = false;
                return;
            }
            if (!that.splitNum) {
                this.$toast.fail("发货数量不能为空");
                that.isLoading = false;
                return;
            }
            that.AxiosHttp("post", 'MesXsck/SplitBarcode', {
                userName: that.userInfo.loginAccount,
                barcode: that.barcode,
                daa001: that.billNo,
                num: that.splitNum,
                //type: selectType
            }, false)
                .then(function (res) {
                    var json = res;
                    if (json.status == 0) {
                        that.ItemBlDetail = json.data.pendingList;
                        that.$notify({ type: 'success', message: '扫描成功' });
                        that.$refs.barcode.focus();
                        that.barcode = "";
                        that.num = "";
                        that.splitNum = "";
                        that.GetMesItemDetailByBillNo();
                    }
                    else {
                        that.$toast.fail(json.message);
                        that.$refs.barcode.focus();
                    }
                    that.isLoading = false;
                })
                .catch(function (error) {
                    that.isLoading = false;
                    that.$toast.fail("网络错误,请重试!");
                    //console.log(error);
                    that.$refs.barcode.focus();
                    that.barcode = "";
                    that.num = "";
                    that.splitNum = "";
                });
        }
    }
})
H5/Xsck.aspx
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,99 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Mst.master" AutoEventWireup="true" CodeFile="Xsck.aspx.cs" Inherits="H5_Scbl" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
        <style>
    .bg-info {
        background-color:#fff;
    }
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">
        <van-nav-bar
          title="销售出库"
          left-text="返回"
          left-arrow
          @click-left="GoBack()"
        ></van-nav-bar>
        <div>
        <van-cell-group>
  <van-field
      ref="billNo"
    value=""
    label="发货通知"
    clearable
     placeholder="扫码/选择/手录"
    :right-icon-size="19"
      @keyup.enter.native ="GetMesItemDetailByBillNo"
      v-model="billNo"
     v-focus.noKeyboard
  ><template #button>
    <van-button size="small" type="info" plain @click="getInfo" >选择</van-button>
  </template></van-field>
 <van-field
     ref="barcode"
  value=""
  label="物料条码"
   clearable
 placeholder="请扫码"
<%--     @input="getBarcode"--%>
     @keyup.enter.native ="getBarcode"
  :right-icon-size="19"
     v-model="barcode"
  v-focus.noKeyboard
></van-field>
   <van-field
  value=""
       v-model="num"
  label="条码数量"
  placeholder="条码数量"
  disabled
></van-field>
  <van-field
      ref ="splitNum"
    center
    clearable
    v-model="splitNum"
    label="发货数量"
    placeholder="发货数量"
<%--disabled--%>
 ><template #button>
    <van-button size="small" type="info" plain @click="tmcf" >条码拆分</van-button>
  </template></van-field>
</van-cell-group>
    </div>
    <div  class="van-tab-left">
              <van-tabs <%--@click="onClick"--%> color="#000" title-active-color="#0283EF" >
  <van-tab title="待发物料" class="mySolid font">
<%--    <van-row v-for="value in ItemBlDetail" class="font">
          <van-col span="12">物料:{{value.itemNo}}</van-col>
          <van-col span="6">申请数{{value.bld007}}</van-col>
          <van-col span="6">已领数{{value.bld008}}</van-col>
    </van-row>--%>
        <van-row>
        <van-col span="12" class="text-left padding-left">物料</van-col>
         <van-col span="6">需领</van-col>
        <van-col span="6">已扫</van-col>
</van-row>
<van-row  v-for="value in ItemBlDetail" class="font">
      <van-col span="12"  class="text-left padding-left">
           <div>{{value.itemNo}}</div>
           <div>{{value.itemName}}</div>
      </van-col>
      <van-col span="6">{{value.fQty}}</van-col>
     <van-col span="6">{{value.sQty ?? 0}}</van-col>
</van-row>
  </van-tab>
</van-tabs>
    </div>
    <van-action-sheet v-model="show" :actions="actions" @select="onSelect" ></van-action-sheet>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder3" Runat="Server">
    <comloading  v-if="isLoading"></comloading>
  <%--<comback ></comback>--%>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="ContentPlaceHolder4" Runat="Server">
 <script src="Js/Xsck.js?<%=127 %>"></script>
</asp:Content>
H5/Xsck.aspx.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class H5_Scbl : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
    }
}