编辑客户,学校列表接口更换

dev
yujialong 3 years ago
parent 8f9faed1cc
commit b29874e06d
  1. 2
      src/utils/api.js
  2. 22
      src/views/customer/AddCustomer.vue
  3. 11
      src/views/customer/Dashboard.vue
  4. 2
      src/views/setting/Person.vue
  5. 2
      src/views/user/AddUser.vue

@ -38,7 +38,7 @@ export default {
queryCustomerIndustryClass: `${host}/liuwanr/customer/queryCustomerIndustryClass`,
queryCustomerIndustry: `${host}/liuwanr/customer/queryCustomerIndustry`,
queryPhone: `${host}/liuwanr/user/queryPhone`,
querySchoolData: `${host}/liuwanr/customer/querySchool`,
querySchoolData: `${host3}/nakadai/school/querySchool`,
queryPlatform: `${host}/liuwanr/userInfo/queryPlatform`,
// 用户管理

@ -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,

@ -137,18 +137,17 @@ export default {
},
methods: {
getData() {
let data = {
this.$post(this.api.queryCustomer,{
countries: this.form.countries,
provinceId: this.form.provinces,
cityId: this.form.city,
searchContent: this.form.keyword,
page: this.page,
size: this.pageSize
}
this.$post(this.api.queryCustomer,data).then(res => {
}).then(res => {
this.listData = res.message.list
this.total = res.message.totalCount
}).catch(res => {});
}).catch(res => {})
},
initData(){
this.page = 1
@ -157,8 +156,8 @@ export default {
getProvince(){
this.$get(this.api.queryProvince).then(res => {
this.provinceList = res.message
this.$store.commit("provinceData", { provinceList : this.provinceList});
}).catch(res => {});
this.$store.commit("provinceData", { provinceList : this.provinceList})
}).catch(res => {})
},
clearprovince(){
this.form.city = ''

@ -528,7 +528,7 @@ export default {
//
getSchoolData(){
this.$get(this.api.querySchoolData,{schoolName: '',provinceId: '',cityId: ''}).then(res => {
this.schoolList = res.message
this.schoolList = res.list
}).catch(res => {});
},
async accountChange(){

@ -669,7 +669,7 @@ export default {
provinceId: '',
cityId: ''
}).then(res => {
this.schoolList = res.message
this.schoolList = res.list
}).catch(res => {});
},
goback(){

Loading…
Cancel
Save