Bladeren bron

对接后端接口

魏熙美 5 jaren geleden
bovenliggende
commit
a4f79e25e1

+ 13
- 1
src/config/api.js Bestand weergeven

@@ -223,7 +223,19 @@ const apis = {
223 223
     verify: { // 审核用户
224 224
       method: `put`,
225 225
       url: `${commPrefix}/customer/recommend/verify/:id`
226
-    }
226
+    },
227
+    report: { // 报备客户列表
228
+      method: `get`,
229
+      url: `${commPrefix}/customer/recommend/report`
230
+    },
231
+    agents: { // 独立经纪人列表
232
+      method: `get`,
233
+      url: `${commPrefix}/customer/agents`
234
+    },
235
+    recommender:{ // 推荐客户列表
236
+      method:'get',
237
+      url: `${commPrefix}/customer/recommend/recommender`
238
+    },
227 239
   },
228 240
   goods:{
229 241
     list:{

+ 37
- 1
src/store/modules/customer.js Bestand weergeven

@@ -70,7 +70,7 @@ export default {
70 70
         })
71 71
       })
72 72
     },
73
-    recommendCustomerList({ commit }, payload) { // 推荐客户列表
73
+    recommendCustomerList({ commit }, payload) { // 客户列表
74 74
       return new Promise((resolve, reject) => {
75 75
         request({
76 76
           ...apis.recommendCustomer.recommendCustomerList,
@@ -133,6 +133,42 @@ export default {
133 133
         })
134 134
       })
135 135
     },
136
+    getReportCustomers ({ commit }, payload) { // 查询报备客户列表
137
+      return new Promise((resolve, reject) => {
138
+        request({
139
+          ...apis.recommendCustomer.report,
140
+          params: payload,
141
+        }).then((data) => {
142
+          resolve(data)
143
+        }).catch(({ message }) => {
144
+          reject(message)
145
+        })
146
+      })
147
+    },
148
+    getAgentsCustomers ({ commit }, payload) { // 查询独立经纪人列表
149
+      return new Promise((resolve, reject) => {
150
+        request({
151
+          ...apis.recommendCustomer.agents,
152
+          params: payload,
153
+        }).then((data) => {
154
+          resolve(data)
155
+        }).catch(({ message }) => {
156
+          reject(message)
157
+        })
158
+      })
159
+    },
160
+    getRecommenderCustomers ({ commit }, payload) { // 查询推荐客户列表
161
+      return new Promise((resolve, reject) => {
162
+        request({
163
+          ...apis.recommendCustomer.recommender,
164
+          params: payload,
165
+        }).then((data) => {
166
+          resolve(data)
167
+        }).catch(({ message }) => {
168
+          reject(message)
169
+        })
170
+      })
171
+    },
136 172
     
137 173
   }
138 174
 }

+ 8
- 9
src/views/customer/independentList.vue Bestand weergeven

@@ -29,12 +29,12 @@
29 29
               label="头像">
30 30
         <template slot-scope="scope">
31 31
           <div class="header">
32
-            <img :src="scope.row.picture" alt="" />
32
+            <img :src="scope.row.avatarurl" alt="" />
33 33
           </div>
34 34
         </template>
35 35
       </el-table-column>
36 36
       <el-table-column
37
-              prop="name"
37
+              prop="nickname"
38 38
               label="姓名">
39 39
       </el-table-column>
40 40
       <el-table-column
@@ -49,7 +49,7 @@
49 49
       <el-table-column fixed="right"  width="200" label="操作">
50 50
         <template slot-scope="scope">
51 51
           &nbsp;
52
-          <router-link :to="{ name:'integralRecord', query: { id: scope.row.customerId } }" v-if="scope.row.phone !== '' && scope.row.phone !== undefined && scope.row.phone !== null">积分记录</router-link>
52
+          <router-link :to="{ name:'integralRecord', query: { id: scope.row.personId } }" v-if="scope.row.phone !== '' && scope.row.phone !== undefined && scope.row.phone !== null">积分记录</router-link>
53 53
           &nbsp;
54 54
           <a href="javascript: void(0);" @click="showRecommendCustomerList(scope.row)" v-if="scope.row.phone !== '' && scope.row.phone !== undefined && scope.row.phone !== null">推荐客户</a>
55 55
           &nbsp;
@@ -114,8 +114,7 @@
114 114
           pageSize: 10,
115 115
           pageNumber: 1,
116 116
           name: "",
117
-          tel: '',
118
-          verifyStatus: '1', // 0未通过 1已通过 2已驳
117
+          tel: ''
119 118
         },
120 119
         mainTotal: 0, // 列表总数
121 120
         sexOptions: [ // 性别
@@ -196,7 +195,7 @@
196 195
       this.getList();
197 196
     },
