From 52dbfd767f2485a1d615c5d9db50d648a1d8214a Mon Sep 17 00:00:00 2001
From: wbc <2597324127@qq.com>
Date: 星期二, 23 十二月 2025 23:56:58 +0800
Subject: [PATCH] 生产报工模糊查询

---
 H5/Js/PurchaseReturn.js |  109 +++++++++++++-----------------------------------------
 1 files changed, 27 insertions(+), 82 deletions(-)

diff --git a/H5/Js/PurchaseReturn.js b/H5/Js/PurchaseReturn.js
index 6c39c84..cf35b11 100644
--- a/H5/Js/PurchaseReturn.js
+++ b/H5/Js/PurchaseReturn.js
@@ -26,21 +26,13 @@
             messageCenter: {},
             messageId: 0,
 
+            show: false,
+
             scanInfo: { barcodeNum: "", splitNum: "", barcode: "" },
             ip: "",
             port: "",
             oldBarInfo: [],
             cfBarInfo: [],
-
-            selectKey: "",//鏌ヨ鍏抽敭瀛�
-            actions: [],//鍒楄〃鐨勫��
-            show: false,//鍒楄〃灞曠ず
-            // 褰撳墠閫変腑琛岀殑绱㈠紩
-            currentIndex: -1,
-            // 瀛樺偍閫変腑琛屾暟鎹璞�
-            selItem: {},
-            ItemBarKw: [],//褰撳ぉ琛岀浉鍏虫潯鐮佸簱浣嶄俊鎭�
-            DaaInfo: {},
         }
     },
     mounted() {
@@ -53,78 +45,20 @@
         //that.show = false;
     },
     methods: {
-        /**
-        * 澶勭悊琛岀偣鍑讳簨浠讹紙鍗曢�夐�昏緫锛�
-        * @param {Object} item 褰撳墠琛屾暟鎹�
-        * @param {Number} index 褰撳墠琛岀储寮�
-        */
-        handleRowClick(item, index) {
-            if (this.isLoading) {
-                return;
-            }
-
-            // 閲嶇疆鎵�鏈夎鐨勯�変腑鐘舵��
-            this.currentIndex = -1;
-
-            // 璁剧疆褰撳墠閫変腑琛�
-            this.currentIndex = index;
-            this.selItem = {
-                itemid: item.itemId,//椹煎嘲鍛藉悕娉曪紒锛侊紒
-                index: index
-            };
-
-            console.log('褰撳墠閫変腑椤�:', this.selItem); // 璋冭瘯鐢�
-
-            this.GetBarKwByItem();
-        },
-        //鑾峰彇搴撲綅淇℃伅
-        GetBarKwByItem() {
-            //Womdaa
-            //WwGd
+        getItemOutNo() {
             var that = this;
+
             that.isLoading = true;
-            that.AxiosHttp("post", 'Womdaa/GetBarKwByItemCK', {
-                itemId: that.selItem.itemid,
-                userName: that.userInfo.loginAccount,
-                type: 'CGCK',
-                billNo:that.scanFormData.itemOutNo
+            that.AxiosHttp("post", 'MesCgthSq/GetMesCgthSq', {
             }, false)
                 .then(function (res) {
                     var json = res;
                     if (json.status == 0) {
-                        that.ItemBarKw = json.data.tbBillList;
-                    }
-                    else {
-                        that.$toast.fail(json.message);
-                        that.$playSound('error');
-                        that.ItemBarKw = [];
-                    }
-                    that.isLoading = false;
-                })
-                .catch(function (error) {
-                    that.isLoading = false;
-                    that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
-                    that.$playSound('error');
-                    console.log(error);
-                    that.ItemBarKw = [];
-                });
-        },
-        getItemOutNo() {
-            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;
-                        if (!Array.isArray(that.itemOutNoList) || that.itemOutNoList.length === 0) {
-                            that.$toast.fail("娌℃湁鍙敤鐨勬暟鎹�");
-                            that.show = false;
-                        }
-                        else {
-                            that.itemOutNoStr = that.itemOutNoList.map(s => ({ name: s }));
-                            that.show = true;
-                        }
+                        that.itemOutNoStr = that.itemOutNoList.map(s => {
+                            return { name: s.billNo }
+                        });
+                        that.show = true;
                     }
                     else {
                         that.$playSound('error');
@@ -166,27 +100,38 @@
 
         },
         onSelect(item) {
+            // 榛樿鎯呭喌涓嬬偣鍑婚�夐」鏃朵笉浼氳嚜鍔ㄦ敹璧�
+            // 鍙互閫氳繃 close-on-click-action 灞炴�у紑鍚嚜鍔ㄦ敹璧�
             this.show = false;
+
+            //let staf = this.stafList.filter(it => it.staffName === item.name);
+
             this.scanFormData.itemOutNo = item.name;
-            this.invItemOutId = item.name;
-            this.ItemBarKw = []; // 閫夋嫨鐢宠鍗曞彿鍚庢竻绌哄簱浣嶅垪琛�
+
+            let itemOut = this.itemOutNoList.filter(it => it.billNo == item.name);
+
+            this.invItemOutId = itemOut[0].id;
+
             this.getItem();
+
         },
         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,
                 barcode: that.scanFormData.barcode,
             }, false)
                 .then(function (res) {
                     var json = res;
                     if (json.status == 0) {
-                        that.ItemDetail = {
-                            items: json.data.tbBillList.items,
-                            ysitems: json.data.tbBillList.ysitems,
-                            allList: json.data.tbBillList.allList
-                        };
+                        that.ItemDetail = json.data.tbBillList;
                         that.$refs.barcode.focus();
                     }
                     else {

--
Gitblit v1.9.3