diff --git a/src/utils/api.js b/src/utils/api.js index 9b9dcc9..fca5ac5 100644 --- a/src/utils/api.js +++ b/src/utils/api.js @@ -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`, // 用户管理 diff --git a/src/views/customer/AddCustomer.vue b/src/views/customer/AddCustomer.vue index 096f778..b60a2c5 100644 --- a/src/views/customer/AddCustomer.vue +++ b/src/views/customer/AddCustomer.vue @@ -71,8 +71,8 @@ - - + + @@ -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, diff --git a/src/views/customer/Dashboard.vue b/src/views/customer/Dashboard.vue index 350003c..985df65 100644 --- a/src/views/customer/Dashboard.vue +++ b/src/views/customer/Dashboard.vue @@ -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 = '' diff --git a/src/views/setting/Person.vue b/src/views/setting/Person.vue index 0ffb6e4..1035602 100644 --- a/src/views/setting/Person.vue +++ b/src/views/setting/Person.vue @@ -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(){ diff --git a/src/views/user/AddUser.vue b/src/views/user/AddUser.vue index 05188ea..15567de 100644 --- a/src/views/user/AddUser.vue +++ b/src/views/user/AddUser.vue @@ -669,7 +669,7 @@ export default { provinceId: '', cityId: '' }).then(res => { - this.schoolList = res.message + this.schoolList = res.list }).catch(res => {}); }, goback(){