[update] 市场法规清单

This commit is contained in:
lideqin
2024-07-08 09:53:34 +08:00
parent 90f7d4829d
commit 8bceb86ae0
4 changed files with 81 additions and 49 deletions
+3
View File
@@ -142,6 +142,8 @@ const marketRegulationListAdd = (params) => postAction('/laws/marketStandard/add
const marketRegulationListEdit = (params) => postAction('/laws/marketStandard/edit', params) const marketRegulationListEdit = (params) => postAction('/laws/marketStandard/edit', params)
// 市场法规清单-清单列表-获取详情列表分页 // 市场法规清单-清单列表-获取详情列表分页
const marketRegulationDetailListById = (params) => getAction('/laws/marketStandardDetail/list', params) const marketRegulationDetailListById = (params) => getAction('/laws/marketStandardDetail/list', params)
// 市场法规清单-清单列表-调取
const marketRegulationDetailTransfer = (params) => postAction('/laws/marketStandardDetail/batchAdd', params)
// 市场法规清单-清单列表-复制 // 市场法规清单-清单列表-复制
const marketRegulationDetailCopy = (params) => postAction('/laws/marketStandardDetail/copy', params) const marketRegulationDetailCopy = (params) => postAction('/laws/marketStandardDetail/copy', params)
// 市场法规清单-清单列表-新增 // 市场法规清单-清单列表-新增
@@ -233,6 +235,7 @@ export {
marketRegulationListAdd, marketRegulationListAdd,
marketRegulationListEdit, marketRegulationListEdit,
marketRegulationDetailListById, marketRegulationDetailListById,
marketRegulationDetailTransfer,
marketRegulationDetailCopy, marketRegulationDetailCopy,
marketRegulationDetailAdd, marketRegulationDetailAdd,
marketRegulationDetailEdit, marketRegulationDetailEdit,
@@ -10,37 +10,37 @@
<!-- 国家/地区 --> <!-- 国家/地区 -->
<a-col :span="12"> <a-col :span="12">
<label>{{ $t('standardRegulationLibrary.marketRegulationsList.countryRegion') }}</label> <label>{{ $t('standardRegulationLibrary.marketRegulationsList.countryRegion') }}</label>
<span>{{ model.manifest.countryText || global.emptyLine }}</span> <span>{{ model.countryText || global.emptyLine }}</span>
</a-col> </a-col>
<!-- 清单编号 --> <!-- 清单编号 -->
<a-col :span="12"> <a-col :span="12">
<label>{{ $t('standardRegulationLibrary.marketRegulationsList.listNumber') }}</label> <label>{{ $t('standardRegulationLibrary.marketRegulationsList.listNumber') }}</label>
<span>{{ model.manifest.manifestNo || global.emptyLine }}</span> <span>{{ model.manifestNo || global.emptyLine }}</span>
</a-col> </a-col>
<!-- 清单名称 --> <!-- 清单名称 -->
<a-col :span="12"> <a-col :span="12">
<label>{{ $t('standardRegulationLibrary.marketRegulationsList.listName') }}</label> <label>{{ $t('standardRegulationLibrary.marketRegulationsList.listName') }}</label>
<span>{{ model.manifest.manifestName || global.emptyLine }}</span> <span>{{ model.manifestName || global.emptyLine }}</span>
</a-col> </a-col>
<!-- 驾驶位置 --> <!-- 驾驶位置 -->
<a-col :span="12"> <a-col :span="12">
<label>{{ $t('standardRegulationLibrary.marketRegulationsList.drivingPosition') }}</label> <label>{{ $t('standardRegulationLibrary.marketRegulationsList.drivingPosition') }}</label>
<span>{{ model.manifest.drivePositionText || global.emptyLine }}</span> <span>{{ model.drivePositionText || global.emptyLine }}</span>
</a-col> </a-col>
<!-- 密级 --> <!-- 密级 -->
<a-col :span="12"> <a-col :span="12">
<label>{{ $t('standardRegulationLibrary.marketRegulationsList.securityClass') }}</label> <label>{{ $t('standardRegulationLibrary.marketRegulationsList.securityClass') }}</label>
<span>{{ model.manifest.securityLevelText || global.emptyLine }}</span> <span>{{ model.securityLevelText || global.emptyLine }}</span>
</a-col> </a-col>
<!-- 清单说明 --> <!-- 清单说明 -->
<a-col :span="12"> <a-col :span="12">
<label>{{ $t('standardRegulationLibrary.marketRegulationsList.listDeclaration') }}</label> <label>{{ $t('standardRegulationLibrary.marketRegulationsList.listDeclaration') }}</label>
<span>{{ model.manifest.manifestDesc || global.emptyLine }}</span> <span>{{ model.manifestDesc || global.emptyLine }}</span>
</a-col> </a-col>
<!-- 附件 --> <!-- 附件 -->
<a-col :span="12" class="file-echo-col"> <a-col :span="12" class="file-echo-col">
<label>{{ $t('attach') }}</label> <label>{{ $t('attach') }}</label>
<file-echo v-if="model.manifest.file" class="file-echo-div" :fileIds="model.manifest.file"/> <file-echo v-if="model.file" class="file-echo-div" :fileIds="model.file"/>
<span v-else>{{ global.emptyLine }}</span> <span v-else>{{ global.emptyLine }}</span>
</a-col> </a-col>
</a-row> </a-row>
@@ -331,7 +331,7 @@ export default {
param.manifestId = ids param.manifestId = ids
getMarketRegulationListById(param).then(res => { getMarketRegulationListById(param).then(res => {
if (res.success) { if (res.success) {
this.model = Object.assign({}, res.result) this.model = Object.assign({}, res.result.manifest)
} }
}).finally(() => { }).finally(() => {
this.loading = false this.loading = false
@@ -556,6 +556,7 @@ export default {
return return
} }
this.loading = true this.loading = true
const paramList = []
for (const item of list) { for (const item of list) {
await getForeignStandardDocumentInfo({ id: item.id, type: '2' }).then(res => { await getForeignStandardDocumentInfo({ id: item.id, type: '2' }).then(res => {
if (res.success) { if (res.success) {
@@ -577,19 +578,20 @@ export default {
form.associateDeptProfMode = result.associate_dept_prof_mode || undefined // 关联部门专业模块 form.associateDeptProfMode = result.associate_dept_prof_mode || undefined // 关联部门专业模块
form.applicableVehicle = result.applicable_vehicle // 适用车型 form.applicableVehicle = result.applicable_vehicle // 适用车型
form.dynamicType = result.dynamic_type // 动力类型 form.dynamicType = result.dynamic_type // 动力类型
marketRegulationDetailAdd(form).then(res => { paramList.push(form)
if (res.success) {
this.$message.success(res.message)
this.loadData()
} else {
this.$message.warn(res.message)
}
}).finally(() => {
this.loading = false
})
} }
}) })
} }
marketRegulationDetailTransfer(paramList).then(res => {
if (res.success) {
this.$message.success(res.message)
this.loadData()
} else {
this.$message.warn(res.message)
}
}).finally(() => {
this.loading = false
})
}, },
// 复制 // 复制
handleCopy () { handleCopy () {
@@ -308,37 +308,64 @@ export default {
// 选择标准改变 // 选择标准改变
selectStandardChange (value) { selectStandardChange (value) {
this.confirmLoading = true this.confirmLoading = true
// 根据返回的id查询企标数据 if (value && value.length > 0) {
getForeignStandardDocumentInfo({ id: value[0].id, type: '2' }).then(res => { // 根据返回的id查询企标数据
if (res.success) { getForeignStandardDocumentInfo({ id: value[0].id, type: '2' }).then(res => {
const result = res.result if (res.success) {
const form = {} const result = res.result
form.standardId = result.id const form = {}
form.standardName = result.standard_name // 标准名称 form.standardId = result.id
form.standardEnglishName = result.standard_english_name // 标准英文名称 form.standardName = result.standard_name // 标准名称
form.type = result.type // 标准类型 form.standardEnglishName = result.standard_english_name // 标准英文名称
form.newProductImplDate = result.new_product_impl_date // 新生产车实施日期 form.type = result.type // 标准类型
form.newAuthImplDate = result.new_auth_impl_date // 新认证车实施日期 form.newProductImplDate = result.new_product_impl_date // 新生产车实施日期
form.registrationDate = result.registration_date // 注册日期 form.newAuthImplDate = result.new_auth_impl_date // 新认证车实施日期
form.country = result.applicable_market ? (result.applicable_market.split(',').map(item => { form.registrationDate = result.registration_date // 注册日期
return { value: item } form.country = result.applicable_market ? (result.applicable_market.split(',').map(item => {
})) : [] // 适用国家/地区 return { value: item }
form.mainDept = result.main_dept // 主控部门 })) : [] // 适用国家/地区
form.mainDeptProfMode = result.main_dept_prof_mode || undefined // 主控部门专业模块 form.mainDept = result.main_dept // 主控部门
form.associateDept = result.associate_dept // 关联部门 form.mainDeptProfMode = result.main_dept_prof_mode || undefined // 主控部门专业模块
form.associateDeptProfMode = result.associate_dept_prof_mode || undefined // 关联部门专业模块 form.associateDept = result.associate_dept // 关联部门
form.applicableVehicle = result.applicable_vehicle // 适用车型 form.associateDeptProfMode = result.associate_dept_prof_mode || undefined // 关联部门专业模块
form.dynamicType = result.dynamic_type // 动力类 form.applicableVehicle = result.applicable_vehicle // 适用车
this.model = Object.assign({}, form) form.dynamicType = result.dynamic_type // 动力类型
this.$nextTick(() => { this.model = Object.assign({}, form)
this.form.setFieldsValue(pick(form, 'standardName', 'standardEnglishName', this.$nextTick(() => {
'type', 'newProductImplDate', 'newAuthImplDate', 'registrationDate', 'country', this.form.setFieldsValue(pick(form, 'standardName', 'standardEnglishName',
'mainDept', 'mainDeptProfMode', 'associateDept', 'associateDeptProfMode', 'applicableVehicle', 'dynamicType')) 'type', 'newProductImplDate', 'newAuthImplDate', 'registrationDate', 'country',
}) 'mainDept', 'mainDeptProfMode', 'associateDept', 'associateDeptProfMode',
} 'applicableVehicle', 'dynamicType'))
}).finally(() => { })
this.confirmLoading = false }
}) }).finally(() => {
this.confirmLoading = false
})
} else {
const form = {}
form.standardId = ''
form.standardName = '' // 标准名称
form.standardEnglishName = '' // 标准英文名称
form.type = undefined // 标准类型
form.newProductImplDate = '' // 新生产车实施日期
form.newAuthImplDate = '' // 新认证车实施日期
form.registrationDate = '' // 注册日期
form.country = [] // 适用国家/地区
form.mainDept = '' // 主控部门
form.mainDeptProfMode = undefined // 主控部门专业模块
form.associateDept = '' // 关联部门
form.associateDeptProfMode = undefined // 关联部门专业模块
form.applicableVehicle = '' // 适用车型
form.dynamicType = '' // 动力类型
this.model = Object.assign({}, form)
this.$nextTick(() => {
this.form.setFieldsValue(pick(form, 'standardName', 'standardEnglishName',
'type', 'newProductImplDate', 'newAuthImplDate', 'registrationDate', 'country',
'mainDept', 'mainDeptProfMode', 'associateDept', 'associateDeptProfMode',
'applicableVehicle', 'dynamicType'))
this.confirmLoading = false
})
}
}, },
handleOk () { handleOk () {
if (this.confirmLoading) return if (this.confirmLoading) return