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/Dbck.js |   72 ++++++++++++++++++++++++++++++++++--
 1 files changed, 68 insertions(+), 4 deletions(-)

diff --git a/H5/Js/Dbck.js b/H5/Js/Dbck.js
index 42df939..37e9047 100644
--- a/H5/Js/Dbck.js
+++ b/H5/Js/Dbck.js
@@ -11,8 +11,14 @@
             num: "",
             fum: "",
             billNo: "",
-            barcode:"",
-            ItemBlDetail:[],
+            barcode: "",
+
+            ItemBlDetail: [], // 寰呮壂
+            ItemYsDetail: [], // 宸叉壂
+            ItemDetail: [],
+            ItemBarKw: [],
+            currentIndex: -1,
+
             modeInfo: [],
             active: 0,
             show: false,
@@ -29,6 +35,56 @@
         };
     },
     methods: {
+        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();
+            //this.active = 1;            //鑷姩鍒囨崲鍒板簱浣嶅垪琛╰ab
+        },
+        GetBarKwByItem() {
+
+            var that = this;
+            that.isLoading = true;
+            that.AxiosHttp("post", 'Womdaa/GetBarKwByItemCK', {
+                itemId: that.selItem.itemid,
+                userName: that.userInfo.loginAccount,
+                type: 'DBCK',//璋冩嫧鍑哄簱
+                billNo: that.billNo
+            }, 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 = [];
+                });
+        },
         getInfo() {
             this.show = true;
 
@@ -71,6 +127,8 @@
             this.show = false;
 
             this.billNo = item.name;
+            // 娓呯┖搴撲綅鍒楄〃
+            this.ItemBarKw = [];
             this.GetMesItemBlDetailByBillNo();
             //this.$toast(item.name);
 
@@ -84,9 +142,15 @@
                 .then(function (res) {
                     var json = res;
                     if (json.status == 0) {
-                        that.ItemDetail = json.data.tbBillList;
+                        //that.ItemDetail = json.data.tbBillList;
+                        var tbBillList = json.data.tbBillList || {};
+                        that.ItemBlDetail = tbBillList.blDetails || []; // 寰呮壂
+                        that.ItemYsDetail = tbBillList.ysDetails || []; // 宸叉壂
                         that.$refs.barcode.focus();
                         that.barcode = "";
+                        // 閲嶇疆搴撲綅鏌ヨ涓墍鏈夎鐨勯�変腑鐘舵��
+                        that.currentIndex = -1;
+                        that.ItemBarKw = [];
                     }
                     else {
                         that.$toast.fail(json.message);
@@ -144,7 +208,7 @@
                         ////that.fum = json.data.form.fum;
                         //that.ItemBlDetail = json.data.items
                         that.$notify({ type: 'success', message: '鎵爜鎴愬姛' });
-
+                        that.$toast.success("鎵弿鎴愬姛");
                         that.$refs.barcode.focus();
                         that.barcode = "";
                         //that.GetMesItemBlDetailByBillNo();

--
Gitblit v1.9.3