From 70cb04a1eabdf0ffdddc017f219eb6bc9f13de66 Mon Sep 17 00:00:00 2001 From: 南骏 池 <chiffly@163.com> Date: 星期三, 28 五月 2025 15:22:31 +0800 Subject: [PATCH] 1.现场收料字段优化 --- H5/Js/IPQC_SJ/Add.js | 181 ++++++++++++++++++--------------------------- 1 files changed, 72 insertions(+), 109 deletions(-) diff --git a/H5/Js/IPQC_SJ/Add.js b/H5/Js/IPQC_SJ/Add.js index faa203f..7db3472 100644 --- a/H5/Js/IPQC_SJ/Add.js +++ b/H5/Js/IPQC_SJ/Add.js @@ -40,6 +40,8 @@ okValue: '',//OK-鏁伴噺 ngValue: '',//NG-鏁伴噺 showDialog: false,//涓嶈壇琛ㄨ堪杈撳叆妗� + showDialogRzxx: false,//璁よ瘉淇℃伅杈撳叆妗� + rzxxValue: '',//璁よ瘉淇℃伅杈撳叆鍊� //鍥剧墖涓婁紶妗� fileList: [ //{ @@ -85,15 +87,17 @@ }, //閽堝娌℃湁涓婁笅闄愬�肩殑鏁版嵁锛屽彧闇�閫夋嫨鍚堟牸鎴栦笉鍚堟牸.鎸夐挳瑙﹀彂 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 +113,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 +121,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 +172,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 +198,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 +233,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 +286,30 @@ 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); @@ -388,6 +322,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; }); }, @@ -503,16 +463,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