From 5c6c67ff6a447f55ed82bf925fcbb6c1ed6ab542 Mon Sep 17 00:00:00 2001
From: 南骏 池 <chiffly@163.com>
Date: 星期四, 26 六月 2025 08:34:08 +0800
Subject: [PATCH] 1.生产补料优化 2.条码拆分优化 3.入库前拆分界面

---
 H5/Js/IPQC_SJ/Add.js |  555 ++++++++++++++++++++++++++++++++++++++++++++-----------
 1 files changed, 445 insertions(+), 110 deletions(-)

diff --git a/H5/Js/IPQC_SJ/Add.js b/H5/Js/IPQC_SJ/Add.js
index faa203f..d19e67d 100644
--- a/H5/Js/IPQC_SJ/Add.js
+++ b/H5/Js/IPQC_SJ/Add.js
@@ -2,6 +2,54 @@
     el: '#app',
     data: function () {
         return {
+            tableTbData: [],      // "鍒剁儹鎬ц兘"鐢熸垚鐨勮〃鏍兼暟鎹�
+            formTbData: {         // 琛ㄥ崟鏁版嵁
+            temperatureData: {} // 瀛樺偍鐨勫疄闄呮俯搴︺�佸疄闄呮祦閲忔暟鎹�
+            },
+            indexZrxx:0,//鍒剁儹鎬ц兘index
+            headers: [],
+            showZr: false,
+            waterOptions: [
+                { value: '100鈩�', text: '100鈩�' },
+                { value: '99鈩�', text: '99鈩�' },
+                { value: '90鈩�', text: '90鈩�' },
+                { value: '85鈩�', text: '85鈩�' },
+                { value: '80鈩�', text: '80鈩�' },
+                { value: '75鈩�', text: '75鈩�' },
+                { value: '65鈩�', text: '65鈩�' },
+                { value: '60鈩�', text: '60鈩�' },
+                { value: '55鈩�', text: '55鈩�' },
+                { value: '45鈩�', text: '45鈩�' },
+                { value: '42鈩�', text: '42鈩�' },
+                { value: '甯告俯姘�', text: '甯告俯姘�' },
+                { value: '鍐版按', text: '鍐版按' },
+                { value: '70鈩�', text: '70鈩�' },
+                { value: '50鈩�', text: '50鈩�' },
+                { value: '寰喎', text: '寰喎' }
+            ],//姘存俯閫夐」
+            flowOptions: [
+                { value: '50ml', text: '50ml' },
+                { value: '100ml', text: '100ml' },
+                { value: '120ml', text: '120ml' },
+                { value: '150ml', text: '150ml' },
+                { value: '160ml', text: '160ml' },
+                { value: '200ml', text: '200ml' },
+                { value: '250ml', text: '250ml' },
+                { value: '260ml', text: '260ml' },
+                { value: '300ml', text: '300ml' },
+                { value: '350ml', text: '350ml' },
+                { value: '360ml', text: '360ml' },
+                { value: '450ml', text: '450ml' },
+                { value: '500ml', text: '500ml' },
+                { value: '550ml', text: '550ml' },
+                { value: '600ml', text: '600ml' },
+                { value: '750ml', text: '750ml' },
+                { value: '999ml', text: '999ml' },
+                { value: '涓�鍒嗛挓娴侀噺', text: '涓�鍒嗛挓娴侀噺' },
+                { value: '涓夊垎閽熸祦閲�', text: '涓夊垎閽熸祦閲�' }
+            ],//娴侀噺閫夐」
+            selectedWater: [],// 宸查�夋按娓╁��
+            selectedFlow: [],   // 宸查�夋祦閲忓��
             isLoading: false,
             userInfo: {
                 "loginGuid": '',
@@ -40,6 +88,8 @@
             okValue: '',//OK-鏁伴噺
             ngValue: '',//NG-鏁伴噺
             showDialog: false,//涓嶈壇琛ㄨ堪杈撳叆妗�
+            showDialogRzxx: false,//璁よ瘉淇℃伅杈撳叆妗�
+            rzxxValue: '',//璁よ瘉淇℃伅杈撳叆鍊�
             //鍥剧墖涓婁紶妗�
             fileList: [
                 //{
@@ -53,6 +103,19 @@
                 //    message: '涓婁紶澶辫触',
                 //},
             ],
+
+            //鏃堕棿閫夋嫨鍙傛暟
+            showScDatePicker: false,
+            minDate: new Date(new Date().getFullYear() - 1, 0, 1),  // 杩囧幓涓�骞�
+            maxDate: new Date(new Date().getFullYear() + 1, 11, 31), // 鏈潵涓�骞�
+            currentDate: new Date(),
+            scDate: '',  // 瀛樺偍鏍煎紡鍖栧悗鐨勬棩鏈�
+
+            //璁よ瘉淇℃伅閫夋嫨
+            showRzxx: false,
+            actions: [],
+            selectedRzxx: [], // 瀛樺偍澶氶�夊��
+            rzxxOptions: [], // 璁よ瘉淇℃伅閫夐」
         }
     },
     mounted() {
@@ -83,17 +146,31 @@
                 .replace(/(\..*)\./g, '$1')               // 2. 绂佹澶氫釜灏忔暟鐐�
                 .replace(/^\./g, '');    
         },
+
+
+        openZrPopup(index) {
+            this.showZr = true;
+            this.indexZrxx = this.tabActive;
+            this.loadTableConfig();
+        },
+        closeZrPopup() {
+            this.showZr = false;
+            // this.selectedWater = [];  // 鍏抽棴鏃舵竻绌洪�夋嫨
+            // this.selectedFlow = [];   // 鍏抽棴鏃舵竻绌洪�夋嫨
+        },
         //閽堝娌℃湁涓婁笅闄愬�肩殑鏁版嵁锛屽彧闇�閫夋嫨鍚堟牸鎴栦笉鍚堟牸.鎸夐挳瑙﹀彂
         handleQualified(isQualified) {
-            if (isQualified) {
-                console.log('鍚堟牸鎿嶄綔');
+            var input = "";
+            if (isQualified) { 
                 // 鎵ц鍚堟牸鐩稿叧閫昏緫
+                 input = "OK-1";
+                this.addJyzIpqc(input);
             } else {
-                console.log('涓嶅悎鏍兼搷浣�');
                 // 鎵ц涓嶅悎鏍肩浉鍏抽�昏緫
+                 input = "NG-1";
+                this.addJyzIpqc(input);
             }
         },
-
         togglePopup(index) {
             // 鍒囨崲鎸囧畾绱㈠紩鐨� popup 鐘舵��
             var that = this;
@@ -109,14 +186,6 @@
             }, true, 1).then(function (res1) {
                 if (res1.rtnCode == 1) {
                     that.tableMxData = res1.rtnData;
-                    // 缁熻鍚堟牸鏁板拰涓嶅悎鏍兼暟
-                    const list = res1.rtnData?.list || []; // 纭繚 list 鏄暟缁勶紝閬垮厤 undefined 閿欒
-                    const okNum = list.filter(item => item.fstand === '鈭�').length;
-                    const ngNum = list.length - okNum;
-
-                    // 灏嗙粨鏋滀繚瀛樺埌鎸囧畾鍙橀噺锛堝 that 鐨勬垚鍛樺睘鎬э級
-                    that.okNum = okNum;
-                    that.ngNum = ngNum;
 
                 } else {
                     that.$toast.fail(res1.rtnMsg);
@@ -125,105 +194,34 @@
                 that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
                 console.log(error);
             });
-
-
         },
-
-        getInputOK() {
-            var that = this;
-            var jys = that.tableData[that.tabActive].checkQyt;//妫�楠岄」鐩殑妫�楠屾暟
-
-            if (!that.okValue) {
-                this.$toast.fail("OK鏁颁笉鑳戒负绌�");
-                that.isLoading = false;
-                return;
-            }
-
-            if (jys < that.okValue) {
-                that.$toast.fail("褰曞叆鏁伴噺涓嶈兘澶т簬妫�楠屾暟锛�");
-                that.okValue = null;
-                //that.$refs.okValue.focus();
-                return;
-            }
-            // 鍒囨崲鎸囧畾绱㈠紩鐨� popup 鐘舵��
-            var resultValue = "OK-" + this.okValue;
-            this.getInput(resultValue);
-            that.okValue = null;
-        },
-        getInputNG() {
-            var that = this;
-            var jys = that.tableData[that.tabActive].checkQyt;//妫�楠岄」鐩殑妫�楠屾暟
-
-            if (!that.ngValue) {
-                this.$toast.fail("NG鏁颁笉鑳戒负绌�");
-                that.isLoading = false;
-                return;
-            }
-            if (jys < that.ngValue) {
-                that.$toast.fail("褰曞叆鏁伴噺涓嶈兘澶т簬妫�楠屾暟锛�");
-                that.ngValue = null;
-                //that.$refs.ngValue.focus();
-                return;
-            }
-            // 鍒囨崲鎸囧畾绱㈠紩鐨� popup 鐘舵��
-            var resultValue = "NG-" + this.ngValue;
-            this.getInput(resultValue);
-            that.ngValue = null;
-        },
-
-        getInput(resultValue) {
-            // 鍒囨崲鎸囧畾绱㈠紩鐨� popup 鐘舵��
-            var that = this;
-            var guid1 = that.formData.guid;//涓昏〃id
-            var mxguid = that.tableData[that.tabActive].guid;//妫�楠岄」鐩殑guid
-            that.isLoading = true;
-            console.log(that.formData);
-            var input = resultValue;//鎷兼帴妫�楠屽��
-            that.AxiosHttp("post", 'MesQaItemsDetect01Manager/EdtModel12', {
-                inOrderGuid1: guid1,
-                inOrderGuid5: mxguid,
-                inP1: input,//鎴栬��0k-19,鎴栬�卬g-19
-            }, true, 1).then(function (res1) {
-                if (res1.rtnCode == 1) {
-                    that.$notify({
-                        type: 'success', message: res1.rtnMsg
-                    });
-                    that.refreshJYItem();//鍒锋柊妫�楠岄」鐩�
-                    //that.tableData = null;
-                    //that.$refs.inputValue.focus();
-                } else {
-                    that.$toast.fail(res1.rtnMsg);
-                }
-                that.isLoading = false;
-            }).catch(function (error) {
-                that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
-                that.isLoading = false;
-            });
-        },
-
-        getInputTZZ() {
+        getInputJYZ() {
             // 鍒囨崲鎸囧畾绱㈠紩鐨� popup 鐘舵��
             var that = this;
 
             if (!that.inputValue) {
-                this.$toast.fail("鐗瑰緛鍊间笉鑳戒负绌�");
+                this.$toast.fail("妫�楠屽�间笉鑳戒负绌�");
                 that.isLoading = false;
                 return;
             }
+            that.addJyzIpqc(that.inputValue);
+            
+        },
 
+        addJyzIpqc(input) {
+            var that = this;
+            var guid1 = that.formData.guid;//涓昏〃id
             var mxguid = that.tableData[that.tabActive].guid;//妫�楠岄」鐩殑guid
-            var input = that.inputValue;
             that.isLoading = true;
-            that.AxiosHttp("post", 'MesQaItemsDetect01Manager/EditYangLi', {
-                dt05Guid: mxguid,
-                fSeq : "pda",
-                fVal : input,
+            that.AxiosHttp("post", 'PqcManager/AddIpqcJyz', {
+                inOrderGuid1: guid1,
+                inOrderGuid5: mxguid,
+                inP1: input,//鎴栬��0k-19,鎴栬�卬g-19,鎴栧疄闄呮楠屽��
             }, true, 1).then(function (res1) {
-                if (res1.rtnData.outSum == 1) {
+                if (res1.rtnCode > 0) {
                     that.$notify({
                         type: 'success', message: res1.rtnMsg
                     });
-                    that.okValue = null;
                     that.refreshJYItem();//鍒锋柊妫�楠岄」鐩�
                     //that.handleTabClick();//鍒锋柊妫�楠屾槑缁嗛潰鏉�
                     //that.$refs.inputValue.focus();
@@ -247,7 +245,7 @@
         //妫�楠屾槑缁嗗埛鏂�
         refreshJYItem() {
             const that = this;
-            return that.AxiosHttp("post", 'LLJ/getJYItem', {
+            return that.AxiosHttp("post", 'Ipqc/getJYItem', {
                 releaseNo: that.formData.releaseNo
             }, false).then(res1 => {
                 const tableData = res1.data.tbBillList || [];
@@ -273,8 +271,8 @@
                     let data = res.data.tbBillList[0];
                     if (data) {
                         that.formData = data;
-                        that.remarks = that.formData.remarks;
-                        that.AxiosHttp("post", 'LLJ/getJYItem', {
+                        that.remarks = that.formData.fnGDesc;
+                        that.AxiosHttp("post", 'Ipqc/getJYItem', {
                             //id: that.formData.guid,
                             releaseNo: that.formData.releaseNo
                         }, false).then(function (res1) {
@@ -308,7 +306,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) {
@@ -361,21 +359,31 @@
         updateRemarks(guid) {
             this.showDialog= true
         },
-        deleteDetail13(guid13) {
+
+        // updateRzxx() {
+        //     this.showDialogRzxx = true
+        // },
+        //鍒犻櫎妫�楠屾槑缁嗚褰�
+        deleteDetail13(guid12) {
             const that = this;
-            
+            var guid1 = that.formData.guid;//涓昏〃id
+            var mxguid = that.tableData[that.tabActive].guid;//妫�楠岄」鐩殑guid
             // 娣诲姞纭寮圭獥
             that.$dialog.confirm({
-                message: '纭瑕佸垹闄よ鏍锋湰鍊艰褰曞悧锛�',
+                message: '纭瑕佸垹闄よ妫�楠屽�艰褰曞悧锛�',
                 confirmButtonText: '纭',
                 cancelButtonText: '鍙栨秷'
             }).then(() => {  // 纭鍥炶皟
                 that.isLoading = true;
-                that.AxiosHttp("post", 'Llj/deleteDetail13', {
-                    id13: guid13
-                }, true, 0).then(res1 => {
-                    if (res1.status == 0) {
-                        that.$notify({ type: 'success', message: '鍒犻櫎鎴愬姛' });
+                that.AxiosHttp("post", 'PqcManager/DeleteIpqcJyz', {
+                    inOrderGuid1: guid1,
+                    inOrderGuid5: mxguid,
+                    inOrderGuid12: guid12
+                }, true, 1).then(res1 => {
+                    if (res1.rtnCode > 0) {
+                        that.$notify({
+                            type: 'success', message: res1.rtnMsg
+                        });
                         that.refreshJYItem();//鍒锋柊妫�楠岄」鐩�
                     } else {
                         that.$toast.fail(res1.rtnMsg);
@@ -391,6 +399,58 @@
                 that.isLoading = false;
             });
         },
+        //鏇存柊璁よ瘉淇℃伅
+        rzxxConfirm() {
+            var that = this;
+            var guid1 = that.formData.guid;//涓昏〃id
+            var mxguid = that.tableData[that.tabActive].guid;//妫�楠岄」鐩殑guid
+            that.isLoading = true;
+            that.AxiosHttp("post", 'Ipqc/updateIpqcRzxx', {
+                gid: guid1,
+                pid: mxguid,
+                inRzxxValue: that.rzxxValue,//杈撳叆鐨勮璇佷俊鎭�
+            }, true, 0).then(function (res) {
+                var json = res;
+                if (json.status == 0) {
+                    that.$notify({ type: 'success', message: '杈撳叆鎴愬姛' });
+                    //that.refreshJYItem();//鍒锋柊妫�楠岄」鐩�
+                }
+                else {
+                    that.$toast.fail(json.message);
+                }
+                //that.$notify({ type: 'success', message: json.message });
+                that.isLoading = false;
+            }).catch(function (error) {
+                that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
+                that.inRzxxValue = null;
+                that.isLoading = false;
+            });
+        },
+        // 淇敼鍘焤zxxConfirm鏂规硶
+        updateRzxxToServer(selectedValues) {
+            var that = this;
+            that.AxiosHttp("post", 'Ipqc/updateIpqcRzxx', {
+            gid: that.formData.guid,
+            pid: that.tableData[that.tabActive].guid,
+            inRzxxValue: that.jymxData.ipqcrzxx  // 鏀逛负鏁扮粍鏍煎紡
+            }).then(res => {
+                var json = res;
+                if (json.status == 0) {
+                    that.$notify({ type: 'success', message: '杈撳叆鎴愬姛' });
+                    //that.refreshJYItem();//鍒锋柊妫�楠岄」鐩�
+                }
+                else {
+                    that.$toast.fail(json.message);
+                }
+                //that.$notify({ type: 'success', message: json.message });
+                that.isLoading = false;
+            }).catch(function (error) {
+                that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
+                that.inRzxxValue = null;
+                that.isLoading = false;
+            });
+        },
+        //鏇存柊涓嶅悎鏍艰〃杩�
         remarksConfirm() {
             const that = this;
             that.isLoading = true;
@@ -503,17 +563,292 @@
                 }, 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();//鍒锋柊妫�楠岄」鐩�
             })
         },
+        createTb() {
+            // 娓呯┖鏃ф暟鎹�
+            this.tableTbData = [];
+            this.formTbData.temperatureData = {};
+    
+            // 鏍¢獙閫夋嫨
+            if (this.selectedWater.length === 0 || this.selectedFlow.length === 0) {
+                this.$toast.fail('璇峰厛閫夋嫨姘存俯鍜屾祦閲�');
+                return;
+            }
+    
+            // 鐢熸垚琛ㄥご
+            // 淇敼headers鐢熸垚閫昏緫 鈫�
+            const headers = [
+                '璁惧畾娓╁害', 
+                '瀹為檯娓╁害锛堚剝锛�', 
+                ...this.selectedFlow.sort().map(f => `${f}`)
+            ];
+            this.headers = headers;
+            console.log(this.headers);
+            // 鐢熸垚琛屾暟鎹�
+            this.tableTbData = this.selectedWater.sort((a,b) => a - b).map(water => {
+                const row = {
+                    temperature: water === '甯告俯姘�' ? water : water,
+                    values: Object.fromEntries([
+                        ['temp', ''],  // 鍥哄畾娓╁害瀛楁
+                        ...this.selectedFlow.map(flow => [flow, ''])
+                    ])
+                };
+                
+                // 鍒濆鍖栬〃鍗曟暟鎹粨鏋�
+                this.$set(this.formTbData.temperatureData, water, {});
+                // 娣诲姞鍥哄畾瀛楁鈥濆疄闄呮俯搴︹�滃垵濮嬪寲
+                this.$set(this.formTbData.temperatureData[water], 'temp', '');
+                this.selectedFlow.forEach(flow => {
+                    this.$set(this.formTbData.temperatureData[water], flow, '');
+                });
+                
+                return row;
+            });
+    
+            // 鑷姩婊氬姩鍒拌〃鏍煎尯鍩�
+            setTimeout(() => {
+                const tableEl = document.getElementById('temperature-table');
+                if (tableEl) tableEl.scrollIntoView({ behavior: 'smooth' });
+            }, 100);
+            console.log(this.formTbData);
+        },
+        // 鏂板淇濆瓨閰嶇疆鏂规硶
+        saveTableConfig() {
+            const that = this;
+            that.isLoading = true;
+            
+            that.AxiosHttp("post", 'Ipqc/SaveTableConfig', {
+                selectedWater: (that.selectedWater),
+                selectedFlow: (that.selectedFlow),
+                tableData: (that.formTbData.temperatureData),
+                mxguid: that.tableData[that.indexZrxx].guid // 浣跨敤涓昏〃ID鍏宠仈
+            }, true).then(res1 => {
+                if (res1.status === 0) {
+                    that.$notify({ type: 'success', message: '閰嶇疆淇濆瓨鎴愬姛' });
+                } else {
+                    that.$toast.fail(res1.rtnMsg);
+                }
+                that.isLoading = false;
+            }).catch(error => {
+                that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
+                that.isLoading = false;
+            });
+        },
+        // 鏂板鍔犺浇閰嶇疆鏂规硶
+        loadTableConfig() {
+            const that = this;
+            that.isLoading = true;
+            var mxguid =  that.tableData[that.indexZrxx].guid;
+
+
+            that.AxiosHttp("post", 'Ipqc/GetTableConfig', {
+                mxguid: mxguid,
+            }, true).then(res1 => {
+                if (res1.status === 0 && res1.data) {
+                    // 瑙f瀽瀛樺偍鐨勬暟鎹�
+                    that.selectedWater = JSON.parse(res1.data.selectedWater || '[]');
+                    that.selectedFlow = JSON.parse(res1.data.selectedFlow || '[]');
+                    that.formTbData.temperatureData = JSON.parse(res1.data.tableData || '{}');
+                    
+                    // 璋冪敤鏂扮殑娓叉煋鏂规硶
+                    this.renderExistingTable();
+                }
+                that.isLoading = false;
+            }).catch(error => {
+                that.isLoading = false;
+                that.$toast.fail("鍔犺浇閰嶇疆澶辫触");
+            });
+        },
+
+        // 鏂板娓叉煋宸叉湁鏁版嵁琛ㄦ牸鐨勬柟娉�
+        renderExistingTable() {
+            const that = this;
+            console.log(that.formTbData.temperatureData);
+            // 浠庣幇鏈夋暟鎹弽鍚戞帹瀵奸�夋嫨椤�
+            const existingWaters = Object.keys(that.formTbData.temperatureData);
+            const existingFlows = existingWaters.length > 0 
+                ? Object.keys(that.formTbData.temperatureData[existingWaters[0]])
+                    .filter(k => k !== 'temp')
+                : [];
+            
+            // 鐢熸垚琛ㄥご锛堜繚鐣欏師濮媍reateTb鐨勬牸寮忥級
+            that.headers = [
+                '璁惧畾娓╁害', 
+                '瀹為檯娓╁害锛堚剝锛�', 
+                ...existingFlows.map(f => `${f}`)
+            ];
+            
+            // 鐢熸垚琛屾暟鎹紙淇濈暀鍘熷缁撴瀯锛�
+            that.tableTbData = existingWaters.map(water => {
+                const values = that.formTbData.temperatureData[water];
+                return {
+                    temperature: water,
+                    values: Object.fromEntries([
+                        ['temp', values.temp || ''],
+                        ...existingFlows.map(flow => [flow, values[flow] || ''])
+                    ])
+                };
+            });
+            console.log(that.formTbData.temperatureData);
+            // 淇濈暀鍘熷婊氬姩閫昏緫
+            setTimeout(() => {
+                const tableEl = document.getElementById('temperature-table');
+                if (tableEl) tableEl.scrollIntoView({ behavior: 'smooth' });
+            }, 100);
+            console.log(that.formTbData.temperatureData);
+        },
+        //淇濆瓨鐢熶骇鏃ユ湡
+        confirmScDate(value) {
+            const date = new Date(value);
+            this.scDate = `${date.getFullYear()}-${(date.getMonth() + 1).toString().padStart(2, '0')}-${date.getDate().toString().padStart(2, '0')}`;
+            //this.rzxxValue = this.scDate; // 鍚屾椂鏇存柊璁よ瘉淇℃伅瀛楁
+            console.log(this.scDate);
+
+            var that = this;
+            var guid1 = that.formData.guid;//涓昏〃id
+            var mxguid = that.tableData[that.tabActive].guid;//妫�楠岄」鐩殑guid
+            that.isLoading = true;
+            that.AxiosHttp("post", 'Ipqc/updateScDate', {
+                gid: guid1,
+                mxguid: mxguid,
+                scDateValue: that.scDate,//杈撳叆鐨勮璇佷俊鎭�
+            }, true, 0).then(function (res) {
+                var json = res;
+                if (json.status == 0) {
+                    that.$notify({ type: 'success', message: '杈撳叆鎴愬姛' });
+                    that.refreshJYItem();//鍒锋柊妫�楠岄」鐩�
+                }
+                else {
+                    that.$toast.fail(json.message);
+                }
+                //that.$notify({ type: 'success', message: json.message });
+                that.isLoading = false;
+            }).catch(function (error) {
+                that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
+                that.inRzxxValue = null;
+                that.isLoading = false;
+            });
+
+            this.showScDatePicker = false;
+        },
+
+        selectRzxx() {
+            this.showRzxx = true;
+            this.getRzxxList();
+        },
+        //鑾峰彇璁よ瘉淇℃伅鐩稿叧鍒楄〃
+        getRzxxList() {
+            var that = this;
+            that.rzxxOptions = [];
+            that.isLoading = true;
+            var mxguid = that.tableData[that.tabActive].guid;//妫�楠岄」鐩殑guid
+            that.AxiosHttp("post", 'Ipqc/GetRzxxList', {
+                // 鏍规嵁瀹為檯鎺ュ彛闇�瑕佷紶閫掑弬鏁�
+                mxguid: mxguid,
+            }, false)
+            .then(function (res) {
+                if (res.status == 0) {
+                    // that.actions = res.data.tbBillList.map(item => {
+                    //     return { name: item.defect_name } // 鏍规嵁瀹為檯鏁版嵁缁撴瀯璋冩暣
+                    // });
+                    that.rzxxOptions = res.data.tbBillList.map(item => ({
+                        value: item.defect_name, // 鍋囪guid鏄敮涓�鏍囪瘑绗�
+                        text: item.defect_name // 璁よ瘉淇℃伅鍚嶇О
+                    }));
+                } else {
+                    that.$toast.fail(res.message);
+                }
+                that.isLoading = false;
+            })
+            .catch(function (error) {
+                that.isLoading = false;
+                that.$toast.fail("鑾峰彇璁よ瘉淇℃伅澶辫触");
+            });
+        },
+        // 鏂板纭澶氶�夋柟娉�
+        confirmMultiRzxx() {
+            const selectedTexts = this.rzxxOptions
+            .filter(item => this.selectedRzxx.includes(item.value))
+            .map(item => item.text);
+            
+            // 淇敼杩欓噷锛氱敤鎹㈣绗︽浛浠i�楀彿鍒嗛殧
+            this.jymxData.ipqcrzxx = selectedTexts.join('\n');
+            this.showRzxx = false;
+            
+            // 鏇存柊澶氶�夊�煎埌鍚庣
+            this.updateRzxxToServer(selectedTexts);
+        },
+
+        //閫夋嫨璁よ瘉淇℃伅
+        onRzxxSelect(item) {
+            this.showRzxx = false;
+            this.rzxxValue = item.name;
+            this.rzxxConfirm();
+            //this.refreshJYItem();//鍒锋柊妫�楠岄」鐩�
+            // 濡傛灉闇�瑕佽幏鍙栬缁嗕俊鎭彲鍦ㄦ澶勮皟鐢ㄥ叾浠栨柟娉�
+        },
+        //鏇存柊璁よ瘉淇℃伅浣跨敤鏁伴噺
+        updateRzxxNum(value, index) {
+            // 娣诲姞闃叉姈鍒ゆ柇
+            if (this.isLoading) {
+                return;
+            }
+
+            const that = this;
+            that.isLoading = true;
+            that.AxiosHttp("post", 'Ipqc/saveIpqcrzxxNum', {
+                guid: that.tableData[that.tabActive].guid,
+                ipqcrzxxNum: value
+            }, true, 0).then(res => {
+                if (res.status == 0) {
+                    //that.$notify({ type: 'success', message: '鏁伴噺鏇存柊鎴愬姛' });
+                    //that.refreshJYItem();//鍒锋柊妫�楠岄」鐩�
+                } else {
+                    that.$toast.fail(res.rtnMsg);
+                }
+                that.isLoading = false;
+            }).catch(error => {
+                that.isLoading = false;
+                that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
+            });
+        },
+        //鏇存柊鏄惁鏈夋棤寮傚懗
+        updateCpscs(value) {
+            // 娣诲姞闃叉姈鍒ゆ柇
+            if (this.isLoading) {
+                return;
+            }
+            const that = this;
+            that.isLoading = true;
+            if (!value) return;
+            that.AxiosHttp("post", 'Ipqc/saveIpqCpscs', {
+                guid: that.tableData[that.tabActive].guid,
+                ipqCpscs: value
+            }, true, 0).then(res => {
+                if (res.status == 0) {
+                    //that.refreshJYItem();
+                } else {
+                    that.$toast.fail(res.rtnMsg);
+                }
+                that.isLoading = false;
+            }).catch(error => {
+                that.isLoading = false;
+                that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
+            });
+        },
     }
-})
\ No newline at end of file
+})

--
Gitblit v1.9.3