From f08a3f38c505938639bfdde930f35e3b3d7af1ae Mon Sep 17 00:00:00 2001
From: chenhaozhe <cgz@hz-kingdee.com>
Date: 星期四, 17 七月 2025 16:52:39 +0800
Subject: [PATCH] 1

---
 pages/caigoutuiliao/form.vue |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/pages/caigoutuiliao/form.vue b/pages/caigoutuiliao/form.vue
index ed5cd80..7e466a9 100644
--- a/pages/caigoutuiliao/form.vue
+++ b/pages/caigoutuiliao/form.vue
@@ -313,6 +313,15 @@
 			this.getHDeptList()
 		},
         methods: {
+			playSound(e){
+				const innerAudioContext = uni.createInnerAudioContext();
+				if(e == 1){
+					innerAudioContext.src = '/static/success.wav';
+				}else{
+					innerAudioContext.src = '/static/jingbao.wav';
+				}
+				innerAudioContext.play(); // 鎾斁闊抽
+			},
 			//鎵爜
 			toScanCode(){
 				uni.scanCode({
@@ -723,6 +732,7 @@
 				console.log(this.hform.HSourceBillNo,HSourceFlag)
                 if (HDeleteFlag == "*") {
                     if (sBarCode == "") {
+						this.playSound(0)
                         uni.showToast({
                         	title:'璇锋壂鎻忚鍒犻櫎鐨勬潯鐮�',
 							icon:'none'
@@ -735,9 +745,11 @@
 						        console.log('鍒犻櫎鏉$爜',res.data);
 								this.hform.HBarCode = ''
 								if(res.data.count == 1){
+									this.playSound(1)
 									this.hform.HQty = ''
 									this.DisBillEntryList()
 								}else{
+									this.playSound(0)
 									uni.showToast({
 										title:res.data.Message,
 										icon:'none'
@@ -745,6 +757,7 @@
 								}
 							},
 							fail: (res) => {
+								this.playSound(0)
 								console.log(res);
 								uni.showToast({
 									title:'鎺ュ彛璇锋眰澶辫触',
@@ -765,6 +778,7 @@
 					        console.log('鎵爜杩斿洖',res.data);
 							this.hform.HBarCode = ''
 							if(res.data.count == 1){
+								this.playSound(1)
 								var data = res.data.data
 								if (data.hBarTypeField == '浠撳簱鏉$爜') {
 									this.hform.HWHName = data.hWhNameField
@@ -828,6 +842,7 @@
 								//娓呯┖鏁伴噺
 								this.hform.HQty = ''
 							}else{
+								this.playSound(0)
 								uni.showToast({
 									title:res.data.Message,
 									icon:'none'
@@ -835,6 +850,7 @@
 							}
 						},
 						fail: (res) => {
+							this.playSound(0)
 							console.log(res);
 							uni.showToast({
 								title:'鎺ュ彛璇锋眰澶辫触',

--
Gitblit v1.9.1