|
@@ -602,6 +602,11 @@
|
|
|
form: {},
|
|
|
// 表单校验
|
|
|
rules: {
|
|
|
+ orgName: [{
|
|
|
+ required: true,
|
|
|
+ message: '销售组织不能为空',
|
|
|
+ trigger: 'blur'
|
|
|
+ }],
|
|
|
name: [{
|
|
|
required: true,
|
|
|
message: '客户名称不能为空',
|
|
@@ -733,7 +738,7 @@
|
|
|
this.mkCmCustomersDepartmentList = response.data.mkCmCustomersDepartmentList;
|
|
|
this.openState = 'check';
|
|
|
});
|
|
|
- getContactInfo().then(response => {
|
|
|
+ getContactInfo(id1).then(response => {
|
|
|
this.mkCmCustomersContactList = response.data;
|
|
|
});
|
|
|
},
|
|
@@ -784,18 +789,20 @@
|
|
|
if (this.form.id != null) {
|
|
|
updateCustomers(this.form).then(response => {
|
|
|
this.$modal.msgSuccess("修改成功");
|
|
|
+ this.reset();
|
|
|
+ this.getList();
|
|
|
+ this.isList = true;
|
|
|
});
|
|
|
- this.reset();
|
|
|
- this.getList();
|
|
|
- this.isList = true;
|
|
|
} else {
|
|
|
addCustomers(this.form).then(response => {
|
|
|
this.$modal.msgSuccess("新增成功");
|
|
|
+ this.reset();
|
|
|
+ this.getList();
|
|
|
+ this.isList = true;
|
|
|
});
|
|
|
- this.reset();
|
|
|
- this.getList();
|
|
|
- this.isList = true;
|
|
|
}
|
|
|
+ } else {
|
|
|
+ this.checkout();
|
|
|
}
|
|
|
});
|
|
|
},
|
|
@@ -928,6 +935,23 @@
|
|
|
})
|
|
|
.catch(_ => {});
|
|
|
},
|
|
|
+ /** 必填项校验 */
|
|
|
+ checkout() {
|
|
|
+ if (!(this.form.orgName != null && this.form.orgName != '' && this.form.orgName != undefined &&
|
|
|
+ this.form.name != null && this.form.name != '' && this.form.name != undefined &&
|
|
|
+ this.form.classification != null && this.form.classification != '' && this.form.classification !=
|
|
|
+ undefined &&
|
|
|
+ this.form.taxType != null && this.form.taxType != '' && this.form.taxType != undefined &&
|
|
|
+ this.form.licenseNumber != null && this.form.licenseNumber != '' && this.form.licenseNumber != undefined)) {
|
|
|
+ return this.$modal.msgError("基本信息中存在必填项未填!");
|
|
|
+ }
|
|
|
+ if (!(this.form.enterpriseType != null && this.form.enterpriseType != '' && this.form.enterpriseType !=
|
|
|
+ undefined &&
|
|
|
+ this.form.enterpriseName != null && this.form.enterpriseName != '' && this.form.enterpriseName != undefined
|
|
|
+ )) {
|
|
|
+ return this.$modal.msgError("资质信息中存在必填项未填!");
|
|
|
+ }
|
|
|
+ },
|
|
|
}
|
|
|
};
|
|
|
|