cnf
2025-08-14 8ab5e98465199c58454edc579ebae903d162c78b
领料模块
已修改9个文件
已添加3个文件
890 ■■■■ 文件已修改
H5/Dbck.aspx 126 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
H5/Dbrk.aspx 79 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
H5/Js/Dbck.js 111 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
H5/Js/Dbrk.js 34 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
H5/Js/Scbl.js 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
H5/Js/Sccl.js 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
H5/Js/Scllhb.js 357 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
H5/Sccl.aspx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
H5/Scllhb.aspx 142 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
H5/Scllhb.aspx.cs 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Mst.master 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Scripts/config.js 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
H5/Dbck.aspx
@@ -29,18 +29,16 @@
  ><template #button>
    <van-button size="small" type="info" plain @click="getInfo" >选择</van-button>
  </template></van-field>
 <van-field
     ref="barcode"
  value=""
  label="物料条码"
   clearable
 placeholder="请扫码"
     @keyup.enter.native ="getBarcode"
    <%-- @change="getBarcode"--%>
  :right-icon-size="19"
     v-model="barcode"
  v-focus.noKeyboard
></van-field>
                <van-field
                    ref="barcode"
                    v-model="barcode"
                    label="物料条码"
                    clearable
                    placeholder="请扫码"
                    :right-icon-size="19"
                    v-focus.noKeyboard
                    @keyup.enter.native="getScan">
                </van-field>
 <van-field
  value=""
  label="物料编码"
@@ -51,52 +49,72 @@
  v-focus.noKeyboard
     disabled
></van-field>
   <van-field
  value=""
       v-model="num"
  label="数量"
  placeholder="数量"
  disabled
></van-field>
 <van-field
                <van-field
                    v-model="scanInfo.barcodeNum"
                    label="条码数量"
                    placeholder="条码数量"
                    disabled>
                </van-field>
<van-field
    ref="splitNum"
    v-model="scanInfo.splitNum"
    center
    clearable
    v-model="fum"
    label="拆分数量"
    placeholder="拆分数量"
 ><template #button>
    <van-button size="small" type="info" plain @click="tmcf" >条码拆分</van-button>
  </template></van-field>
    label="发料数量"
    placeholder="发料数量">
    <van-button
        slot="button"
        type="info"
        size="small"
        plain
        @click="getChaiFen">
        æ¡ç æ‹†åˆ†
    </van-button>
</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>
          <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="(itm,index) in ItemBlDetail" :key="index">
        <van-col span="12"  class="text-left padding-left">
             <div>{{itm.itemNo}}</div>
             <div>{{itm.itemName}}</div>
        </van-col>
        <van-col span="6">{{itm.fQty}}</van-col>
        <!-- <van-col span="6">{{itm.sQty ?? 0}}</van-col> -->
       <van-col span="6">{{ itm.sQty != null ? itm.sQty : 0 }}</van-col>
  </van-row>
</van-tab>
<%--  <van-tab title="待出物料">
    <van-row v-for="value in ItemBlDetail" class="font">
          <van-col span="12">物料:{{value.itemNo}}</van-col>
          <van-col span="6">计划数{{value.qd007}}</van-col>
          <van-col span="6">完成数{{value.qd008}}</van-col>
    </van-row>
  </van-tab>
</van-tabs>--%>
    </div>
  <van-tabs color="#000" title-active-color="#0283EF">
    <van-tab title="待扫物料" class="mySolid font">
        <van-row>
            <van-col span="8" class="text-left padding-left">物料</van-col>
            <van-col span="8" class="text-left padding-left">规格</van-col>
            <van-col span="3">待扫</van-col>
            <van-col span="5">推荐库位</van-col>
        </van-row>
        <van-row v-for="(itm,index) in ItemDetail.items" :key="index">
            <van-col span="8" class="text-left padding-left">
                <div class="blue-text">{{itm.itemNo}}</div>
                <div>{{itm.itemName}}</div>
            </van-col>
            <van-col span="8" class="text-left padding-left">
                <div>{{itm.itemModel}}</div>
            </van-col>
            <van-col span="3" class="blue-text">{{itm.dsQty}}</van-col>
            <van-col span="5">{{itm.recoKw}}</van-col>
        </van-row>
    </van-tab>
    <van-tab title="已扫物料" class="mySolid font">
        <van-row>
            <van-col span="8" class="text-left padding-left">物料</van-col>
            <van-col span="8" class="text-left padding-left">规格</van-col>
            <van-col span="3">需领数</van-col>
            <van-col span="5">已领数</van-col>
        </van-row>
        <van-row v-for="(itm,index) in ItemDetail.ysitems" :key="index">
            <van-col span="8" class="text-left padding-left">
                <div class="blue-text">{{itm.itemNo}}</div>
                <div>{{itm.itemName}}</div>
            </van-col>
            <van-col span="8" class="text-left padding-left">
                <div>{{itm.itemModel}}</div>
            </van-col>
            <van-col span="3">{{itm.fQty}}</van-col>
            <van-col span="5" class="blue-text">{{itm.sQty}}</van-col>
        </van-row>
    </van-tab>
</van-tabs>
    <van-action-sheet v-model="show" :actions="actions" @select="onSelect" ></van-action-sheet>
