From a04dbcc3d28f566c664709d82f67e2544c47b96b Mon Sep 17 00:00:00 2001 From: liujun Date: Mon, 24 Mar 2025 16:55:43 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=97=E9=99=90=E7=A9=BA=E9=97=B4=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E5=8A=9F=E8=83=BD=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../confined_space/gas/list.vue | 2 +- .../confined_space/gas/name.vue | 84 +++++++++++-------- 2 files changed, 51 insertions(+), 35 deletions(-) diff --git a/pages/eight_assignments/confined_space/gas/list.vue b/pages/eight_assignments/confined_space/gas/list.vue index f2bb2a5..63f665a 100644 --- a/pages/eight_assignments/confined_space/gas/list.vue +++ b/pages/eight_assignments/confined_space/gas/list.vue @@ -29,7 +29,7 @@ 分析人:{{ item.ANALYZE_USER_NAME }} - + - + - + - + - + - + - + - + - + @@ -77,37 +77,53 @@ export default { this.form = resData.data.aux[0] || {} }, async fnSubmit() { - if (!this.form.GAS_NAME1 && !this.form.GAS_NAME2 && !this.form.GAS_NAME3 && !this.form.GAS_NAME4) { - uni.$u.toast('最少填写一项气体名称') - return - } - for (let i = 0; i < 4; i++) { - if (this.form['GAS_NAME' + (i + 1)] && !this.form['GAS_STANDARD' + (i + 1)]) { - uni.$u.toast('请填写气体名称(' + this.form['GAS_NAME' + (i + 1)] + ')的合格标准') + if (this.isView === '1') { + uni.$u.route({ + url: '/pages/eight_assignments/confined_space/gas/list', + params: { + isView: this.isView, + GAS_NAME1: this.form.GAS_NAME1, + GAS_NAME2: this.form.GAS_NAME2, + GAS_NAME3: this.form.GAS_NAME3, + GAS_NAME4: this.form.GAS_NAME4, + EW_RU_TASK_ID: this.EW_RU_TASK_ID, + EW_RU_JOB_ID: this.EW_RU_JOB_ID + } + }) + } else { + if (!this.form.GAS_NAME1 && !this.form.GAS_NAME2 && !this.form.GAS_NAME3 && !this.form.GAS_NAME4) { + uni.$u.toast('最少填写一项气体名称') return } - if (this.form['GAS_STANDARD' + (i + 1)] && !this.form['GAS_NAME' + (i + 1)]) { - uni.$u.toast('请填写合格标准(' + this.form['GAS_STANDARD' + (i + 1)] + ')的气体名称') - return + for (let i = 0; i < 4; i++) { + if (this.form['GAS_NAME' + (i + 1)] && !this.form['GAS_STANDARD' + (i + 1)]) { + uni.$u.toast('请填写气体名称(' + this.form['GAS_NAME' + (i + 1)] + ')的合格标准') + return + } + if (this.form['GAS_STANDARD' + (i + 1)] && !this.form['GAS_NAME' + (i + 1)]) { + uni.$u.toast('请填写合格标准(' + this.form['GAS_STANDARD' + (i + 1)] + ')的气体名称') + return + } } - } - await setConfinedSpaceGasInfoSave({ - wh: {...this.form}, - EW_RU_TASK_ID: this.EW_RU_TASK_ID, - EW_RU_JOB_ID: this.EW_RU_JOB_ID, - postMethod: 'application/json', - }) - uni.$u.route({ - url: '/pages/eight_assignments/confined_space/gas/list', - params: { - GAS_NAME1: this.form.GAS_NAME1, - GAS_NAME2: this.form.GAS_NAME2, - GAS_NAME3: this.form.GAS_NAME3, - GAS_NAME4: this.form.GAS_NAME4, + await setConfinedSpaceGasInfoSave({ + wh: {...this.form}, EW_RU_TASK_ID: this.EW_RU_TASK_ID, EW_RU_JOB_ID: this.EW_RU_JOB_ID, - } - }) + postMethod: 'application/json', + }) + uni.$u.route({ + url: '/pages/eight_assignments/confined_space/gas/list', + params: { + GAS_NAME1: this.form.GAS_NAME1, + GAS_NAME2: this.form.GAS_NAME2, + GAS_NAME3: this.form.GAS_NAME3, + GAS_NAME4: this.form.GAS_NAME4, + EW_RU_TASK_ID: this.EW_RU_TASK_ID, + EW_RU_JOB_ID: this.EW_RU_JOB_ID, + } + }) + } + } }, }