From 49f81e663f0961c86548800ad8fa0135463bf15f Mon Sep 17 00:00:00 2001
From: kyy <3283105747@qq.com>
Date: 星期三, 08 十月 2025 15:52:56 +0800
Subject: [PATCH] scbg优化
---
H5/Js/BarCfBefore.js | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/H5/Js/BarCfBefore.js b/H5/Js/BarCfBefore.js
index 526f35f..eb0c438 100644
--- a/H5/Js/BarCfBefore.js
+++ b/H5/Js/BarCfBefore.js
@@ -87,10 +87,12 @@
//that.barMessage = json.data.tbBillList.message;
//that.$refs.barcode.focus();
//that.formData.barcode = null;
+ that.$playSound('success');
that.$refs.cfNum.focus();
}
else {
that.$toast.fail(json.message);
+ that.$playSound('error');
that.$refs.barcode.focus();
that.formData.barcode = null;
}
@@ -100,6 +102,7 @@
.catch(function (error) {
that.isLoading = false;
that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
+ that.$playSound('error');
console.log(error);
that.$refs.barcode.focus();
});
@@ -113,16 +116,19 @@
if (that.formData.cfNum * 1 <= 0) {
that.$toast.fail("鎷嗗垎鏁伴噺涓嶈兘涓虹┖锛�");
+ that.$playSound('error');
return;
}
// ... existing code ...
if (parseFloat(that.formData.cfNum) > parseFloat(that.formData.sumQuantity)) {
that.$toast.fail("鎷嗗垎鏁伴噺涓嶈兘澶т簬鏉$爜鏁伴噺锛�");
+ that.$playSound('error');
return;
}
// ... existing code ...
if (that.formData.barcode.length * 1 <= 0) {
that.$toast.fail("鐗╂枡鏉$爜涓嶈兘涓虹┖锛�");
+ that.$playSound('error');
return;
}
that.isLoading = true;
@@ -140,6 +146,7 @@
that.$refs.barcode.focus();
that.formData.barcode = null;
that.formData.cfNum = null;
+ that.$playSound('success');
that.$notify({ type: 'success', message: json.message });
}
else {
@@ -151,6 +158,7 @@
.catch(function (error) {
that.isLoading = false;
that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
+ that.$playSound('error');
console.log(error);
});
},
--
Gitblit v1.9.3