Blame view

admin-web-master/src/views/customer/rsaManagement/genjin.vue 20 KB
8550d958   杨鑫   '最新'
1
  <template>
eb438c24   wesley88   1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
    <div style="background-color:#f7f7f7;padding:10px 10px;">
      <div class="zhuti" v-if="ontype == '1'">
        <div style="height:58px;line-height:58px;">
          <div style="color:#0006"> <span>商户寻租管理</span> <span style="padding:0 5px;">></span> <span
              style="color:#000000e6">跟进日志</span></div>
        </div>
        <!-- 搜索 -->
        <div class="formSearch">
          <el-form :inline="true" :model="formSel">
            <el-form-item label="年月">
              <el-date-picker style="width: 100%;" v-model="formSel.yytime" value-format="yyyy-MM" type="month"
                placeholder="选择日期">
              </el-date-picker>
            </el-form-item>
8550d958   杨鑫   '最新'
16
  
8550d958   杨鑫   '最新'
17
  
eb438c24   wesley88   1
18
19
20
21
22
23
          </el-form>
          <div style="width: 17%;">
            <el-button style="background-color: #3F9B6A;color: #fff" @click="onSubmit">查询
            </el-button>
            <el-button class="buttonHover" style="color: #606266;border: 1px solid #dddfe5;background-color: #fff;"
              @click="resetting">重置
b1fef010   杨鑫   '最新代码'
24
25
            </el-button>
          </div>
cfcb44ef   杨鑫   '改bug版'
26
  
eb438c24   wesley88   1
27
28
29
30
31
32
33
34
35
36
37
38
39
40
        </div>
        <div style="margin-bottom:20px;">
          <el-button style="background-color: #3F9B6A;color: #fff;padding:8px 15px;" icon="el-icon-circle-plus-outline"
            @click="genad">新增</el-button>
        </div>
        <div>
          <el-calendar v-model="morenCard">
            <template slot="dateCell" slot-scope="{date, data}">
              {{data.day.split("-").slice(2).join("-")}}
              <div style="overflow: auto;height:55px;">
                <div style="width:100%," v-for="(item,index) in tableData" @click="genjinMsg(item)">
                  <div style="font-size:12px;margin-top:10px;">
                    {{item.followUpTime == data.day?item.contentFeedback:''}}
                  </div>
c3f8e431   wesley88   1
41
                </div>
b1fef010   杨鑫   '最新代码'
42
              </div>
eb438c24   wesley88   1
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
            </template>
          </el-calendar>
        </div>
        <div>
          <el-button class="buttonHover" style="color: #606266;border: 1px solid #dddfe5;background-color: #fff;"
            @click="closeGenjin">返回
          </el-button>
        </div>
      </div>
      <div class="zhuti" v-if="ontype == '2'">
        <div style="height:58px;line-height:58px;">
          <div style="color:#0006"> <span>跟进日志</span> <span style="padding:0 5px;">></span> <span
              style="color:#000000e6">新增</span></div>
        </div>
        <div style="padding: 20px;">
          <el-form ref="genform" :model="formInline" :rules="rulesOne" label-width="120px">
            <el-row :gutter="20">
              <el-col :span="12">
                <el-form-item label="跟进时间" prop="followUpTime">
                  <el-date-picker  v-model="formInline.followUpTime" type="date" value-format="yyyy-MM-dd"
                    placeholder="选择日期" style="width:100%">
                  </el-date-picker>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="跟进类型" prop="followUpType" >
                  <el-select v-model="formInline.followUpType" placeholder="请选择" style="width:100%">
                    <el-option label="电话跟进" value="电话跟进" />
                    <el-option label="现场跟进" value="现场跟进" />
                    <el-option label="微信跟进" value="微信跟进" />
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="客户级别" prop="customerLevel" tyle="width: 100%;">
                  <el-select v-model="formInline.customerLevel" placeholder="请选择" style="width:100%">
                    <el-option label="A" value="A" />
                    <el-option label="B" value="B" />
                    <el-option label="C" value="C" />
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="当前阶段" prop="currentStage">
                  <el-select v-model="formInline.currentStage" placeholder="请选择" style="width:100%" >
                    <el-option label="继续跟进" value="继续跟进" />
                    <el-option label="达成共识" value="达成共识" />
                  </el-select>
                </el-form-item>
              </el-col>
            </el-row>
            <el-form-item label="意向资源"  style="width: 100%;">
