|
@@ -3,65 +3,66 @@
|
3
|
3
|
<div class="form-wrapper">
|
4
|
4
|
<el-form label-width="200px" :model="detail">
|
5
|
5
|
<el-form-item label="意向项目:">
|
6
|
|
- <el-input v-model="detail.name"></el-input>
|
|
6
|
+ <el-input v-model="detail.intention"></el-input>
|
7
|
7
|
</el-form-item>
|
8
|
8
|
<el-form-item label="客户照片:">
|
9
|
|
- <el-upload
|
10
|
|
- :action="upFileUrl"
|
11
|
|
- name='file'
|
12
|
|
- list-type="picture-card"
|
13
|
|
- :headers="uploadHeaders"
|
14
|
|
- :file-list="imgList"
|
15
|
|
- :show-file-list="true"
|
16
|
|
- :before-upload="beforeImgUpload"
|
17
|
|
- :on-success="handleAvatarSuccess"
|
18
|
|
- :on-remove="handleRemove">
|
19
|
|
- <i class="el-icon-plus"></i>
|
|
9
|
+ <el-upload
|
|
10
|
+ :headers="uploadHeaders"
|
|
11
|
+ :action="upFileUrl"
|
|
12
|
+ :show-file-list="false"
|
|
13
|
+ :on-success="handleAvatarSuccess">
|
|
14
|
+ <img v-if="imageUrl" :src="imageUrl" class="avatar">
|
|
15
|
+ <i v-else class="el-icon-plus avatar-uploader-icon"></i>
|
20
|
16
|
</el-upload>
|
21
|
|
- <el-dialog :visible.sync="dialogVisible">
|
22
|
|
- <img width="100%" :src="dialogImageUrl" alt="">
|
23
|
|
- </el-dialog>
|
24
|
17
|
</el-form-item>
|
25
|
18
|
<el-form-item label="客户姓名:">
|
26
|
|
- <el-input v-model="detail.company"></el-input>
|
|
19
|
+ <el-input v-model="detail.name"></el-input>
|
27
|
20
|
</el-form-item>
|
28
|
21
|
<el-form-item label="客户电话:">
|
29
|
|
- <el-input v-model="detail.department"></el-input>
|
|
22
|
+ <el-input v-model="detail.phone"></el-input>
|
30
|
23
|
</el-form-item>
|
31
|
24
|
<el-form-item label="客户性别:">
|
32
|
|
- <el-radio-group v-model="detail.isMain">
|
|
25
|
+ <el-radio-group v-model="detail.sex">
|
33
|
26
|
<el-radio :label="1">男</el-radio>
|
34
|
27
|
<el-radio :label="0">女</el-radio>
|
35
|
28
|
</el-radio-group>
|
36
|
29
|
</el-form-item>
|
37
|
30
|
<el-form-item label="预约到访时间:">
|
38
|
|
- <el-input v-model="detail.department"></el-input>
|
|
31
|
+ <el-date-picker
|
|
32
|
+ v-model="detail.appointmentTime"
|
|
33
|
+ type="datetime"
|
|
34
|
+ placeholder="选择日期时间">
|
|
35
|
+ </el-date-picker>
|
39
|
36
|
</el-form-item>
|
40
|
37
|
<el-form-item label="到访人数:">
|
41
|
|
- <el-input v-model="detail.department"></el-input>
|
|
38
|
+ <el-input v-model="detail.visiteNum"></el-input>
|
42
|
39
|
</el-form-item>
|
43
|
40
|
<el-form-item label="客户描述:">
|
44
|
|
- <el-input type="textarea" :rows="5" v-model="detail.introduction"></el-input>
|
|
41
|
+ <el-input type="textarea" :rows="5" v-model="detail.describe"></el-input>
|
45
|
42
|
</el-form-item>
|
46
|
43
|
<el-form-item label="物业类型:">
|
47
|
|
- <el-input v-model="detail.department"></el-input>
|
|
44
|
+ <el-input v-model="detail.realtyManageType"></el-input>
|
48
|
45
|
</el-form-item>
|
49
|
46
|
<el-form-item label="需求类型:">
|
50
|
|
- <el-input v-model="detail.department"></el-input>
|
|
47
|
+ <el-input v-model="detail.demandType"></el-input>
|
51
|
48
|
</el-form-item>
|
52
|
49
|
<el-form-item label="价格区间:">
|
53
|
|
- <el-input v-model="detail.department"></el-input>
|
|
50
|
+ <el-input v-model="detail.priceRange"></el-input>
|
54
|
51
|
</el-form-item>
|
55
|
52
|
<el-form-item label="报备日期:">
|
56
|
|
- <el-input v-model="detail.department"></el-input>
|
|
53
|
+ <el-date-picker
|
|
54
|
+ v-model="detail.reportDate"
|
|
55
|
+ type="datetime"
|
|
56
|
+ placeholder="选择日期时间">
|
|
57
|
+ </el-date-picker>
|
57
|
58
|
</el-form-item>
|
58
|
59
|
<el-form-item label="状态:">
|
59
|
|
- <el-select v-model="detail.buildings" placeholder="请选择">
|
60
|
|
- <el-option v-for="(build,i) in buildings.list || []" :key="i" :label="build.buildingName" :value="build.buildingId"></el-option>
|
|
60
|
+ <el-select v-model="detail.status" placeholder="请选择">
|
|
61
|
+ <el-option v-for="(item,i) in gridData || []" :key="i" :label="item.name" :value="item.value"></el-option>
|
61
|
62
|
</el-select>
|
62
|
63
|
</el-form-item>
|
63
|
64
|
<el-form-item label="归属置业顾问:">
|
64
|
|
- <p style="margin:0">{{consultant}}<span @click="dialogTableVisible=true" class="choose">请选择</span></p>
|
|
65
|
+ <p style="margin:0">{{detail.realtyConsultant}}<span @click="dialogTableVisible=true" class="choose">请选择</span></p>
|
65
|
66
|
</el-form-item>
|
66
|
67
|
<el-form-item>
|
67
|
68
|
<el-button type="primary" @click="submitForm">修改并审核通过</el-button>
|
|
@@ -101,36 +102,38 @@ export default {
|
101
|
102
|
return {
|
102
|
103
|
upFileUrl: apis.file.upload.url,
|
103
|
104
|
detail: {
|
|
105
|
+ customerId: '',
|
104
|
106
|
name: undefined,
|
105
|
107
|
company: undefined,
|
106
|
108
|
department: undefined,
|
107
|
109
|
post: undefined,
|
108
|
110
|
tel: undefined,
|
109
|
111
|
photo: undefined,
|
110
|
|
- status: 1,
|
111
|
|
- buildings: []
|
|
112
|
+ status: '1',
|
|
113
|
+ buildings: [],
|
|
114
|
+ realtyConsultant: ''
|
112
|
115
|
},
|
113
|
|
- imgList: [],
|
|
116
|
+ imageUrl: '',
|
114
|
117
|
dialogVisible: false,
|
115
|
118
|
dialogImageUrl: "",
|
116
|
119
|
dialogTableVisible: false, //选择置业顾问弹框
|
117
|
120
|
consultant:"",
|
118
|
121
|
gridData: [
|
119
|
122
|
{
|
120
|
|
- date: "2016-05-02",
|
121
|
|
- name: "王小虎"
|
|
123
|
+ name: "报备",
|
|
124
|
+ value: '1'
|
122
|
125
|
},
|
123
|
126
|
{
|
124
|
|
- date: "2016-05-04",
|
125
|
|
- name: "王小虎"
|
|
127
|
+ name: "到访",
|
|
128
|
+ value: '2'
|
126
|
129
|
},
|
127
|
130
|
{
|
128
|
|
- date: "2016-05-01",
|
129
|
|
- name: "王小虎"
|
|
131
|
+ name: "认购",
|
|
132
|
+ value: '3'
|
130
|
133
|
},
|
131
|
134
|
{
|
132
|
|
- date: "2016-05-03",
|
133
|
|
- name: "王小虎"
|
|
135
|
+ name: "签约",
|
|
136
|
+ value: '4'
|
134
|
137
|
}
|
135
|
138
|
]
|
136
|
139
|
};
|
|
@@ -154,9 +157,12 @@ export default {
|
154
|
157
|
...mapPersonActions(["getConsultant", "editConsultant"]),
|
155
|
158
|
|
156
|
159
|
init() {
|
157
|
|
- if (this.$route.params.id) {
|
158
|
|
- this.getConsultant({ id: this.$route.params.id }).then(data => {
|
|
160
|
+ this.detail.customerId = this.$route.query.id
|
|
161
|
+ if (this.detail.customerId !== undefined) {
|
|
162
|
+ this.$store.dispatch('customer/getRecommendCustomersGetById',this.detail).then(data => {
|
159
|
163
|
this.detail = data;
|
|
164
|
+ this.dialogImageUrl = data.picture
|
|
165
|
+ this.imageUrl = data.picture
|
160
|
166
|
});
|
161
|
167
|
}
|
162
|
168
|
},
|
|
@@ -200,12 +206,8 @@ export default {
|
200
|
206
|
return true;
|
201
|
207
|
},
|
202
|
208
|
handleAvatarSuccess(res) {
|
203
|
|
- this.imgList = [
|
204
|
|
- ...this.imgList,
|
205
|
|
- {
|
206
|
|
- url: res.data
|
207
|
|
- }
|
208
|
|
- ];
|
|
209
|
+ this.imageUrl = res.data
|
|
210
|
+ this.detail.picture = res.data
|
209
|
211
|
this.hideLoadding();
|
210
|
212
|
},
|
211
|
213
|
handleRemove(file, fileList) {
|
|
@@ -213,7 +215,7 @@ export default {
|
213
|
215
|
},
|
214
|
216
|
submitForm() {
|
215
|
217
|
this.showLoadding("保存中...");
|
216
|
|
- this.editConsultant(this.detail)
|
|
218
|
+ this.$store.dispatch('customer/getRecommendCustomersUpdate',this.detail)
|
217
|
219
|
.then(res => {
|
218
|
220
|
if (res.personId) {
|
219
|
221
|
this.detail = res;
|
|
@@ -221,6 +223,7 @@ export default {
|
221
|
223
|
|
222
|
224
|
this.hideLoadding();
|
223
|
225
|
this.$notify.info("保存成功");
|
|
226
|
+ this.$router.go(-1)
|
224
|
227
|
})
|
225
|
228
|
.catch(err => {
|
226
|
229
|
this.hideLoadding();
|
|
@@ -242,16 +245,7 @@ export default {
|
242
|
245
|
}
|
243
|
246
|
},
|
244
|
247
|
mounted() {
|
245
|
|
- const _that = this;
|
246
|
248
|
|
247
|
|
- this.getBuildings({
|
248
|
|
- pageNum: 1,
|
249
|
|
- pageSize: 100
|
250
|
|
- }).then(() => {
|
251
|
|
- if ((this.$route.query.id || "") !== "") {
|
252
|
|
- this.getDetail({ id: this.$route.query.id }).then(data => {});
|
253
|
|
- }
|
254
|
|
- });
|
255
|
249
|
}
|
256
|
250
|
};
|
257
|
251
|
</script>
|