From d3a7b64c6855523c1d4b4978df09eda788c0064c Mon Sep 17 00:00:00 2001 From: value <z1292839451@163.com> Date: 星期三, 24 四月 2024 18:20:41 +0800 Subject: [PATCH] 检验模板调整 --- src/components/view/b1-report-preparation.vue | 64 ++++++++++++++++++++++++++++--- 1 files changed, 57 insertions(+), 7 deletions(-) diff --git a/src/components/view/b1-report-preparation.vue b/src/components/view/b1-report-preparation.vue index b3a289a..f35498b 100644 --- a/src/components/view/b1-report-preparation.vue +++ b/src/components/view/b1-report-preparation.vue @@ -217,7 +217,7 @@ type: 'text', method: 'handleSubmit', disabFun: (row, index) => { - return row.isExamine != null + return row.state != 0 } }, { id: 'handleIssued', @@ -225,7 +225,7 @@ type: 'text', method: 'handleIssued', disabFun: (row, index) => { - return row.isExamine != null + return row.state == null||row.state == 0 ||row.isExamine == 1 } }, { id: 'handleApprove', @@ -233,7 +233,7 @@ type: 'text', method: 'handleApprove', disabFun: (row, index) => { - return row.isRatify != null + return row.state == null||row.state == 0||row.isExamine == 0||row.isExamine == null ||row.isRatify==1 } }], linkEvent: { @@ -262,6 +262,17 @@ value: 1, type: 'success', label: '閫氳繃' + }] + }, + state: { + select: [{ + value: 0, + type: 'danger', + label: '寰呮彁浜�' + }, { + value: 1, + type: 'success', + label: '宸叉彁浜�' }] } }, @@ -351,7 +362,7 @@ let edit = false let up = false let res = false - let sub = true + let sub = false let issued = true let approve = true for (var i = 0; i < power.length; i++) { @@ -363,6 +374,9 @@ } if (power[i].menuMethod == 'upReportUrl') { res = true + } + if (power[i].menuMethod == 'writeReport') { + sub = true } } if (!approve) { @@ -394,6 +408,7 @@ let url = row.urlS?row.urlS:row.url; const link = document.createElement('a'); link.href = this.javaApi + url; + link.target = '_blank'; document.body.appendChild(link); link.click(); }, @@ -413,6 +428,22 @@ }, subIssued(){ this.loadingIssued = true; + this.$axios.post(this.$api.insReport.examineReport, { + id: this.currentInfo.id, + isExamine: 1 + }).then(res => { + if (res.code === 201) { + return + } + this.$message.success('鎻愪氦鎴愬姛') + this.refreshTable() + this.loadingIssued = false; + this.currentInfo = null; + this.issuedVisible = false; + }).catch(e => { + this.$message.error('鎻愪氦澶辫触') + this.loadingIssued = false; + }) }, handleApprove(row){ this.currentInfo = row; @@ -425,16 +456,16 @@ this.$confirm('鏄惁鎻愪氦褰撳墠鎶ュ憡?', "鎻愪氦", { confirmButtonText: "鎻愪氦", cancelButtonText: "鍙栨秷", - type: "success" + type: "warning" }).then(() => { - this.$axios.post(this.delUrl, { + this.$axios.post(this.$api.insReport.writeReport, { id: row.id }).then(res => { if (res.code === 201) { return } this.$message.success('鎻愪氦鎴愬姛') - this.selectList() + this.refreshTable() }).catch(e => { this.$message.error('鎻愪氦澶辫触') }) @@ -445,6 +476,25 @@ return this.$message.error('璇疯緭鍏ュ師鍥�') } this.loadingIssuedReason = true; + this.$axios.post(this.$api.insReport.examineReport, { + id: this.currentInfo.id, + isExamine: 0, + examineTell:this.reason + }).then(res => { + if (res.code === 201) { + return + } + this.$message.success('鎿嶄綔鎴愬姛') + this.refreshTable() + this.loadingIssuedReason = false; + this.currentInfo = null; + this.reason = ''; + this.issuedVisible = false; + this.issuedReasonVisible = false; + }).catch(e => { + this.$message.error('鎿嶄綔澶辫触') + this.loadingIssuedReason = false; + }) }, handleApproveReason(){ if(!this.reason){ -- Gitblit v1.9.3