fix 79913
This commit is contained in:
@@ -78,8 +78,8 @@ export const DynamicCataloging = {
|
||||
|
||||
// 标准法规入库/变更流程-操作类型
|
||||
export const OperationType = {
|
||||
ENTRY: { text: '标准法规入库', value: '1' },
|
||||
CHANGE: { text: '标准法规变更', value: '2' }
|
||||
ENTRY: { text: '入库', value: '1' },
|
||||
CHANGE: { text: '变更', value: '2' }
|
||||
}
|
||||
|
||||
// 企标计划立项/变更流程-申请类型
|
||||
|
||||
@@ -490,6 +490,12 @@ export default {
|
||||
return fields
|
||||
}
|
||||
return ['replaced_by_standard_number', 'referenced_standard']
|
||||
},
|
||||
// 流程名称相关字段
|
||||
fieldsRelatedProcessName () {
|
||||
// 标准类别,填写的标准编号(中间部分),年代号,标准编号(完整的,变更的时候可以用),操作类型,标准名称
|
||||
const { standard_class, standard_number_temp, year_number, standard_number, operateType, standard_name } = this.formInline
|
||||
return { standard_class, standard_number_temp, year_number, standard_number, operateType, standard_name }
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@@ -500,6 +506,19 @@ export default {
|
||||
'formInline.standard_state' (val) {
|
||||
// 起草、征求依据、报批状态时发布日期、实施日期不必填
|
||||
this.handleRequiredByState(val)
|
||||
},
|
||||
/**
|
||||
* 生成流程名称
|
||||
* 规则:标准号-标准名称-入库/变更
|
||||
* 入库:按照标准编号规则先生成标准编号(标准类别 + 1个空格 + 标准编号(填写)+ 短横杠(-) + 年代号)
|
||||
* 变更:直接生成流程名称即可
|
||||
*/
|
||||
fieldsRelatedProcessName: {
|
||||
handler (newVal) {
|
||||
this.generateProcessName()
|
||||
},
|
||||
immediate: true,
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
created () {
|
||||
@@ -553,6 +572,25 @@ export default {
|
||||
this.getSourceOptions()
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 生成流程名称
|
||||
*/
|
||||
generateProcessName () {
|
||||
const { standard_class, standard_number_temp, year_number, standard_number, operateType, standard_name } = this.fieldsRelatedProcessName
|
||||
// 变更流程需要有standard_number和standard_name
|
||||
if (operateType === OperationType.CHANGE.value && !!standard_number && !!standard_name) {
|
||||
const processName = `${standard_number}-${standard_name}-${OperationType.CHANGE.text}`
|
||||
this.processInfoForm.setFieldsValue({ processName })
|
||||
return
|
||||
}
|
||||
// 入库流程需要有standard_class、standard_number_temp、year_number、standard_name
|
||||
if (operateType === OperationType.ENTRY.value && !!standard_class && !!standard_number_temp && !!year_number && !!standard_name) {
|
||||
const processName = `${standard_class} ${standard_number_temp}-${year_number}-${standard_name}-${OperationType.ENTRY.text}`
|
||||
this.processInfoForm.setFieldsValue({ processName })
|
||||
return
|
||||
}
|
||||
this.processInfoForm.setFieldsValue({ processName: null })
|
||||
},
|
||||
/**
|
||||
* 获取流程详情数据
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user