From 6acdfc2c867d8fde898a4cc67bdefa2b97f03e3e Mon Sep 17 00:00:00 2001 From: 南骏 池 <chiffly@163.com> Date: 星期三, 09 七月 2025 10:58:54 +0800 Subject: [PATCH] 1.条码入库前拆分优化 2.其他入库优化 --- H5/Js/Qtck.js | 31 +++++++++++++++++++++++++++++-- 1 files changed, 29 insertions(+), 2 deletions(-) diff --git a/H5/Js/Qtck.js b/H5/Js/Qtck.js index 3666b7b..adae1b8 100644 --- a/H5/Js/Qtck.js +++ b/H5/Js/Qtck.js @@ -17,6 +17,7 @@ active: 0, show: false, actions: [], + ItemDetail: [], } }, mounted() { @@ -40,6 +41,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 +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); }); }, @@ -82,21 +86,26 @@ .then(function (res) { var json = res; if (json.status == 0) { - that.ItemBlDetail = json.data.tbBillList; + that.ItemDetail = json.data.tbBillList; + //that.ItemBlDetail = json.data.tbBillList; } 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 +113,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; } @@ -135,48 +147,60 @@ 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); }); }, 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,15 +220,18 @@ 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); }); } -- Gitblit v1.9.3