b1fef010   杨鑫   '最新代码'
95
              <div style="border: 1px solid #E5E5E5;padding: 1px" id="huodong">
eb438c24   wesley88   1
96
97
98
99
100
101
                <div v-if="addziyuanData.length != 1"
                  style="font-size: 14px;border-bottom: 1px solid #E5E5E5;display: flex;justify-content: space-between;line-height:20px;background:#F2F3F5;">
                  <div></div>
                  <div style="color: #3F9B6A;padding:10px;" @click="addZi()">
                    添加
                  </div>
b1fef010   杨鑫   '最新代码'
102
103
104
                </div>
                <div style="padding: 15px;">
                  <div style="padding: 0px 20px 0px 0px">
eb438c24   wesley88   1
105
106
107
                    <el-table :data="addziyuanData"
                      :header-cell-style="{fontSize: '14px',color:'#0009',fontWeight: 'normal',backgroundColor:'#F2F3F5'}">
                      <el-table-column label="序号">
b1fef010   杨鑫   '最新代码'
108
109
110
111
                        <template slot-scope="scope">
                          {{scope.$index + 1}}
                        </template>
                      </el-table-column>
eb438c24   wesley88   1
112
113
114
115
116
                      <el-table-column label="资源编号" prop="id" ></el-table-column>
                      <el-table-column label="意向资源名称"  prop="name"   show-overflow-tooltip>
                        <template slot-scope="scope">
                          {{scope.row.shopName ? scope.row.shopName :  scope.row.advertisingName?scope.row.advertisingName:scope.row.venueName}}
                        </template>
b1fef010   杨鑫   '最新代码'
117
                      </el-table-column>
eb438c24   wesley88   1
118
119
120
121
                      <el-table-column label="意向资源类型" prop="type" >
                        <template slot-scope="scope">
                          {{scope.row.shopName ? '商铺' : scope.row.advertisingType?scope.row.advertisingType:'场地'}}
                        </template>
b1fef010   杨鑫   '最新代码'
122
                      </el-table-column>
eb438c24   wesley88   1
123
                      <el-table-column label="操作">
b1fef010   杨鑫   '最新代码'
124
                        <template slot-scope="scope">
eb438c24   wesley88   1
125
                          <div @click="MingDelete(scope.$index)" class="tableBtn greens">删除</div>
b1fef010   杨鑫   '最新代码'
126
127
                        </template>
                      </el-table-column>
b1fef010   杨鑫   '最新代码'
128
129
130
131
                    </el-table>
                  </div>
                </div>
              </div>
eb438c24   wesley88   1
132
133
134
135
136
137
138
139
140
141
142
143
144
            </el-form-item>
            <el-form-item label="内容反馈" prop="contentFeedback">
              <el-input type="textarea" v-model="formInline.contentFeedback" :rows="4" ></el-input>
            </el-form-item>
            <el-form-item label="现场照片">
              <upimg filePath="yixiang" inputtype="onSitePhotos" :value="formInline.onSitePhotos"  @changimg="e=>changimg(e,'onSitePhotos')" :limit="3"></upimg>
            </el-form-item>
            <el-form-item label="下次更进时间" prop="plan_Time">
              <el-date-picker style="width: 100%;" v-model="formInline.plan_Time" value-format="yyyy-MM-dd"
                 type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"
                align="right" @change="changeNext">
              </el-date-picker>
            </el-form-item>