</asp:Content>
@@ -105,5 +123,5 @@
  <%--<comback ></comback>--%>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="ContentPlaceHolder4" Runat="Server">
 <script src="Js/Dbck.js?<%=1231 %>"></script>
 <script src="Js/Dbck.js?<%=123111116 %>"></script>
</asp:Content>
H5/Dbrk.aspx
@@ -16,19 +16,6 @@
        ></van-nav-bar>
        <div>
        <van-cell-group>
  <van-field
            ref="billNo"
    value=""
    label="调拨申请"
    clearable
     placeholder="选择/手录"
      @keyup.enter.native ="GetMesItemBlDetailByBillNo"
    :right-icon-size="19"
      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="sectionCode"
    value=""
@@ -62,6 +49,20 @@
     v-model="itemNo"
  v-focus.noKeyboard
></van-field>
             <van-field
           ref="billNo"
   value=""
   label="调拨申请"
   clearable
    placeholder="申请单号"
     @keyup.enter.native ="GetMesItemBlDetailByBillNo"
   :right-icon-size="19"
     v-model="billNo"
    v-focus.noKeyboard
    disabled
 ><%--<template #button>
   <van-button size="small" type="info" plain @click="getInfo" >选择</van-button>
 </template>--%></van-field>
   <van-field
  value=""
       v-model="num"
@@ -73,7 +74,51 @@
</van-cell-group>
    </div>
    <div  class="van-tab-left">
      <van-tabs color="#000" title-active-color="#0283EF">
    <van-tab title="待扫物料" class="mySolid font">
        <van-row>
            <van-col span="8" class="text-left padding-left">物料</van-col>
            <van-col span="7" class="text-left padding-left">规格</van-col>
            <van-col span="3">申请数量</van-col>
            <van-col span="3">扫出数量</van-col>
            <van-col span="3">待入数量</van-col>
        </van-row>
        <van-row v-for="(itm,index) in ItemDetail.items" :key="index">
            <van-col span="8" class="text-left padding-left">
                <div class="blue-text">{{itm.itemNo}}</div>
                <div>{{itm.itemName}}</div>
            </van-col>
            <van-col span="7" class="text-left padding-left">
                <div>{{itm.itemModel}}</div>
            </van-col>
            <van-col span="3" class="blue-text">{{itm.fQty}}</van-col>
            <van-col span="3" class="blue-text">{{itm.sQty}}</van-col>
            <van-col span="3" class="blue-text">{{itm.dsQty}}</van-col>
        </van-row>
    </van-tab>
    <van-tab title="已扫物料" class="mySolid font">
        <van-row>
            <van-col span="8" class="text-left padding-left">物料</van-col>
            <van-col span="8" class="text-left padding-left">规格</van-col>
            <van-col span="3">申请数量</van-col>
            <van-col span="5">已入数量</van-col>
        </van-row>
        <van-row v-for="(itm,index) in ItemDetail.ysitems" :key="index">
            <van-col span="8" class="text-left padding-left">
                <div class="blue-text">{{itm.itemNo}}</div>
                <div>{{itm.itemName}}</div>
            </van-col>
            <van-col span="8" class="text-left padding-left">
                <div>{{itm.itemModel}}</div>
            </van-col>
            <van-col span="3">{{itm.fQty}}</van-col>
            <van-col span="5" class="blue-text">{{itm.rQty}}</van-col>
        </van-row>
    </van-tab>
</van-tabs>
<%--    <div  class="van-tab-left">
              <van-tabs @click="onClick" color="#000" title-active-color="#0283EF" >
<van-tab title="待入物料" class="mySolid font">
    <van-row>
@@ -97,8 +142,8 @@
          <van-col span="6">完成数{{value.qd008}}</van-col>
    </van-row>
  </van-tab>--%>
</van-tabs>
    </div>
<%--</van-tabs>
    </div>--%>
    <van-action-sheet v-model="show" :actions="actions" @select="onSelect" ></van-action-sheet>
</asp:Content>
@@ -107,5 +152,5 @@
  <%--<comback ></comback>--%>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="ContentPlaceHolder4" Runat="Server">
 <script src="Js/Dbrk.js?<%=1141 %>"></script>
 <script src="Js/Dbrk.js?<%=1141112 %>"></script>
</asp:Content>
H5/Js/Dbck.js
@@ -17,6 +17,8 @@
            active: 0,
            show: false,
            actions: [],
            ItemDetail: [],
            scanInfo: { barcodeNum: "", splitNum: "", barcode: "" },
        }
    },
    mounted() {
@@ -43,18 +45,21 @@
                            that.$toast.fail("没有找到可以选择的出库单号");
                        }
                        that.actions = json.data.tbBillList.map(item => {
                            return { name: item }
                        });
                    }
                    else {
                        that.$toast.fail(json.message);
                        that.$playSound('error');
                    }
                    that.isLoading = false;
                })
                .catch(function (error) {
                    that.isLoading = false;
                    that.$toast.fail("网络错误,请重试!");
                    that.$playSound('error');
                    console.log(error);
                });
        },