198 197
     methods: {
199
-      ...mapCustomerActions(["getCustomers", "getDetail", "getRecommendCustomers"]),
198
+      ...mapCustomerActions(["getCustomers", "getDetail", "getRecommendCustomers", "getAgentsCustomers"]),
200 199
       ...mapDynamicActions([
201 200
         "getDynamics",
202 201
         "setDetailNull",
@@ -211,13 +210,13 @@
211 210
         return !dt ? '' : dayjs(dt).format('YYYY-MM-DD HH:mm')
212 211
       },
213 212
       getList() {
214
-        this.getRecommendCustomers(this.form).then((res) => {
213
+        this.getAgentsCustomers(this.form).then((res) => {
215 214
           this.list = res.records
216 215
           this.form.pageSize = res.size
217 216
           this.form.pageNumber = res.current
218 217
           this.total = res.total
219 218
         }).catch(() => {
220
-          console.log('getRecommendCustomers err')
219
+          console.log('getAgentsCustomers err')
221 220
         });
222 221
       },
223 222
 
@@ -304,7 +303,7 @@
304 303
       },
305 304
       showRecommendCustomerList(row) {
306 305
         this.dialogRecommendedTableVisible = true
307
-        this.recommendedDialogConsultantForm.customerId = row.customerId
306
+        this.recommendedDialogConsultantForm.customerId = row.personId
308 307
         this.getRecommendCustomerList()
309 308
       },
310 309
       recommendedDialogHandleSizeChange(value) {

+ 8
- 8
src/views/customer/recommendCustomer.vue Bestand weergeven

@@ -10,10 +10,10 @@
10 10
             <el-input v-model="form.tel" ></el-input>
11 11
           </el-form-item>
12 12
           <el-form-item label="推荐人">
13
-            <el-input v-model="form.consultName" ></el-input>
13
+            <el-input v-model="form.recommendName" ></el-input>
14 14
           </el-form-item>
15 15
           <el-form-item label="推荐人电话">
16
-            <el-input v-model="form.consultTel" ></el-input>
16
+            <el-input v-model="form.recommendTel" ></el-input>
17 17
           </el-form-item>
18 18
           <el-form-item label="状态">
19 19
             <el-select v-model="form.verifyStatus" placeholder="请选择">
@@ -71,7 +71,7 @@
71 71
       <el-table-column
72 72
         prop="reportDate"
73 73
         label="推荐时间">
74
-          <template slot-scope="scope">{{ formateDate(scope.row.reportDate) }}</template>
74
+          <template slot-scope="scope">{{ formateDate(scope.row.createDate) }}</template>
75 75
       </el-table-column>
76 76
       <el-table-column  label="状态">
77 77
         <template slot-scope="scope">
@@ -165,8 +165,8 @@ export default {
165 165
         pageSize: 10,
166 166
         pageNumber: 1,
167 167
         name: "",
168
-        consultName: '',
169
-        consultTel: '',
168
+        recommendName: '',
169
+        recommendTel: '',
170 170
         verifyStatus: '', // 0未通过 1已通过 2已驳
171 171
         entryType: 'input'
172 172
       },
@@ -235,7 +235,7 @@ export default {
235 235
     this.getList();
236 236
   },
237 237
   methods: {
238
-    ...mapCustomerActions(["getCustomers", "getDetail", "getRecommendCustomers"]),
238
+    ...mapCustomerActions(["getCustomers", "getDetail", "getRecommendCustomers", "getRecommenderCustomers"]),
239 239
     ...mapDynamicActions([
240 240
       "getDynamics",
241 241
       "setDetailNull",
@@ -250,13 +250,13 @@ export default {
250 250
       return !dt ? '' : dayjs(dt).format('YYYY-MM-DD HH:mm')
251 251
     },
252 252
     getList() {
253
-      this.getRecommendCustomers(this.form).then((res) => {
253
+      this.getRecommenderCustomers(this.form).then((res) => {
254 254
         this.list = res.records
255 255
         this.form.pageSize = res.size
256 256
         this.form.pageNumber = res.current
257 257
         this.mainTotal = res.total
258 258
       }).catch(() => {
259
-        console.log('getRecommendCustomers err')
259
+        console.log('getRecommenderCustomers err')
260 260
       });
261 261
     },
262 262
 

+ 3
- 3
src/views/customer/reportedList.vue Bestand weergeven

@@ -196,7 +196,7 @@
196 196
       this.getList();
197 197
     },
198 198
     methods: {
199
-      ...mapCustomerActions(["getCustomers", "getDetail", "getRecommendCustomers"]),
199
+      ...mapCustomerActions(["getCustomers", "getDetail", "getRecommendCustomers", "getReportCustomers"]),
200 200
       ...mapDynamicActions([
201 201
         "getDynamics",
202 202
         "setDetailNull",
@@ -211,13 +211,13 @@
211 211
         return !dt ? '' : dayjs(dt).format('YYYY-MM-DD HH:mm')
212 212
       },
213 213
       getList() {
214
-        this.getRecommendCustomers(this.form).then((res) => {
214
+        this.getReportCustomers(this.form).then((res) => {
215 215
           this.list = res.records
216 216
           this.form.pageSize = res.size
217 217
           this.form.pageNumber = res.current
218 218
           this.total = res.total
219 219
         }).catch(() => {
220
-          console.log('getRecommendCustomers err')
220
+          console.log('getReportCustomers err')
221 221
         });
222 222
       },
223 223