[update] 修改bug81746
This commit is contained in:
@@ -215,7 +215,6 @@ import {
|
||||
getEnterpriseStandardTableHeader,
|
||||
getEnterpriseStandardSearchForm,
|
||||
shiftStandard,
|
||||
initChange,
|
||||
collectStandard,
|
||||
cancelCollectStandard,
|
||||
shareStandard,
|
||||
@@ -575,24 +574,16 @@ export default {
|
||||
},
|
||||
// 发起更改
|
||||
handleInitChange () {
|
||||
// 没有选择列表数据,需要提示“选中至少一条列表数据”
|
||||
if (!this.selectedRowKeys || this.selectedRowKeys.length === 0) {
|
||||
this.$message.warning(this.$t('selectLeastOne'))
|
||||
// 没有选择列表数据,需要提示“请选择一条列表数据”
|
||||
if (!this.selectedRowKeys || this.selectedRowKeys.length !== 1) {
|
||||
this.$message.warning(this.$t('selectOne'))
|
||||
return
|
||||
}
|
||||
this.loading = true
|
||||
const params = {
|
||||
ids: this.selectedRowKeys.join(',')
|
||||
}
|
||||
initChange(params).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
this.modalFormOk()
|
||||
} else {
|
||||
this.$message.warn(res.message)
|
||||
this.$router.push({
|
||||
path: '/workCenter/enterpriseStandardChange/enterpriseStandardChangeFlow',
|
||||
query: {
|
||||
enStandardId: this.selectedRowKeys[0]
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
// 临时权限设置
|
||||
|
||||
@@ -191,6 +191,15 @@ export default {
|
||||
} else {
|
||||
this.currentNodeName = '主起草人发起'
|
||||
}
|
||||
// 从企标库点发起更改跳转过来的
|
||||
if (this.$route.query.enStandardId) {
|
||||
this.$nextTick(() => {
|
||||
// 说明是从企标库页面发起跳转过来的
|
||||
this.$refs.baseInfoRef.$nextTick(() => {
|
||||
this.$refs.baseInfoRef.$refs.baseInfoForm.setFormById(this.$route.query.enStandardId)
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
|
||||
@@ -577,6 +577,66 @@ export default {
|
||||
this.initStandardSystemOptions()
|
||||
},
|
||||
methods: {
|
||||
setFormById (enStandardId) {
|
||||
this.loading = true
|
||||
this.isEditSetData = true
|
||||
getEnterpriseStandardInfoById({ id: enStandardId, type: '2' }).then(res => {
|
||||
if (res.success) {
|
||||
const result = res.result
|
||||
const formInline = {}
|
||||
// 企标id
|
||||
formInline.standardId = result.id
|
||||
// 企标编号
|
||||
formInline.standardNumber = result.standard_number
|
||||
// 企标名称
|
||||
formInline.standardName = result.standard_name
|
||||
// 标准等级分类
|
||||
formInline.gradeClassification = result.grade_classification || undefined
|
||||
// 授权部门
|
||||
formInline.authDept = result.auth_dept
|
||||
// 标准体系
|
||||
formInline.standardSystem = result.standard_system ? result.standard_system.split(',').map(item => {
|
||||
return { value: item }
|
||||
}) : []
|
||||
// 标准英文名称
|
||||
formInline.standardEnglishName = result.standard_english_name
|
||||
// 发布日期
|
||||
formInline.releaseDate = result.release_date
|
||||
// 实施日期
|
||||
formInline.implementationDate = result.implementation_date
|
||||
// 是否试行
|
||||
formInline.tryFlag = result.try_flag
|
||||
// 试行周期
|
||||
formInline.trialPeriod = result.trial_period || undefined
|
||||
// 零部件名称
|
||||
formInline.partName = result.part_name
|
||||
formInline.partName_dictText = result.part_name_dictText
|
||||
// 主起草人
|
||||
formInline.mainDraftingUser = result.main_drafting_user
|
||||
formInline.mainDraftingUser_dictText = result.main_drafting_user_dictText
|
||||
// 主起草单位
|
||||
formInline.mainDraftingUnit = result.main_drafting_unit
|
||||
// 代替标准号
|
||||
formInline.substituteStandardNumber = result.substitute_standard_number
|
||||
// 引用标准
|
||||
formInline.referenceStandard = result.reference_standard
|
||||
// 关联文件
|
||||
formInline.associatedFile = result.associated_file
|
||||
// 采标程度
|
||||
formInline.acquisitionDegree = result.acquisition_degree || null
|
||||
// 采用国际标准号
|
||||
formInline.internationalStandardNum = result.international_standard_num
|
||||
this.formInline = Object.assign({}, formInline)
|
||||
this.$refs.ruleForm.clearValidate()
|
||||
this.$emit('listChange', [this.formInline])
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
setTimeout(() => {
|
||||
this.isEditSetData = false
|
||||
}, 500)
|
||||
})
|
||||
},
|
||||
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
|
||||
initData (data) {
|
||||
this.isEditSetData = true
|
||||
|
||||
Reference in New Issue
Block a user