@@ -82,28 +87,31 @@
                .then(function (res) {
                    var json = res;
                    if (json.status == 0) {
                        that.ItemBlDetail = json.data.tbBillList;
                        that.ItemDetail = json.data.tbBillList;
                        that.$playSound('success');
                        that.$refs.barcode.focus();
                        that.barcode = "";
                    }
                    else {
                        that.$toast.fail(json.message);
                        that.$playSound('error');
                        that.$refs.billNo.focus();
                        that.billNo = "";
                        that.ItemBlDetail = null;
                        that.ItemDetail = null;
                    }
                    that.isLoading = false;
                })
                .catch(function (error) {
                    that.isLoading = false;
                    that.$toast.fail("网络错误,请重试!");
                    that.$playSound('error');
                    that.$refs.billNo.focus();
                    that.billNo = "";
                    that.ItemBlDetail = null;
                    //console.log(error);
                });
        },
        getBarcode() {
        getScan() {
            //this.barcode = value;
@@ -112,18 +120,21 @@
            if (!that.userInfo.loginAccount) {
                this.$toast.fail("请重新检查登录状态");
                that.$playSound('error');
                that.isLoading = false;
                return;
            }
            if (!that.barcode) {
                this.$toast.fail("条码不能为空");
                that.$playSound('error');
                that.isLoading = false;
                return;
            }
            if (!that.billNo) {
                this.$toast.fail("申请单号不能为空");
                that.$playSound('error');
                that.isLoading = false;
                return;
            }
@@ -137,18 +148,28 @@
                    var json = res;
                    if (json.status == 0) {
                        that.itemNo = json.data.form.itemNo;
                        //that.num = json.data.form.num;
                        //that.fum = json.data.form.fum;
                        that.ItemBlDetail = json.data.items
                        //that.itemNo = json.data.tbBillList.itemNo;
                        ////that.num = json.data.form.num;
                        ////that.fum = json.data.form.fum;
                        //that.ItemBlDetail = json.data.items
                        that.$notify({ type: 'success', message: '扫码成功' });
                        that.$playSound('success');
                        that.$refs.barcode.focus();
                        that.barcode = "";
                        //that.GetMesItemBlDetailByBillNo();
                        that.GetMesItemBlDetailByBillNo();
                    }
                    else if (json.status == 2) {
                        that.itemNo = json.data.tbBillList.itemNo;
                        that.$playSound('error');
                        that.$refs.splitNum.focus();
                        that.scanInfo.splitNum = json.data.tbBillList.splitNum;
                        that.scanInfo.barcodeNum = json.data.tbBillList.barcodeNum;
                    }
                    else {
                        that.$toast.fail(json.message);
                        that.$playSound('error');
                        that.$refs.barcode.focus();
                        that.barcode = "";
                    }
@@ -157,62 +178,80 @@
                .catch(function (error) {
                    that.isLoading = false;
                    that.$toast.fail("网络错误,请重试!");
                    that.$playSound('error');
                    //console.log(error);
                    that.$refs.barcode.focus();
                    that.barcode = "";
                });
        },
        tmcf() {
        getChaiFen() {
            //this.isPrinterPopupVisible = true; // æ˜¾ç¤ºå¼¹çª—
            if (this.isLoading) {
                return;
            }
            var that = this;
            if (!that.userInfo.loginAccount) {
                this.$toast.fail("请重新检查登录状态");
            if (that.billNo.length <= 0) {
                that.$toast.fail("申请单号不能为空!");
                that.$playSound('error');
                return;
            }
            if (that.scanInfo.splitNum * 1 <= 0) {
                that.$toast.fail("拆分数量不能为空!");
                that.$playSound('error');
                return;
            }
            if (that.barcode.length * 1 <= 0) {
                that.$toast.fail("物料条码不能为空!");
                that.$playSound('error');
                return;
            }
            //that.ip = "";
            //that.prot = "";
            //that.getPrintInfo();
            if (!that.barcode) {
                this.$toast.fail("条码不能为空");
                return;
            }
            if (!that.billNo) {
                this.$toast.fail("申请单号不能为空");
                return;
            }
            if (!that.fum) {
                this.$toast.fail("拆分数不能为空");
                return;
            }
            //if (that.ip.length <= 0 || that.prot.length <= 0) {
            //    alert(that.ip);
            //    alert(that.prot);
            //    return;
            //}
            that.isLoading = true;
            that.AxiosHttp("post", 'TransferOut/SplitBarcode', {
            that.AxiosHttp("post", 'TransferOut/ScanCodeCF', {
                daa001: that.billNo,
                userName: that.userInfo.loginAccount,
                barcode: that.barcode,
                billNo: that.billNo,
                fum: that.fum
                Num: that.scanInfo.splitNum,
            }, false)
                .then(function (res) {
                    var json = res;
                    if (json.status == 0) {
                        //  that.modeInfo = json.data.tbBillList;
                        that.scanInfo.splitNum = null;
                        that.scanInfo.barcodeNum = null;
                        that.scanInfo.barcode = null;
                        that.$notify({ type: 'success', message: json.message });
                        that.$playSound('success');
                        that.itemNo = json.data.form.itemNo;
                        that.num = json.data.form.num;
                        that.barcode = json.data.form.barcode;
                        that.fum = json.data.form.fum;
                        that.ItemBlDetail = json.data.items
                        that.$notify({ type: 'success', message: '扫码成功' });
                        that.sendPrintMessage(json.data.tbBillList);
                        that.$refs.barcode.focus();
                        that.barcode = "";
                        //that.GetMesItemBlDetailByBillNo();
                        that.GetMesItemBlDetailByBillNo();
                    }
                    else {
                        that.$toast.fail(json.message);
                        that.$playSound('error');
                    }
                    that.isLoading = false;
                })
                .catch(function (error) {
                    that.isLoading = false;
                    that.$toast.fail("网络错误,请重试!");
                    console.log(error);
                    that.$playSound('error');
                });
        }
        },
    }
})
H5/Js/Dbrk.js
@@ -17,6 +17,7 @@
            active: 0,
            show: false,
            actions: [],
            ItemDetail: [],
        }
    },
    mounted() {
@@ -49,12 +50,14 @@
                    }
                    else {
                        that.$toast.fail(json.message);
                        that.$playSound('error');
                    }
                    that.isLoading = false;
                })
                .catch(function (error) {
                    that.isLoading = false;
                    that.$toast.fail("网络错误,请重试!");
                    that.$playSound('error');
                    console.log(error);
                });
        },
