From d677b5fd388942b0371bfca442e6df9320237299 Mon Sep 17 00:00:00 2001
From: 南骏 池 <chiffly@163.com>
Date: 星期五, 14 二月 2025 08:34:51 +0800
Subject: [PATCH] 1.成品入库功能开发完成 2.生产报工优化

---
 H5/Js/cprk.js |   22 ++++++++++++++++------
 H5/cprk.aspx  |    2 +-
 H5/Js/Scbg.js |    5 +++--
 H5/Scbg.aspx  |    2 +-
 4 files changed, 21 insertions(+), 10 deletions(-)

diff --git a/H5/Js/Scbg.js b/H5/Js/Scbg.js
index d308bec..d85e8e6 100644
--- a/H5/Js/Scbg.js
+++ b/H5/Js/Scbg.js
@@ -92,7 +92,7 @@
             this.barcode = value;
 
             var that = this;
-            that.isLoading = true;
+            
 
             if (!that.userInfo.loginAccount) {
                 this.$toast.fail("璇烽噸鏂版鏌ョ櫥褰曠姸鎬�");
@@ -106,9 +106,10 @@
 
             if (!that.stafId) {
                 that.$toast.fail("鍛樺伐涓嶅厑璁镐负绌�");
+                return;
             }
 
-
+            that.isLoading = true;
             that.AxiosHttp("post", 'MesWorkProd/ScanWork', {
                 userNo: that.userInfo.loginAccount,
                 itemBarcode: that.barcode,
diff --git a/H5/Js/cprk.js b/H5/Js/cprk.js
index 7977ac9..1b9f066 100644
--- a/H5/Js/cprk.js
+++ b/H5/Js/cprk.js
@@ -51,14 +51,22 @@
                     var json = res;
                     if (json.status == 0) {
                         //that.formData.sectionCode = json.data.tbBillList;
-                        that.$refs.barcode.focus();
+                        
+
+                        if (that.formData.barcode == "" || that.formData.barcode == null) {
+                            that.$refs.barcode.focus();
+                            that.isLoading = false;
+                        } else {
+                            that.getScan();
+                        }
                     }
                     else {
                         that.$toast.fail(json.message);
                         that.formData.sectionCode = null;
                         that.$refs.sectionCode.focus();
+                        that.isLoading = false;
                     }
-                    that.isLoading = false;
+                    
                     
                 })
                 .catch(function (error) {
@@ -89,6 +97,7 @@
                         //that.formData.sumQuantity = json.data.tbMesItems.quantity;
                         if (that.formData.sectionCode == "" || that.formData.sectionCode == null) {
                             that.$refs.sectionCode.focus();
+                            that.isLoading = false;
                         } else {
                             that.getScan();
                         }
@@ -97,9 +106,9 @@
                         that.$toast.fail(json.message);
                         that.$refs.barcode.focus();
                         that.formData.barcode = null;
+                        that.isLoading = false;
                     }
-                    that.$notify({ type: 'success', message: json.message });
-                    that.isLoading = false;
+                    
                 })
                 .catch(function (error) {
                     that.isLoading = false;
@@ -120,7 +129,7 @@
                 return;
             }
             that.isLoading = true;
-            that.AxiosHttp("post", 'MesBarCF/CPRK', {
+            that.AxiosHttp("post", 'MesCprk/CPRK', {
                 userName: that.userInfo.loginAccount,
                 sectionCode: that.formData.sectionCode,
                 barcode: that.formData.barcode,
@@ -136,7 +145,8 @@
                     }
                     else {
                         that.$toast.fail(json.message);
-                        that.$refs.cfNum.focus();
+                        that.$refs.barcode.focus();
+                        that.formData.barcode = null;
                     }
                     that.isLoading = false;
                 })
diff --git a/H5/Scbg.aspx b/H5/Scbg.aspx
index c7b9a9f..fa9e6ea 100644
--- a/H5/Scbg.aspx
+++ b/H5/Scbg.aspx
@@ -128,5 +128,5 @@
     <comback ></comback>
 </asp:Content>
 <asp:Content ID="Content4" ContentPlaceHolderID="ContentPlaceHolder4" Runat="Server">
-    <script src="Js/Scbg.js?<%=12322 %>"></script>
+    <script src="Js/Scbg.js?<%=12323 %>"></script>
 </asp:Content>
diff --git a/H5/cprk.aspx b/H5/cprk.aspx
index 7de1fdf..806deb2 100644
--- a/H5/cprk.aspx
+++ b/H5/cprk.aspx
@@ -85,5 +85,5 @@
     <comback ></comback>
 </asp:Content>
 <asp:Content ID="Content4" ContentPlaceHolderID="ContentPlaceHolder4" Runat="Server">
-    <script src="Js/cprk.js?<%=1212 %>"></script>
+    <script src="Js/cprk.js?<%=1214 %>"></script>
 </asp:Content>

--
Gitblit v1.9.3