[update] 市场法规清单
This commit is contained in:
+43
-25
@@ -17,7 +17,8 @@
|
||||
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||
style="width: 100%"
|
||||
:tree-data="countryOptions"
|
||||
:label-in-value="false"
|
||||
tree-checkable
|
||||
treeCheckStrictly
|
||||
:placeholder="$t('pleaseSelect')+$t('standardRegulationLibrary.marketRegulationsList.countryRegion')" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
@@ -47,9 +48,12 @@
|
||||
<a-form-item :labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
:label="$t('standardRegulationLibrary.marketRegulationsList.drivingPosition')">
|
||||
<j-dict-select-tag v-decorator="['drivePosition', validatorRules.drivePosition]"
|
||||
dict-code="driving_position"
|
||||
:placeholder="$t('pleaseSelect') + $t('standardRegulationLibrary.marketRegulationsList.drivingPosition')" />
|
||||
<!-- <j-dict-select-tag v-decorator="['drivePosition', validatorRules.drivePosition]"-->
|
||||
<!-- dict-code="driving_position"-->
|
||||
<!-- :placeholder="$t('pleaseSelect') + $t('standardRegulationLibrary.marketRegulationsList.drivingPosition')" />-->
|
||||
<j-multi-select-tag v-decorator="['drivePosition', validatorRules.drivePosition]"
|
||||
dict-code="driving_position"
|
||||
:placeholder="$t('pleaseSelect') + $t('standardRegulationLibrary.marketRegulationsList.drivingPosition')" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<!-- 密级 -->
|
||||
@@ -838,32 +842,46 @@ export default {
|
||||
// 提交
|
||||
handleSubmit () {
|
||||
if (this.loading) return
|
||||
const requiredField = [
|
||||
'standardNumber', // 标准编号
|
||||
'standardName', // 标准名称
|
||||
'newProductImplDate', // 新生产车实施日期
|
||||
'newAuthImplDate', // 新认证车实施日期
|
||||
'registrationDate', // 注册日期
|
||||
'applicableCountryRegion', // 适用国家/地区
|
||||
'authenticationObject', // 认证对象
|
||||
'mainDept', // 主控部门
|
||||
'mainDeptProfMode', // 主控部门专业模块
|
||||
'applicableVehicle', // 适用车型
|
||||
'dynamicType' // 动力类型
|
||||
]
|
||||
for (const item of this.dataList) {
|
||||
for (const filed of requiredField) {
|
||||
if (!item[filed]) {
|
||||
this.$message.warning(this.$t('pleaseCompleteTableInfo'))
|
||||
return
|
||||
this.form.validateFields((err, values) => {
|
||||
if (err) {
|
||||
return
|
||||
}
|
||||
let tableErr = false
|
||||
// 校验表格是否至少有一条数据
|
||||
if (this.dataList.length <= 0) {
|
||||
this.$message.warning(this.$t('addAtLeastOneRowOfData'))
|
||||
tableErr = true
|
||||
return
|
||||
}
|
||||
// 校验表格必填项是否都填写了
|
||||
const requiredField = [
|
||||
'standardNumber', // 标准编号
|
||||
'standardName', // 标准名称
|
||||
'newProductImplDate', // 新生产车实施日期
|
||||
'newAuthImplDate', // 新认证车实施日期
|
||||
'registrationDate', // 注册日期
|
||||
'applicableCountryRegion', // 适用国家/地区
|
||||
'authenticationObject', // 认证对象
|
||||
'mainDept', // 主控部门
|
||||
'mainDeptProfMode', // 主控部门专业模块
|
||||
'applicableVehicle', // 适用车型
|
||||
'dynamicType' // 动力类型
|
||||
]
|
||||
for (const item of this.dataList) {
|
||||
for (const filed of requiredField) {
|
||||
if (!item[filed]) {
|
||||
this.$message.warning(this.$t('pleaseCompleteTableInfo'))
|
||||
tableErr = true
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
this.form.validateFields((err, values) => {
|
||||
if (!err) {
|
||||
if (!err && !tableErr) {
|
||||
this.loading = true
|
||||
const param = {}
|
||||
param.manifest = Object.assign({}, values)
|
||||
// 国家/地区是树选择,需要处理格式
|
||||
param.manifest.country = param.manifest.country.map(item => item.value).join(',')
|
||||
let func
|
||||
if (this.model.manifest.id) {
|
||||
param.manifest.id = this.model.manifest.id
|
||||
|
||||
Reference in New Issue
Block a user