cf438595   wesley88   1
145
146
147
148
149
150
151
152
153
154
155
            <el-row :gutter="20">
              <el-col :span="12">
                <el-form-item>
                  <div style="margin-top: 20px">
                    <el-button @click="addCheck()" style="background-color: #3F9B6A;color: #fff;">确定</el-button>
                    <el-button @click="closeFn()" class="buttonHover"
                      style="color: #606266;border: 1px solid #DBDBDB;background-color: #fff;">取消</el-button>
                  </div>
                </el-form-item>
              </el-col>
            </el-row>
eb438c24   wesley88   1
156
157
          </el-form>
        </div>
cf438595   wesley88   1
158
159
  
        <!-- <div style="display: flex;">
eb438c24   wesley88   1
160
161
162
          <el-button @click="closeFn" class="buttonHover"
            style="color: #606266;border: 1px solid #dddfe5;background-color: #fff;">返回</el-button>
          <el-button @click="addCheck" style="background-color: #3F9B6A;color: #fff">确定</el-button>
cf438595   wesley88   1
163
        </div> -->
eb438c24   wesley88   1
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
      </div>
      <div class="zhuti" v-if="ontype == '3'">
        <div style="height:58px;line-height:58px;">
          <div style="color:#0006"> <span>跟进日志</span> <span style="padding:0 5px;">></span> <span
              style="color:#000000e6">查看</span></div>
        </div>
        <el-form :model="formInline" ref="formInline" label-width="120px" class="demo-ruleForm">
          <el-row :gutter="20">
            <el-col :span="12">
              <el-form-item label="跟进时间" prop="followUpTime">
                <div class="duiqi">{{formInline.followUpTime  || '无'}}</div>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="跟进类型" prop="followUpType" >
                <div class="duiqi">{{formInline.followUpType  || '无'}}</div>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="客户级别" prop="customerLevel" style="width: 100%;">
                <div class="duiqi">{{formInline.customerLevel  || '无'}}</div>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="当前阶段" prop="currentStage">
                <div class="duiqi">{{formInline.currentStage  || '无'}}</div>
              </el-form-item>
            </el-col>
          </el-row>
          <el-form-item label="意向资源"  style="width: 100%;">
            <div style="border: 1px solid #E5E5E5;padding: 1px" id="huodong">
              <div style="padding: 15px;">
                <div style="padding: 0px 20px 0px 0px">
                  <el-table :data="addziyuanData"
                    :header-cell-style="{fontSize: '14px',color:'#0009',fontWeight: 'normal',backgroundColor:'#F2F3F5'}">
                    <el-table-column label="序号">
                      <template slot-scope="scope">
                        {{scope.$index + 1}}
                      </template>
                    </el-table-column>
                    <el-table-column label="资源编号" prop="id" ></el-table-column>
                    <el-table-column label="意向资源名称"  prop="name"   show-overflow-tooltip>
                      <template slot-scope="scope">
                        {{scope.row.shopName ? scope.row.shopName :  scope.row.advertisingName?scope.row.advertisingName:scope.row.venueName}}
                      </template>
                    </el-table-column>
                    <el-table-column label="意向资源类型" prop="type" >
                      <template slot-scope="scope">
                        {{scope.row.shopName ? '商铺' : scope.row.advertisingType?scope.row.advertisingType:'场地'}}
                      </template>
                    </el-table-column>
                  </el-table>
                </div>
b1fef010   杨鑫   '最新代码'
217
              </div>
