[update] 修改年度制修订主动上报和流程中心

This commit is contained in:
lideqin
2023-12-08 17:01:11 +08:00
parent 393e562723
commit dc99032d70
9 changed files with 130 additions and 93 deletions
@@ -149,12 +149,12 @@
</span>
</div>
<a-form-model-item class="item-model" prop="decadeCode">
<!--@change="decadeCodeChange"-->
<j-date show-type="year"
v-model="formInline.decadeCode"
:default-value="yearNumberDefaultValue"
date-format="YYYY"
:disabled="disabled"
@change="decadeCodeChange"
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.yearNumber')" />
</a-form-model-item>
</div>
@@ -538,7 +538,7 @@ import UploadFile from '@/components/UploadFile'
import { getTreeList } from '@/api/enterpriseStandardLibraryApi'
import Vue from 'vue'
import { USER_INFO } from '@/store/mutation-types'
import { getEnStandardNo } from '@/api/workCenter'
// import { getEnStandardNo } from '@/api/workCenter'
import TreeSelection from '@/components/selection/TreeSelection'
export default {
@@ -734,18 +734,18 @@ export default {
}
},
watch: {
// 企业标准代号
'formInline.enStandardCode' (value) {
this.getEnStandardNo()
},
// 企业名称代号
'formInline.enNameCode' (value) {
this.getEnStandardNo()
},
// 标准类别代号
'formInline.standardCategoryCode' (value) {
this.getEnStandardNo()
}
// // 企业标准代号
// 'formInline.enStandardCode' (value) {
// this.getEnStandardNo()
// },
// // 企业名称代号
// 'formInline.enNameCode' (value) {
// this.getEnStandardNo()
// },
// // 标准类别代号
// 'formInline.standardCategoryCode' (value) {
// this.getEnStandardNo()
// }
},
mounted () {
this.getWorkGroupTree()
@@ -789,39 +789,39 @@ export default {
this.disabled = true
},
// watch监视年代号会滞后
decadeCodeChange (value) {
this.getEnStandardNo()
},
// decadeCodeChange (value) {
// this.getEnStandardNo()
// },
// 根据三个代号和一个年代号获取企标编号
getEnStandardNo () {
// 如果是制定根据填的三个代号和一个年代号获取
if (this.formInline.projectType === ProjectType.ENACT.value) {
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.$forceUpdate()
}
})
} else {
// 是修订,通过选中的企标编号和年代号拼接新企标编号
if (this.formInline.originEnStandardNo && this.formInline.decadeCode) {
const standardNo = this.formInline.originEnStandardNo.split('-')[0] + '-' + this.formInline.decadeCode
this.$set(this.formInline, 'newEnStandardNo', standardNo)
this.$forceUpdate()
// 返回流程名称
this.returnProcessName()
}
}
},
// getEnStandardNo () {
// // 如果是制定根据填的三个代号和一个年代号获取
// if (this.formInline.projectType === ProjectType.ENACT.value) {
// 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.$forceUpdate()
// }
// })
// } else {
// // 是修订,通过选中的企标编号和年代号拼接新企标编号
// if (this.formInline.originEnStandardNo && this.formInline.decadeCode) {
// const standardNo = this.formInline.originEnStandardNo.split('-')[0] + '-' + this.formInline.decadeCode
// this.$set(this.formInline, 'newEnStandardNo', standardNo)
// this.$forceUpdate()
// // 返回流程名称
// this.returnProcessName()
// }
// }
// },
// 获取标准体系下拉框数据
initStandardSystemOptions () {
getTreeList({ option: 1 }).then(res => {
@@ -849,6 +849,10 @@ export default {
return item
})
},
// 零部件名称选择完成的回调
treeSelectNameChange (value, fieldName) {
this.formInline[fieldName + '_dictText'] = value
},
// 授权部门返回参数
authDeptBack (value) {
this.formInline.authDept_dictText = value.map(item => item.text).join(',')