|
@@ -5,314 +5,411 @@
|
5
|
5
|
<ul>
|
6
|
6
|
<li>
|
7
|
7
|
<span>姓名</span>
|
8
|
|
- <el-input v-model="name" ></el-input>
|
|
8
|
+ <el-input v-model="form.name" ></el-input>
|
9
|
9
|
</li>
|
10
|
10
|
<li>
|
11
|
11
|
<span>电话</span>
|
12
|
|
- <el-input v-model="name" ></el-input>
|
|
12
|
+ <el-input v-model="form.tel" ></el-input>
|
13
|
13
|
</li>
|
14
|
14
|
<li>
|
15
|
|
- <span>置业顾问</span>
|
16
|
|
- <el-input v-model="name" ></el-input>
|
|
15
|
+ <span>推荐人</span>
|
|
16
|
+ <el-input v-model="form.consultName" ></el-input>
|
17
|
17
|
</li>
|
18
|
18
|
<li>
|
19
|
|
- <span>置业顾问电话</span>
|
20
|
|
- <el-input v-model="name" ></el-input>
|
|
19
|
+ <span>推荐人电话</span>
|
|
20
|
+ <el-input v-model="form.consultTel" ></el-input>
|
21
|
21
|
</li>
|
|
22
|
+ <!-- <li>-->
|
|
23
|
+ <!-- <span>状态</span>-->
|
|
24
|
+ <!-- <el-select v-model="form.status" placeholder="请选择">-->
|
|
25
|
+ <!-- <el-option v-for="(item,i) in gridData || []" :key="i" :label="item.name" :value="item.value"></el-option>-->
|
|
26
|
+ <!-- </el-select>-->
|
|
27
|
+ <!-- </li>-->
|
22
|
28
|
</ul>
|
23
|
29
|
<el-button
|
24
|
|
- size="mini"
|
25
|
|
- type="primary" @click="search">查询</el-button>
|
|
30
|
+ size="mini"
|
|
31
|
+ type="primary" @click="search">查询</el-button>
|
26
|
32
|
</div>
|
27
|
33
|
</div>
|
28
|
|
- <el-table :data="dynamics.list || []" style="width: 100%">
|
|
34
|
+ <el-table :data="list || []"
|
|
35
|
+ border
|
|
36
|
+ style="width: 100%">
|
29
|
37
|
<el-table-column
|
30
|
|
- type="index"
|
31
|
|
- width="50">
|
32
|
|
- <template slot-scope="scope">
|
33
|
|
- <span>{{ GetIndex(scope.$index) }}</span>
|
34
|
|
- </template>
|
|
38
|
+ type="index"
|
|
39
|
+ width="50">
|
35
|
40
|
</el-table-column>
|
36
|
41
|
<el-table-column
|
37
|
|
- label="头像">
|
|
42
|
+ label="头像">
|
38
|
43
|
<template slot-scope="scope">
|
39
|
44
|
<div class="header">
|
40
|
|
- <img :src="scope.row.imgUrl" alt="" />
|
|
45
|
+ <img :src="scope.row.picture" alt="" />
|
41
|
46
|
</div>
|
42
|
47
|
</template>
|
43
|
48
|
</el-table-column>
|
44
|
49
|
<el-table-column
|
45
|
|
- prop="title"
|
46
|
|
- label="姓名">
|
|
50
|
+ prop="name"
|
|
51
|
+ label="姓名">
|
47
|
52
|
</el-table-column>
|
48
|
53
|
<el-table-column
|
49
|
|
- prop="phone"
|
50
|
|
- label="电话">
|
|
54
|
+ prop="phone"
|
|
55
|
+ label="电话">
|
51
|
56
|
</el-table-column>
|
52
|
57
|
<el-table-column
|
53
|
|
- prop="sex"
|
54
|
|
- label="性别">
|
|
58
|
+ prop="sex"
|
|
59
|
+ label="性别">
|
|
60
|
+ <template slot-scope="scope">{{ scope.row.sex === 1 ? '男' : '女' }}</template>
|
55
|
61
|
</el-table-column>
|
56
|
|
- <el-table-column label="置业顾问">
|
|
62
|
+ <el-table-column label="置业顾问">
|
57
|
63
|
<template slot-scope="scope">
|
58
|
|
- <span>{{scope.row.desc}}</span>
|
59
|
|
- <p>{{scope.row.tel}}</p>
|
|
64
|
+ <span>{{scope.row.name}}</span>
|
|
65
|
+ <p>{{scope.row.phone}}</p>
|
60
|
66
|
</template>
|
61
|
67
|
</el-table-column>
|
62
|
|
- <el-table-column fixed="right" width="300" label="操作">
|
|
68
|
+ <el-table-column fixed="right" width="200" label="操作">
|
63
|
69
|
<template slot-scope="scope">
|
64
|
|
- <el-button type="text" @click="toEditCustomer(scope.row)" size="small">编辑</el-button>
|
65
|
|
- <el-button type="text" @click="adjustment(scope.row)" size="small">调整归属</el-button>
|
66
|
|
- <el-button type="text" @click="toIntegralRecord(scope.row)" size="small">积分记录</el-button>
|
67
|
|
- <el-button type="text" @click="recommend(scope.row)" size="small">推荐客户</el-button>
|
68
|
|
- <el-button type="text" size="small" @click="toDetail(scope.row)">查看详情</el-button>
|
|
70
|
+ <router-link :to="{ name:'editCustomer', query: { id: scope.row.customerId } }" v-if="scope.row.phone !== '' && scope.row.phone !== undefined && scope.row.phone !== null">编辑</router-link>
|
|
71
|
+
|
|
72
|
+ <a href="javascript: void(0);" @click="showDialogConsultants(scope.row)" v-if="scope.row.phone !== '' && scope.row.phone !== undefined && scope.row.phone !== null">调整归属</a>
|
|
73
|
+
|
|
74
|
+ <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>
|
|
75
|
+
|
|
76
|
+ <a href="javascript: void(0);" @click="showRecommendCustomerList(scope.row)" v-if="scope.row.phone !== '' && scope.row.phone !== undefined && scope.row.phone !== null">推荐客户</a>
|
|
77
|
+
|
|
78
|
+ <router-link :to="{ name:'editCustomer', query: { id: scope.row.customerId } }">查看详情</router-link>
|
69
|
79
|
</template>
|
70
|
80
|
</el-table-column>
|
71
|
81
|
</el-table>
|
|
82
|
+ <el-pagination
|
|
83
|
+ small
|
|
84
|
+ style="margin-top:10px;"
|
|
85
|
+ layout="prev, pager, next"
|
|
86
|
+ :current-page.sync="form.pageNumber"
|
|
87
|
+ :pageSize="form.pageSize"
|
|
88
|
+ @current-change="getList"
|
|
89
|
+ >
|
|
90
|
+ </el-pagination>
|
|
91
|
+
|
|
92
|
+
|
72
|
93
|
<el-dialog title="选择置业顾问" :visible.sync="dialogTableVisible">
|
73
|
|
- <el-table :data="gridData">
|
74
|
|
- <el-table-column property="date" label="姓名"></el-table-column>
|
75
|
|
- <el-table-column property="name" label="电话"></el-table-column>
|
76
|
|
- <el-table-column property="name" label="部门"></el-table-column>
|
77
|
|
- <el-table-column property="name" label="岗位"></el-table-column>
|
|
94
|
+ <el-table :data="consultantList">
|
|
95
|
+ <el-table-column property="name" label="姓名"></el-table-column>
|
|
96
|
+ <el-table-column property="phone" label="电话"></el-table-column>
|
|
97
|
+ <el-table-column property="department" label="部门"></el-table-column>
|
|
98
|
+ <el-table-column property="post" label="岗位"></el-table-column>
|
78
|
99
|
<el-table-column fixed="right" label="操作">
|
79
|
100
|
<template slot-scope="scope">
|
80
|
|
- <el-button type="text" @click="handleDel(scope.row)" size="small">选择</el-button>
|
|
101
|
+ <!-- <el-button type="text" @click="handleDel(scope.row)" size="small">选择</el-button>-->
|
|
102
|
+ <el-radio v-model="dialogConsultantForm.realtyConsultant" :label="scope.row.personId"></el-radio>
|
81
|
103
|
</template>
|
82
|
104
|
</el-table-column>
|
83
|
105
|
</el-table>
|
|
106
|
+ <el-pagination
|
|
107
|
+ @size-change="dialogHandleSizeChange"
|
|
108
|
+ @current-change="dialogHandleCurrentChange"
|
|
109
|
+ :current-page.sync="dialogForm.pageNumber"
|
|
110
|
+ :page-size="dialogForm.pageSize"
|
|
111
|
+ layout="total, prev, pager, next"
|
|
112
|
+ :total="dialogTotal">
|
|
113
|
+ </el-pagination>
|
|
114
|
+ <el-button type="primary" @click="handleDel" size="small">确定</el-button>
|
84
|
115
|
</el-dialog>
|
85
|
|
- <el-dialog title="推荐客户" :visible.sync="dialogRecommendVisible">
|
86
|
|
- <el-table :data="gridData">
|
87
|
|
- <el-table-column property="date" label="姓名"></el-table-column>
|
88
|
|
- <el-table-column property="name" label="电话"></el-table-column>
|
89
|
|
- <el-table-column property="name" label="性别"></el-table-column>
|
90
|
|
- <el-table-column property="name" label="意向项目"></el-table-column>
|
91
|
|
- <el-table-column property="name" label="推荐时间"></el-table-column>
|
92
|
|
- <el-table-column property="name" label="状态"></el-table-column>
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+ <el-dialog title="推荐客户" :visible.sync="dialogRecommendedTableVisible">
|
|
119
|
+ <el-table :data="recommendedConsultantList">
|
|
120
|
+ <el-table-column property="name" label="姓名"></el-table-column>
|
|
121
|
+ <el-table-column property="phone" label="电话"></el-table-column>
|
|
122
|
+ <el-table-column property="sex" label="性别">
|
|
123
|
+ <template slot-scope="scope"> {{ scope.row.sex === 1 ? '男' : '女' }}</template>
|
|
124
|
+ </el-table-column>
|
|
125
|
+ <el-table-column property="intention" label="意向项目"></el-table-column>
|
|
126
|
+ <el-table-column property="post" label="推荐时间"></el-table-column>
|
|
127
|
+ <el-table-column fixed="right" label="状态">
|
|
128
|
+ <template slot-scope="scope">
|
|
129
|
+ {{ scope.row.status == 1 ? '报备': scope.row.status == 2 ? '到访' : scope.row.status == 3 ? '认购' : scope.row.status == 4 ? '签约' : '无效' }}
|
|
130
|
+ </template>
|
|
131
|
+ </el-table-column>
|
93
|
132
|
</el-table>
|
94
|
|
- <el-button type="primary" class="close-btn" @click="dialogRecommendVisible=false" >关闭</el-button>
|
|
133
|
+ <el-pagination
|
|
134
|
+ @size-change="recommendedDialogHandleSizeChange"
|
|
135
|
+ @current-change="recommendedDialogHandleCurrentChange"
|
|
136
|
+ :current-page.sync="recommendedDialogConsultantForm.pageNumber"
|
|
137
|
+ :page-size="recommendedDialogConsultantForm.pageSize"
|
|
138
|
+ layout="total, prev, pager, next"
|
|
139
|
+ :total="recommendedDialogTotal">
|
|
140
|
+ </el-pagination>
|
95
|
141
|
</el-dialog>
|
96
|
|
- <el-pagination
|
97
|
|
- small
|
98
|
|
- style="margin-top:10px;"
|
99
|
|
- layout="prev, pager, next"
|
100
|
|
- :current-page.sync="currentPage"
|
101
|
|
- :pageSize="pageSize"
|
102
|
|
- @current-change="getList"
|
103
|
|
- >
|
104
|
|
- </el-pagination>
|
105
|
142
|
</div>
|
106
|
143
|
</template>
|
107
|
144
|
<script>
|
108
|
|
-import { createNamespacedHelpers } from "vuex";
|
109
|
|
-const {
|
110
|
|
- mapState: mapDynamicState,
|
111
|
|
- mapActions: mapDynamicActions
|
112
|
|
-} = createNamespacedHelpers("dynamic");
|
113
|
|
-const {
|
114
|
|
- mapState: mapCustomerState,
|
115
|
|
- mapActions: mapCustomerActions
|
116
|
|
-} = createNamespacedHelpers("customer");
|
117
|
|
-export default {
|
118
|
|
- data() {
|
119
|
|
- return {
|
120
|
|
- pageSize: 20,
|
121
|
|
- currentPage: 1,
|
122
|
|
- name: "",
|
123
|
|
- sex: "",
|
124
|
|
- phone: "",
|
125
|
|
- picture: "",
|
126
|
|
- describe: "",
|
127
|
|
- appointmentTime: "",
|
128
|
|
- visiteNum: "",
|
129
|
|
- intention: "",
|
130
|
|
- buildingId: "",
|
131
|
|
- realtyManageType: "",
|
132
|
|
- demandType: "",
|
133
|
|
- priceRange: "",
|
134
|
|
- reportDate: "",
|
135
|
|
- status: "",
|
136
|
|
- personId: "",
|
137
|
|
- dialogTableVisible: false, //调整归属弹框
|
138
|
|
- dialogRecommendVisible: false, //推荐客户弹框
|
139
|
|
- gridData: [
|
140
|
|
- {
|
141
|
|
- date: "2016-05-02",
|
142
|
|
- name: "王小虎"
|
|
145
|
+ import { createNamespacedHelpers } from "vuex";
|
|
146
|
+ import dayjs from 'dayjs'
|
|
147
|
+ const {
|
|
148
|
+ mapState: mapDynamicState,
|
|
149
|
+ mapActions: mapDynamicActions
|
|
150
|
+ } = createNamespacedHelpers("dynamic");
|
|
151
|
+ const {
|
|
152
|
+ mapState: mapCustomerState,
|
|
153
|
+ mapActions: mapCustomerActions
|
|
154
|
+ } = createNamespacedHelpers("customer");
|
|
155
|
+ export default {
|
|
156
|
+ data() {
|
|
157
|
+ return {
|
|
158
|
+ form: {
|
|
159
|
+ pageSize: 10,
|
|
160
|
+ pageNumber: 1,
|
|
161
|
+ name: "",
|
|
162
|
+ consultName: '',
|
|
163
|
+ consultTel: '',
|
|
164
|
+ verifyStatus: '1' // 0未通过 1已通过 2已驳
|
143
|
165
|
},
|
144
|
|
- {
|
145
|
|
- date: "2016-05-04",
|
146
|
|
- name: "王小虎"
|
|
166
|
+ list: [],
|
|
167
|
+ total: 0,
|
|
168
|
+ sex: "",
|
|
169
|
+ phone: "",
|
|
170
|
+ picture: "",
|
|
171
|
+ describe: "",
|
|
172
|
+ appointmentTime: "",
|
|
173
|
+ visiteNum: "",
|
|
174
|
+ intention: "",
|
|
175
|
+ buildingId: "",
|
|
176
|
+ realtyManageType: "",
|
|
177
|
+ demandType: "",
|
|
178
|
+ priceRange: "",
|
|
179
|
+ reportDate: "",
|
|
180
|
+ status: "",
|
|
181
|
+ personId: "",
|
|
182
|
+ gridData: [
|
|
183
|
+ {
|
|
184
|
+ name: "报备",
|
|
185
|
+ value: 1
|
|
186
|
+ },
|
|
187
|
+ {
|
|
188
|
+ name: "到访",
|
|
189
|
+ value: 2
|
|
190
|
+ },
|
|
191
|
+ {
|
|
192
|
+ name: "认购",
|
|
193
|
+ value: 3
|
|
194
|
+ },
|
|
195
|
+ {
|
|
196
|
+ name: "签约",
|
|
197
|
+ value: 4
|
|
198
|
+ }
|
|
199
|
+ ],
|
|
200
|
+ dialogTableVisible: false, //选择置业顾问弹框
|
|
201
|
+ consultantList: [],
|
|
202
|
+ dialogForm: {
|
|
203
|
+ pageNumber: 1,
|
|
204
|
+ pageSize: 10
|
147
|
205
|
},
|
148
|
|
- {
|
149
|
|
- date: "2016-05-01",
|
150
|
|
- name: "王小虎"
|
|
206
|
+ dialogTotal: 0,
|
|
207
|
+ dialogConsultantForm: {
|
|
208
|
+ customerId: '', // 客户Id
|
|
209
|
+ realtyConsultant: '' // 置业顾问
|
151
|
210
|
},
|
152
|
|
- {
|
153
|
|
- date: "2016-05-03",
|
154
|
|
- name: "王小虎"
|
155
|
|
- }
|
156
|
|
- ]
|
157
|
|
- };
|
158
|
|
- },
|
159
|
|
- computed: {
|
160
|
|
- ...mapCustomerState({
|
161
|
|
- customers: x => x.customers
|
162
|
|
- }),
|
163
|
|
- ...mapDynamicState({
|
164
|
|
- dynamics: x => x.dynamics
|
165
|
|
- })
|
166
|
|
- },
|
167
|
|
- created() {
|
168
|
|
- this.getList();
|
169
|
|
- },
|
170
|
|
- methods: {
|
171
|
|
- ...mapCustomerActions(["getCustomers", "getDetail"]),
|
172
|
|
- ...mapDynamicActions([
|
173
|
|
- "getDynamics",
|
174
|
|
- "setDetailNull",
|
175
|
|
- "deleteDynamics",
|
176
|
|
- "publicDynamic",
|
177
|
|
- "cancelDynamic"
|
178
|
|
- ]),
|
179
|
|
- GetIndex(inx) {
|
180
|
|
- return (this.currentPage - 1) * this.pageSize + inx + 1;
|
181
|
|
- },
|
182
|
|
- getList() {
|
183
|
|
- this.getDynamics({
|
184
|
|
- pageNum: this.currentPage,
|
185
|
|
- pageSize: this.pageSize,
|
186
|
|
- name: this.name,
|
187
|
|
- buildingId: this.buildingId
|
188
|
|
- });
|
189
|
|
- },
|
190
|
|
- // 进入编辑页
|
191
|
|
- toEditCustomer(row) {
|
192
|
|
- this.$router.push({
|
193
|
|
- name: "editCustomer",
|
194
|
|
- params: { id: row.personId }
|
195
|
|
- });
|
196
|
|
- },
|
197
|
|
- // 进入积分记录页
|
198
|
|
- toIntegralRecord(row) {
|
199
|
|
- this.$router.push({
|
200
|
|
- name: "integralRecord",
|
201
|
|
- params: { id: row.personId }
|
202
|
|
- });
|
203
|
|
- },
|
204
|
|
- // 调整归属
|
205
|
|
- adjustment(row) {
|
206
|
|
- this.dialogTableVisible = true;
|
207
|
|
- },
|
208
|
|
- // 推荐客户
|
209
|
|
- recommend(row) {
|
210
|
|
- this.dialogRecommendVisible = true;
|
|
211
|
+ // 推荐客户
|
|
212
|
+ dialogRecommendedTableVisible: false,
|
|
213
|
+ recommendedConsultantList: [],
|
|
214
|
+ recommendedDialogTotal: 0,
|
|
215
|
+ recommendedDialogConsultantForm: {
|
|
216
|
+ customerId: '', // 客户Id
|
|
217
|
+ pageNumber: 1,
|
|
218
|
+ pageSize: 10
|
|
219
|
+ },
|
|
220
|
+ };
|
211
|
221
|
},
|
212
|
|
- handleDel(row) {
|
213
|
|
- this.$confirm("确定选择此置业顾问?", "提示", {
|
214
|
|
- confirmButtonText: "确定",
|
215
|
|
- cancelButtonText: "取消",
|
216
|
|
- type: "warning"
|
|
222
|
+ computed: {
|
|
223
|
+ ...mapCustomerState({
|
|
224
|
+ customers: x => x.customers
|
|
225
|
+ }),
|
|
226
|
+ ...mapDynamicState({
|
|
227
|
+ dynamics: x => x.dynamics
|
217
|
228
|
})
|
218
|
|
- .then(() => {
|
219
|
|
- this.$message({
|
220
|
|
- type: "success",
|
221
|
|
- message: "选择成功!"
|
222
|
|
- });
|
223
|
|
- this.dialogTableVisible = false;
|
224
|
|
- })
|
225
|
|
- .catch(() => {
|
226
|
|
- this.$message({
|
227
|
|
- type: "info",
|
228
|
|
- message: "已取消选择"
|
229
|
|
- });
|
230
|
|
- });
|
231
|
229
|
},
|
232
|
|
- // getList() {
|
233
|
|
- // this.getCustomers({
|
234
|
|
- // pageNum: this.currentPage,
|
235
|
|
- // pageSize: this.pageSize,
|
236
|
|
- // name: this.name,
|
237
|
|
- // sex: this.sex,
|
238
|
|
- // phone: this.phone,
|
239
|
|
- // picture: this.picture,
|
240
|
|
- // describe: this.describe,
|
241
|
|
- // appointmentTime: this.appointmentTime,
|
242
|
|
- // visiteNum: this.visiteNum,
|
243
|
|
- // intention: this.intention,
|
244
|
|
- // buildingId: this.buildingId,
|
245
|
|
- // realtyManageType: this.realtyManageType,
|
246
|
|
- // demandType: this.demandType,
|
247
|
|
- // priceRange: this.priceRange,
|
248
|
|
- // reportDate: this.reportDate,
|
249
|
|
- // status: this.status,
|
250
|
|
- // personId: this.personId
|
251
|
|
- // });
|
252
|
|
- // },
|
253
|
|
- search() {
|
254
|
|
- this.currentPage = 1;
|
|
230
|
+ created() {
|
255
|
231
|
this.getList();
|
256
|
232
|
},
|
257
|
|
- toDetail(row) {
|
258
|
|
- this.$router.push({
|
259
|
|
- name: "consultant.edit",
|
260
|
|
- params: { id: row.personId }
|
261
|
|
- });
|
|
233
|
+ methods: {
|
|
234
|
+ ...mapCustomerActions(["getCustomers", "getDetail", "getRecommendCustomers"]),
|
|
235
|
+ ...mapDynamicActions([
|
|
236
|
+ "getDynamics",
|
|
237
|
+ "setDetailNull",
|
|
238
|
+ "deleteDynamics",
|
|
239
|
+ "publicDynamic",
|
|
240
|
+ "cancelDynamic"
|
|
241
|
+ ]),
|
|
242
|
+ GetIndex(inx) {
|
|
243
|
+ return (this.currentPage - 1) * this.pageSize + inx + 1;
|
|
244
|
+ },
|
|
245
|
+ formateDate(dt) {
|
|
246
|
+ return !dt ? '' : dayjs(dt).format('YYYY-MM-DD HH:mm')
|
|
247
|
+ },
|
|
248
|
+ getList() {
|
|
249
|
+ this.getRecommendCustomers(this.form).then((res) => {
|
|
250
|
+ this.list = res.records
|
|
251
|
+ this.form.pageSize = res.size
|
|
252
|
+ this.form.pageNumber = res.current
|
|
253
|
+ this.total = res.total
|
|
254
|
+ }).catch(() => {
|
|
255
|
+ console.log('getRecommendCustomers err')
|
|
256
|
+ });
|
|
257
|
+ },
|
|
258
|
+
|
|
259
|
+ // 进入积分记录页
|
|
260
|
+ toEditRecommend(row) {
|
|
261
|
+ this.$router.push({
|
|
262
|
+ name: "editRecommend",
|
|
263
|
+ params: { id: row.personId }
|
|
264
|
+ });
|
|
265
|
+ },
|
|
266
|
+
|
|
267
|
+ // getList() {
|
|
268
|
+ // this.getCustomers({
|
|
269
|
+ // pageNum: this.currentPage,
|
|
270
|
+ // pageSize: this.pageSize,
|
|
271
|
+ // name: this.name,
|
|
272
|
+ // sex: this.sex,
|
|
273
|
+ // phone: this.phone,
|
|
274
|
+ // picture: this.picture,
|
|
275
|
+ // describe: this.describe,
|
|
276
|
+ // appointmentTime: this.appointmentTime,
|
|
277
|
+ // visiteNum: this.visiteNum,
|
|
278
|
+ // intention: this.intention,
|
|
279
|
+ // buildingId: this.buildingId,
|
|
280
|
+ // realtyManageType: this.realtyManageType,
|
|
281
|
+ // demandType: this.demandType,
|
|
282
|
+ // priceRange: this.priceRange,
|
|
283
|
+ // reportDate: this.reportDate,
|
|
284
|
+ // status: this.status,
|
|
285
|
+ // personId: this.personId
|
|
286
|
+ // });
|
|
287
|
+ // },
|
|
288
|
+ search() {
|
|
289
|
+ this.currentPage = 1;
|
|
290
|
+ this.getList();
|
|
291
|
+ },
|
|
292
|
+ handleDel() {
|
|
293
|
+ this.dialogSubmitForm(this.dialogConsultantForm.customerId, this.dialogConsultantForm.realtyConsultant)
|
|
294
|
+ this.dialogTableVisible = false
|
|
295
|
+ },
|
|
296
|
+ dialogHandleSizeChange(value) {
|
|
297
|
+ this.dialogForm.pageSize = value
|
|
298
|
+ this.getConsultantsList()
|
|
299
|
+ },
|
|
300
|
+ dialogHandleCurrentChange(value) {
|
|
301
|
+ this.dialogForm.pageNumber = 1
|
|
302
|
+ this.dialogForm.pageSize = value
|
|
303
|
+ this.getConsultantsList()
|
|
304
|
+ },
|
|
305
|
+ getConsultantsList() {
|
|
306
|
+ this.$store.dispatch('persons/getConsultants', this.dialogForm).then((res) => {
|
|
307
|
+ this.consultantList = res.records
|
|
308
|
+ this.dialogForm.pageNumber = res.current
|
|
309
|
+ this.dialogForm.pageSize = res.size
|
|
310
|
+ this.dialogTotal = res.total
|
|
311
|
+ }).catch(()=> {
|
|
312
|
+ console.log('persons/getConsultants err')
|
|
313
|
+ })
|
|
314
|
+ },
|
|
315
|
+ dialogSubmitForm(customerId, realtyConsultant) {
|
|
316
|
+ console.log('提交', this.dialogConsultantForm)
|
|
317
|
+ this.$store.dispatch('customer/getRecommendCustomersUpdate',{customerId: customerId, realtyConsultant: realtyConsultant})
|
|
318
|
+ .then(res => {
|
|
319
|
+ if (res.personId) {
|
|
320
|
+ this.detail = res;
|
|
321
|
+ }
|
|
322
|
+
|
|
323
|
+ this.$notify.info("保存成功");
|
|
324
|
+ })
|
|
325
|
+ .catch(err => {
|
|
326
|
+ this.$notify.error(err.message);
|
|
327
|
+ });
|
|
328
|
+ },
|
|
329
|
+ showDialogConsultants(row) {
|
|
330
|
+ this.dialogTableVisible = true
|
|
331
|
+ this.dialogConsultantForm.customerId = row.customerId
|
|
332
|
+ this.dialogConsultantForm.realtyConsultant = row.realtyConsultant
|
|
333
|
+ this.getConsultantsList()
|
|
334
|
+ },
|
|
335
|
+ getRecommendCustomerList() {
|
|
336
|
+ this.$store.dispatch('customer/recommendCustomerList', this.recommendedDialogConsultantForm).then((res) => {
|
|
337
|
+ this.recommendedConsultantList = res.records
|
|
338
|
+ this.recommendedDialogConsultantForm.pageNumber = res.current
|
|
339
|
+ this.recommendedDialogConsultantForm.pageSize = res.size
|
|
340
|
+ this.recommendedDialogTotal = res.total
|
|
341
|
+ }).catch(()=> {
|
|
342
|
+ console.log('persons/getConsultants err')
|
|
343
|
+ })
|
|
344
|
+ },
|
|
345
|
+ showRecommendCustomerList(row) {
|
|
346
|
+ this.dialogRecommendedTableVisible = true
|
|
347
|
+ this.recommendedDialogConsultantForm.customerId = row.customerId
|
|
348
|
+ this.getRecommendCustomerList()
|
|
349
|
+ },
|
|
350
|
+ recommendedDialogHandleSizeChange(value) {
|
|
351
|
+ this.recommendedDialogConsultantForm.pageSize = value
|
|
352
|
+ this.getRecommendCustomerList()
|
|
353
|
+ },
|
|
354
|
+ recommendedDialogHandleCurrentChange(value) {
|
|
355
|
+ this.recommendedDialogConsultantForm.pageNumber = 1
|
|
356
|
+ this.recommendedDialogConsultantForm.pageSize = value
|
|
357
|
+ this.getConsultantsList()
|
|
358
|
+ },
|
262
|
359
|
}
|
263
|
|
- }
|
264
|
|
-};
|
|
360
|
+ };
|
265
|
361
|
</script>
|
266
|
362
|
<style lang="scss" scoped>
|
267
|
|
-.list {
|
268
|
|
- .header {
|
269
|
|
- width: 50px;
|
270
|
|
- height: 50px;
|
271
|
|
- img {
|
272
|
|
- width: 100%;
|
273
|
|
- height: 100%;
|
|
363
|
+ .list {
|
|
364
|
+ .header {
|
|
365
|
+ width: 50px;
|
|
366
|
+ height: 50px;
|
|
367
|
+ img {
|
|
368
|
+ width: 100%;
|
|
369
|
+ height: 100%;
|
|
370
|
+ }
|
274
|
371
|
}
|
275
|
372
|
}
|
276
|
|
-}
|
277
|
373
|
|
278
|
|
-.system-table-search {
|
279
|
|
- width: calc(100% - 40px);
|
280
|
|
- margin: 16px auto 0;
|
281
|
|
-}
|
|
374
|
+ .system-table-search {
|
|
375
|
+ width: calc(100% - 40px);
|
|
376
|
+ margin: 16px auto 0;
|
|
377
|
+ }
|
282
|
378
|
|
283
|
|
-.system-table-search ul > li {
|
284
|
|
- margin-right: 20px;
|
285
|
|
- display: flex;
|
286
|
|
- float: left;
|
287
|
|
- align-items: center;
|
288
|
|
- span {
|
289
|
|
- margin-right: 10px;
|
|
379
|
+ .system-table-search ul > li {
|
|
380
|
+ margin-right: 20px;
|
|
381
|
+ display: flex;
|
|
382
|
+ float: left;
|
|
383
|
+ align-items: center;
|
|
384
|
+ margin-bottom: 10px;
|
|
385
|
+ span {
|
|
386
|
+ margin-right: 10px;
|
|
387
|
+ }
|
290
|
388
|
}
|
291
|
|
-}
|
292
|
389
|
|
293
|
|
-.system-table-search ul {
|
294
|
|
- font-size: 15px;
|
295
|
|
- white-space: nowrap;
|
296
|
|
- padding: 0;
|
297
|
|
-}
|
|
390
|
+ .system-table-search ul {
|
|
391
|
+ font-size: 15px;
|
|
392
|
+ white-space: nowrap;
|
|
393
|
+ padding: 0;
|
|
394
|
+ }
|
298
|
395
|
|
299
|
|
-.flex-h {
|
300
|
|
- display: flex;
|
301
|
|
- align-items: center;
|
302
|
|
-}
|
303
|
|
-.el-dialog__body{
|
304
|
|
- text-align: center;
|
305
|
|
- .close-btn{
|
306
|
|
- margin: 20px auto 0 auto;
|
307
|
|
-}
|
308
|
|
-}
|
|
396
|
+ .flex-h {
|
|
397
|
+ display: flex;
|
|
398
|
+ align-items: center;
|
|
399
|
+ }
|
|
400
|
+ .el-dialog__body {
|
|
401
|
+ text-align: center;
|
|
402
|
+ .close-btn {
|
|
403
|
+ margin: 20px auto 0 auto;
|
|
404
|
+ }
|
|
405
|
+ }
|
309
|
406
|
|
310
|
|
-.flex-item {
|
311
|
|
- flex: 1;
|
312
|
|
- -webkit-flex: 1;
|
313
|
|
- position: relative;
|
314
|
|
- overflow: hidden;
|
315
|
|
-}
|
|
407
|
+ .flex-item {
|
|
408
|
+ flex: 1;
|
|
409
|
+ -webkit-flex: 1;
|
|
410
|
+ position: relative;
|
|
411
|
+ overflow: hidden;
|
|
412
|
+ }
|
316
|
413
|
</style>
|
317
|
414
|
|
318
|
415
|
|