eb438c24   wesley88   1
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
            </div>
          </el-form-item>
          <el-form-item label="内容反馈" prop="contentFeedback">
            <div class="duiqi">{{formInline.contentFeedback  || '无'}}</div>
          </el-form-item>
          <el-form-item label="现场照片">
            <div style="display: flex;">
              <allimg v-if="item" :src="item" fit="contain" v-for="item in imgList"
                style="width: 112px;height: 112px;border: 1px dotted #dcdfe6;border-radius: 2px;overflow: hidden;margin: 0 10px 10px 0;" />
            </div>
          </el-form-item>
          <el-form-item label="下次更进时间" prop="plan_Time">
            <div class="duiqi">{{formInline.plan_Time?formInline.plan_Time.length>0?formInline.plan_Time[0]+' 至 '+formInline.plan_Time[1]:'无':'无'}}</div>
          </el-form-item>
        </el-form>
        <div style="display: flex;">
          <el-button @click="closeFn" class="buttonHover"
            style="color: #606266;border: 1px solid #dddfe5;background-color: #fff;">返回</el-button>
        </div>
      </div>
      <!-- 资源选择 -->
      <el-dialog :visible.sync="addziyuan" title="选择资源" width="65%" append-to-body center :close-on-click-modal="false"
        :close-on-press-escape="false" :show-close="false">
        <zy :maxSelection="1" publishStatus="2" v-if="addziyuan" @mingClose="mingClose" @minSev="minSev"></zy>
      </el-dialog>
    </div>
8550d958   杨鑫   '最新'
244
245
246
  </template>
  
  <script>
eb438c24   wesley88   1
247
    import zy from "@/components/change/zy"
b1fef010   杨鑫   '最新代码'
248
    import {
eb438c24   wesley88   1
249
250
251
252
253
      genGetAll,
      genAdd,
      genEdit,
      genDel,
      rsaManEdit
b1fef010   杨鑫   '最新代码'
254
255
256
    } from '../../../api/followup.js'
    import upimg from "@/components/ImageUpload/index"
    import {
eb438c24   wesley88   1
257
      getAlls
b1fef010   杨鑫   '最新代码'
258
259
260
261
    } from '../../../api/information.js'
    import {
      getAlls as map1
    } from '../../../api/map1'
c3f8e431   wesley88   1
262
    import allimg from '@/components/chakan/allimg.vue';
