|
|
@@ -299,19 +299,22 @@ export default {
|
|
|
},
|
|
|
handleAdd() {
|
|
|
this.reset();
|
|
|
+ //获取回填信息(当前登录销售和绑定的医生)
|
|
|
getCompanyUserAndDoctor().then(response => {
|
|
|
const data = response.data;
|
|
|
- if (data) {
|
|
|
- this.form.companyUserId = data.companyUserId;
|
|
|
- this.form.companyUserName = data.companyUserName;
|
|
|
- this.form.doctorId = data.doctorId;
|
|
|
- this.form.doctorName = data.doctorName;
|
|
|
+ if (!data || !data.doctorId) {
|
|
|
+ this.$modal.msgError("未找到绑定医生!请绑定医生后再操作!");
|
|
|
+ return;
|
|
|
}
|
|
|
+ this.form.companyUserId = data.companyUserId;
|
|
|
+ this.form.companyUserName = data.companyUserName;
|
|
|
+ this.form.doctorId = data.doctorId;
|
|
|
+ this.form.doctorName = data.doctorName;
|
|
|
+ this.open = true;
|
|
|
+ this.title = "添加客户信息";
|
|
|
}).catch(() => {
|
|
|
this.$modal.msgError("获取销售与医生信息失败");
|
|
|
});
|
|
|
- this.open = true;
|
|
|
- this.title = "添加客户信息";
|
|
|
},
|
|
|
handleUpdate(row) {
|
|
|
this.reset();
|