From cd757b79217ba11868a4e771298194a362621afe Mon Sep 17 00:00:00 2001
From: cdk <2441919651@qq.com>
Date: 星期二, 09 九月 2025 18:04:36 +0800
Subject: [PATCH] 其他出库销售出库增加库位查询

---
 H5/Js/BarCf.js |   62 +++++++++++++++++++++++++++++++
 1 files changed, 62 insertions(+), 0 deletions(-)

diff --git a/H5/Js/BarCf.js b/H5/Js/BarCf.js
index be38d8a..c19122d 100644
--- a/H5/Js/BarCf.js
+++ b/H5/Js/BarCf.js
@@ -105,12 +105,26 @@
                 });
         },
         getChaiFen() {
+            if (this.isLoading) {
+                return;
+            }
+
             var that = this;
 
             if (that.formData.cfNum * 1 <= 0) {
                 that.$toast.fail("鎷嗗垎鏁伴噺涓嶈兘涓虹┖锛�");
                 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("鐗╂枡鏉$爜涓嶈兘涓虹┖锛�");
                 return;
@@ -125,6 +139,8 @@
                     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.formData.cfNum = null;
@@ -145,5 +161,51 @@
         //cleraCode() {
         //    this.formData.sectionCode = null;
         //},
+        handleNumberInput3(value) {
+            this.formData.cfNum = value.replace(/[^\d.]/g, '')  // 1. 鍘婚櫎闈炴暟瀛楀拰灏忔暟鐐�
+                .replace(/(\..*)\./g, '$1')               // 2. 绂佹澶氫釜灏忔暟鐐�
+                .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