From 802971e1c3f378354dbd5014a0c552f9081d4a00 Mon Sep 17 00:00:00 2001 From: cnf <3200815559@qq.com> Date: 星期二, 26 八月 2025 13:14:05 +0800 Subject: [PATCH] 部分模块加上声音提示 --- H5/Js/Scbg.js | 27 +++++++++++++++++++++++++++ 1 files changed, 27 insertions(+), 0 deletions(-) diff --git a/H5/Js/Scbg.js b/H5/Js/Scbg.js index 2079542..78864ea 100644 --- a/H5/Js/Scbg.js +++ b/H5/Js/Scbg.js @@ -68,15 +68,18 @@ that.$refs.barcode.focus(); } else { that.$toast("鏈壘鍒板尮閰嶇殑 鐢ㄦ埛鍚嶇О"); + that.$playSound('error'); } } else { that.$toast.fail(json.message); + that.$playSound('error'); } that.isLoading = false; }) .catch(function (error) { that.isLoading = false; + that.$playSound('error'); that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�"); console.log(error); }); @@ -104,17 +107,20 @@ that.actions = json.data.tbBillList.map(item => { return { name: item.staffName } }); + that.$playSound('success'); that.stafList = 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); }); }, @@ -136,9 +142,11 @@ }); that.stafList = json.data.result.rksqOrderList; + that.$playSound('success'); } else { that.$toast.fail(json.message); + that.$playSound('error'); } that.isLoading = false; }) @@ -183,6 +191,7 @@ this.$refs.sjBillNo.focus(); } else { this.$toast("鏈壘鍒板尮閰嶇殑閫佹鍗曞彿"); + that.$playSound('error'); } //this.GetMesItemBlDetailByBillNo(); //this.$toast(item.name); @@ -203,16 +212,19 @@ }); that.stafList = json.data.tbBillList; + that.$playSound('success'); console.log('DAWDADWDADADADWD' + that.stafList); } 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); }); // 榛樿鎯呭喌涓嬬偣鍑婚�夐」鏃朵笉浼氳嚜鍔ㄦ敹璧� @@ -243,16 +255,19 @@ if (!that.userInfo.loginAccount) { this.$toast.fail("璇烽噸鏂版鏌ョ櫥褰曠姸鎬�"); + that.$playSound('error'); return; } if (!that.barcode) { this.$toast.fail("鏉$爜涓嶈兘涓虹┖"); + that.$playSound('error'); return; } if (!that.stafId) { that.$toast.fail("鍛樺伐涓嶅厑璁镐负绌�"); + that.$playSound('error'); return; } @@ -281,11 +296,13 @@ console.log(entity.barcodesDetail); console.log(that.BarcodesDetail); that.$notify({ type: 'success', message: '鎵弿鎴愬姛' }); + that.$playSound('success'); that.$refs.barcode.focus(); that.barcode = null; } else { that.$toast.fail(json.message); + that.$playSound('error'); that.$refs.barcode.focus(); that.barcode = null; } @@ -294,6 +311,7 @@ .catch(function (error) { that.isLoading = false; that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�"); + that.$playSound('error'); console.log(error); }); }, @@ -306,6 +324,7 @@ if (!that.userInfo.loginAccount) { this.$toast.fail("璇烽噸鏂版鏌ョ櫥褰曠姸鎬�"); + that.$playSound('error'); that.load = false; return; } @@ -330,6 +349,7 @@ if (!that.sjBillNo) { this.$toast.fail("閫佹鍗曞彿涓嶈兘涓虹┖"); + that.$playSound('error'); that.load = false; return; } @@ -344,10 +364,13 @@ var json = res; if (json.status == 0) { that.$notify({ type: 'success', message: '閫佹鎴愬姛' }); + that.BarcodesDetail = []; + that.$playSound('success'); } else { that.$toast.fail(json.message); + that.$playSound('error'); } that.isLoading = false; that.load = false; @@ -355,6 +378,7 @@ .catch(function (error) { that.isLoading = false; that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�"); + that.$playSound('error'); console.log(error); }); }, @@ -377,10 +401,12 @@ console.log(that.BarcodesDetail); that.$notify({ type: 'success', message: '鎵弿鎴愬姛' }); that.$refs.sjBillNo.focus(); + that.$playSound('success'); } else { that.$toast.fail(json.message); that.$refs.sjBillNo.focus(); + that.$playSound('error'); that.barcode = null; } that.isLoading = false; @@ -388,6 +414,7 @@ .catch(function (error) { that.isLoading = false; that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�"); + that.$playSound('error'); console.log(error); }); // 榛樿鎯呭喌涓嬬偣鍑婚�夐」鏃朵笉浼氳嚜鍔ㄦ敹璧� -- Gitblit v1.9.3