From 171e6dc39bb085184c0e0989b7b37b129c59e6ac Mon Sep 17 00:00:00 2001 From: 南骏 池 <chiffly@163.com> Date: 星期三, 16 七月 2025 22:38:10 +0800 Subject: [PATCH] 1.样本值修改 --- H5/Js/Qtck.js | 35 +++++++++++++++++++++++++++++++---- 1 files changed, 31 insertions(+), 4 deletions(-) diff --git a/H5/Js/Qtck.js b/H5/Js/Qtck.js index ec5cc84..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,40 +86,48 @@ .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(value) { - - this.barcode = value; + getBarcode() { + if (this.isLoading) { + return; + } + //this.barcode = value; 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; } @@ -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