diff --git a/src/common/lang/en-us.js b/src/common/lang/en-us.js index 9c6b602..b8f8219 100644 --- a/src/common/lang/en-us.js +++ b/src/common/lang/en-us.js @@ -188,7 +188,8 @@ module.exports = { reasonForPurchase: '采购理由', export: '导出', goToThePCToExport: '请前往PC端导出', - carbonCopy: '抄送' + carbonCopy: '抄送', + regulatoryEngineer: '法规工程师' }, // 企标稽查计划 esInspectionPlan: { diff --git a/src/common/lang/zh-cn.js b/src/common/lang/zh-cn.js index dd38262..abe57d8 100644 --- a/src/common/lang/zh-cn.js +++ b/src/common/lang/zh-cn.js @@ -216,7 +216,8 @@ module.exports = { reasonForPurchase: '采购理由', export: '导出', goToThePCToExport: '请前往PC端导出', - carbonCopy: '抄送' + carbonCopy: '抄送', + regulatoryEngineer: '法规工程师' }, // 企标稽查计划 esInspectionPlan: { diff --git a/src/views/workCenter/standardProcurementProcess/StandardProcurementProcess.vue b/src/views/workCenter/standardProcurementProcess/StandardProcurementProcess.vue index e8cc62d..5eedc2f 100644 --- a/src/views/workCenter/standardProcurementProcess/StandardProcurementProcess.vue +++ b/src/views/workCenter/standardProcurementProcess/StandardProcurementProcess.vue @@ -37,7 +37,6 @@ -
{{ $t('basicServiceInformation') }}
@@ -59,7 +58,23 @@
- + + + +
{{ $t('processApprovalInfo') }}
@@ -150,16 +165,19 @@ import { } from '../../../api/api' import SelectUser from '../../../components/SelectUser' import * as dd from 'dingtalk-jsapi' +import SelectUserField from '@/components/SelectUserField' export default { name: 'StandardProcurementProcess', - components: { SelectUser, ZUpload, ProcessCommonLayout }, + components: { SelectUserField, SelectUser, ZUpload, ProcessCommonLayout }, data () { return { ProcessKey, loading: false, processInfo: {}, approvalInfo: {}, + // 业务信息 + businessFormData: {}, columns: [ { // 标准编号 title: this.$t('standardNumber'), @@ -185,7 +203,9 @@ export default { ], dataSource: [], rules: { - handleText: [{ required: false, message: this.$t('pleaseEnter') + this.$t('remark'), trigger: 'onBlur' }] + handleText: [{ required: false, message: this.$t('pleaseEnter') + this.$t('remark'), trigger: 'onBlur' }], + // 法规工程师 + confirmEngineer: [{ required: true, message: this.$t('pleaseSelect') + this.$t('procurement.regulatoryEngineer'), trigger: 'onChange' }] }, currentNode: null, isTransfer: true, // 是否转办 @@ -196,6 +216,10 @@ export default { // 是否法规工程师确认节点 isRegulatoryEngineerConfirmation () { return this.currentNode === ProcurementProcessNodes.regulatoryEngineerConfirmation.value + }, + // 是否节点三-标准化主管级领导审批 + isStandardLeaderApproval () { + return this.currentNode === ProcurementProcessNodes.standardLeaderApproval.value } }, created () { @@ -203,6 +227,9 @@ export default { this.initProcessData() }, methods: { + userNameChange (value, fieldName) { + this.businessFormData[fieldName + '_dictText'] = value + }, initProcessData () { this.loading = true const params = { @@ -213,10 +240,14 @@ export default { } queryProcurementProcessInfo(params).then(res => { if (res.success) { - const { result = {} } = res + let { result = {} } = res + if (result.infoJsonStr) { + result = JSON.parse(result.infoJsonStr) + } this.processInfo = Object.assign({}, result.basicProcessInfoDTO || {}) this.dataSource = result.businessInfoDTO || [] this.approvalInfo = Object.assign({}, result.basicTaskInfoDTO || {}) + this.businessFormData = Object.assign({}, result.businessInfoFormDTO || {}) } else { this.$message(res.message) } @@ -297,10 +328,23 @@ export default { flag = false this.$message(this.$t('pleaseEnterRemarks')) } + // 节点三,法规工程师必填 + if (this.isStandardLeaderApproval) { + const businessForm = await this.validateForm('businessFormRef') + if (!businessForm) { + flag = false + this.$message(this.$t('pleaseSelect') + this.$t('procurement.regulatoryEngineer')) + } + } const userInfoMap = await this.$refs.personInfo.getDataObjVerify() if (!userInfoMap) { flag = false } + // 节点三,法规工程师必填 + if (this.isStandardLeaderApproval && userInfoMap) { + userInfoMap.confirmEngineer = this.businessFormData.confirmEngineer + userInfoMap.confirmEngineer_dictText = this.businessFormData.confirmEngineer_dictText + } if (!flag) { return false } @@ -310,6 +354,7 @@ export default { basicProcessInfoDTO: { ...this.processInfo }, basicTaskInfoDTO: approvalInfo, businessInfoDTO: this.dataSource, + businessInfoFormDTO: this.businessFormData, userInfoMap: userInfoMap || {} } },