From a6035a9ea8298467ec7f8d4d339a0cc1bec41ddd Mon Sep 17 00:00:00 2001 From: cnf <3200815559@qq.com> Date: 星期二, 26 八月 2025 15:25:44 +0800 Subject: [PATCH] 期初打印和入库加声音提示 --- H5/Js/Qcrk.js | 15 ++++++++++++++- H5/Js/QcPrint.js | 1 + 2 files changed, 15 insertions(+), 1 deletions(-) diff --git a/H5/Js/QcPrint.js b/H5/Js/QcPrint.js index 8c84ddb..9ade8a7 100644 --- a/H5/Js/QcPrint.js +++ b/H5/Js/QcPrint.js @@ -135,6 +135,7 @@ that.depotsInfo = json.data.tbBillList.depotsInfo; that.orgInfo = json.data.tbBillList.orgInfo; that.orgID = json.data.tbBillList.fSubsidiary; + that.$playSound('success'); that.$refs.selectKey.focus(); } else { diff --git a/H5/Js/Qcrk.js b/H5/Js/Qcrk.js index c374524..fc83899 100644 --- a/H5/Js/Qcrk.js +++ b/H5/Js/Qcrk.js @@ -28,6 +28,7 @@ if (!value) { this.$toast.fail("搴撲綅缂栫爜"); + that.$playSound('error'); return; } @@ -42,17 +43,20 @@ /*that.$notify({ type: 'success', message: json.data.tbBillList });*/ if (!that.barcode?.trim()) { that.$refs.barcode.focus(); + that.$playSound('succcess'); } else { that.scanBarcode(); } } else { that.$toast.fail(json.message); + that.$playSound('error'); } }) .catch(function (error) { that.isLoading = false; - that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�"); + that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�"); + that.$playSound('error'); console.log(error); }); }, @@ -72,11 +76,13 @@ that.num = res.data.tbBillList.quantity; if (!that.depotNo?.trim()) { that.$refs.depotNo.focus(); + that.$playSound('success'); } else { that.scanBarcode(); } } else { + that.$playSound('error'); that.$toast.fail(json.message); that.$refs.barcode.focus(); that.barcode = null; @@ -85,6 +91,7 @@ }) .catch(function (error) { that.isLoading = false; + that.$playSound('error'); that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�" + error.message); that.$refs.barcode.focus(); }); @@ -94,18 +101,21 @@ var that = this; if (!that.userInfo.loginAccount) { this.$toast.fail("璇烽噸鏂版鏌ョ櫥褰曠姸鎬�"); + that.$playSound('error'); that.isLoading = false; return; } if (!that.barcode?.trim()) { this.$toast.fail("鏉$爜涓嶈兘涓虹┖"); + that.$playSound('error'); that.isLoading = false; return; } if (!that.depotNo?.trim()) { this.$toast.fail("浠撳簱涓嶈兘涓虹┖"); + that.$playSound('error'); that.isLoading = false; return; } @@ -119,6 +129,7 @@ var json = res; if (json.status == 0) { that.$notify({ type: 'success', message: json.data.tbBillList.message }); + that.$playSound('success'); that.barcode = null; that.num = null; that.barInfo = []; @@ -126,12 +137,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); }); } -- Gitblit v1.9.3