8550d958   杨鑫   '最新'
263
    export default {
b1fef010   杨鑫   '最新代码'
264
      components: {
eb438c24   wesley88   1
265
266
267
268
269
270
271
272
273
274
        upimg,
        allimg,
        zy
      },
      props: {
        message: {
          type: Number, // 指定数据的类型
          required: true, // 指定该数据是必需的
          default: null, // 指定默认值
        }
b1fef010   杨鑫   '最新代码'
275
      },
8550d958   杨鑫   '最新'
276
277
      data() {
        return {
eb438c24   wesley88   1
278
279
280
          ontype: "1",
          formSel: {
            yytime: ''
8550d958   杨鑫   '最新'
281
          },
eb438c24   wesley88   1
282
283
284
285
286
287
288
289
290
291
292
293
294
          formInline: {
            followUpTime: '', //跟进时间
            followUpType: '', //跟进类型
            customerLevel: '',
            potentialCustomer: '', //意向客户
            intendedResource: '', //意向资源
            currentStage: '', //当前阶段
            contentFeedback: '', //内容反馈
            onSitePhotos: '', //现场照片
            plan_Time: null,
            nextFollowUpStartTime: '', //下次跟进开始时间
            nextFollowUpEndTime: '', //下次跟进结束时间
            status: '1' //状态
b1fef010   杨鑫   '最新代码'
295
          },
eb438c24   wesley88   1
296
297
          addziyuanData: [],
          ziyuanData: [], //资源
b1fef010   杨鑫   '最新代码'
298
          morenCard: new Date(),
eb438c24   wesley88   1
299
300
301
          multipleSelection: [],
          addziyuan: false,
          pageSize: 10,
b1fef010   杨鑫   '最新代码'
302
303
          currentPage: 1,
          total: 0,
eb438c24   wesley88   1
304
          ggXin: false,
b1fef010   杨鑫   '最新代码'
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
          rulesOne: {
            followUpTime: [{
              required: true,
              message: '请选择跟进时间',
              trigger: 'change'
            }, ],
            followUpType: [{
              required: true,
              message: '请选择跟进类型',
              trigger: 'change'
            }],
            customerLevel: [{
              required: true,
              message: '请选择客户级别',
              trigger: 'change'
            }],
            contentFeedback: [{
              required: true,
              message: '请输入内容反馈',
              trigger: 'blur'
            }, ],
            currentStage: [{
              required: true,
              message: '请选择当前阶段',
              trigger: 'change'
            }, ],
            plan_Time: [{
              required: true,
              message: '请选择下次跟进时间',
              trigger: 'change'
            }, ],
          },
          pageindex: {
b1fef010   杨鑫   '最新代码'
338
339
            pageNumber: 0,
            pageSize: 10,
eb438c24   wesley88   1
340
341
342
343
344
345
346
347
348
            potentialCustomer: null
          },
          zipageindex: {
            pageNumber: 0,
            pageSize: 10,
          },
          tableData: [],
          msgEit: false,
          imgList: []
8550d958   杨鑫   '最新'
349
350
351
352
353
        }
      },
      created() {
  
      },
b1fef010   杨鑫   '最新代码'
354
355
356
357
      mounted() {
        this.pageindex.potentialCustomer = this.message
        this.getAll()
      },
eb438c24   wesley88   1
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
      methods: {
        changimg(e, type) {
          this.formInline[type] = e
          // this.imgList.push(e)
        },
        async getAll() {
          const res = await genGetAll(this.pageindex)
          this.tableData = res.data.content
        },
        genjinMsg(item) {
          this.msgEit = true
          this.formInline = {}
          this.formInline = item
          this.formInline.plan_Time = [item.nextFollowUpStartTime, item.nextFollowUpEndTime]
          if (typeof item.intendedResource == 'string' && item.intendedResource != '') {
            this.addziyuanData = JSON.parse(item.intendedResource)
          }
8550d958   杨鑫   '最新'
375
  
eb438c24   wesley88   1
376
377
378
          if (typeof item.onSitePhotos == 'string') {
            this.imgList = item.onSitePhotos.split(',') || []
          }
4e955529   杨鑫   '1'
379
  
eb438c24   wesley88   1
380
381
382
          this.ontype = '3'
        },
        onSubmit() {
b1fef010   杨鑫   '最新代码'
383
384
          this.morenCard = this.formSel.yytime
          this.getAll()
eb438c24   wesley88   1
385
386
        },
        resetting() {
b1fef010   杨鑫   '最新代码'
387
388
389
          this.morenCard = new Date()
          this.formSel.yytime = ''
          this.getAll()
eb438c24   wesley88   1
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
        },
        async addZi() {
          this.addziyuan = true
  
  
          // const ziyuan = await getAlls(this.zipageindex)
          // const ggw = await map1(this.zipageindex)
          // this.ziyuanData = [...ziyuan.data.content, ...ggw.data.content]
          // this.addziyuan = true
        },
        genad() {
          // this.msgEit = false
          // this.ggXin = true
          // this.$refs.genform.resetFields()
          this.ontype = '2'
          this.formInline = {
            followUpTime: '', //跟进时间
            followUpType: '', //跟进类型
            customerLevel: '',
            potentialCustomer: '', //意向客户
            intendedResource: '', //意向资源
            currentStage: '', //当前阶段
            contentFeedback: '', //内容反馈
            onSitePhotos: '', //现场照片
            plan_Time: [],
            nextFollowUpStartTime: '', //下次跟进开始时间
            nextFollowUpEndTime: '', //下次跟进结束时间
            status: '1' //状态
b1fef010   杨鑫   '最新代码'
418
          }
eb438c24   wesley88   1
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
        },
        closeGenjin() {
          this.$emit('cancel', false)
        },
        handleSelectionChange(selection) {
          this.multipleSelection = selection[0]
          // 确保只有一行被选中
          if (selection.length > 1) {
            this.$refs.singleTable.clearSelection();
            this.$refs.singleTable.toggleRowSelection(selection[selection.length - 1]);
          }
        },
        minSev(data) {
          // this.multipleSelection.leaseTerm = this.formInline.leaseTerm
          // this.multipleSelection.rent = this.formInline.rent
          // this.addziyuanData.push(this.multipleSelection)
          // this.addziyuan = false
          // this.multipleSelection = []
          // this.formInline.leaseTerm = ''
          // this.formInline.rent = ''
          // this.$refs.singleTable.clearSelection()
b1fef010   杨鑫   '最新代码'
440
  
b1fef010   杨鑫   '最新代码'
441
  
eb438c24   wesley88   1
442
443
444
445
446
447
448
449
450
451
452
453
454
455
          data.leaseTerm = this.formInline.leaseTerm
          data.rent = this.formInline.rent
          console.log('资源选择确认:', data);
          this.addziyuanData = data
          this.multipleSelection = null
          this.formInline.leaseTerm = ''
          this.formInline.rent = ''
    
          this.addziyuan = false; // 关闭资源对话框
        },
        MingDelete(item) {
          this.addziyuanData = []
        },
        changeNext(e) {
cfcb44ef   杨鑫   '改bug版'
456
  
eb438c24   wesley88   1
457
458
          this.formInline.nextFollowUpStartTime = e[0]
          this.formInline.nextFollowUpEndTime = e[1]
cfcb44ef   杨鑫   '改bug版'
459
  
eb438c24   wesley88   1
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
        },
        mingClose() {
          this.multipleSelection = []
          this.addziyuan = false
        },
        closemsg(index) {
          this.addziyuanData.splice(index, 1);
        },
        closeFn(val) {
          this.formInline.plan_Time = []
          this.addziyuanData = []
          this.ontype = '1'
        },
        // 新增确定按钮
        addCheck(val) {
          this.$refs.genform.validate((valid) => {
            if (valid) {
              this.formInline.potentialCustomer = this.message
              if (this.addziyuanData.length != 0) {
                this.formInline.intendedResource = JSON.stringify(this.addziyuanData)
              }
              
              // this.formInline.onSitePhotos  =  this.imgList.join(',')
              if (this.formInline.currentStage == '达成共识') {
                this.formInline.status = '2'
cfcb44ef   杨鑫   '改bug版'
485
              }
eb438c24   wesley88   1
486
487
488
489
490
491
492
              console.log(this.formInline)
              // return
              genAdd(this.formInline).then(() => {
                this.ontype = '1'
                this.addziyuanData = []
                this.getAll()
              })
cfcb44ef   杨鑫   '改bug版'
493
  
eb438c24   wesley88   1
494
495
496
497
498
499
500
501
502
503
504
            } else {
              this.$message({
                message: '请填写完整信息',
                type: 'error'
              })
  
            }
          })
  
        },
      }
8550d958   杨鑫   '最新'
505
506
507
508
509
510
511
    }
  </script>
  
  <style lang="scss" scoped>
    ::v-deep .el-calendar button-group {
      display: none;
    }
eb438c24   wesley88   1
512
  
b1fef010   杨鑫   '最新代码'
513
514
    .zhuti {
      padding: 0 20px 20px 20px;
eb438c24   wesley88   1
515
     min-height: calc(100vh - 50px - 20px);
b1fef010   杨鑫   '最新代码'
516
      background-color: #fff;
eb438c24   wesley88   1
517
      box-sizing: border-box;
b1fef010   杨鑫   '最新代码'
518
519
520
521
522
523
524
525
526
527
    }
  
    .formSearch {
  
      display: flex;
      width: 100%;
      font-size: 14px;
      justify-content: space-between;
  
    }
eb438c24   wesley88   1
528
529
530
531
532
533
534
535
536
537
538
539
  
    ::v-deep .el-calendar-table:not(.is-range)td.next {
      display: none;
    }
  
    ::v-deep .el-calendar-table:not(.is-range)td.prev {
      visibility: hidden;
    }
  
    ::v-deep .el-calendar__button-group {
      display: none;
    }
8550d958   杨鑫   '最新'
540
  </style>