From 0bb1834b9755eaf7c67d25cd9012be2ca14a7efe Mon Sep 17 00:00:00 2001
From: 南骏 池 <chiffly@163.com>
Date: 星期五, 11 四月 2025 09:13:16 +0800
Subject: [PATCH] 1.委外退料优化 2.核对送检

---
 H5/Js/PurchaseReturn.js |   36 +++++++++++++++++++++++++++++++++++-
 1 files changed, 35 insertions(+), 1 deletions(-)

diff --git a/H5/Js/PurchaseReturn.js b/H5/Js/PurchaseReturn.js
index 409bdfa..b2618f8 100644
--- a/H5/Js/PurchaseReturn.js
+++ b/H5/Js/PurchaseReturn.js
@@ -35,6 +35,8 @@
             loginGuid: this.GetLoginInfor().loginGuid,
             loginAccount: this.GetLoginInfor().loginAccount,
         };
+        that.beginload();
+        //that.show = false;
     },
     methods: {
         getItemOutNo() {
@@ -51,6 +53,29 @@
                             return { name: s.billNo }
                         });
                         that.show = true;
+                    }
+                    else {
+                        that.$toast.fail(json.message);
+                    }
+                    that.isLoading = false;
+                })
+                .catch(function (error) {
+                    that.isLoading = false;
+                    that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
+                    console.log(error);
+                });
+
+        },
+        beginload() {
+            var that = this;
+
+            that.isLoading = true;
+            that.AxiosHttp("post", 'MesCgthSq/GetMesCgthSq', {
+            }, false)
+                .then(function (res) {
+                    var json = res;
+                    if (json.status == 0) {
+                        that.itemOutNoList = json.data.tbBillList;
                     }
                     else {
                         that.$toast.fail(json.message);
@@ -110,6 +135,11 @@
         getItem() {
             var that = this;
             that.isLoading = true;
+
+            let itemOut = this.itemOutNoList.filter(it => it.billNo == that.scanFormData.itemOutNo);
+
+            this.invItemOutId = itemOut[0].id;
+
             that.AxiosHttp("post", 'MesCgthSq/GetSumItem', {
                 id: that.invItemOutId,
                 billNo: that.scanFormData.itemOutNo,
@@ -121,7 +151,8 @@
                         that.tableData = json.data.tbBillList.sumItem;
                         that.scanFormData.itemNo = json.data.tbBillList.itemNo
                         //that.scanFormData.quantity = json.data.tbBillList.quantity
-                        console.log(json);
+                        //console.log(json);
+                        that.$refs.barcode.focus();
                     }
                     else {
                         that.$toast.fail(json.message);
@@ -180,10 +211,13 @@
                         //}
                         that.scanFormData.quantity = json.data.tbBillList.barcodeNum
                         that.getItem();
+                        that.$refs.barcode.focus();
+                        that.scanFormData.barcode = null;
                     }
                     else {
                         that.$toast.fail(json.message);
                         that.$refs.barcode.focus();
+                        that.scanFormData.barcode = null;
                     }
                     that.$notify({ type: 'success', message: json.message });
                     that.isLoading = false;

--
Gitblit v1.9.3