From f08212289e2df739fafb476203f0edc921068457 Mon Sep 17 00:00:00 2001 From: Harry Yang Date: Tue, 27 Dec 2022 18:08:57 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=88=E5=90=8C=E6=B5=81=E7=A8=8B=20?= =?UTF-8?q?=E5=89=8D=E7=AB=AF=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 解决闪屏 解决不填写完整内容,点击保存草稿不应该校验内容 解决【项目标题】:项目编号+项目名称+申请人+申请日期,自动生成 预期:申请日期显示应去掉连接符号 --- .../admin/business/process-completed.ftl | 14 +- .../templates/admin/business/process-edit.ftl | 33 ++- .../templates/admin/business/process-new.ftl | 205 ++++++++++-------- .../admin/business/process-review.ftl | 15 +- 4 files changed, 153 insertions(+), 114 deletions(-) diff --git a/src/main/resources/templates/admin/business/process-completed.ftl b/src/main/resources/templates/admin/business/process-completed.ftl index 19cb941..b5f7f51 100644 --- a/src/main/resources/templates/admin/business/process-completed.ftl +++ b/src/main/resources/templates/admin/business/process-completed.ftl @@ -23,6 +23,10 @@ .el-radio-button__inner, .el-radio-group { line-height: unset; } + + [v-cloak] { + display: none; + }
@@ -32,9 +36,9 @@ 已办流程
-
+
- +
@@ -126,7 +130,7 @@
- + {{processForm.applyDeptLeaderName}} - + @@ -500,8 +501,8 @@ } // @formatter:on - const applyDept = process.applyDept.split(',') - this.initForm({ ...form, ...process, ...contract, applyDept }) + const applyDeptId = process.applyDept.split(',') + this.initForm({ ...form, ...process, ...contract, applyDeptId }) this.projectSelected = true this.processType = process.processType this.incomeDetails = incomeDetails.map(detail => ({ @@ -532,26 +533,26 @@ saveDraft() { this.processForm.status = 'draft' - this.submit() + this.submit(false) }, submitForm() { this.processForm.status = 'to_be_audit' - this.submit() + this.submit(true) }, - submit() { + submit(needValid) { this.$refs["contractProcessForm"].validate((valid) => { - if (valid) { + if (valid || !needValid) { const fileList = this.fileList - if (fileList.length === 0) { + if (needValid && fileList.length === 0) { this.$message.error("未上传附件"); return false } const processType = this.processType const processForm = this.processForm - if (processType === 'procurement_contract') { + if (needValid && processType === 'procurement_contract') { const { procurementMode } = processForm // specify_purchase("指定采购"), @@ -562,7 +563,15 @@ if (procurementMode === 'price_comparison' || procurementMode === 'competitive_evaluation') { + if (isEmpty(this.supplierMaterialsForm)) { + this.$message.error("供应商比选材料未填写") + return false + } for (const item in this.supplierMaterialsForm) { + if (isEmpty(Object.keys(item))) { + this.$message.error("供应商比选材料未填写") + return false + } for (const [key, value] of Object.entries(item)) { if (value) { if (typeof value === 'string') { @@ -584,19 +593,19 @@ } } - if (!processForm.applyDeptId) { + if (needValid && !processForm.applyDeptId) { this.$message.error("申请部门还未选择"); return false } const loading = this.$loading({ lock: true, - text: '正在提交', + text: processForm.status === 'draft' ? '正在保存草稿' : "正在提交", spinner: 'el-icon-loading', background: 'rgba(0, 0, 0, 0.7)' }) - const applyDeptId = processForm.applyDeptId.map(level => level.id).join(',') // (逗号分割) + const applyDeptId = processForm.applyDeptId.join(',') // (逗号分割) const form = { ...this.processForm, diff --git a/src/main/resources/templates/admin/business/process-new.ftl b/src/main/resources/templates/admin/business/process-new.ftl index b264d2a..04a819a 100644 --- a/src/main/resources/templates/admin/business/process-new.ftl +++ b/src/main/resources/templates/admin/business/process-new.ftl @@ -157,7 +157,8 @@ 未选择部门 - + @@ -297,7 +298,7 @@ - + - +