|
@@ -83,11 +83,11 @@
|
83
|
83
|
<template slot-scope="scope">
|
84
|
84
|
<router-link :to="{ name:'editRecommend', query: { id: scope.row.customerId } }">编辑</router-link>
|
85
|
85
|
|
86
|
|
- <router-link :to="{ name: 'editRecommend', query: { id: scope.row.personId } }">调整归属</router-link>
|
|
86
|
+ <a href="javascript: void(0);" @click="showDialogConsultants(scope.row)">调整归属</a>
|
87
|
87
|
|
88
|
88
|
<router-link :to="{ name:'editRecommend', query: { id: scope.row.customerId } }">积分记录</router-link>
|
89
|
89
|
|
90
|
|
- <router-link :to="{ name:'editRecommend', query: { id: scope.row.customerId } }">推荐客户</router-link>
|
|
90
|
+ <a href="javascript: void(0);" @click="showRecommendCustomerList(scope.row)">推荐客户</a>
|
91
|
91
|
|
92
|
92
|
<router-link :to="{ name:'editRecommend', query: { id: scope.row.customerId } }">查看详情</router-link>
|
93
|
93
|
</template>
|
|
@@ -102,6 +102,57 @@
|
102
|
102
|
@current-change="getList"
|
103
|
103
|
>
|
104
|
104
|
</el-pagination>
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+ <el-dialog title="选择置业顾问" :visible.sync="dialogTableVisible">
|
|
108
|
+ <el-table :data="consultantList">
|
|
109
|
+ <el-table-column property="name" label="姓名"></el-table-column>
|
|
110
|
+ <el-table-column property="phone" label="电话"></el-table-column>
|
|
111
|
+ <el-table-column property="department" label="部门"></el-table-column>
|
|
112
|
+ <el-table-column property="post" label="岗位"></el-table-column>
|
|
113
|
+ <el-table-column fixed="right" label="操作">
|
|
114
|
+ <template slot-scope="scope">
|
|
115
|
+<!-- <el-button type="text" @click="handleDel(scope.row)" size="small">选择</el-button>-->
|
|
116
|
+ <el-radio v-model="dialogConsultantForm.realtyConsultant" :label="scope.row.personId"></el-radio>
|
|
117
|
+ </template>
|
|
118
|
+ </el-table-column>
|
|
119
|
+ </el-table>
|
|
120
|
+ <el-pagination
|
|
121
|
+ @size-change="dialogHandleSizeChange"
|
|
122
|
+ @current-change="dialogHandleCurrentChange"
|
|
123
|
+ :current-page.sync="dialogForm.pageNumber"
|
|
124
|
+ :page-size="dialogForm.pageSize"
|
|
125
|
+ layout="total, prev, pager, next"
|
|
126
|
+ :total="dialogTotal">
|
|
127
|
+ </el-pagination>
|
|
128
|
+ <el-button type="primary" @click="handleDel" size="small">确定</el-button>
|
|
129
|
+ </el-dialog>
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+ <el-dialog title="推荐客户" :visible.sync="dialogRecommendedTableVisible">
|
|
133
|
+ <el-table :data="recommendedConsultantList">
|
|
134
|
+ <el-table-column property="name" label="姓名"></el-table-column>
|
|
135
|
+ <el-table-column property="phone" label="电话"></el-table-column>
|
|
136
|
+ <el-table-column property="sex" label="性别">
|
|
137
|
+ <template slot-scope="scope"> {{ scope.row.sex === 1 ? '男' : '女' }}</template>
|
|
138
|
+ </el-table-column>
|
|
139
|
+ <el-table-column property="intention" label="意向项目"></el-table-column>
|
|
140
|
+ <el-table-column property="post" label="推荐时间"></el-table-column>
|
|
141
|
+ <el-table-column fixed="right" label="状态">
|
|
142
|
+ <template slot-scope="scope">
|
|
143
|
+ {{ scope.row.status == 1 ? '报备': scope.row.status == 2 ? '到访' : scope.row.status == 3 ? '认购' : scope.row.status == 4 ? '签约' : '无效' }}
|
|
144
|
+ </template>
|
|
145
|
+ </el-table-column>
|
|
146
|
+ </el-table>
|
|
147
|
+ <el-pagination
|
|
148
|
+ @size-change="recommendedDialogHandleSizeChange"
|
|
149
|
+ @current-change="recommendedDialogHandleCurrentChange"
|
|
150
|
+ :current-page.sync="recommendedDialogConsultantForm.pageNumber"
|
|
151
|
+ :page-size="recommendedDialogConsultantForm.pageSize"
|
|
152
|
+ layout="total, prev, pager, next"
|
|
153
|
+ :total="recommendedDialogTotal">
|
|
154
|
+ </el-pagination>
|
|
155
|
+ </el-dialog>
|
105
|
156
|
</div>
|
106
|
157
|
</template>
|
107
|
158
|
<script>
|
|
@@ -158,7 +209,27 @@ export default {
|
158
|
209
|
name: "签约",
|
159
|
210
|
value: 4
|
160
|
211
|
}
|
161
|
|
- ]
|
|
212
|
+ ],
|
|
213
|
+ dialogTableVisible: false, //选择置业顾问弹框
|
|
214
|
+ consultantList: [],
|
|
215
|
+ dialogForm: {
|
|
216
|
+ pageNumber: 1,
|
|
217
|
+ pageSize: 10
|
|
218
|
+ },
|
|
219
|
+ dialogTotal: 0,
|
|
220
|
+ dialogConsultantForm: {
|
|
221
|
+ customerId: '', // 客户Id
|
|
222
|
+ realtyConsultant: '' // 置业顾问
|
|
223
|
+ },
|
|
224
|
+ // 推荐客户
|
|
225
|
+ dialogRecommendedTableVisible: false,
|
|
226
|
+ recommendedConsultantList: [],
|
|
227
|
+ recommendedDialogTotal: 0,
|
|
228
|
+ recommendedDialogConsultantForm: {
|
|
229
|
+ customerId: '', // 客户Id
|
|
230
|
+ pageNumber: 1,
|
|
231
|
+ pageSize: 10
|
|
232
|
+ },
|
162
|
233
|
};
|
163
|
234
|
},
|
164
|
235
|
computed: {
|
|
@@ -227,7 +298,74 @@ export default {
|
227
|
298
|
search() {
|
228
|
299
|
this.currentPage = 1;
|
229
|
300
|
this.getList();
|
230
|
|
- }
|
|
301
|
+ },
|
|
302
|
+ handleDel() {
|
|
303
|
+ this.dialogSubmitForm(this.dialogConsultantForm.customerId, this.dialogConsultantForm.realtyConsultant)
|
|
304
|
+ this.dialogTableVisible = false
|
|
305
|
+ },
|
|
306
|
+ dialogHandleSizeChange(value) {
|
|
307
|
+ this.dialogForm.pageSize = value
|
|
308
|
+ this.getConsultantsList()
|
|
309
|
+ },
|
|
310
|
+ dialogHandleCurrentChange(value) {
|
|
311
|
+ this.dialogForm.pageNumber = 1
|
|
312
|
+ this.dialogForm.pageSize = value
|
|
313
|
+ this.getConsultantsList()
|
|
314
|
+ },
|
|
315
|
+ getConsultantsList() {
|
|
316
|
+ this.$store.dispatch('persons/getConsultants', this.dialogForm).then((res) => {
|
|
317
|
+ this.consultantList = res.records
|
|
318
|
+ this.dialogForm.pageNumber = res.current
|
|
319
|
+ this.dialogForm.pageSize = res.size
|
|
320
|
+ this.dialogTotal = res.total
|
|
321
|
+ }).catch(()=> {
|
|
322
|
+ console.log('persons/getConsultants err')
|
|
323
|
+ })
|
|
324
|
+ },
|
|
325
|
+ dialogSubmitForm(customerId, realtyConsultant) {
|
|
326
|
+ console.log('提交', this.dialogConsultantForm)
|
|
327
|
+ this.$store.dispatch('customer/getRecommendCustomersUpdate',{customerId: customerId, realtyConsultant: realtyConsultant})
|
|
328
|
+ .then(res => {
|
|
329
|
+ if (res.personId) {
|
|
330
|
+ this.detail = res;
|
|
331
|
+ }
|
|
332
|
+
|
|
333
|
+ this.$notify.info("保存成功");
|
|
334
|
+ })
|
|
335
|
+ .catch(err => {
|
|
336
|
+ this.$notify.error(err.message);
|
|
337
|
+ });
|
|
338
|
+ },
|
|
339
|
+ showDialogConsultants(row) {
|
|
340
|
+ this.dialogTableVisible = true
|
|
341
|
+ this.dialogConsultantForm.customerId = row.customerId
|
|
342
|
+ this.dialogConsultantForm.realtyConsultant = row.realtyConsultant
|
|
343
|
+ this.getConsultantsList()
|
|
344
|
+ },
|
|
345
|
+ getRecommendCustomerList() {
|
|
346
|
+ this.$store.dispatch('customer/recommendCustomerList', this.recommendedDialogConsultantForm).then((res) => {
|
|
347
|
+ this.recommendedConsultantList = res.records
|
|
348
|
+ this.recommendedDialogConsultantForm.pageNumber = res.current
|
|
349
|
+ this.recommendedDialogConsultantForm.pageSize = res.size
|
|
350
|
+ this.recommendedDialogTotal = res.total
|
|
351
|
+ }).catch(()=> {
|
|
352
|
+ console.log('persons/getConsultants err')
|
|
353
|
+ })
|
|
354
|
+ },
|
|
355
|
+ showRecommendCustomerList(row) {
|
|
356
|
+ this.dialogRecommendedTableVisible = true
|
|
357
|
+ this.recommendedDialogConsultantForm.customerId = row.customerId
|
|
358
|
+ this.getRecommendCustomerList()
|
|
359
|
+ },
|
|
360
|
+ recommendedDialogHandleSizeChange(value) {
|
|
361
|
+ this.recommendedDialogConsultantForm.pageSize = value
|
|
362
|
+ this.getRecommendCustomerList()
|
|
363
|
+ },
|
|
364
|
+ recommendedDialogHandleCurrentChange(value) {
|
|
365
|
+ this.recommendedDialogConsultantForm.pageNumber = 1
|
|
366
|
+ this.recommendedDialogConsultantForm.pageSize = value
|
|
367
|
+ this.getConsultantsList()
|
|
368
|
+ },
|
231
|
369
|
}
|
232
|
370
|
};
|
233
|
371
|
</script>
|