[update 法规采购流程] 标准化主管级领导审批节点增加法规工程师表单
This commit is contained in:
@@ -87,7 +87,8 @@ module.exports = {
|
||||
pleaseSelectLeastTwoExpert: '请至少选择两位专家',
|
||||
newPrincipalDrafter: '新主起草人',
|
||||
newMainDraftUnit: '新主起草单位',
|
||||
newHeadOfMainDraftingUnit: '新起草单位负责人'
|
||||
newHeadOfMainDraftingUnit: '新起草单位负责人',
|
||||
regulatoryEngineer: '法规工程师'
|
||||
},
|
||||
// 年度制修订计划
|
||||
revisionPlanActivelyReport: {
|
||||
|
||||
@@ -90,7 +90,8 @@ module.exports = {
|
||||
newMainDraftUnit: '新主起草单位',
|
||||
newHeadOfMainDraftingUnit: '新起草单位负责人',
|
||||
existingNumber: '企标编号已存在,需等待重新生成顺序号',
|
||||
numberReset: '顺序号已重新生成'
|
||||
numberReset: '顺序号已重新生成',
|
||||
regulatoryEngineer: '法规工程师'
|
||||
},
|
||||
// 年度制修订计划
|
||||
revisionPlanActivelyReport: {
|
||||
|
||||
@@ -85,6 +85,22 @@
|
||||
</j-table>
|
||||
</div>
|
||||
</div>
|
||||
<!--节点三显示-->
|
||||
<a-form :form="businessInfoForm" v-if="isStandardLeaderApproval">
|
||||
<div class="form-flex-box">
|
||||
<div class="form-flex-item custom-flex-form-item">
|
||||
<!--法规工程师-->
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('workCenter.enterpriseInitChangePlan.regulatoryEngineer')">
|
||||
<user-selection :placeholder="$t('pleaseSelect') + $t('workCenter.enterpriseInitChangePlan.regulatoryEngineer')"
|
||||
type="radio"
|
||||
v-decorator="['confirmEngineer', validatorRules.confirmEngineer]"
|
||||
@nameChange="userSelectNameChange"
|
||||
filedName="confirmEngineer"
|
||||
:nameStr="businessFormData.confirmEngineer_dictText" />
|
||||
</a-form-item>
|
||||
</div>
|
||||
</div>
|
||||
</a-form>
|
||||
<!--流程审批信息-->
|
||||
<div class="process-part-title">{{ $t('processApprovalInformation') }}</div>
|
||||
<a-form :form="approvalInfoForm">
|
||||
@@ -185,7 +201,11 @@ export default {
|
||||
processInfo: {},
|
||||
// 审批信息的表单
|
||||
approvalInfoForm: this.$form.createForm(this),
|
||||
// 业务信息的表单
|
||||
businessInfoForm: this.$form.createForm(this),
|
||||
approvalInfo: {},
|
||||
// 业务信息
|
||||
businessFormData: {},
|
||||
labelCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 4 }
|
||||
@@ -212,6 +232,13 @@ export default {
|
||||
handleText: {
|
||||
rules: [{ required: false, message: this.$t('pleaseEnter') + this.$t('remarks') }],
|
||||
validateTrigger: 'blur'
|
||||
},
|
||||
// 法规工程师
|
||||
confirmEngineer: {
|
||||
rules: [
|
||||
{ required: true, message: this.$t('pleaseSelect') + this.$t('workCenter.enterpriseInitChangePlan.regulatoryEngineer') }
|
||||
],
|
||||
validateTrigger: 'change'
|
||||
}
|
||||
},
|
||||
columns: [
|
||||
@@ -271,6 +298,10 @@ export default {
|
||||
return { selectedRowKeys: this.selectedRowKeys, onChange: this.onSelectChange }
|
||||
}
|
||||
return null
|
||||
},
|
||||
// 是否节点三-标准化主管级领导审批
|
||||
isStandardLeaderApproval () {
|
||||
return this.currentNode === ProcurementProcessNodes.standardLeaderApproval.value
|
||||
}
|
||||
},
|
||||
created () {
|
||||
@@ -290,6 +321,10 @@ export default {
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
// 选择用户得到用户名
|
||||
userSelectNameChange (value, fieldName) {
|
||||
this.businessFormData[fieldName + '_dictText'] = value
|
||||
},
|
||||
onSelectChange (selectedRowKeys) {
|
||||
this.selectedRowKeys = selectedRowKeys
|
||||
},
|
||||
@@ -353,9 +388,11 @@ export default {
|
||||
this.processInfo = Object.assign({}, result.basicProcessInfoDTO || {})
|
||||
this.dataSource = result.businessInfoDTO || []
|
||||
this.approvalInfo = Object.assign({}, result.basicTaskInfoDTO || {})
|
||||
this.businessFormData = Object.assign({}, result.businessInfoFormDTO || {})
|
||||
this.$nextTick(() => {
|
||||
this.processInfoForm.setFieldsValue(this.processInfo)
|
||||
this.approvalInfoForm.setFieldsValue(this.approvalInfo)
|
||||
this.businessInfoForm.setFieldsValue(this.businessFormData)
|
||||
})
|
||||
}
|
||||
}).finally(() => {
|
||||
@@ -363,10 +400,11 @@ export default {
|
||||
})
|
||||
},
|
||||
dealFormData (isSave) {
|
||||
let flag = true, formData = {}, processInfo = {}, approvalInfo = {}, businessInfo = [], userInfoMap = {}
|
||||
let flag = true, formData = {}, processInfo = {}, approvalInfo = {}, businessInfo = [], businessFormData = {}, userInfoMap = {}
|
||||
if (isSave) {
|
||||
processInfo = Object.assign(this.processInfo, this.processInfoForm.getFieldsValue())
|
||||
businessInfo = this.dataSource
|
||||
businessFormData = Object.assign(this.businessFormData, this.businessInfoForm.getFieldsValue())
|
||||
approvalInfo = Object.assign(this.approvalInfo, this.approvalInfoForm.getFieldsValue())
|
||||
approvalInfo.taskId = approvalInfo.taskId || this.$route.query.taskId
|
||||
approvalInfo.finishFlag = 1 // 保存——1;提交/同意/驳回——2
|
||||
@@ -392,6 +430,16 @@ export default {
|
||||
flag = false
|
||||
}
|
||||
businessInfo = this.dataSource
|
||||
// 节点三,法规工程师必填
|
||||
if (this.isStandardLeaderApproval) {
|
||||
this.businessInfoForm.validateFields({ force: true }, (err, values) => {
|
||||
if (!err) {
|
||||
businessFormData = Object.assign(this.businessFormData, values)
|
||||
} else {
|
||||
flag = false
|
||||
}
|
||||
})
|
||||
}
|
||||
// 审批信息
|
||||
this.approvalInfoForm.validateFields({ force: true }, (errors, values) => {
|
||||
if (!errors) {
|
||||
@@ -411,6 +459,11 @@ export default {
|
||||
// 人员信息
|
||||
const userInfo = this.$refs.personnelInfo.getDataObjVerify()
|
||||
userInfoMap = userInfo ? userInfo : flag = false
|
||||
// 节点三,法规工程师
|
||||
if (userInfo && this.isStandardLeaderApproval) {
|
||||
userInfoMap.confirmEngineer = businessFormData.confirmEngineer
|
||||
userInfoMap.confirmEngineer_dictText = businessFormData.confirmEngineer_dictText
|
||||
}
|
||||
if (!flag && !baseFlag) {
|
||||
this.switchValue = 'base'
|
||||
} else if (!flag && !userInfo) {
|
||||
@@ -422,6 +475,7 @@ export default {
|
||||
basicProcessInfoDTO: processInfo,
|
||||
basicTaskInfoDTO: approvalInfo,
|
||||
businessInfoDTO: businessInfo,
|
||||
businessInfoFormDTO: businessFormData,
|
||||
userInfoMap
|
||||
}
|
||||
return !flag ? flag : formData
|
||||
|
||||
Reference in New Issue
Block a user