From 03ff743705dd64f67e6e4aabd03ec5591b922ff9 Mon Sep 17 00:00:00 2001
From: 南骏 池 <chiffly@163.com>
Date: 星期一, 09 六月 2025 12:28:50 +0800
Subject: [PATCH] 1.生产补料/超领优化 2.委外补料/超领优化 3.巡检检验新增工单查询选择 4.巡检优化新增时间段字段

---
 H5/Js/IPQC_XJ/Add.js |  104 +++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 102 insertions(+), 2 deletions(-)

diff --git a/H5/Js/IPQC_XJ/Add.js b/H5/Js/IPQC_XJ/Add.js
index 7df1dbf..5351162 100644
--- a/H5/Js/IPQC_XJ/Add.js
+++ b/H5/Js/IPQC_XJ/Add.js
@@ -40,6 +40,10 @@
             okValue: '',//OK-鏁伴噺
             ngValue: '',//NG-鏁伴噺
             showDialog: false,//涓嶈壇琛ㄨ堪杈撳叆妗�
+            selectKey: "",//鏌ヨ鍏抽敭瀛�
+            actions: [],//鍒楄〃鐨勫��
+            daashow: false,//宸ュ崟鍒楄〃灞曠ず
+            lineId:[],
             //鍥剧墖涓婁紶妗�
             fileList: [
 
@@ -111,6 +115,70 @@
                 console.log(error);
             });
         },
+
+        getInfo() {
+            this.daashow = true;
+            var that = this;
+            that.actions = [];
+            that.isLoading = true;
+            console.log(that.lineId);
+
+            that.AxiosHttp("post", 'Ipqc/GetIpqcXjDaa', {
+                selectKey: that.selectKey,
+                xt: that.lineId,
+            }, false)
+                .then(function (res) {
+                    var json = res;
+                    if (json.status == 0) {
+
+                        if (json.data.tbBillList.length <= 0) {
+                            that.$toast.fail("娌℃湁鍙敤鐨勬暟鎹�");
+                            that.$playSound('error');
+                        } else {
+                            that.itemInfo = json.data.tbBillList;
+                            that.actions = json.data.tbBillList.map(item => {
+                                return {
+                                    name: item.daaInfo  // 鎷兼帴瀛楁
+
+                                };
+                            });
+                        }
+                    }
+                    else {
+                        that.$toast.fail(json.message);
+                        that.$playSound('error');
+                    }
+                    that.isLoading = false;
+                })
+                .catch(function (error) {
+                    that.isLoading = false;
+                    that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
+                    that.$playSound('error');
+                    console.log(error);
+                });
+        },
+
+        onSelect(item) {
+            // 榛樿鎯呭喌涓嬬偣鍑婚�夐」鏃朵笉浼氳嚜鍔ㄦ敹璧�
+            // 鍙互閫氳繃 close-on-click-action 灞炴�у紑鍚嚜鍔ㄦ敹璧�
+            this.daashow = false;
+            console.log(item);
+            // 姝e垯鍖归厤绗竴涓柟鎷彿鍐呭
+            const regex = /\[([^\]]+)\]/;
+            const matchResult = item.name.match(regex);
+
+            if (matchResult && matchResult[1]) {
+                this.formData.lotNo = matchResult[1]; // PPBOM00000088-1
+                console.log('鎻愬彇鐨凞AA001:', this.formData.lotNo);
+            } else {
+                this.$toast.fail('宸ュ崟鍙锋牸寮忓紓甯�');
+                this.formData.lotNo = '';
+            }
+            this.createByWomdaa();
+            //this.$toast(item.name);
+
+        },
+
         getInputJYZ() {
             // 鍒囨崲鎸囧畾绱㈠紩鐨� popup 鐘舵��
             var that = this;
@@ -158,6 +226,34 @@
             console.log(this.tabActive)
             this.togglePopup(this.tabActive);
         },
+
+        //鐢熸垚妫�楠屽崟
+        createByWomdaa() {
+            const that = this;
+            var guid1 = that.formData.guid;//涓昏〃id
+            return that.AxiosHttp("post", 'Ipqc/createByWomdaa', {
+                inOrderGuid1: guid1,
+                userAccount: that.userInfo.loginAccount,
+                DAA001: that.formData.lotNo
+            }, false).then(res => {
+                var json = res;
+                if (json.status == 0) {
+
+                }
+                else {
+                    that.$toast.fail(json.message);
+                    that.$playSound('error');
+                    that.formData.lotNo = "";
+                }
+                that.isLoading = false;
+                that.init();
+                
+            }).catch(error => {
+                that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
+                console.error('Refresh error:', error);
+            });
+        },
+
         //妫�楠屾槑缁嗗埛鏂�
         refreshJYItem() {
             const that = this;
@@ -188,6 +284,7 @@
                     if (data) {
                         that.formData = data;
                         that.remarks = that.formData.fnGDesc;
+                        that.lineId = data.lineId;
                         that.AxiosHttp("post", 'LLJ/getJYItem', {
                             //id: that.formData.guid,
                             releaseNo: that.formData.releaseNo
@@ -222,7 +319,7 @@
         submit() {
             var that = this;
             that.ttrre = true;
-            that.AxiosHttp("post", 'MesQaItemsDetect01Manager/EditModelSubmit', {
+            that.AxiosHttp("post", 'FqcManager/EditModelSubmit', {
                 guid: that.formData.guid
             }, true, 1).then(function (res1) {
                 if (res1.rtnData.outSum == 1) {
@@ -422,16 +519,19 @@
                 }, true, 0).then(res1 => {
                     if (res1.status === 0) {
                         that.$notify({ type: 'success', message: '鍒犻櫎鎴愬姛' });
-                        that.init();//鍒锋柊妫�楠岄」鐩�
+                        
                     } else {
                         that.$toast.fail(res1.rtnMsg);
+                        
                     }
+                    that.init();//鍒锋柊妫�楠岄」鐩�
                 }).catch(error => {
                     that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
                 });
 
             }).catch(() => {
                 // 鍙栨秷鎿嶄綔
+                that.init();//鍒锋柊妫�楠岄」鐩�
             })
         },
     }

--
Gitblit v1.9.3