[update] 企标计划立项、变更流程合并修改

This commit is contained in:
lideqin
2023-12-11 19:41:16 +08:00
parent 15652b642b
commit 3a588fdd73
@@ -248,6 +248,7 @@
v-model="formInline.decadeCode"
date-format="YYYY"
:disabled="disabled"
@change="decadeCodeChange"
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.yearNumber')" />
</a-form-model-item>
</div>
@@ -371,13 +372,14 @@
</span>
</div>
<a-form-model-item class="item-model" prop="componentName">
<a-tree-select v-model="formInline.componentName"
:disabled="disabled"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
style="width: 100%"
:tree-data="partNameOptions"
:label-in-value="false"
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.partName')" />
<tree-selection :placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.partName')"
v-model="formInline.componentName"
@nameChange="treeSelectNameChange"
filedName="componentName"
type="checkbox"
:nameStr="formInline.componentName_dictText"
dict-id="1696007957666533377"
:disabled="disabled" />
</a-form-model-item>
</div>
<!-- 主起草人 -->
@@ -458,10 +460,12 @@ import UploadFile from '@/components/UploadFile'
import { getTreeList } from '@/api/enterpriseStandardLibraryApi'
import { ApplicationCategory } from '@/enums/commonEnums'
import { getFormDictTreeList } from '@/api/api'
import TreeSelection from '@/components/selection/TreeSelection'
import { getEnStandardNo } from '@/api/workCenter'
export default {
name: 'MergeBaseInfo',
components: { EnterprisePlanSelection, UserSelection, UploadFile },
components: { EnterprisePlanSelection, UserSelection, UploadFile, TreeSelection },
props: {
disabled: {
type: Boolean,
@@ -482,6 +486,18 @@ export default {
// 企标名称,企标名称修改流程名称需要自动更改
'formInline.newEnStandardName' (value) {
this.returnProcessName()
},
// 企业标准代号
'formInline.enStandardCode' (value) {
this.getEnStandardNo()
},
// 企业名称代号
'formInline.enNameCode' (value) {
this.getEnStandardNo()
},
// 标准类别代号
'formInline.standardCategoryCode' (value) {
this.getEnStandardNo()
}
},
data () {
@@ -645,7 +661,7 @@ export default {
methods: {
// 返回流程名称
returnProcessName () {
const processName = (this.formInline.newEnStandardNo || '') + '-' + (this.formInline.newEnStandardName || '') + '-' + '立项'
const processName = (this.formInline.newEnStandardNo || '') + '-' + (this.formInline.newEnStandardName || '') + '-' + '变更'
console.log(processName)
this.$emit('processNameChange', processName)
},
@@ -665,6 +681,35 @@ export default {
}
})
},
// 零部件名称选择完成的回调
treeSelectNameChange (value, fieldName) {
this.formInline[fieldName + '_dictText'] = value
},
// watch监视年代号会滞后
decadeCodeChange (value) {
this.getEnStandardNo()
},
// 根据三个代号和一个年代号获取企标编号
getEnStandardNo () {
if (!this.formInline.enStandardCode || !this.formInline.enNameCode ||
!this.formInline.standardCategoryCode || !this.formInline.decadeCode) {
return
}
const param = {}
param.enStandardCode = this.formInline.enStandardCode
param.enNameCode = this.formInline.enNameCode
param.standardCategoryCode = this.formInline.standardCategoryCode
param.decadeCode = this.formInline.decadeCode
getEnStandardNo(param).then(res => {
if (res.success) {
this.$set(this.formInline, 'newEnStandardNo', res.message)
this.$refs.ruleForm.clearValidate('newEnStandardNo')
this.$forceUpdate()
// 返回流程名称
this.returnProcessName()
}
})
},
// 改变内容区域收起和展开
handleChangeRetractable (module) {
this.$set(this.retractableFlag, module, !this.retractableFlag[module])