From 46de11510807648d990b3ad77354ca556da5893a Mon Sep 17 00:00:00 2001 From: 南骏 池 <chiffly@163.com> Date: 星期四, 04 九月 2025 08:53:27 +0800 Subject: [PATCH] 1.库位变更bug --- H5/Js/Cpbd.js | 91 ++++++++++++--------------------------------- 1 files changed, 25 insertions(+), 66 deletions(-) diff --git a/H5/Js/Cpbd.js b/H5/Js/Cpbd.js index 4880535..bb144f8 100644 --- a/H5/Js/Cpbd.js +++ b/H5/Js/Cpbd.js @@ -28,7 +28,7 @@ var that = this; that.isLoading = true; that.AxiosHttp("post", 'Womdaa/getZsBarInfo', { - Xt: that.GX, + GX: that.GX, Zsbarcode: that.ZsBar }, false) .then(function (res) { @@ -40,6 +40,7 @@ } else { that.$toast.fail(json.message); + that.$playSound('error'); that.$refs.ZsBar.focus(); that.ZsBar = ""; that.ZsBarInfo = []; @@ -50,46 +51,48 @@ .catch(function (error) { that.isLoading = false; that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�"); + that.$playSound('error'); that.$refs.ZsBar.focus(); that.ZsBar = ""; that.ZsBarInfo = []; that.Traceability = []; }); }, - getScan() { + productBinding() { var that = this; - if (that.modeInfo.daa001.length <= 0) { - that.$toast.fail("宸ュ崟鍗曞彿涓嶈兘涓虹┖锛�"); + if (that.ZsBar.length <= 0) { + that.$toast.fail("杩芥函鐮佷笉鑳戒负绌猴紒"); + that.$playSound('error'); return; } - if (that.scanInfo.barcode.length * 1 <= 0) { - that.$toast.fail("鐗╂枡鏉$爜涓嶈兘涓虹┖锛�"); + if (that.LsBar.length <= 0) { + that.$toast.fail("鍚庣洊鐮佷笉鑳戒负绌猴紒"); + that.$playSound('error'); return; } that.isLoading = true; - that.AxiosHttp("post", 'Womdaa/ScanCode', { - daa001: that.modeInfo.daa001, + that.AxiosHttp("post", 'Womdaa/ProductBinding', { + ZsBar: that.ZsBar, + LsBar: that.LsBar, 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.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; + that.$playSound('success'); + that.$refs.ZsBar.focus(); + that.ZsBar = null; + that.LsBar = null; } else { that.$toast.fail(json.message); - that.$refs.barcode.focus(); + that.$playSound('error'); + that.$refs.ZsBar.focus(); + that.ZsBar = null; + that.LsBar = null; } that.isLoading = false; @@ -97,56 +100,12 @@ .catch(function (error) { that.isLoading = false; that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�"); - console.log(error); - that.$refs.barcode.focus(); + that.$playSound('error'); + that.$refs.ZsBar.focus(); + that.ZsBar = null; + that.LsBar = null; }); }, - getChaiFen() { - //this.isPrinterPopupVisible = true; // 鏄剧ず寮圭獥 - - 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.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.$refs.barcode.focus(); - that.getModel(); - } - else { - that.$toast.fail(json.message); - } - that.isLoading = false; - }) - .catch(function (error) { - that.isLoading = false; - that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�"); - console.log(error); - }); - }, - //鎵撳嵃鏈烘敞閲� //selectPrinter(printer) { // this.selectedPrinter = printer.printerId; // 鏇存柊閫変腑鐨勬墦鍗版満缂栧彿 -- Gitblit v1.9.3