From 409c7f4171e4c5689eda68bb1e52ae7ae2905c8d Mon Sep 17 00:00:00 2001
From: 南骏 池 <chiffly@163.com>
Date: 星期四, 13 二月 2025 13:43:37 +0800
Subject: [PATCH] 1.成品入库初步 2.其他入库优化

---
 H5/Js/cprk.js |   86 +++++++++++++++++++++++++++++++-----------
 1 files changed, 63 insertions(+), 23 deletions(-)

diff --git a/H5/Js/cprk.js b/H5/Js/cprk.js
index ef4bcbd..7977ac9 100644
--- a/H5/Js/cprk.js
+++ b/H5/Js/cprk.js
@@ -69,11 +69,11 @@
                     that.$refs.sectionCode.focus();
                 });
         },
-        getScan() {
+        getBarInfo() {
             var that = this;
              
             that.isLoading = true;
-            that.AxiosHttp("post", 'MesInvItemInCDetails/SaveBarCodes', {
+            that.AxiosHttp("post", 'MesCprk/GetBarInfo', {
                 sectionCode: that.formData.sectionCode,
                 userName: that.userInfo.loginAccount,
                 barcode: that.formData.barcode,
@@ -81,15 +81,17 @@
                 .then(function (res) {
                     var json = res;
                     if (json.status == 0) {
-                        that.formData.itemNo = json.data.tbBillList.itemNo;
-                        that.formData.sumQuantity = json.data.tbBillList.sumQuantity;
-
-                        that.itemInsFormData = json.data.tbBillList.itemIns;
-                        that.itemTableData = json.data.tbBillList.itemInDetails;
-                        that.tableData = json.data.tbBillList.invItemInCDetails;
-                        that.barMessage = json.data.tbBillList.message;
-                        that.$refs.barcode.focus();
-                        that.formData.barcode = null;
+                        that.formData.itemNo = json.data.tbMesItems.itemNo;
+                        that.formData.itemName = json.data.tbMesItems.itemName;
+                        that.formData.itemModel = json.data.tbMesItems.itemModel;
+                        that.formData.barQuantity = json.data.tbBillList.quantity;
+                        that.formData.DAA001 = json.data.tbBillList.billNo;
+                        //that.formData.sumQuantity = json.data.tbMesItems.quantity;
+                        if (that.formData.sectionCode == "" || that.formData.sectionCode == null) {
+                            that.$refs.sectionCode.focus();
+                        } else {
+                            that.getScan();
+                        }
                     }
                     else {
                         that.$toast.fail(json.message);
@@ -106,33 +108,35 @@
                     that.$refs.barcode.focus();
                 });
         },
-        getChaiFen() {
+        getScan() {
             var that = this;
-            if (that.modeInfo.daa001.length <= 0) {
-                that.$toast.fail("棰嗘枡鍗曞彿涓嶈兘涓虹┖锛�");
+
+            if (that.formData.sectionCode.length * 1 <= 0) {
+                that.$toast.fail("搴撲綅缂栫爜涓嶈兘涓虹┖锛�");
                 return;
             }
-            if (that.scanInfo.splitNum * 1 <= 0) {
-                that.$toast.fail("鎷嗗垎鏁伴噺涓嶈兘涓虹┖锛�");
-                return;
-            }
-            if (that.scanInfo.barcode.length * 1 <= 0) {
+            if (that.formData.barcode.length * 1 <= 0) {
                 that.$toast.fail("鐗╂枡鏉$爜涓嶈兘涓虹┖锛�");
                 return;
             }
             that.isLoading = true;
-            that.AxiosHttp("post", 'Womdaa/ScanCode', {
-                daa001: that.modeInfo.daa001,
+            that.AxiosHttp("post", 'MesBarCF/CPRK', {
                 userName: that.userInfo.loginAccount,
-                barcode: that.modeInfo.barcode,
+                sectionCode: that.formData.sectionCode,
+                barcode: that.formData.barcode,
             }, false)
                 .then(function (res) {
                     var json = res;
                     if (json.status == 0) {
-                      //  that.modeInfo = json.data.tbBillList;
+                        //  that.modeInfo = json.data.tbBillList;
+                        that.$refs.barcode.focus();
+                        that.formData.barcode = null;
+                        that.formData.cfNum = null;
+                        that.$notify({ type: 'success', message: json.message });
                     }
                     else {
                         that.$toast.fail(json.message);
+                        that.$refs.cfNum.focus();
                     }
                     that.isLoading = false;
                 })
@@ -142,6 +146,42 @@
                     console.log(error);
                 });
         },
+        //getChaiFen() {
+        //    var that = this;
+        //    if (that.modeInfo.daa001.length <= 0) {
+        //        that.$toast.fail("棰嗘枡鍗曞彿涓嶈兘涓虹┖锛�");
+        //        return;
+        //    }
+        //    if (that.scanInfo.splitNum * 1 <= 0) {
+        //        that.$toast.fail("鎷嗗垎鏁伴噺涓嶈兘涓虹┖锛�");
+        //        return;
+        //    }
+        //    if (that.scanInfo.barcode.length * 1 <= 0) {
+        //        that.$toast.fail("鐗╂枡鏉$爜涓嶈兘涓虹┖锛�");
+        //        return;
+        //    }
+        //    that.isLoading = true;
+        //    that.AxiosHttp("post", 'Womdaa/ScanCode', {
+        //        daa001: that.modeInfo.daa001,
+        //        userName: that.userInfo.loginAccount,
+        //        barcode: that.modeInfo.barcode,
+        //    }, false)
+        //        .then(function (res) {
+        //            var json = res;
+        //            if (json.status == 0) {
+        //              //  that.modeInfo = json.data.tbBillList;
+        //            }
+        //            else {
+        //                that.$toast.fail(json.message);
+        //            }
+        //            that.isLoading = false;
+        //        })
+        //        .catch(function (error) {
+        //            that.isLoading = false;
+        //            that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
+        //            console.log(error);
+        //        });
+        //},
         cleraCode() {
             this.formData.sectionCode = null;
         },

--
Gitblit v1.9.3