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/cprk.js |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/H5/Js/cprk.js b/H5/Js/cprk.js
index 1b9f066..2acfe43 100644
--- a/H5/Js/cprk.js
+++ b/H5/Js/cprk.js
@@ -55,6 +55,7 @@
 
                         if (that.formData.barcode == "" || that.formData.barcode == null) {
                             that.$refs.barcode.focus();
+                            that.$playSound('success');
                             that.isLoading = false;
                         } else {
                             that.getScan();
@@ -62,6 +63,7 @@
                     }
                     else {
                         that.$toast.fail(json.message);
+                        that.$playSound('error');
                         that.formData.sectionCode = null;
                         that.$refs.sectionCode.focus();
                         that.isLoading = false;
@@ -72,6 +74,7 @@
                 .catch(function (error) {
                     that.isLoading = false;
                     that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
+                    that.$playSound('error');
                     console.log(error);
                     that.formData.sectionCode = null;
                     that.$refs.sectionCode.focus();
@@ -97,6 +100,7 @@
                         //that.formData.sumQuantity = json.data.tbMesItems.quantity;
                         if (that.formData.sectionCode == "" || that.formData.sectionCode == null) {
                             that.$refs.sectionCode.focus();
+                            that.$playSound('sucess');
                             that.isLoading = false;
                         } else {
                             that.getScan();
@@ -104,6 +108,7 @@
                     }
                     else {
                         that.$toast.fail(json.message);
+                        that.$playSound('error');
                         that.$refs.barcode.focus();
                         that.formData.barcode = null;
                         that.isLoading = false;
@@ -112,6 +117,7 @@
                 })
                 .catch(function (error) {
                     that.isLoading = false;
+                    that.$playSound('error');
                     that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
                     console.log(error);
                     that.$refs.barcode.focus();
@@ -122,10 +128,12 @@
 
             if (that.formData.sectionCode.length * 1 <= 0) {
                 that.$toast.fail("搴撲綅缂栫爜涓嶈兘涓虹┖锛�");
+                that.$playSound('error');
                 return;
             }
             if (that.formData.barcode.length * 1 <= 0) {
                 that.$toast.fail("鐗╂枡鏉$爜涓嶈兘涓虹┖锛�");
+                that.$playSound('error');
                 return;
             }
             that.isLoading = true;
@@ -141,9 +149,11 @@
                         that.$refs.barcode.focus();
                         that.formData.barcode = null;
                         that.formData.cfNum = null;
+                        that.$playSound('success');
                         that.$notify({ type: 'success', message: json.message });
                     }
                     else {
+                        that.$playSound('error');
                         that.$toast.fail(json.message);
                         that.$refs.barcode.focus();
                         that.formData.barcode = null;
@@ -152,6 +162,7 @@
                 })
                 .catch(function (error) {
                     that.isLoading = false;
+                    that.$playSound('error');
                     that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
                     console.log(error);
                 });
@@ -199,6 +210,7 @@
             this.Message = "";
             if (this.tableData.length == 0) {
                 this.Message = "鏉$爜涓虹┖锛屾棤娉曟帹閫丒RP";
+                that.$playSound('error');
                 return;
             }
             let userName = this.$loginInfo.account;
@@ -237,6 +249,7 @@
                     this.messageCenter.dealWith = 0;
                     this.messageCenter.status = 1;
                     this.messageCenter.resultData = res.msg;
+                    that.$playSound('success');
                     this.updateMessage(this.messageCenter);
                 }
             });
@@ -252,8 +265,10 @@
             }).then(res => {
                 if (res.data.tbBillList) {
                     this.Message += "  瀹℃牳鎴愬姛锛�";
+                    that.$playSound('success');
                 } else {
                     this.Message += " 瀹℃牳澶辫触锛�";
+                    that.$playSound('error');
                 }
 
                 let entity = {

--
Gitblit v1.9.3