|
|
|
@ -71,8 +71,8 @@ |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item prop="customerId" label="客户名称"> |
|
|
|
|
<el-select v-model="form.customerId" filterable clearable placeholder="请选择学校" @change="SchoolChange" @clear="clearSchool()"> |
|
|
|
|
<el-form-item prop="schoolId" label="客户名称"> |
|
|
|
|
<el-select v-model="form.schoolId" filterable clearable placeholder="请选择学校" @change="SchoolChange" @clear="clearSchool"> |
|
|
|
|
<el-option v-for="(item,index) in schoolList" :key="index" :label="item.schoolName" :value="item.schoolId"></el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
@ -260,7 +260,6 @@ export default { |
|
|
|
|
isDetail : Boolean(this.$route.query.show), |
|
|
|
|
customerData: [], |
|
|
|
|
form: { |
|
|
|
|
customerId: '', |
|
|
|
|
customerName: '', |
|
|
|
|
countries: '中国', |
|
|
|
|
industryClassId: '', |
|
|
|
@ -274,6 +273,7 @@ export default { |
|
|
|
|
customerType: '', |
|
|
|
|
expireDate: '', |
|
|
|
|
email: '', |
|
|
|
|
schoolId: '' |
|
|
|
|
}, |
|
|
|
|
rules: { |
|
|
|
|
countries: [ |
|
|
|
@ -302,7 +302,7 @@ export default { |
|
|
|
|
trigger: 'blur' |
|
|
|
|
} |
|
|
|
|
], |
|
|
|
|
customerId: [ |
|
|
|
|
schoolId: [ |
|
|
|
|
{ required: true, message: '请选择客户名称', trigger: 'change' } |
|
|
|
|
], |
|
|
|
|
email: [ |
|
|
|
@ -376,7 +376,7 @@ export default { |
|
|
|
|
}).then((res) => { |
|
|
|
|
let customer = res.result.customer |
|
|
|
|
this.form = { |
|
|
|
|
customerId: Number(this.customerId), |
|
|
|
|
schoolId: customer.schoolId, |
|
|
|
|
countries: customer.countries, |
|
|
|
|
industryClassId: customer.industryClassId, |
|
|
|
|
industryId: customer.industryId, |
|
|
|
@ -423,8 +423,8 @@ export default { |
|
|
|
|
provinceId: '', |
|
|
|
|
cityId: '' |
|
|
|
|
} |
|
|
|
|
this.$get(this.api.querySchoolData,data).then(res => { |
|
|
|
|
this.schoolList = res.message |
|
|
|
|
this.$get(this.api.querySchoolData).then(res => { |
|
|
|
|
this.schoolList = res.list |
|
|
|
|
}).catch(res => {}); |
|
|
|
|
}, |
|
|
|
|
// 查询客户是否存在 |
|
|
|
@ -441,7 +441,7 @@ export default { |
|
|
|
|
this.form.cityId = obj.cityId |
|
|
|
|
|
|
|
|
|
this.$get(this.api.queryCustomerIsExists,{ |
|
|
|
|
schoolId: this.form.customerId |
|
|
|
|
schoolId: this.form.schoolId |
|
|
|
|
}).then(res => { |
|
|
|
|
this.NoAdd = true |
|
|
|
|
}).catch(res => { |
|
|
|
@ -479,7 +479,7 @@ export default { |
|
|
|
|
if(this.NoAdd){ |
|
|
|
|
let obj = {}; |
|
|
|
|
obj = this.schoolList.find((item)=>{ |
|
|
|
|
return item.schoolId == this.form.customerId; |
|
|
|
|
return item.schoolId == this.form.schoolId; |
|
|
|
|
}); |
|
|
|
|
this.form.customerName = obj.schoolName |
|
|
|
|
this.form.provinceId = obj.provinceId |
|
|
|
@ -487,8 +487,8 @@ export default { |
|
|
|
|
this.form.cityId = obj.cityId |
|
|
|
|
let data = { |
|
|
|
|
customerName: this.form.customerName, |
|
|
|
|
customerId: this.form.customerId, |
|
|
|
|
schoolId: this.form.customerId, |
|
|
|
|
customerId: this.customerId, |
|
|
|
|
schoolId: this.form.schoolId, |
|
|
|
|
countries: this.form.countries, |
|
|
|
|
industryClassId: this.form.industryClassId, |
|
|
|
|
industryId: this.form.industryId, |
|
|
|
|