@@ -76,18 +79,21 @@
        GetMesItemBlDetailByBillNo() {
            var that = this;
            that.isLoading = true;
            that.AxiosHttp("post", 'TransferOut/GetTransferOutDetailListByBillNo', {
            that.AxiosHttp("post", 'TransferOut/GetTransferInDetailListByBillNo', {
                billNo: that.billNo
            }, false)
                .then(function (res) {
                    var json = res;
                    if (json.status == 0) {
                        that.ItemBlDetail = json.data.tbBillList;
                        //that.ItemBlDetail = json.data.tbBillList;
                        that.ItemDetail = json.data.tbBillList;
                        that.$playSound('success');
                        that.$refs.sectionCode.focus();
                        that.sectionCode = "";
                    }
                    else {
                        that.$toast.fail(json.message);
                        that.$playSound('error');
                        that.$refs.billNo.focus();
                        that.billNo = "";
                        that.ItemBlDetail = null;
@@ -97,6 +103,7 @@
                .catch(function (error) {
                    that.isLoading = false;
                    that.$toast.fail("网络错误,请重试!");
                    that.$playSound('error');
                    that.$refs.billNo.focus();
                    that.billNo = "";
                    that.ItemBlDetail = null;
@@ -110,6 +117,7 @@
            if (that.sectionCode.length == 0) {
                this.$toast.fail("库位编码不能为空");
                that.$playSound('error');
                return;
            }
@@ -122,11 +130,13 @@
                    var json = res;
                    if (json.status == 0) {
                        that.$notify({ type: 'success', message: json.data.tbBillList });
                        that.$playSound('success');
                        that.$refs.barcode.focus();
                        that.barcode = "";
                    }
                    else {
                        that.$toast.fail(json.message);
                        that.$playSound('error');
                        that.$refs.sectionCode.focus();
                        that.sectionCode = "";
@@ -135,6 +145,7 @@
                .catch(function (error) {
                    that.isLoading = false;
                    that.$toast.fail("网络错误,请重试!");
                    that.$playSound('error');
                    //console.log(error);
                    that.$refs.sectionCode.focus();
                    that.sectionCode = "";
@@ -149,27 +160,30 @@
            if (!that.userInfo.loginAccount) {
                this.$toast.fail("请重新检查登录状态");
                that.$playSound('error');
                that.isLoading = false;
                return;
            }
            if (!that.sectionCode) {
                this.$toast.fail("库位不能为空");
                that.$playSound('error');
                that.isLoading = false;
                return;
            }
            if (!that.barcode) {
                this.$toast.fail("条码不能为空");
                that.$playSound('error');
                that.isLoading = false;
                return;
            }
            if (!that.billNo) {
                this.$toast.fail("申请单号不能为空");
                that.isLoading = false;
                return;
            }
            //if (!that.billNo) {
            //    this.$toast.fail("申请单号不能为空");
            //    that.isLoading = false;
            //    return;
            //}
            that.AxiosHttp("post", 'TransferOut/ScanReceiveBarcode', {
                userName: that.userInfo.loginAccount,
@@ -186,12 +200,15 @@
                        //that.barcode = json.data.form.barcode;
                        that.ItemBlDetail = json.data.items
                        that.$notify({ type: 'success', message: '扫码成功' });
                        that.$playSound('success');
                        that.$refs.barcode.focus();
                        that.barcode = "";
                        //that.GetMesItemBlDetailByBillNo();
                        that.billNo = json.data.form.billNo;
                        that.GetMesItemBlDetailByBillNo();
                    }
                    else {
                        that.$toast.fail(json.message);
                        that.$playSound('error');
                        that.$refs.barcode.focus();
                        that.barcode = "";
                    }
@@ -200,6 +217,7 @@
                .catch(function (error) {
                    that.isLoading = false;
                    that.$toast.fail("网络错误,请重试!");
                    that.$playSound('error');
                    //console.log(error);
                    that.$refs.barcode.focus();
                    that.barcode = "";
H5/Js/Scbl.js
@@ -169,12 +169,14 @@
                        
                    } else if (json.status == 2) {
                        that.$playSound('error');
                        that.$refs.splitNum.focus();
                        that.splitNum = json.data.cfNum;
                        that.num = json.data.num;
                    }
                    else {
                        that.$toast.fail(json.message);
                        that.$playSound('error');
                        that.$refs.barcode.focus();
                        that.barcode = "";
                        that.num = "";
@@ -184,6 +186,7 @@
                })
                .catch(function (error) {
                    that.isLoading = false;
                    that.$playSound('error');
                    that.$toast.fail("网络错误,请重试!");
                    //console.log(error);
                    that.$refs.barcode.focus();
H5/Js/Sccl.js
@@ -75,7 +75,7 @@
        GetMesItemBlDetailByBillNo() {
            var that = this;
            that.isLoading = true;
            that.AxiosHttp("post", 'MesItemBl/GetMesItemBlDetailBySccBillNo', {
            that.AxiosHttp("post", 'MesItemBl/GetMesItemBlDetailByBillNo', {
                billNo: that.billNo,
                type:"生产超领"
            }, false)
@@ -128,11 +128,12 @@
            }
            that.AxiosHttp("post", 'MesItemBl/ScanBarcodeForOverPicking', {
            that.AxiosHttp("post", 'MesItemBl/ScblScanBarcode', {
                userName: that.userInfo.loginAccount,
                barcode: that.barcode,
                blNo: that.billNo,
                billNo: that.daa001
                billNo: that.daa001,
                type: "生产超领"
            }, false)
                .then(function (res) {
                    var json = res;
@@ -191,12 +192,13 @@
                return;
            }
            that.AxiosHttp("post", 'MesItemBl/PrintBarcodeForOverPicking', {
            that.AxiosHttp("post", 'MesItemBl/SplitBarcode', {
                userName: that.userInfo.loginAccount,
                barcode: that.barcode,
                blNo: that.billNo,
                billNo: that.daa001,
                num: that.sms
                num: that.sms,
                type: "生产超领"
            }, false)
                .then(function (res) {
                    var json = res;
H5/Js/Scllhb.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,357 @@
var vm = new Vue({
    el: '#app',
    data: function () {
        return {
            isLoading: false,
            userInfo: {
                "loginGuid": '',
                "loginAccount": '',
            },
            modeInfo: { daa001: "", planNo: "" },
            scanInfo: { barcodeNum: "", splitNum: "", barcode: "" },
            ItemDetail: [],
            ip: "",
            port: "",
            oldBarInfo: [],
            cfBarInfo: [],
            selectKey: "",//查询关键字
            actions: [],//列表的值
            show: false,//列表展示
            //isPrinterPopupVisible: false, // æŽ§åˆ¶å¼¹çª—显示/隐藏
            //selectedPrinter: '', // å½“前选择的打印机编号
            //printerList: [
            //    { printerId: 'Printer1', ipAddress: '192.168.1.1' },
            //    { printerId: 'Printer2', ipAddress: '192.168.1.2' },
            //    { printerId: 'Printer3', ipAddress: '192.168.1.3' }
            //], // æ‰“印机列表
        }
    },
    mounted() {
        var that = this;
        this.userInfo = {
            loginGuid: this.GetLoginInfor().loginGuid,
            loginAccount: this.GetLoginInfor().loginAccount,
        };
    },
    methods: {
        getModel() {
            var that = this;
            that.isLoading = true;
            that.AxiosHttp("post", 'Womdaa/GetItemsByDaa001', {
                daa001: that.modeInfo.daa001,
                userName: that.userInfo.loginAccount
            }, false)
                .then(function (res) {
                    var json = res;
                    if (json.status == 0) {
                        console.log(json)
                        that.ItemDetail = json.data.tbBillList;
                        that.modeInfo.planNo = json.data.tbBillList.planNo;
                        that.$refs.barcode.focus();
                    }
                    else {
                        that.$toast.fail(json.message);
                        that.$refs.daa001.focus();
                        that.modeInfo.daa001 = "";
                        that.modeInfo.planNo = "";
                        that.ItemDetail = [];
                    }
                    that.isLoading = false;
                })
                .catch(function (error) {
                    that.isLoading = false;
                    that.$toast.fail("网络错误,请重试!");
                    console.log(error);
                    that.$refs.daa001.focus();
                    that.modeInfo.daa001 = "";
                });
        },
        getScan() {
            if (this.isLoading) {
                return;
            }
            var that = this;
            if (that.modeInfo.daa001.length <= 0) {
                that.$toast.fail("工单单号不能为空!");
                return;
            }
            if (that.scanInfo.barcode.length * 1 <= 0) {
                that.$toast.fail("物料条码不能为空!");
                return;
            }
            that.isLoading = true;
            that.AxiosHttp("post", 'Womdaa/ScanCode', {
                daa001: that.modeInfo.daa001,
                userName: that.userInfo.loginAccount,
                barcode: that.scanInfo.barcode,
            }, false)
                .then(function (res) {
                    var json = res;
                    if (json.status == 0) {
                        // that.scanInfo = json.data.tbBillList;
                        that.$notify({ type: 'success', message: json.message });
                        that.$playSound('success');
                        that.getModel();
                        that.$refs.barcode.focus();
                        that.scanInfo.barcode = null;
                    }
                    else if (json.status == 2) {
                        that.$refs.splitNum.focus();
                        that.scanInfo.splitNum = json.data.tbBillList.splitNum;
                        that.scanInfo.barcodeNum = json.data.tbBillList.barcodeNum;
                    }
                    else {
                        that.$toast.fail(json.message);
                        that.$playSound('error');
                        that.$refs.barcode.focus();
                    }
                    that.isLoading = false;
                })
                .catch(function (error) {
                    that.isLoading = false;
                    that.$toast.fail("网络错误,请重试!");
                    that.$playSound('error');
                    that.$refs.barcode.focus();
                });
        },
        getChaiFen() {
            //this.isPrinterPopupVisible = true; // æ˜¾ç¤ºå¼¹çª—
            if (this.isLoading) {
                return;
            }
            var that = this;
            if (that.modeInfo.daa001.length <= 0) {
                that.$toast.fail("工单单号不能为空!");
                return;
            }
            if (that.scanInfo.splitNum * 1 <= 0) {
                that.$toast.fail("拆分数量不能为空!");
                return;
            }
            if (that.scanInfo.barcode.length * 1 <= 0) {
                that.$toast.fail("物料条码不能为空!");
                return;
            }
            //that.ip = "";
            //that.prot = "";
            //that.getPrintInfo();
            //if (that.ip.length <= 0 || that.prot.length <= 0) {
            //    alert(that.ip);
            //    alert(that.prot);
            //    return;
            //}
            that.isLoading = true;
            that.AxiosHttp("post", 'Womdaa/ScanCodeCF', {
                daa001: that.modeInfo.daa001,
                userName: that.userInfo.loginAccount,
                barcode: that.scanInfo.barcode,
                Num: that.scanInfo.splitNum,
            }, false)
                .then(function (res) {
                    var json = res;
                    if (json.status == 0) {
                        //  that.modeInfo = json.data.tbBillList;
                        that.scanInfo.splitNum = null;
                        that.scanInfo.barcodeNum = null;
                        that.scanInfo.barcode = null;
                        that.$notify({ type: 'success', message: json.message });
                        that.$playSound('success');
                        //that.sendMessage(json.data.tbBillList);
                        that.$refs.barcode.focus();
                        that.getModel();
                    }
                    else {
                        that.$toast.fail(json.message);
                        that.$playSound('error');
                    }
                    that.isLoading = false;
                })
                .catch(function (error) {
                    that.isLoading = false;
                    that.$toast.fail("网络错误,请重试!");
                    that.$playSound('error');
                });
        },
        sendMessage(tbBillList) {
            const cfDetails = tbBillList.cfBarInfo.map(item => {
                return "! 0 200 200 210 1\r\n" +
                    "PAGE - WIDTH 700 \r\n" +
                    "BOX 0 0 700 180 0 \r\n" +
                    `T 16 0 10 10 ç‰©æ–™ç¼–码:\r\n` +
                    `T 55 3 120 10 ${item.iteM_NO}\r\n` +
                    `T 16 0 310 10 ${item.item_name}\r\n` +
                    "T 55 2 10 42 ç‰©æ–™è§„格:\r\n" +
                    `T 55 2 110 42 ${item.item_model}\r\n` +
                    "T 16 0 10 78 æ•°é‡ï¼š\r\n" +
                    `T 0 5 90 78 ${item.quantity}\r\n` +
                    `T 16 5 180 78 ${item.barType}\r\n` +
                    `BARCODE 128 1 25 35 350 130 ${item.iteM_BARCODE}\r\n` +
                    `T 0 1 350 130 ${item.iteM_BARCODE}\r\n` +
                    "T 55 0 10 125 åˆ›å»ºæ—¶é—´ï¼š\r\n" +
                    `T 55 0 120 125 ${item.creatE_DATE}\r\n` +
                    "T 55 0 10 150 æ‰“印时间:\r\n" +
                    `T 55 0 120 150 ${item.print_date}\r\n` +
                    "B QR 580 12 M 2 U 4\r\n" +
                    `MA,${item.iteM_BARCODE}\r\n` +
                    "ENDQR\r\nFORM\r\nPRINT\r\n";
            });
            //alert(cfDetails);
            let sendData = {
                Type: 'Bar',
                Barcode: tbBillList.cfBarInfo[0].iteM_BARCODE,
                Detail: cfDetails,
                Ip: tbBillList.printInfo[0].ip,
                Port: tbBillList.printInfo[0].port,
            }
            console.log('sendMessage å¼€å§‹1:')
            console.log('sendMessage å¼€å§‹2:' + JSON.stringify(sendData))
            uni.webView.postMessage({
                data: JSON.stringify(sendData)
            })
        },
        //getPrintInfo() {
        //    var that = this;
        //    that.AxiosHttp("post", 'MesPrint/getPrintInfo', {
        //        userName: that.userInfo.loginAccount,
        //    }, false)
        //        .then(function (res) {
        //            var json = res;
        //            if (json.status == 0) {
        //                alert(json.data.tbBillList[0].port);
        //                alert(json.data.tbBillList[0].ip);
        //                that.port = json.data.tbBillList[0].port;
        //                that.ip = json.data.tbBillList[0].ip;
        //            }
        //            else {
        //                that.$toast.fail(json.message);
        //                that.$playSound('error');
        //            }
        //            that.isLoading = false;
        //        })
        //        .catch(function (error) {
        //            that.isLoading = false;
        //            that.$toast.fail("网络错误,请重试!");
        //        });
        //},
        //printCfBar(cfBar) {
        //    var that = this;
        //    that.AxiosHttp("post", 'MesPrint/getCfInfo', {
        //        userName: that.userInfo.loginAccount,
        //        cfBar: cfBar,
        //        oldBar: that.scanInfo.barcode
        //    }, false)
        //        .then(function (res) {
        //            var json = res;
        //            if (json.status == 0) {
        //                that.$notify({ type: 'success', message: '打印请求已发送' });
        //                that.$playSound('success');
        //            }
        //            else {
        //                that.$toast.fail(json.message);
        //                that.$playSound('error');
        //            }
        //            that.isLoading = false;
        //        })
        //        .catch(function (error) {
        //            that.isLoading = false;
        //            that.$toast.fail("打印服务异常:" + error.message);
        //            that.$playSound('error');
        //        });
        //},
        //打印机注释
        //selectPrinter(printer) {
        //    this.selectedPrinter = printer.printerId; // æ›´æ–°é€‰ä¸­çš„æ‰“印机编号
        //},
        //confirmSelection() {
        //    if (this.selectedPrinter) {
        //        alert(`您选择了打印机:${this.selectedPrinter}`);
        //        // åœ¨è¿™é‡Œå¤„理选择结果,例如调用接口或更新状态
        //        this.isPrinterPopupVisible = false; // å…³é—­å¼¹çª—
        //    } else {
        //        alert('请选择一个打印机!');
        //    }
        //},
        //onPrinterSelected(value) {
        //    console.log('当前选中的打印机编号:', value);
        //},
        //获取工单信息
        getInfo() {
            this.show = true;
            var that = this;
            that.actions = [];
            that.isLoading = true;
            that.AxiosHttp("post", 'Womdaahb/GetXcslDaa', {
                selectKey: that.selectKey,
            }, false)
                .then(function (res) {
                    var json = res;
                    if (json.status == 0) {
                        if (json.data.tbBillList.length <= 0) {
                            that.$toast.fail("没有可用的数据");
                            that.$playSound('error');
                        } else {
                            that.itemInfo = json.data.tbBillList;
                            that.actions = json.data.tbBillList.map(item => {
                                return {
                                    name: item.daaInfo  // æ‹¼æŽ¥å­—段
                                };
                            });
                        }
                    }
                    else {
                        that.$toast.fail(json.message);
                        that.$playSound('error');
                    }
                    that.isLoading = false;
                })
                .catch(function (error) {
                    that.isLoading = false;
                    that.$toast.fail("网络错误,请重试!");
                    that.$playSound('error');
                    console.log(error);
                });
        },
        onSelect(item) {
            // é»˜è®¤æƒ…况下点击选项时不会自动收起
            // å¯ä»¥é€šè¿‡ close-on-click-action å±žæ€§å¼€å¯è‡ªåŠ¨æ”¶èµ·
            this.show = false;
            console.log(item);
            // æ­£åˆ™åŒ¹é…ç¬¬ä¸€ä¸ªæ–¹æ‹¬å·å†…容
            const regex = /\[([^\]]+)\]/;
            const matchResult = item.name.match(regex);
            if (matchResult && matchResult[1]) {
                this.modeInfo.daa001 = matchResult[1]; // PPBOM00000088-1
                console.log('提取的DAA001:', this.modeInfo.daa001);
            } else {
                this.$toast.fail('工单号格式异常');
                this.modeInfo.daa001 = '';
            }
            this.getModel();
            //this.$toast(item.name);
        },
    }
})
H5/Sccl.aspx
@@ -86,5 +86,5 @@
    <%--<comback ></comback>--%>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="ContentPlaceHolder4" Runat="Server">
    <script src="Js/Sccl.js?<%=12322 %>"></script>
    <script src="Js/Sccl.js?<%=12324 %>"></script>
</asp:Content>
H5/Scllhb.aspx
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,142 @@
<%@ Page Title="生产领料" Language="C#" MasterPageFile="~/Mst.master" AutoEventWireup="true" CodeFile="Scllhb.aspx.cs" Inherits="H5_Scll" %>
<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">
    <div class="content-wrapper">
        <van-nav-bar
            title="生产备料合并"
            left-text="返回"
            left-arrow
            @click-left="GoBack()">
        </van-nav-bar>
        <div class="mySolid">
            <van-cell-group>
                <van-field
                    ref ="selectKey"
                value=""
                label="合并工单查询"
                clearable
                    placeholder="请输入合并工单号进行查询"
                :right-icon-size="19"
                    v-model="selectKey"
                ><template #button>
                <van-button size="small" type="info" plain @click="getInfo" >选择</van-button>
                </template></van-field>
                <van-field
                    ref="daa001"
                    v-model="modeInfo.daa001"
                    label="工单单号"
                    clearable
                    placeholder="请扫码"
                    :right-icon-size="19"
                    v-focus.noKeyboard
                    @keyup.enter.native="getModel"
                    autofocus="true">
                </van-field>
                <van-field
                    v-model="modeInfo.planNo"
                    label="任务单号"
                    clearable
                    :right-icon-size="19"
                    placeholder="任务单号"
                    disabled>
                </van-field>
                <van-field
                    ref="barcode"
                    v-model="scanInfo.barcode"
                    label="物料条码"
                    clearable
                    placeholder="请扫码"
                    :right-icon-size="19"
                    v-focus.noKeyboard
                    @keyup.enter.native="getScan">
                </van-field>
                <van-field
                    v-model="scanInfo.barcodeNum"
                    label="条码数量"
                    placeholder="条码数量"
                    disabled>
                </van-field>
                <van-field
                    ref="splitNum"
                    v-model="scanInfo.splitNum"
                    center
                    clearable
                    label="发料数量"
                    placeholder="发料数量">
                    <van-button
                        slot="button"
                        type="info"
                        size="small"
                        plain
                        @click="getChaiFen">
                        æ¡ç æ‹†åˆ†
                    </van-button>
                </van-field>
            </van-cell-group>
        </div>
       <van-action-sheet v-model="show" :actions="actions" @select="onSelect" ></van-action-sheet>
        <van-tabs color="#000" title-active-color="#0283EF">
            <van-tab title="待扫物料" class="mySolid font">
                <van-row>
                    <van-col span="8" class="text-left padding-left">物料</van-col>
                    <van-col span="8" class="text-left padding-left">规格</van-col>
                    <van-col span="3">待扫</van-col>
                    <van-col span="5">推荐库位</van-col>
                </van-row>
                <van-row v-for="(itm,index) in ItemDetail.items" :key="index">
                    <van-col span="8" class="text-left padding-left">
                        <div class="blue-text">{{itm.itemNo}}</div>
                        <div>{{itm.itemName}}</div>
                    </van-col>
                    <van-col span="8" class="text-left padding-left">
                        <div>{{itm.itemModel}}</div>
                    </van-col>
                    <van-col span="3" class="blue-text">{{itm.dsQty}}</van-col>
                    <van-col span="5">{{itm.recoKw}}</van-col>
                </van-row>
            </van-tab>
            <van-tab title="已扫物料" class="mySolid font">
                <van-row>
                    <van-col span="8" class="text-left padding-left">物料</van-col>
                    <van-col span="8" class="text-left padding-left">规格</van-col>
                    <van-col span="3">需领数</van-col>
                    <van-col span="5">已领数</van-col>
                </van-row>
                <van-row v-for="(itm,index) in ItemDetail.ysitems" :key="index">
                    <van-col span="8" class="text-left padding-left">
                        <div class="blue-text">{{itm.itemNo}}</div>
                        <div>{{itm.itemName}}</div>
                    </van-col>
                    <van-col span="8" class="text-left padding-left">
                        <div>{{itm.itemModel}}</div>
                    </van-col>
                    <van-col span="3">{{itm.fQty}}</van-col>
                    <van-col span="5" class="blue-text">{{itm.sQty}}</van-col>
                </van-row>
            </van-tab>
        </van-tabs>
    </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder3" Runat="Server">
    <comloading v-if="isLoading"></comloading>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="ContentPlaceHolder4" Runat="Server">
    <script src="Js/Scll.js?<%=123336162 %>"></script>
</asp:Content>
H5/Scllhb.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_Scll : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
    }
}
Mst.master
@@ -11,7 +11,7 @@
    <script src="/Scripts/vue.min.js"></script>
    <script src="/Scripts/js.cookie.min.js"></script>
    <script src="/scripts/axios0.25.0.js"></script>
    <script src="/scripts/config.js?<%=123611129 %>"></script>
    <script src="/scripts/config.js?<%=123611130 %>"></script>
   <!-- <script src="/scripts/config.js?<%=DateTime.Now.Ticks %>"></script>-->
    <link href="/scripts/vant/vant.css" rel="stylesheet" />
    <script src="/scripts/vant/vant.js"></script>
Scripts/config.js
@@ -1,8 +1,8 @@
/*var APIURL = "http://192.168.1.187:8083/api/";*///后端发布测试地址
//var APIURL = "http://localhost:5204/api/";
var APIURL_PC = "http://192.168.1.187:81/"; //PC后端的地址
var APIURL = "http://192.168.1.187:83/api/";
//var APIURL_PC = "http://116.148.211.203:8081/";//
var APIURL = "http://localhost:5204/api/";
//var APIURL_PC = "http://192.168.1.187:81/"; //PC后端的地址
//var APIURL = "http://192.168.1.187:83/api/";
var APIURL_PC = "http://116.148.211.203:8081/";//
var APIURL_IMAGE = APIURL_PC+"upload/";
var ISNEEDLOGIN = true;
String.prototype.trim = function () {