From c35b25fc7b3f039bb525b73b4f72e9e2abf8b5d9 Mon Sep 17 00:00:00 2001 From: 南骏 池 <chiffly@163.com> Date: 星期四, 29 五月 2025 15:51:05 +0800 Subject: [PATCH] 1.首检生成表格 --- H5/Js/IPQC_SJ/Add.js | 129 +++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 123 insertions(+), 6 deletions(-) diff --git a/H5/Js/IPQC_SJ/Add.js b/H5/Js/IPQC_SJ/Add.js index a3b84e0..f63bff6 100644 --- a/H5/Js/IPQC_SJ/Add.js +++ b/H5/Js/IPQC_SJ/Add.js @@ -2,6 +2,36 @@ el: '#app', data: function () { return { + tableData: [], // 鐢熸垚鐨勮〃鏍兼暟鎹� + formData: { // 琛ㄥ崟鏁版嵁 + temperatureData: {} // 瀛樺偍娓╁害鏁版嵁 + }, + headers: [], + showZr: false, + waterOptions: [ + { value: '甯告俯姘�', text: '甯告俯姘�' }, + { value: '0鈩�', text: '0鈩�' }, + { value: '5鈩�', text: '5鈩�' }, + { value: '15鈩�', text: '15鈩�' }, + { value: '35鈩�', text: '35鈩�' }, + { value: '55鈩�', text: '55鈩�' }, + { value: '75鈩�', text: '75鈩�' }, + { value: '100鈩�', text: '100鈩�' } + ], + flowOptions: [ + { value: '100ml', text: '100ml' }, + { value: '200ml', text: '200ml' }, + { value: '300ml', text: '300ml' }, + { value: '400ml', text: '400ml' }, + { value: '500ml', text: '500ml' }, + { value: '600ml', text: '600ml' }, + { value: '700ml', text: '700ml' }, + { value: '800ml', text: '800ml' }, + { value: '900ml', text: '900ml' }, + { value: '1000ml', text: '1000ml' } + ], + selectedWater: [],// 宸查�夋按娓╁�� + selectedFlow: [], // 宸查�夋祦閲忓�� isLoading: false, userInfo: { "loginGuid": '', @@ -40,6 +70,8 @@ okValue: '',//OK-鏁伴噺 ngValue: '',//NG-鏁伴噺 showDialog: false,//涓嶈壇琛ㄨ堪杈撳叆妗� + showDialogRzxx: false,//璁よ瘉淇℃伅杈撳叆妗� + rzxxValue: '',//璁よ瘉淇℃伅杈撳叆鍊� //鍥剧墖涓婁紶妗� fileList: [ //{ @@ -83,6 +115,18 @@ .replace(/(\..*)\./g, '$1') // 2. 绂佹澶氫釜灏忔暟鐐� .replace(/^\./g, ''); }, + + + openZrPopup() { + this.showZr = true; + }, + closeZrPopup() { + this.showZr = false; + this.selectedWater = []; // 鍏抽棴鏃舵竻绌洪�夋嫨 + this.selectedFlow = []; // 鍏抽棴鏃舵竻绌洪�夋嫨 + }, + + //閽堝娌℃湁涓婁笅闄愬�肩殑鏁版嵁锛屽彧闇�閫夋嫨鍚堟牸鎴栦笉鍚堟牸.鎸夐挳瑙﹀彂 handleQualified(isQualified) { var input = ""; @@ -170,7 +214,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 || []; @@ -196,8 +240,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) { @@ -231,7 +275,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) { @@ -284,6 +328,10 @@ updateRemarks(guid) { this.showDialog= true }, + + updateRzxx() { + this.showDialogRzxx = true + }, deleteDetail13(guid12) { const that = this; var guid1 = that.formData.guid;//涓昏〃id @@ -316,6 +364,32 @@ }).catch(() => { // 鍙栨秷鍥炶皟 that.$toast('宸插彇娑堟搷浣�'); + 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; }); }, @@ -431,17 +505,60 @@ }, 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.tableData = []; + this.formData.temperatureData = {}; + + // 鏍¢獙閫夋嫨 + if (this.selectedWater.length === 0 || this.selectedFlow.length === 0) { + this.$toast.fail('璇峰厛閫夋嫨姘存俯鍜屾祦閲�'); + return; + } + + // 鐢熸垚琛ㄥご + const headers = ['璁惧畾娓╁害','瀹為檯娓╁害', ...this.selectedFlow.sort().map(f => f )]; + this.headers = headers; + + // 鐢熸垚琛屾暟鎹� + this.tableData = this.selectedWater.sort((a,b) => a - b).map(water => { + const row = { + temperature: water === '甯告俯姘�' ? water : water, + values: this.selectedFlow.map(flow => ({ + flow: flow, + value: '' // 鍒濆绌哄�� + })) + }; + + // 鍒濆鍖栬〃鍗曟暟鎹� + this.formData.temperatureData[water] = {}; + this.selectedFlow.forEach(flow => { + this.formData.temperatureData[water][flow] = ''; + }); + + return row; + }); + + // 鑷姩婊氬姩鍒拌〃鏍煎尯鍩� + setTimeout(() => { + const tableEl = document.getElementById('temperature-table'); + if (tableEl) tableEl.scrollIntoView({ behavior: 'smooth' }); + }, 100); + }, } -}) \ No newline at end of file +}) -- Gitblit v1.9.3