[update] 市场法规清单可以修改中间部分的英文缩写

This commit is contained in:
lideqin
2024-07-30 11:21:38 +08:00
parent 9e76fbbb05
commit e6c62f253c
4 changed files with 33 additions and 6 deletions
+3
View File
@@ -142,6 +142,8 @@ const getMarketRegulationListByIdNoPerm = (params) => getAction('/laws/marketSta
const marketRegulationListAdd = (params) => postAction('/laws/marketStandard/add', params)
// 市场法规清单-基础信息-编辑
const marketRegulationListEdit = (params) => postAction('/laws/marketStandard/edit', params)
// 市场法规清单-改变国家地区,重新获取清单编号
const marketRegulationGetListNumber = (params) => getAction('/laws/marketStandard/getManifestNo', params)
// 市场法规清单-清单列表-获取详情列表不分页
const marketRegulationDetailListById = (params) => getAction('/laws/marketStandardDetail/list', params)
// 市场法规清单-清单列表-调取
@@ -237,6 +239,7 @@ export {
getMarketRegulationListByIdNoPerm,
marketRegulationListAdd,
marketRegulationListEdit,
marketRegulationGetListNumber,
marketRegulationDetailListById,
marketRegulationDetailTransfer,
marketRegulationDetailCopy,
@@ -75,7 +75,8 @@ module.exports = {
standardExist: 'The standard already exists',
haveStandardExist: 'Some standards already exist',
pleaseSelectAListPublish: 'Please select a list to publish',
pleaseSelectCorrectData: 'Select an unpublished or modified list to publish'
pleaseSelectCorrectData: 'Select an unpublished or modified list to publish',
listNumberEnglishPart: 'List number English abbreviation'
},
// 市场清单详情列表字段
marketListField: {
@@ -76,7 +76,8 @@ module.exports = {
standardExist: '标准已经存在',
haveStandardExist: '部分标准已存在',
pleaseSelectAListPublish: '请选择一个清单进行发布',
pleaseSelectCorrectData: '请选择未发布或者修改中的清单进行发布'
pleaseSelectCorrectData: '请选择未发布或者修改中的清单进行发布',
listNumberEnglishPart: '清单编号英文缩写'
},
// 市场清单详情列表字段
marketListField: {
@@ -19,16 +19,17 @@
:tree-data="countryOptions"
tree-checkable
treeCheckStrictly
@change="countryChange"
:placeholder="$t('pleaseSelect')+$t('standardRegulationLibrary.marketRegulationsList.countryRegion')" />
</a-form-item>
</a-col>
<!-- 清单编号 -->
<!-- 清单编号英文缩写 -->
<a-col :span="12" v-if="model.id">
<a-form-item :label="$t('standardRegulationLibrary.marketRegulationsList.listNumber')"
<a-form-item :label="$t('standardRegulationLibrary.marketRegulationsList.listNumberEnglishPart')"
:labelCol="labelCol"
:wrapperCol="wrapperCol">
<a-input :placeholder="$t('pleaseEnter') + $t('standardRegulationLibrary.marketRegulationsList.listNumber')"
:maxLength="200"
<a-input :placeholder="$t('pleaseEnter') + $t('standardRegulationLibrary.marketRegulationsList.listNumberEnglishPart')"
:maxLength="192"
v-decorator="['manifestNo', validatorRules.manifestNo]" />
</a-form-item>
</a-col>
@@ -205,6 +206,7 @@ import {
getMarketRegulationListById,
marketRegulationDetailCopy,
marketRegulationDetailTransfer,
marketRegulationGetListNumber,
marketRegulationListAdd,
marketRegulationListEdit
} from '../../../api/standardRegulationLibraryApi'
@@ -496,6 +498,24 @@ export default {
}
})
},
// 国家地区改变,重新获取清单编号
countryChange (value) {
// 重新获取清单编号
// const value = this.form.getFieldValue('country')
console.log('--------value', value)
const param = {}
param.country = value && value.length > 0 ? value.map(item => item.value).join(',') : ''
marketRegulationGetListNumber(param).then(res => {
if (res.success) {
const result = {
manifestNo: res.message
}
this.$nextTick(() => {
this.form.setFieldsValue(pick(result, 'manifestNo'))
})
}
})
},
// 获取基础信息
initData (id) {
this.pageLoading = true
@@ -511,6 +531,8 @@ export default {
return { value: item }
})
}
// 从清单编号截取英文缩写
this.model.manifestNo = this.model.manifestNo.split('-')[1]
this.$nextTick(() => {
this.form.setFieldsValue(pick(this.model, 'country', 'manifestNo', 'customColumnName', 'drivePosition', 'securityLevel', 'manifestDesc', 'file'))
})