From 7ae27d18e908f643d873b5312bf88df5cfdb7503 Mon Sep 17 00:00:00 2001 From: 南骏 池 <chiffly@163.com> Date: 星期五, 05 九月 2025 08:17:14 +0800 Subject: [PATCH] 1.其他出库拆分+制单人 2.生产领料加开工时间 --- H5/Js/Qtck.js | 133 +++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 123 insertions(+), 10 deletions(-) diff --git a/H5/Js/Qtck.js b/H5/Js/Qtck.js index 3666b7b..dc0552c 100644 --- a/H5/Js/Qtck.js +++ b/H5/Js/Qtck.js @@ -17,6 +17,9 @@ active: 0, show: false, actions: [], + ItemDetail: [], + splitNum: "", + zdy: "", } }, mounted() { @@ -40,6 +43,7 @@ if (json.status == 0) { if (json.data.tbBillList.length <= 0) { that.$toast.fail("娌℃湁鍙敤鐨勬暟鎹�"); + that.$playSound('error'); } else { that.actions = json.data.tbBillList.map(item => { return { name: item } @@ -48,12 +52,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); }); }, @@ -82,21 +88,29 @@ .then(function (res) { var json = res; if (json.status == 0) { - that.ItemBlDetail = json.data.tbBillList; + that.ItemDetail = json.data.tbBillList; + that.zdy = json.data.tbBillList.allList[0].createNmae; + //that.ItemBlDetail = json.data.tbBillList; + that.$refs.barcode.focus(); + that.barcode = ""; } 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); }); }, getBarcode() { - + if (this.isLoading) { + return; + } //this.barcode = value; var that = this; @@ -104,18 +118,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; } @@ -128,55 +145,72 @@ .then(function (res) { var json = res; if (json.status == 0) { - - that.itemNo = json.data.form.itemNo; - that.num = json.data.form.num; - that.fnm = json.data.form.fum; - that.barcode = json.data.form.barcode; - that.ItemBlDetail = json.data.item - that.$notify({ type: 'success', message: json.data.message }); + that.num = json.data.tbBillList.barcodeNum; + that.GetMesItemBlDetailByBillNo(); + that.$refs.barcode.focus(); + that.barcode = null; + that.$playSound('success'); + that.$notify({ type: 'success', message: json.message }); + } + else if (json.status == 2) { + that.$refs.splitNum.focus(); + that.splitNum = json.data.tbBillList.splitNum; + that.num = json.data.tbBillList.barcodeNum; } else { + that.$playSound('error'); that.$toast.fail(json.message); + that.$refs.barcode.focus(); + that.barcode = null; } that.isLoading = false; }) .catch(function (error) { that.isLoading = false; that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�"); + that.$playSound('error'); console.log(error); }); }, tmcf() { + if (this.isLoading) { + return; + } + var that = this; that.isLoading = true; 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; } if (!that.fnm) { this.$toast.fail("鍙戞枡鏁伴噺涓嶈兘涓虹┖"); + that.$playSound('error'); that.isLoading = false; return; } if (that.fnm <= 0) { this.$toast.fail("鍙戞枡鏁伴噺涓嶈兘灏忎簬绛変簬闆�"); + that.$playSound('error'); that.isLoading = false; return; } @@ -196,17 +230,96 @@ that.barcode = json.data.form.barcode; that.ItemBlDetail = json.data.item that.$notify({ type: 'success', message: json.data.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("缃戠粶閿欒锛岃閲嶈瘯锛�"); + that.$playSound('error'); console.log(error); }); - } + }, + + getChaiFen() { + //this.isPrinterPopupVisible = true; // 鏄剧ず寮圭獥 + + if (this.isLoading) { + return; + } + + var that = this; + 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; + } + //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", 'MesItemQt/ScanCodeCF', { + userName: that.userInfo.loginAccount, + barcode: that.barcode, + billNo: that.billNo, + Num: that.splitNum, + }, false) + .then(function (res) { + var json = res; + if (json.status == 0) { + // that.modeInfo = json.data.tbBillList; + that.splitNum = null; + that.num = null; + that.barcode = null; + that.$notify({ type: 'success', message: json.message }); + that.$playSound('success'); + that.GetMesItemBlDetailByBillNo(); + //that.sendMessage(json.data.tbBillList); + that.sendPrintMessage(json.data.tbBillList); + + that.$refs.barcode.focus(); + + } + else { + that.$playSound('error'); + that.$toast.fail(json.message); + } + that.isLoading = false; + }) + .catch(function (error) { + that.isLoading = false; + + that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�"); + that.$playSound('error'); + }); + }, + } }) \ No newline at end of file -- Gitblit v1.9.3