From 8ab5e98465199c58454edc579ebae903d162c78b Mon Sep 17 00:00:00 2001 From: cnf <3200815559@qq.com> Date: 星期四, 14 八月 2025 17:36:02 +0800 Subject: [PATCH] 领料模块 --- H5/Js/Scbl.js | 3 Scripts/config.js | 8 H5/Dbck.aspx | 126 ++++--- H5/Dbrk.aspx | 79 ++++- H5/Js/Scllhb.js | 357 +++++++++++++++++++++++ H5/Js/Dbrk.js | 34 + H5/Sccl.aspx | 2 H5/Js/Dbck.js | 111 +++++-- Mst.master | 2 H5/Js/Sccl.js | 12 H5/Scllhb.aspx | 142 +++++++++ H5/Scllhb.aspx.cs | 14 12 files changed, 764 insertions(+), 126 deletions(-) diff --git a/H5/Dbck.aspx b/H5/Dbck.aspx index 6b5b081..502d461 100644 --- a/H5/Dbck.aspx +++ b/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> diff --git a/H5/Dbrk.aspx b/H5/Dbrk.aspx index 9c82514..911eaea 100644 --- a/H5/Dbrk.aspx +++ b/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> diff --git a/H5/Js/Dbck.js b/H5/Js/Dbck.js index 4a5a8c4..930b51a 100644 --- a/H5/Js/Dbck.js +++ b/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'); }); - } + }, } }) \ No newline at end of file diff --git a/H5/Js/Dbrk.js b/H5/Js/Dbrk.js index cb8a307..2047c93 100644 --- a/H5/Js/Dbrk.js +++ b/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 = ""; diff --git a/H5/Js/Scbl.js b/H5/Js/Scbl.js index 5f3725d..78c3b87 100644 --- a/H5/Js/Scbl.js +++ b/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(); diff --git a/H5/Js/Sccl.js b/H5/Js/Sccl.js index d0a1120..9e0cad8 100644 --- a/H5/Js/Sccl.js +++ b/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; diff --git a/H5/Js/Scllhb.js b/H5/Js/Scllhb.js new file mode 100644 index 0000000..455932c --- /dev/null +++ b/H5/Js/Scllhb.js @@ -0,0 +1,357 @@ +锘縱ar 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}`); + // // 鍦ㄨ繖閲屽鐞嗛�夋嫨缁撴灉锛屼緥濡傝皟鐢ㄦ帴鍙f垨鏇存柊鐘舵�� + // 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); + // 姝e垯鍖归厤绗竴涓柟鎷彿鍐呭 + const regex = /\[([^\]]+)\]/; + const matchResult = item.name.match(regex); + + if (matchResult && matchResult[1]) { + this.modeInfo.daa001 = matchResult[1]; // PPBOM00000088-1 + console.log('鎻愬彇鐨凞AA001:', this.modeInfo.daa001); + } else { + this.$toast.fail('宸ュ崟鍙锋牸寮忓紓甯�'); + this.modeInfo.daa001 = ''; + } + this.getModel(); + //this.$toast(item.name); + + }, + } +}) \ No newline at end of file diff --git a/H5/Sccl.aspx b/H5/Sccl.aspx index 539231e..fe1fd6c 100644 --- a/H5/Sccl.aspx +++ b/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> diff --git a/H5/Scllhb.aspx b/H5/Scllhb.aspx new file mode 100644 index 0000000..fd67a19 --- /dev/null +++ b/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> \ No newline at end of file diff --git a/H5/Scllhb.aspx.cs b/H5/Scllhb.aspx.cs new file mode 100644 index 0000000..f11cc1f --- /dev/null +++ b/H5/Scllhb.aspx.cs @@ -0,0 +1,14 @@ +锘縰sing 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) + { + + } +} \ No newline at end of file diff --git a/Mst.master b/Mst.master index 0879cbb..a82a064 100644 --- a/Mst.master +++ b/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> diff --git a/Scripts/config.js b/Scripts/config.js index 3a79a61..a046842 100644 --- a/Scripts/config.js +++ b/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 () { -- Gitblit v1.9.3