From 32274bc8fad5251f78229d67d86c234a4b32df2e Mon Sep 17 00:00:00 2001 From: cnf <3200815559@qq.com> Date: 星期四, 11 九月 2025 17:34:32 +0800 Subject: [PATCH] 销售与其他出入库功能挪移 --- H5/Js/Dbck.js | 111 +++++++++++++++++++++++++++++++++++++------------------ 1 files changed, 75 insertions(+), 36 deletions(-) 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 -- Gitblit v1.9.3