[update] 市场法规清单-新增编辑提交时校验表格必填项
This commit is contained in:
+21
@@ -839,6 +839,27 @@ 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) {
|
||||
this.loading = true
|
||||
|
||||
+2
@@ -290,6 +290,8 @@ export default {
|
||||
this.model.applicableCountryRegion = this.model.applicableCountryRegion.split(',').map(item => {
|
||||
return { value: item }
|
||||
})
|
||||
} else {
|
||||
this.model.applicableCountryRegion = []
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
this.form.setFieldsValue(pick(this.model, 'standardNumber', 'standardName', 'standardEnglishName',
|
||||
|
||||
Reference in New Issue
Block a user