From cdaa6b433a2ce3fbb727a9661015e6f76683529f Mon Sep 17 00:00:00 2001
From: 南骏 池 <chiffly@163.com>
Date: 星期五, 13 六月 2025 14:35:56 +0800
Subject: [PATCH] 1.采购退货单优化 2.采购退料单拆分 3.采购入库优化

---
 H5/Js/PurchaseReturn.js   |   28 ++++++++++++++++------------
 H5/PurchaseReturn.aspx    |    2 +-
 H5/PurchaseInventory.aspx |   10 +++++-----
 3 files changed, 22 insertions(+), 18 deletions(-)

diff --git a/H5/Js/PurchaseReturn.js b/H5/Js/PurchaseReturn.js
index 406b4b5..4ceb63e 100644
--- a/H5/Js/PurchaseReturn.js
+++ b/H5/Js/PurchaseReturn.js
@@ -121,10 +121,10 @@
 
             let itemOut = this.itemOutNoList.filter(it => it.billNo == that.scanFormData.itemOutNo);
 
-            this.invItemOutId = itemOut[0].id;
+            //this.invItemOutId = itemOut[0].id;
 
             that.AxiosHttp("post", 'MesCgthSq/GetSumItem', {
-                id: that.invItemOutId,
+                //id: that.invItemOutId,
                 billNo: that.scanFormData.itemOutNo,
                 barcode: that.scanFormData.barcode,
             }, false)
@@ -174,6 +174,13 @@
                         that.getItem();
                         that.$refs.barcode.focus();
                         that.scanFormData.barcode = null;
+                        that.$playSound('success');
+                        that.$notify({ type: 'success', message: json.message });
+                    }
+                    else if (json.status == 2) {
+                        that.$refs.splitNum.focus();
+                        that.scanInfo.splitNum = json.data.tbBillList.splitNum;
+                        that.scanFormData.quantity = json.data.tbBillList.barcodeNum;
                     }
                     else {
                         that.$playSound('error');
@@ -181,8 +188,6 @@
                         that.$refs.barcode.focus();
                         that.scanFormData.barcode = null;
                     }
-                    that.$playSound('success');
-                    that.$notify({ type: 'success', message: json.message });
                     that.isLoading = false;
                 })
                 .catch(function (error) {
@@ -211,7 +216,7 @@
                 that.$toast.fail("鎷嗗垎鏁伴噺涓嶈兘涓虹┖锛�");
                 return;
             }
-            if (that.scanInfo.barcode.length * 1 <= 0) {
+            if (that.scanFormData.barcode.length * 1 <= 0) {
                 that.$playSound('error');
                 that.$toast.fail("鐗╂枡鏉$爜涓嶈兘涓虹┖锛�");
                 return;
@@ -227,10 +232,10 @@
             //}
 
             that.isLoading = true;
-            that.AxiosHttp("post", 'Womdaa/ScanCodeCF', {
-                daa001: that.modeInfo.daa001,
+            that.AxiosHttp("post", 'MesCgthSq/ScanCodeCF', {
+                billNo: that.scanFormData.itemOutNo,
                 userName: that.userInfo.loginAccount,
-                barcode: that.scanInfo.barcode,
+                barcode: that.scanFormData.barcode,
                 Num: that.scanInfo.splitNum,
             }, false)
                 .then(function (res) {
@@ -238,20 +243,19 @@
                     if (json.status == 0) {
                         //  that.modeInfo = json.data.tbBillList;
                         that.scanInfo.splitNum = null;
-                        that.scanInfo.barcodeNum = null;
-                        that.scanInfo.barcode = null;
+                        that.scanFormData.quantity = null;
+                        that.scanFormData.barcode = null;
                         that.$notify({ type: 'success', message: json.message });
                         that.$playSound('success');
 
                         that.sendMessage(json.data.tbBillList);
 
                         that.$refs.barcode.focus();
-                        that.getModel();
+                        that.getItem();
                     }
                     else {
                         that.$playSound('error');
                         that.$toast.fail(json.message);
-                        that.$playSound('error');
                     }
                     that.isLoading = false;
                 })
diff --git a/H5/PurchaseInventory.aspx b/H5/PurchaseInventory.aspx
index ac2c31a..65a426f 100644
--- a/H5/PurchaseInventory.aspx
+++ b/H5/PurchaseInventory.aspx
@@ -103,18 +103,18 @@
 
    <van-tab title="鍏ュ簱鏉$爜" class="mySolid font">
          <van-row>
-            <van-col span="8" class="text-left padding-left">鐗╂枡</van-col>
-             <van-col span="8" class="text-left padding-left">瑙勬牸</van-col>
+            <van-col span="8" class="text-left padding-left">鏉$爜</van-col>
+             <van-col span="8" class="text-left padding-left">鐗╂枡</van-col>
              <van-col span="4">鏁伴噺</van-col>
             <van-col span="4">搴撲綅缂栫爜</van-col>
         </van-row>
         <van-row  v-for="(itm,index) in tableData" :key="index">
            <van-col span="8" class="text-left padding-left">
-                <div>{{itm.itemNo}}</div>
-                <div>{{itm.itemName}}</div>
+                <div>{{itm.barcode}}</div>
            </van-col>
             <van-col span="8" class="text-left padding-left">
-            <div>{{itm.itemModel}}</div>
+            <div>{{itm.itemNo}}</div>
+            <div>{{itm.itemName}}</div>
             </van-col>
             <van-col span="4">
                 <div>{{itm.fQty}}</div>
diff --git a/H5/PurchaseReturn.aspx b/H5/PurchaseReturn.aspx
index 6275c53..2ae3b4c 100644
--- a/H5/PurchaseReturn.aspx
+++ b/H5/PurchaseReturn.aspx
@@ -123,5 +123,5 @@
     <%--<comback ></comback>--%>
 </asp:Content>
 <asp:Content ID="Content4" ContentPlaceHolderID="ContentPlaceHolder4" Runat="Server">
-    <script src="Js/PurchaseReturn.js?<%=1281111 %>"></script>
+    <script src="Js/PurchaseReturn.js?<%=12811111 %>"></script>
 </asp:Content>

--
Gitblit v1.9.3