From cd5ce6eddc8b5b5bc379a4fe7af9b6be8910b9af Mon Sep 17 00:00:00 2001 From: WenShiJun Date: Tue, 25 Jun 2024 17:46:55 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=80=E6=9C=89=E8=8A=82=E7=82=B9=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E5=8F=AA=E8=83=BD=E7=9C=8B=E5=88=B0=E5=BD=93=E5=89=8D?= =?UTF-8?q?=E8=8A=82=E7=82=B9=E5=8F=8A=E5=89=8D=E8=8A=82=E7=82=B9=E6=89=93?= =?UTF-8?q?=E5=9B=9E=E7=9A=84=E6=95=B0=E6=8D=AE=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E6=A3=80=E6=9F=A5=E9=A1=B9=E7=A1=AE=E8=AE=A4=E4=BA=BA=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E6=B2=A1=E6=9C=89=E5=81=9A=E6=9D=83=E9=99=90=E6=8E=A7?= =?UTF-8?q?=E5=88=B6=20=E6=89=80=E6=9C=89=E8=8A=82=E7=82=B9=E6=89=93?= =?UTF-8?q?=E5=9B=9E=E6=97=B6=E6=B7=BB=E5=8A=A0Loading=E5=8A=A0=E8=BD=BD?= =?UTF-8?q?=E6=95=88=E6=9E=9C=EF=BC=8C=E4=BF=AE=E6=94=B9=E6=89=80=E6=9C=89?= =?UTF-8?q?=E7=9A=84=E6=89=93=E5=9B=9E=E5=BC=B9=E7=AA=97=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=E6=A1=86=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hotwork-accept/hotwork-accept-detail.vue | 10 +- .../hotwork-accept/hotwork-accept-list.vue | 5 +- .../hotwork-approve-detail.vue | 19 +- .../hotwork-approve/hotwork-approve-list.vue | 5 +- .../hotwork-audit/hotwork-audit-detail.vue | 19 +- .../hotwork-audit/hotwork-audit-list.vue | 5 +- .../hotwork-confirm-detail.vue | 252 ++++++++++-------- .../hotwork-leader/hotwork-leader-detail.vue | 19 +- .../hotwork-leader/hotwork-leader-list.vue | 7 +- .../hotwork-monitor-detail.vue | 19 +- .../hotwork-monitor/hotwork-monitor-list.vue | 5 +- .../hotwork-xiang-mu/hotwork-xiang-detail.vue | 37 ++- .../hotwork-xiang-mu/hotwork-xiang-list.vue | 9 +- 13 files changed, 242 insertions(+), 169 deletions(-) diff --git a/pages/application/hotwork_cfd/hotwork-accept/hotwork-accept-detail.vue b/pages/application/hotwork_cfd/hotwork-accept/hotwork-accept-detail.vue index 3365f28..c979aa9 100644 --- a/pages/application/hotwork_cfd/hotwork-accept/hotwork-accept-detail.vue +++ b/pages/application/hotwork_cfd/hotwork-accept/hotwork-accept-detail.vue @@ -422,11 +422,11 @@ - - 是否确定打回? - - - + + 是否确定打回? + + + diff --git a/pages/application/hotwork_cfd/hotwork-accept/hotwork-accept-list.vue b/pages/application/hotwork_cfd/hotwork-accept/hotwork-accept-list.vue index e34be0c..2c8ce6e 100644 --- a/pages/application/hotwork_cfd/hotwork-accept/hotwork-accept-list.vue +++ b/pages/application/hotwork_cfd/hotwork-accept/hotwork-accept-list.vue @@ -560,11 +560,12 @@ uni.hideLoading();//结束加载中动画 if (res.data != null) { _this.totalPage = res.data.page.totalPage; + let filteredList = res.data.varList.filter(item => item.APPLY_STATUS != '-1.5' && item.APPLY_STATUS != '-2' && item.APPLY_STATUS != '-4' && item.APPLY_STATUS != '-5' && item.APPLY_STATUS != '-6' && item.APPLY_STATUS != '-7'); if(_this.list.length == 0){ - _this.list = res.data.varList; + _this.list = filteredList; }else{ if(res.data.varList != null){ - _this.list2 = res.data.varList; + _this.list2 = filteredList; _this.list = _this.list.concat(_this.list2); } } diff --git a/pages/application/hotwork_cfd/hotwork-approve/hotwork-approve-detail.vue b/pages/application/hotwork_cfd/hotwork-approve/hotwork-approve-detail.vue index 3a82709..ad17a7f 100644 --- a/pages/application/hotwork_cfd/hotwork-approve/hotwork-approve-detail.vue +++ b/pages/application/hotwork_cfd/hotwork-approve/hotwork-approve-detail.vue @@ -370,11 +370,11 @@ - - 是否确定打回? - - - + + 是否确定打回? + + + @@ -585,6 +585,15 @@ return; } this.showRejectionConfirm = true; + }, + handleRejectionConfirm() { + this.showRejectionConfirm = false; + uni.showLoading({ + title: '加载中' + }); + this.goSubmit('-6').finally(() => { + uni.hideLoading(); + }); }, goSubmit(STATUS){ var _this = this; diff --git a/pages/application/hotwork_cfd/hotwork-approve/hotwork-approve-list.vue b/pages/application/hotwork_cfd/hotwork-approve/hotwork-approve-list.vue index 3e3e801..e322b3f 100644 --- a/pages/application/hotwork_cfd/hotwork-approve/hotwork-approve-list.vue +++ b/pages/application/hotwork_cfd/hotwork-approve/hotwork-approve-list.vue @@ -561,11 +561,12 @@ uni.hideLoading();//结束加载中动画 if (res.data != null) { _this.totalPage = res.data.page.totalPage; + let filteredList = res.data.varList.filter(item => item.APPLY_STATUS != '-1.5' && item.APPLY_STATUS != '-2' && item.APPLY_STATUS != '-4' && item.APPLY_STATUS != '-5'); if(_this.list.length == 0){ - _this.list = res.data.varList; + _this.list = filteredList; }else{ if(res.data.varList != null){ - _this.list2 = res.data.varList; + _this.list2 = filteredList; _this.list = _this.list.concat(_this.list2); } } diff --git a/pages/application/hotwork_cfd/hotwork-audit/hotwork-audit-detail.vue b/pages/application/hotwork_cfd/hotwork-audit/hotwork-audit-detail.vue index 7e68be9..9f4cc0c 100644 --- a/pages/application/hotwork_cfd/hotwork-audit/hotwork-audit-detail.vue +++ b/pages/application/hotwork_cfd/hotwork-audit/hotwork-audit-detail.vue @@ -409,11 +409,11 @@ - - 是否确定打回? - - - + + 是否确定打回? + + + @@ -621,6 +621,15 @@ return; } this.showRejectionConfirm = true; + }, + handleRejectionConfirm() { + this.showRejectionConfirm = false; + uni.showLoading({ + title: '加载中' + }); + this.goSubmit('-5').finally(() => { + uni.hideLoading(); + }); }, goSubmit(STATUS){ var _this = this; diff --git a/pages/application/hotwork_cfd/hotwork-audit/hotwork-audit-list.vue b/pages/application/hotwork_cfd/hotwork-audit/hotwork-audit-list.vue index 320bfd3..e4243f8 100644 --- a/pages/application/hotwork_cfd/hotwork-audit/hotwork-audit-list.vue +++ b/pages/application/hotwork_cfd/hotwork-audit/hotwork-audit-list.vue @@ -561,11 +561,12 @@ uni.hideLoading();//结束加载中动画 if (res.data != null) { _this.totalPage = res.data.page.totalPage; + let filteredList = res.data.varList.filter(item => item.APPLY_STATUS != '-1.5' && item.APPLY_STATUS != '-2' && item.APPLY_STATUS != '-4'); if(_this.list.length == 0){ - _this.list = res.data.varList; + _this.list = filteredList; }else{ if(res.data.varList != null){ - _this.list2 = res.data.varList; + _this.list2 = filteredList; _this.list = _this.list.concat(_this.list2); } } diff --git a/pages/application/hotwork_cfd/hotwork-confirm/hotwork-confirm-detail.vue b/pages/application/hotwork_cfd/hotwork-confirm/hotwork-confirm-detail.vue index 911502e..f7bd598 100644 --- a/pages/application/hotwork_cfd/hotwork-confirm/hotwork-confirm-detail.vue +++ b/pages/application/hotwork_cfd/hotwork-confirm/hotwork-confirm-detail.vue @@ -300,16 +300,16 @@ - - - - + + + + - - 是否确定打回? - - - + + 是否确定打回? + + + @@ -337,6 +337,7 @@ data() { return { showRejectionConfirm: false, + loadingRejection: false, baseImgPath:baseImgPath, buttonloading: false, isUps:false, @@ -495,123 +496,144 @@ } this.showRejectionConfirm = true; }, - goSubmit(STATUS) { - var _this = this; + + handleRejectionConfirm() { + this.showRejectionConfirm = false; uni.showLoading({ - title: '请稍候' + title: '加载中' }); - - if (STATUS === '1.5') { - if (_this.imgList.length <= 0) { - uni.showToast({ - icon: 'none', - title: '请签字', - duration: 1500 - }); - return; - } - } - - const formData = {}; - Object.keys(this.pd).map(key => { - formData[key] = this.pd[key]; + this.goSubmit('-1.5').finally(() => { + uni.hideLoading(); }); - formData.CORPINFO_ID = corpinfoId; - formData.CREATOR = loginUser.USER_ID; - formData.OPERATOR = loginUser.USER_ID; - formData.ACTION_USER = loginUser.NAME; - formData.APPLY_STATUS = STATUS; + }, - if (STATUS === '1.5') { - uni.request({ - url: basePath + '/app/hotwork/cfd/check', - method: 'POST', - header: { - 'Content-type': 'application/x-www-form-urlencoded' - }, - data: { - HOTWORK_ID: _this.pd.HOTWORK_ID - }, - success: (res) => { - if (res.data.result === 'success') { - uni.hideLoading(); - if (res.data.passFlag === '0') { - uni.showModal({ - title: '', - content: res.data.message, - cancelColor: "#000000", - cancelText: '取消', - confirmText: '确定', - success: res => { - this.buttonloading = false; - } - }); - } else { - formData.STATUS = STATUS; - formData.measuresList = JSON.stringify(this.measuresList); - formData.CORPINFO_ID = loginUser.CORPINFO_ID; - formData.USER_ID = loginUser.USER_ID; - this.buttonloading = true; - uni.uploadFile({ - url: basePath + '/app/hotwork/cfd/editStatus', - filePath: _this.imgList[0].filePath, - name: 'FFILE', - formData: formData, - success: (res) => { - uni.showToast({ - icon: 'none', - title: '保存成功', - duration: 2000 - }); - _this.goback(); - this.buttonloading = false; - }, - fail: (err) => { - uni.hideLoading(); - uni.showModal({ - content: err.errMsg, - showCancel: false - }); - } - }); - } - } else if (res.data.result === 'exception') { - uni.showToast({ - title: '错误', - duration: 2000 - }); - } - } + goSubmit(STATUS) { + return new Promise((resolve, reject) => { + var _this = this; + uni.showLoading({ + title: '请稍候' }); - } else { - formData.STATUS = STATUS; - formData.measuresList = JSON.stringify(this.measuresList); - formData.CORPINFO_ID = loginUser.CORPINFO_ID; - formData.USER_ID = loginUser.USER_ID; - this.buttonloading = true; - uni.uploadFile({ - url: basePath + '/app/hotwork/cfd/editStatus', - filePath: _this.imgList[0].filePath, - name: 'FFILE', - formData: formData, - success: (res) => { + + if (STATUS === '1.5') { + if (_this.imgList.length <= 0) { uni.showToast({ icon: 'none', - title: '保存成功', - duration: 2000 + title: '请签字', + duration: 1500 }); - _this.goback(); - this.buttonloading = false; - }, - fail: (err) => { uni.hideLoading(); - uni.showModal({ - content: err.errMsg, - showCancel: false - }); + reject(); + return; } + } + + const formData = {}; + Object.keys(this.pd).map(key => { + formData[key] = this.pd[key]; }); - } + formData.CORPINFO_ID = corpinfoId; + formData.CREATOR = loginUser.USER_ID; + formData.OPERATOR = loginUser.USER_ID; + formData.ACTION_USER = loginUser.NAME; + formData.APPLY_STATUS = STATUS; + + if (STATUS === '1.5') { + uni.request({ + url: basePath + '/app/hotwork/cfd/check', + method: 'POST', + header: { + 'Content-type': 'application/x-www-form-urlencoded' + }, + data: { + HOTWORK_ID: _this.pd.HOTWORK_ID + }, + success: (res) => { + if (res.data.result === 'success') { + uni.hideLoading(); + if (res.data.passFlag === '0') { + uni.showModal({ + title: '', + content: res.data.message, + cancelColor: "#000000", + cancelText: '取消', + confirmText: '确定', + success: res => { + this.buttonloading = false; + resolve(); + } + }); + } else { + formData.STATUS = STATUS; + formData.measuresList = JSON.stringify(this.measuresList); + formData.CORPINFO_ID = loginUser.CORPINFO_ID; + formData.USER_ID = loginUser.USER_ID; + this.buttonloading = true; + uni.uploadFile({ + url: basePath + '/app/hotwork/cfd/editStatus', + filePath: _this.imgList[0].filePath, + name: 'FFILE', + formData: formData, + success: (res) => { + uni.showToast({ + icon: 'none', + title: '保存成功', + duration: 2000 + }); + _this.goback(); + this.buttonloading = false; + resolve(); + }, + fail: (err) => { + uni.hideLoading(); + uni.showModal({ + content: err.errMsg, + showCancel: false + }); + reject(); + } + }); + } + } else if (res.data.result === 'exception') { + uni.showToast({ + title: '错误', + duration: 2000 + }); + reject(); + } + } + }); + } else { + formData.STATUS = STATUS; + formData.measuresList = JSON.stringify(this.measuresList); + formData.CORPINFO_ID = loginUser.CORPINFO_ID; + formData.USER_ID = loginUser.USER_ID; + this.buttonloading = true; + uni.uploadFile({ + url: basePath + '/app/hotwork/cfd/editStatus', + filePath: _this.imgList[0].filePath, + name: 'FFILE', + formData: formData, + success: (res) => { + uni.showToast({ + icon: 'none', + title: '保存成功', + duration: 2000 + }); + _this.goback(); + this.buttonloading = false; + resolve(); + }, + fail: (err) => { + uni.hideLoading(); + uni.showModal({ + content: err.errMsg, + showCancel: false + }); + reject(); + } + }); + } + }); }, // 获取动火列表 getLimitSpace(){ diff --git a/pages/application/hotwork_cfd/hotwork-leader/hotwork-leader-detail.vue b/pages/application/hotwork_cfd/hotwork-leader/hotwork-leader-detail.vue index de55c22..c8ae1e1 100644 --- a/pages/application/hotwork_cfd/hotwork-leader/hotwork-leader-detail.vue +++ b/pages/application/hotwork_cfd/hotwork-leader/hotwork-leader-detail.vue @@ -348,11 +348,11 @@ - - 是否确定打回? - - - + + 是否确定打回? + + + @@ -558,6 +558,15 @@ } this.showRejectionConfirm = true; }, + handleRejectionConfirm() { + this.showRejectionConfirm = false; + uni.showLoading({ + title: '加载中' + }); + this.goSubmit('-4').finally(() => { + uni.hideLoading(); + }); + }, goSubmit(STATUS) { var _this = this; uni.showLoading({ diff --git a/pages/application/hotwork_cfd/hotwork-leader/hotwork-leader-list.vue b/pages/application/hotwork_cfd/hotwork-leader/hotwork-leader-list.vue index c3e2b3e..4f92a8a 100644 --- a/pages/application/hotwork_cfd/hotwork-leader/hotwork-leader-list.vue +++ b/pages/application/hotwork_cfd/hotwork-leader/hotwork-leader-list.vue @@ -561,12 +561,13 @@ uni.hideLoading();//结束加载中动画 if (res.data != null) { _this.totalPage = res.data.page.totalPage; + let filteredList = res.data.varList.filter(item => item.APPLY_STATUS != '-1.5' && item.APPLY_STATUS != '-2'); if(_this.list.length == 0){ - _this.list = res.data.varList; + _this.list = filteredList; }else{ if(res.data.varList != null){ - _this.list2 = res.data.varList; - _this.list = _this.list.concat(_this.list2); + _this.list2 = filteredList; + _this.list = _this.list.concat(_this.list2); } } } diff --git a/pages/application/hotwork_cfd/hotwork-monitor/hotwork-monitor-detail.vue b/pages/application/hotwork_cfd/hotwork-monitor/hotwork-monitor-detail.vue index 4e29202..a3068fb 100644 --- a/pages/application/hotwork_cfd/hotwork-monitor/hotwork-monitor-detail.vue +++ b/pages/application/hotwork_cfd/hotwork-monitor/hotwork-monitor-detail.vue @@ -388,11 +388,11 @@ - - 是否确定打回? - - - + + 是否确定打回? + + + @@ -602,6 +602,15 @@ return; } this.showRejectionConfirm = true; + }, + handleRejectionConfirm() { + this.showRejectionConfirm = false; + uni.showLoading({ + title: '加载中' + }); + this.goSubmit('-7').finally(() => { + uni.hideLoading(); + }); }, goSubmit(STATUS) { var _this = this; diff --git a/pages/application/hotwork_cfd/hotwork-monitor/hotwork-monitor-list.vue b/pages/application/hotwork_cfd/hotwork-monitor/hotwork-monitor-list.vue index d443292..df3d1dd 100644 --- a/pages/application/hotwork_cfd/hotwork-monitor/hotwork-monitor-list.vue +++ b/pages/application/hotwork_cfd/hotwork-monitor/hotwork-monitor-list.vue @@ -578,11 +578,12 @@ uni.hideLoading();//结束加载中动画 if (res.data != null) { _this.totalPage = res.data.page.totalPage; + let filteredList = res.data.varList.filter(item => item.APPLY_STATUS != '-1.5' && item.APPLY_STATUS != '-2' && item.APPLY_STATUS != '-4' && item.APPLY_STATUS != '-5' && item.APPLY_STATUS != '-6'); if(_this.list.length == 0){ - _this.list = res.data.varList; + _this.list = filteredList; }else{ if(res.data.varList != null){ - _this.list2 = res.data.varList; + _this.list2 = filteredList; _this.list = _this.list.concat(_this.list2); } } diff --git a/pages/application/hotwork_cfd/hotwork-xiang-mu/hotwork-xiang-detail.vue b/pages/application/hotwork_cfd/hotwork-xiang-mu/hotwork-xiang-detail.vue index 662181a..a1128ad 100644 --- a/pages/application/hotwork_cfd/hotwork-xiang-mu/hotwork-xiang-detail.vue +++ b/pages/application/hotwork_cfd/hotwork-xiang-mu/hotwork-xiang-detail.vue @@ -337,21 +337,21 @@ + + + + + + + + + - - 是否确定打回? - - - - - - - - - 是否确定打回? - - - + + 是否确定打回? + + + @@ -555,6 +555,15 @@ export default { } this.showRejectionConfirm = true; }, + handleRejectionConfirm() { + this.showRejectionConfirm = false; + uni.showLoading({ + title: '加载中' + }); + this.goSubmit('-2').finally(() => { + uni.hideLoading(); + }); + }, goSubmit(STATUS) { var _this = this; uni.showLoading({ diff --git a/pages/application/hotwork_cfd/hotwork-xiang-mu/hotwork-xiang-list.vue b/pages/application/hotwork_cfd/hotwork-xiang-mu/hotwork-xiang-list.vue index ed81471..33f23b6 100644 --- a/pages/application/hotwork_cfd/hotwork-xiang-mu/hotwork-xiang-list.vue +++ b/pages/application/hotwork_cfd/hotwork-xiang-mu/hotwork-xiang-list.vue @@ -559,12 +559,13 @@ uni.hideLoading();//结束加载中动画 if (res.data != null) { _this.totalPage = res.data.page.totalPage; + let filteredList = res.data.varList.filter(item => item.APPLY_STATUS != '-1.5'); if(_this.list.length == 0){ - _this.list = res.data.varList; + _this.list = filteredList; }else{ - if(res.data.varList != null){ - _this.list2 = res.data.varList; - _this.list = _this.list.concat(_this.list2); + if(filteredList != null){ + _this.list2 = filteredList; + _this.list = _this.list.concat(_this.list2); } } }