From b29874e06d242b7e5999c4ce7d3998f2bfe8fc52 Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Wed, 7 Jul 2021 15:50:18 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BC=96=E8=BE=91=E5=AE=A2=E6=88=B7=EF=BC=8C?= =?UTF-8?q?=E5=AD=A6=E6=A0=A1=E5=88=97=E8=A1=A8=E6=8E=A5=E5=8F=A3=E6=9B=B4?= =?UTF-8?q?=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/api.js | 2 +- src/views/customer/AddCustomer.vue | 22 +++++++++++----------- src/views/customer/Dashboard.vue | 11 +++++------ src/views/setting/Person.vue | 2 +- src/views/user/AddUser.vue | 2 +- 5 files changed, 19 insertions(+), 20 deletions(-) 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(){