[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 marketRegulationListAdd = (params) => postAction('/laws/marketStandard/add', params)
// 市场法规清单-基础信息-编辑 // 市场法规清单-基础信息-编辑
const marketRegulationListEdit = (params) => postAction('/laws/marketStandard/edit', 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) const marketRegulationDetailListById = (params) => getAction('/laws/marketStandardDetail/list', params)
// 市场法规清单-清单列表-调取 // 市场法规清单-清单列表-调取
@@ -237,6 +239,7 @@ export {
getMarketRegulationListByIdNoPerm, getMarketRegulationListByIdNoPerm,
marketRegulationListAdd, marketRegulationListAdd,
marketRegulationListEdit, marketRegulationListEdit,
marketRegulationGetListNumber,
marketRegulationDetailListById, marketRegulationDetailListById,
marketRegulationDetailTransfer, marketRegulationDetailTransfer,
marketRegulationDetailCopy, marketRegulationDetailCopy,
@@ -75,7 +75,8 @@ module.exports = {
standardExist: 'The standard already exists', standardExist: 'The standard already exists',
haveStandardExist: 'Some standards already exist', haveStandardExist: 'Some standards already exist',
pleaseSelectAListPublish: 'Please select a list to publish', 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: { marketListField: {
@@ -76,7 +76,8 @@ module.exports = {
standardExist: '标准已经存在', standardExist: '标准已经存在',
haveStandardExist: '部分标准已存在', haveStandardExist: '部分标准已存在',
pleaseSelectAListPublish: '请选择一个清单进行发布', pleaseSelectAListPublish: '请选择一个清单进行发布',
pleaseSelectCorrectData: '请选择未发布或者修改中的清单进行发布' pleaseSelectCorrectData: '请选择未发布或者修改中的清单进行发布',
listNumberEnglishPart: '清单编号英文缩写'
}, },
// 市场清单详情列表字段 // 市场清单详情列表字段
marketListField: { marketListField: {
@@ -19,16 +19,17 @@
:tree-data="countryOptions" :tree-data="countryOptions"
tree-checkable tree-checkable
treeCheckStrictly treeCheckStrictly
@change="countryChange"
:placeholder="$t('pleaseSelect')+$t('standardRegulationLibrary.marketRegulationsList.countryRegion')" /> :placeholder="$t('pleaseSelect')+$t('standardRegulationLibrary.marketRegulationsList.countryRegion')" />
</a-form-item> </a-form-item>
</a-col> </a-col>
<!-- 清单编号 --> <!-- 清单编号英文缩写 -->
<a-col :span="12" v-if="model.id"> <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" :labelCol="labelCol"
:wrapperCol="wrapperCol"> :wrapperCol="wrapperCol">
<a-input :placeholder="$t('pleaseEnter') + $t('standardRegulationLibrary.marketRegulationsList.listNumber')" <a-input :placeholder="$t('pleaseEnter') + $t('standardRegulationLibrary.marketRegulationsList.listNumberEnglishPart')"
:maxLength="200" :maxLength="192"
v-decorator="['manifestNo', validatorRules.manifestNo]" /> v-decorator="['manifestNo', validatorRules.manifestNo]" />
</a-form-item> </a-form-item>
</a-col> </a-col>
@@ -205,6 +206,7 @@ import {
getMarketRegulationListById, getMarketRegulationListById,
marketRegulationDetailCopy, marketRegulationDetailCopy,
marketRegulationDetailTransfer, marketRegulationDetailTransfer,
marketRegulationGetListNumber,
marketRegulationListAdd, marketRegulationListAdd,
marketRegulationListEdit marketRegulationListEdit
} from '../../../api/standardRegulationLibraryApi' } 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) { initData (id) {
this.pageLoading = true this.pageLoading = true
@@ -511,6 +531,8 @@ export default {
return { value: item } return { value: item }
}) })
} }
// 从清单编号截取英文缩写
this.model.manifestNo = this.model.manifestNo.split('-')[1]
this.$nextTick(() => { this.$nextTick(() => {
this.form.setFieldsValue(pick(this.model, 'country', 'manifestNo', 'customColumnName', 'drivePosition', 'securityLevel', 'manifestDesc', 'file')) this.form.setFieldsValue(pick(this.model, 'country', 'manifestNo', 'customColumnName', 'drivePosition', 'securityLevel', 'manifestDesc', 'file'))
}) })