From e3ebdc2c25e89ba5d4edeff5fbfe11b29a7de816 Mon Sep 17 00:00:00 2001 From: lideqin <694785430@qq.com> Date: Tue, 9 Jul 2024 18:20:37 +0800 Subject: [PATCH] =?UTF-8?q?[update]=20=E6=B3=95=E8=A7=84=E7=AC=A6=E5=90=88?= =?UTF-8?q?=E6=80=A7=E6=8E=92=E6=9F=A5=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/lang/workCenter/en.js | 3 +- src/common/lang/workCenter/zh.js | 3 +- .../MarketRegulationsListSelection.vue | 5 ++ .../MarketRegulationsListSelectionModal.vue | 7 +- .../processCenter/table/TodoList.vue | 4 +- .../RegulatoryComplianceCheckProcess.vue | 72 ++++++++++--------- .../modules/EngineerInitBaseInfo.vue | 50 ++++++++----- 7 files changed, 88 insertions(+), 56 deletions(-) diff --git a/src/common/lang/workCenter/en.js b/src/common/lang/workCenter/en.js index 443b8d2..75b1524 100644 --- a/src/common/lang/workCenter/en.js +++ b/src/common/lang/workCenter/en.js @@ -50,7 +50,8 @@ module.exports = { salvageListTemplateDownload: 'Split single file template download', salvageListTemplateName: 'Decomposes a single file upload template', carTypeFileTemplateDownload: 'Model project file template download', - carTypeFileTemplateName: 'Model project file upload template' + carTypeFileTemplateName: 'Model project file upload template', + pleaseGenerate: 'Please generate data' }, // 市场清单发布流程 marketListReleaseProcess: { diff --git a/src/common/lang/workCenter/zh.js b/src/common/lang/workCenter/zh.js index d3ec446..1b99919 100644 --- a/src/common/lang/workCenter/zh.js +++ b/src/common/lang/workCenter/zh.js @@ -50,7 +50,8 @@ module.exports = { salvageListTemplateDownload: '分解单文件模板下载', salvageListTemplateName: '分解单文件上传模板', carTypeFileTemplateDownload: '车型项目文件模板下载', - carTypeFileTemplateName: '车型项目文件上传模板' + carTypeFileTemplateName: '车型项目文件上传模板', + pleaseGenerate: '请先生成数据' }, // 市场清单发布流程 marketListReleaseProcess: { diff --git a/src/components/selection/MarketRegulationsListSelection.vue b/src/components/selection/MarketRegulationsListSelection.vue index 809b2d9..1a2bb5e 100644 --- a/src/components/selection/MarketRegulationsListSelection.vue +++ b/src/components/selection/MarketRegulationsListSelection.vue @@ -20,6 +20,7 @@ v-bind="$attrs" :value="value" @change="modalInput" + @numberChange="modalNumberChange" @nameChange="modalNameChange" @listChange="modalListChange"> @@ -76,6 +77,7 @@ export default { clearInput () { console.log('输入框清空了') this.$emit('change', '') + this.$emit('numberChange', '') this.$emit('nameChange', '') this.$emit('listChange', []) }, @@ -86,6 +88,9 @@ export default { modalInput (value) { this.$emit('change', value) }, + modalNumberChange (value) { + this.$emit('numberChange', value) + }, modalNameChange (value) { this.$emit('nameChange', value) }, diff --git a/src/components/selection/MarketRegulationsListSelectionModal.vue b/src/components/selection/MarketRegulationsListSelectionModal.vue index 937a561..4d1c8d0 100644 --- a/src/components/selection/MarketRegulationsListSelectionModal.vue +++ b/src/components/selection/MarketRegulationsListSelectionModal.vue @@ -310,14 +310,15 @@ export default { this.close() }, handleSubmit () { - const serialNumber = [] + const serialNumberArr = [] const serialNameArr = [] if (this.selectedRowKeys && this.selectedRowKeys.length > 0) { this.selectedRowList.forEach(res => { - serialNumber.push(res.standardNumber) - serialNameArr.push(res.standardName) + serialNumberArr.push(res.manifestNo) + serialNameArr.push(res.manifestName) }) this.$emit('change', this.selectedRowKeys.join(',')) + this.$emit('numberChange', serialNumberArr.join(',')) this.$emit('nameChange', serialNameArr.join(',')) this.$emit('listChange', this.selectedRowList) this.close() diff --git a/src/views/workCenter/processCenter/table/TodoList.vue b/src/views/workCenter/processCenter/table/TodoList.vue index 6b94205..a83d82b 100644 --- a/src/views/workCenter/processCenter/table/TodoList.vue +++ b/src/views/workCenter/processCenter/table/TodoList.vue @@ -80,6 +80,7 @@ import { NewRegulationsImportNodes, StandardInterpretationNodes } from '@/enums/commonEnums' import { getAction } from '../../../../api/manage' +import { RegulatoryComplianceCheckNodes } from '../../../../enums/commonEnums' export default { name: 'TodoList', @@ -161,6 +162,7 @@ export default { // 标准解读流程 [ProcessType.STANDARD_INTERPRETATION_PROCESS.value]: [StandardInterpretationNodes.initiated.value], // 法规符合性排查流程 + [ProcessType.REGULATORY_COMPLIANCE_CHECK.value]: [RegulatoryComplianceCheckNodes.initiated.value], // 市场清单发布流程 [ProcessType.MARKET_LIST_RELEASE.value]: [MarketListReleaseNodes.initiated.value] }, @@ -233,7 +235,7 @@ export default { break // 法规符合性排查流程 case '3': - path = '' + path = '/workCenter/RegulatoryComplianceCheckProcess' break // 市场清单发布流程 case '4': diff --git a/src/views/workCenter/regulatoryComplianceCheckProcess/RegulatoryComplianceCheckProcess.vue b/src/views/workCenter/regulatoryComplianceCheckProcess/RegulatoryComplianceCheckProcess.vue index 57638cd..a6762d2 100644 --- a/src/views/workCenter/regulatoryComplianceCheckProcess/RegulatoryComplianceCheckProcess.vue +++ b/src/views/workCenter/regulatoryComplianceCheckProcess/RegulatoryComplianceCheckProcess.vue @@ -27,7 +27,7 @@ + v-decorator="['processName', validatorRules.processName]" /> @@ -41,7 +41,7 @@ style="width: 100%" :disabled="disabled" value-format="YYYY-MM-DD" - v-decorator="['dueTime']" /> + v-decorator="['processDueDate']" /> @@ -55,7 +55,7 @@ :maxLength="500" :rows="4" :disabled="disabled" - v-decorator="['prcMes']" /> + v-decorator="['processDescription']" /> @@ -79,7 +79,7 @@ :colon="formItemColon"> + v-decorator="['applicableMarket_dictText']" /> @@ -111,11 +111,11 @@ + v-decorator="['handleText', validatorRules.handleText]" /> - + @@ -325,13 +325,13 @@ export default { }, validatorRules: { // 流程名称 - prcName: { + processName: { rules: [ { required: true, message: this.$t('pleaseEnter') + this.$t('processName') } ], validateTrigger: 'blur' }, - commitText: { + handleText: { rules: [ { required: false, message: this.$t('pleaseEnter') + this.$t('remarks') } ], @@ -362,19 +362,27 @@ export default { this.$nextTick(() => { if (type === 'todo') { // 初始化流程信息 - this.processInfoForm.setFieldsValue(pick(this.model.common, 'prcName', 'dueTime', 'prcMes')) + if (this.currentNode !== 1) { + // 需要回显上方的标准编号/标准名称和适用市场 + // 标准编号/标准名称 + this.model.basicProcessInfoDTO.standardNumberName = this.model.businessInfoDTO.standardInfo.standardNumber + ' ' + this.model.businessInfoDTO.standardInfo.standardName + // 适用市场 + this.model.basicProcessInfoDTO.applicableMarket_dictText = this.model.businessInfoDTO.standardInfo.applicableMarket_dictText + } + this.processInfoForm.setFieldsValue(pick(this.model.basicProcessInfoDTO, 'processName', 'processDueDate', 'processDescription', 'standardNumberName', 'applicableMarket_dictText')) } // 有草稿json按草稿进来的回显 if (this.model.infoJsonStr) { + this.model = JSON.parse(this.model.infoJsonStr) // 初始化流程信息 const prcObj = Object.assign({}, this.model) - prcObj.dueTime = this.model.processDueDate - prcObj.prcMes = this.model.processDescription - this.processInfoForm.setFieldsValue(pick(prcObj, 'prcName', 'dueTime', 'prcMes')) + prcObj.processDueDate = this.model.processDueDate + prcObj.processDescription = this.model.processDescription + this.processInfoForm.setFieldsValue(pick(prcObj, 'processName', 'processDueDate', 'processDescription')) // 初始化流程审批信息 - prcObj.commitText = this.model.handleText - prcObj.commitFile = this.model.handleFile - this.approvalInfoForm.setFieldsValue(pick(prcObj, 'commitText', 'commitFile')) + prcObj.handleText = this.model.handleText + prcObj.handleFile = this.model.handleFile + this.approvalInfoForm.setFieldsValue(pick(prcObj, 'handleText', 'handleFile')) this.model.data = JSON.parse(this.model.infoJsonStr).data // 如果是节点1的保存回显人员信息 if (this.currentNode === 1) { @@ -399,9 +407,9 @@ export default { }, // 业务基本信息组件中获取到流程名称改变后的值 processNameChange (value) { - const param = { prcName: value } + const param = { processName: value } this.$nextTick(() => { - this.processInfoForm.setFieldsValue(pick(param, 'prcName')) + this.processInfoForm.setFieldsValue(pick(param, 'processName')) }) }, // 保存 @@ -429,14 +437,9 @@ export default { const paramObj = {} // 流程信息 paramObj.basicProcessInfoDTO = Object.assign({}, processInfoForm) - paramObj.basicProcessInfoDTO.processName = paramObj.basicProcessInfoDTO.prcName - paramObj.basicProcessInfoDTO.processDueDate = paramObj.basicProcessInfoDTO.dueTime - paramObj.basicProcessInfoDTO.processDescription = paramObj.basicProcessInfoDTO.prcMes paramObj.basicProcessInfoDTO.processInstanceId = this.$route.query.processInstanceId // 流程审批信息 paramObj.basicTaskInfoDTO = Object.assign({}, approvalInfoForm) - paramObj.basicTaskInfoDTO.handleText = paramObj.basicTaskInfoDTO.commitText - paramObj.basicTaskInfoDTO.handleFile = paramObj.basicTaskInfoDTO.commitFile paramObj.basicTaskInfoDTO.taskId = this.$route.query.taskId // 草稿id if (this.model.infoJsonStr) { @@ -476,13 +479,18 @@ export default { } this.loading = true const paramObj = {} // 需要传给后端的数据 - paramObj.common = { ...values, ...approvalValues } + // 流程基本信息 + paramObj.basicProcessInfoDTO = values + // 流程审批信息 + paramObj.basicTaskInfoDTO = approvalValues // 草稿id if (this.model.infoJsonStr) { - paramObj.common.draftId = this.model.id + paramObj.draftId = this.model.id } - paramObj.flowUser = personnelObj - paramObj.data = data.formInline + paramObj.userInfoMap = personnelObj + paramObj.businessInfoDTO = data + // JSON字符串 + paramObj.infoJsonStr = JSON.stringify(paramObj) let func if (this.$route.query.taskId) { // 有taskId说明是驳回的提交 @@ -560,9 +568,9 @@ export default { // 同意 handleAgree () { if (this.loading) return - this.validatorRules.commitText.rules[0].required = false - if (!this.approvalInfoForm.getFieldValue('commitText')) { - this.approvalInfoForm.setFieldsValue({ commitText: '同意' }) + this.validatorRules.handleText.rules[0].required = false + if (!this.approvalInfoForm.getFieldValue('handleText')) { + this.approvalInfoForm.setFieldsValue({ handleText: '同意' }) } this.approvalInfoForm.validateFields((err, values) => { if (!err) { @@ -585,8 +593,8 @@ export default { // 驳回 handleReject () { if (this.loading) return - this.validatorRules.commitText.rules[0].required = true - if (!this.approvalInfoForm.getFieldValue('commitText')) { + this.validatorRules.handleText.rules[0].required = true + if (!this.approvalInfoForm.getFieldValue('handleText')) { this.$message.warning(this.$t('pleaseEnterRemarks')) this.switchValue = 'base' } @@ -606,7 +614,7 @@ export default { this.loading = false } }).finally(() => { - this.validatorRules.commitText.rules[0].required = false + this.validatorRules.handleText.rules[0].required = false }) } }) diff --git a/src/views/workCenter/regulatoryComplianceCheckProcess/modules/EngineerInitBaseInfo.vue b/src/views/workCenter/regulatoryComplianceCheckProcess/modules/EngineerInitBaseInfo.vue index cc85358..d68ea6d 100644 --- a/src/views/workCenter/regulatoryComplianceCheckProcess/modules/EngineerInitBaseInfo.vue +++ b/src/views/workCenter/regulatoryComplianceCheckProcess/modules/EngineerInitBaseInfo.vue @@ -74,11 +74,11 @@ - @@ -103,7 +103,7 @@
- {{ $t('generate') }} + {{ $t('generate') }}