From ffd88d66e16c6c7a37135bb2631c3f1aa4b43e98 Mon Sep 17 00:00:00 2001
From: 啊鑫 <t2856754968@163.com>
Date: 星期三, 10 九月 2025 15:22:30 +0800
Subject: [PATCH] 111

---
 H5/Js/BarCf.js |   58 +++++++++++++++++++++++++++++++++++++++++++++++++---------
 1 files changed, 49 insertions(+), 9 deletions(-)

diff --git a/H5/Js/BarCf.js b/H5/Js/BarCf.js
index ad71d69..c19122d 100644
--- a/H5/Js/BarCf.js
+++ b/H5/Js/BarCf.js
@@ -87,13 +87,10 @@
                         //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;
                     }
@@ -103,7 +100,6 @@
                 .catch(function (error) {
                     that.isLoading = false;
                     that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
-                    that.$playSound('error');
                     console.log(error);
                     that.$refs.barcode.focus();
                 });
@@ -117,12 +113,20 @@
 
             if (that.formData.cfNum * 1 <= 0) {
                 that.$toast.fail("鎷嗗垎鏁伴噺涓嶈兘涓虹┖锛�");
-                that.$playSound('error');
                 return;
             }
+            //if (that.formData.cfNum > that.formData.sumQuantity) {
+            //    that.$toast.fail("鎷嗗垎鏁伴噺涓嶈兘澶т簬鏉$爜鏁伴噺锛�");
+            //    return;
+            //}
+
+            if (parseFloat(that.formData.cfNum) > parseFloat(that.formData.sumQuantity)) {
+                that.$toast.fail("鎷嗗垎鏁伴噺涓嶈兘澶т簬鏉$爜鏁伴噺锛�");
+                return;
+            }
+
             if (that.formData.barcode.length * 1 <= 0) {
                 that.$toast.fail("鐗╂枡鏉$爜涓嶈兘涓虹┖锛�");
-                that.$playSound('error');
                 return;
             }
             that.isLoading = true;
@@ -140,12 +144,10 @@
                         that.$refs.barcode.focus();
                         that.formData.barcode = null;
                         that.formData.cfNum = null;
-                        that.$playSound('success');
                         that.$notify({ type: 'success', message: json.message });
                     }
                     else {
                         that.$toast.fail(json.message);
-                        that.$playSound('error');
                         that.$refs.cfNum.focus();
                     }
                     that.isLoading = false;
@@ -153,7 +155,6 @@
                 .catch(function (error) {
                     that.isLoading = false;
                     that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
-                    that.$playSound('error');
                     console.log(error);
                 });
         },
@@ -166,6 +167,45 @@
                 .replace(/^\./g, '');
         },
 
+        BarRePrint() {
+            if (this.isLoading) {
+                return;
+            }
+
+            var that = this;
+
+            if (that.formData.barcode.length * 1 <= 0) {
+                that.$toast.fail("鐗╂枡鏉$爜涓嶈兘涓虹┖锛�");
+                return;
+            }
+            that.isLoading = true;
+            that.AxiosHttp("post", 'MesBarCF/BarRePrint', {
+                userName: that.userInfo.loginAccount,
+                barcode: that.formData.barcode
+            }, false)
+                .then(function (res) {
+                    var json = res;
+                    if (json.status == 0) {
+                        //  that.modeInfo = json.data.tbBillList;
+                        // 鎷嗗垎鍏ㄥ眬璋冪敤鏂规硶
+                        that.sendPrintMessage(json.data.tbBillList);
+                        that.$refs.barcode.focus();
+                        that.formData.barcode = null;
+                        that.$notify({ type: 'success', message: json.message });
+                    }
+                    else {
+                        that.$toast.fail(json.message);
+                        that.$refs.barcode.focus();
+                    }
+                    that.isLoading = false;
+                })
+                .catch(function (error) {
+                    that.isLoading = false;
+                    that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
+                    console.log(error);
+                });
+        },
+
 
     }
 })
\ No newline at end of file

--
Gitblit v1.9.3