Blame view

admin-web-master/src/views/customer/rsaManagement/genjin.vue 18.9 KB
8550d958   杨鑫   '最新'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
  <template>
   <div style="background-color:#f7f7f7;padding:10px 10px;">
       <div class="zhuti">
         <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>
  
  
             </el-form>
b1fef010   杨鑫   '最新代码'
19
        <div style="width: 17%;">
8550d958   杨鑫   '最新'
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
               <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"
                 >重置
               </el-button>
             </div>
  
           </div>
          <div style="margin-bottom:20px;">
            <el-button style="background-color: #3F9B6A;color: #fff;padding:8px 15px;" icon="el-icon-circle-plus-outline"
b1fef010   杨鑫   '最新代码'
36
              @click="genad">新增</el-button>
8550d958   杨鑫   '最新'
37
38
          </div>
          <div>
b1fef010   杨鑫   '最新代码'
39
40
41
42
43
           <el-calendar v-model="morenCard">
              <template
                  slot="dateCell"
                  slot-scope="{date, data}">
                  {{data.day.split("-").slice(2).join("-")}}
4e955529   杨鑫   '1'
44
                  <div style="overflow: auto;height:55px;">
b1fef010   杨鑫   '最新代码'
45
46
47
48
49
                <div style="width:100%,height: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>
                  </div>
4e955529   杨鑫   '1'
50
                         </div>
b1fef010   杨鑫   '最新代码'
51
                </template>
8550d958   杨鑫   '最新'
52
53
           </el-calendar>
          </div>
b1fef010   杨鑫   '最新代码'
54
55
56
57
58
59
60
61
          <div>
            <el-button
             class="buttonHover"
               style="color: #606266;border: 1px solid #dddfe5;background-color: #fff;"
              @click="closeGenjin"
              >返回
            </el-button>
          </div>
8550d958   杨鑫   '最新'
62
    </div>
b1fef010   杨鑫   '最新代码'
63
64
65
    <el-dialog :title="msgEit?'查看':'新增'" :visible.sync="ggXin"  width="75%"
          append-to-body  :close-on-click-modal="false" :close-on-press-escape="false" :show-close="false">
          <div style="padding: 20px;">
cfcb44ef   杨鑫   '改bug版'
66
            <el-form ref="genform" :model="formInline"  :rules="rulesOne" label-width="120px">
b1fef010   杨鑫   '最新代码'
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
              <el-form-item label="跟进时间" prop="followUpTime">
                <el-date-picker
                :disabled="msgEit"
                      v-model="formInline.followUpTime"
                       type="date"
                      value-format="yyyy-MM-dd"
                      placeholder="选择日期"
                      tyle="width: 100%;">
                    </el-date-picker>
              </el-form-item>
              <el-form-item label="跟进类型" prop="followUpType" tyle="width: 100%;">
                <el-select v-model="formInline.followUpType" placeholder="请选择"  :disabled="msgEit">
                  <el-option label="电话跟进" value="电话跟进" />
                  <el-option label="现场跟进" value="现场跟进" />
                  <el-option label="微信跟进" value="微信跟进" />
                      </el-select>
              </el-form-item>
              <el-form-item label="客户级别" prop="customerLevel" tyle="width: 100%;"  >
                <el-select v-model="formInline.customerLevel" placeholder="请选择" style="width:168px;margin-right: 15px" :disabled="msgEit">
                  <el-option label="A" value="A" />
                  <el-option label="B" value="B" />
                  <el-option label="C" value="C" />
                </el-select>
              </el-form-item>
          <div style="border:1px solid #DCDFE6;font-size:14px;margin-bottom:10px;">
            <div style="padding: 10px 20px;border-bottom: 1px solid #DCDFE6;display: flex;justify-content: space-between;">
              <div>意向资源</div>
              <div style="color: #3F9B6A;margin-left: 10px;" @click="addZi"  v-if="msgEit==false">
                添加
              </div>
            </div>
            <div style="padding:20px;">
              <el-table :data="addziyuanData.slice((currentPage - 1) * pageSize, currentPage * pageSize)"
                :header-cell-style="{fontSize: '14px',color:'#0009',fontWeight: 'normal',backgroundColor:'#F2F3F5'}"
             >
                <el-table-column label="序号" width="80" >
                  <template slot-scope="scope">
                    {{scope.$index + 1}}
                  </template>
                </el-table-column>
                <el-table-column label="资源编号" prop="id" width="150">
  
                </el-table-column>
                </el-table-column>
                <el-table-column label="意向资源类型"  width="150">
                  <template slot-scope="scope">
                    {{scope.row.advertisingType ?scope.row.advertisingType:'商铺'}}
                  </template>
                </el-table-column>
  
  
                <el-table-column label="意向租期" prop="leaseTerm" min-width="150">
                </el-table-column>
                <el-table-column label="意向租金(元)" prop="rent" min-width="150">
                </el-table-column>
                <el-table-column label="操作" min-width="80" v-if="msgEit==false">
                  <template slot-scope="scope">
                    <div class="tableBtn greens" @click="closemsg(scope.$index)">删除</div>
                  </template>
                </el-table-column>
              </el-table>
            </div>
          </div>
            <el-form-item label="当前阶段" prop="currentStage">
              <el-select v-model="formInline.currentStage" placeholder="请选择" style="width:100%"  :disabled="msgEit">
                <el-option label="继续跟进" value="继续跟进" />
                <el-option label="达成共识" value="达成共识" />
              </el-select>
            </el-form-item>
            <el-form-item label="内容反馈" prop="contentFeedback">
              <el-input type="textarea" v-model="formInline.contentFeedback" :rows="4"  :disabled="msgEit"></el-input>
            </el-form-item>
  
cfcb44ef   杨鑫   '改bug版'
140
141
            <el-form-item label="现场照片" >
              <div style="display:flex;flex-wrap: wrap;" v-if="msgEit" >
b1fef010   杨鑫   '最新代码'
142
                <el-image
cfcb44ef   杨鑫   '改bug版'
143
                      style="width: 100px; height: 100px;margin-right: 10px;"
b1fef010   杨鑫   '最新代码'
144
145
                        fit="fill"
                      :src="$baseURL+item"
cfcb44ef   杨鑫   '改bug版'
146
147
148
149
150
                       v-for="(item,index) in imgList" :key="index"
                      >
                      <div slot="error" class="image-slot">
  
                           </div></el-image>
b1fef010   杨鑫   '最新代码'
151
152
              </div>
              <upimg filePath="yixiang" inputtype="onSitePhotos" :value="formInline.onSitePhotos"
cfcb44ef   杨鑫   '改bug版'
153
                @changimg="e=>changimg(e,'onSitePhotos')" :limit="3" v-if="msgEit==false" ></upimg>
b1fef010   杨鑫   '最新代码'
154
155
156
157
158
159
160
161
162
163
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
217
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
244
245
246
247
248
249
250
  
            </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"
              :disabled="msgEit"
                 type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" align="right" @change="changeNext">
              </el-date-picker>
            </el-form-item>
          </el-form>
             </div>
          <div style="display: flex;justify-content: flex-end;">
            <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" v-if="msgEit==false">确定</el-button>
          </div>
          <!-- 资源选择 -->
          <el-dialog :visible.sync="addziyuan" title="添加" style="padding: 0;" width="50%"
            append-to-body  :close-on-click-modal="false" :close-on-press-escape="false" :show-close="false">
  
            <div style="padding:20px;max-height: calc(100vh - 200px);
            overflow-y: auto;">
              <el-form ref="form" :model="formInline" label-width="120px">
                <el-row :gutter="20">
                  <el-col :span="12">
                    <el-form-item label="意向租期" prop="currentStage">
                    <el-select v-model="formInline.leaseTerm" placeholder="请选择" style="width: 168px;margin-right: 15px">
                          <el-option label="年" value="年"></el-option>
                          <el-option label="月" value="月"></el-option>
                          <el-option label="日" value="日"></el-option>
                        </el-select>
                      </el-form-item>
                  </el-col>
                  <el-col :span="12">
                    <el-form-item label="意向租金">
                      <el-input  v-model="formInline.rent" ></el-input>
                    </el-form-item>
                  </el-col>
                </el-row>
  
  
  
              </el-form>
              <div style="border: 1px solid #E5E5E5;padding: 1px" id="huodong">
                <div style="padding: 10px 13px;font-size: 14px;border-bottom: 1px solid #E5E5E5;display: flex;justify-content: space-between;">
                  <div>选择资源</div>
                </div>
                <div style="padding: 15px;">
                  <div style="padding: 0px 20px 0px 0px">
                    <el-table :data="ziyuanData"
                    @selection-change="handleSelectionChange" tooltip-effect="dark"  ref="singleTable"
                      :header-cell-style="{fontSize: '14px',color:'#0009',fontWeight: 'normal',backgroundColor:'#F2F3F5'}"
                      >
                       <el-table-column
                              label="选择"
                             type="selection"
                             width="55">
                           </el-table-column>
                      <el-table-column label="序号"  min-width="8%" >
                        <template slot-scope="scope">
                          {{scope.$index + 1}}
                        </template>
                      </el-table-column>
                      <el-table-column label="编号" prop="id" min-width="22%">
  
                      </el-table-column>
                      <el-table-column label="资源名称"  min-width="15%">
                      <template slot-scope="scope">
                        {{scope.row.shopName ? scope.row.shopName :  scope.row.advertisingName}}
                      </template>
                      </el-table-column>
                      <el-table-column label="资源类型" min-width="15%">
                        <template slot-scope="scope">
                          {{scope.row.advertisingType ?scope.row.advertisingType:'商铺'}}
                        </template>
                      </el-table-column>
                      <!-- <el-table-column prop="notes" label="对应策略" min-width="15%">
                      </el-table-column> -->
  
                    </el-table>
                  </div>
                </div>
              </div>
            </div>
            <template #footer>
              <div style="display: flex; justify-content: flex-end; align-items: center;">
  
             <el-button  @click="minSev" style="background-color: #3F9B6A;color: #fff;">确定
             </el-button>
             <el-button  @click="mingClose" class="buttonHover"
                   style="color: #606266;border: 1px solid #dddfe5;background-color: #fff;">取消
             </el-button>
              </div>
            </template>
  
          </el-dialog>
  
        </el-dialog>
8550d958   杨鑫   '最新'
251
252
253
254
     </div>
  </template>
  
  <script>
b1fef010   杨鑫   '最新代码'
255
256
257
258
259
260
261
262
263
264
265
266
267
268
    import {
     genGetAll,
     genAdd,
     genEdit,
     genDel,
     rsaManEdit
    } from '../../../api/followup.js'
    import upimg from "@/components/ImageUpload/index"
    import {
     getAlls
    } from '../../../api/information.js'
    import {
      getAlls as map1
    } from '../../../api/map1'
8550d958   杨鑫   '最新'
269
    export default {
b1fef010   杨鑫   '最新代码'
270
271
272
273
274
275
276
277
278
279
      components: {
        upimg
      },
       props: {
         message: {
           type: Number, // 指定数据的类型
           required: true, // 指定该数据是必需的
           default: null ,// 指定默认值
           }
         } ,
8550d958   杨鑫   '最新'
280
281
282
283
284
      data() {
        return {
          formSel:{
          yytime:''
          },
b1fef010   杨鑫   '最新代码'
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
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
338
339
340
341
342
343
344
345
346
347
348
349
350
351
          formInline:{
              followUpTime:'',//跟进时间
              followUpType:'',//跟进类型
              customerLevel:'',
              potentialCustomer:'',//意向客户
              intendedResource:'',//意向资源
              currentStage:'',//当前阶段
              contentFeedback:'',//内容反馈
              onSitePhotos:'',//现场照片
              plan_Time:[],
              nextFollowUpStartTime:'',//下次跟进开始时间
              nextFollowUpEndTime:'',//下次跟进结束时间
              status:'1'//状态
          },
          addziyuanData:[],
          ziyuanData:[],//资源
          morenCard: new Date(),
          multipleSelection:[],
          addziyuan:false,
          pageSize:10,
          currentPage: 1,
          total: 0,
          ggXin:false,
          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: {
          pageNumber: 0,
          pageSize: 10,
          potentialCustomer:null
            },
            zipageindex: {
            pageNumber: 0,
            pageSize: 10,
              },
            tableData:[],
            msgEit:false,
            imgList:[]
8550d958   杨鑫   '最新'
352
353
354
355
356
        }
      },
      created() {
  
      },
b1fef010   杨鑫   '最新代码'
357
358
359
360
      mounted() {
        this.pageindex.potentialCustomer = this.message
        this.getAll()
      },
8550d958   杨鑫   '最新'
361
        methods: {
b1fef010   杨鑫   '最新代码'
362
363
364
365
366
367
368
369
370
371
          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
4e955529   杨鑫   '1'
372
              this.formInline = {}
b1fef010   杨鑫   '最新代码'
373
374
              this.formInline = item
              this.formInline.plan_Time = [item.nextFollowUpStartTime,item.nextFollowUpEndTime]
8550d958   杨鑫   '最新'
375
  
4e955529   杨鑫   '1'
376
               if(typeof item.intendedResource == 'string' && item.intendedResource!=''){
b1fef010   杨鑫   '最新代码'
377
378
379
380
381
                 this.addziyuanData  = JSON.parse(item.intendedResource)
               }
              if(typeof item.onSitePhotos == 'string'){
                this.imgList = item.onSitePhotos.split(',') ||[]
              }
4e955529   杨鑫   '1'
382
  
b1fef010   杨鑫   '最新代码'
383
              this.ggXin = true
8550d958   杨鑫   '最新'
384
385
          },
          onSubmit(){
b1fef010   杨鑫   '最新代码'
386
387
          this.morenCard = this.formSel.yytime
          this.getAll()
8550d958   杨鑫   '最新'
388
389
          },
          resetting(){
b1fef010   杨鑫   '最新代码'
390
391
392
393
394
395
396
397
398
          this.morenCard = new Date()
          this.formSel.yytime = ''
          this.getAll()
          },
         async addZi(){
            const ziyuan =  await getAlls(this.zipageindex)
             const ggw  = await map1(this.zipageindex)
            this.ziyuanData = [...ziyuan.data.content,...ggw.data.content]
            this.addziyuan = true
8550d958   杨鑫   '最新'
399
          },
b1fef010   杨鑫   '最新代码'
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
          genad(){
            this.msgEit = false
            this.ggXin = true
            this.formInline ={
              followUpTime:'',//跟进时间
              followUpType:'',//跟进类型
              customerLevel:'',
              potentialCustomer:'',//意向客户
              intendedResource:'',//意向资源
              currentStage:'',//当前阶段
              contentFeedback:'',//内容反馈
              onSitePhotos:'',//现场照片
              plan_Time:[],
              nextFollowUpStartTime:'',//下次跟进开始时间
              nextFollowUpEndTime:'',//下次跟进结束时间
              status:'1'//状态
          }
          },
          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() {
                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()
               },
               changeNext(e){
  
                 this.formInline.nextFollowUpStartTime = e[0]
                    this.formInline.nextFollowUpEndTime = e[1]
  
               },
             mingClose(){
               this.multipleSelection =[]
               this.addziyuan = false
             },
             closemsg(index){
               this.addziyuanData.splice(index, 1);
             },
             closeFn(val) {
               this.formInline.plan_Time =[]
               this.addziyuanData =[]
             this.ggXin = false
             },
             // 新增确定按钮
cfcb44ef   杨鑫   '改bug版'
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
              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'
                    }
                    genAdd(this.formInline).then(()=>{
                      this.ggXin = false
                      this.addziyuanData =[]
                      this.getAll()
                    })
  
                   }else {
                this.$message({
                  message: '请填写完整信息',
                  type: 'error'
                })
  
              }
            })
  
b1fef010   杨鑫   '最新代码'
484
             },
8550d958   杨鑫   '最新'
485
486
487
488
489
490
491
492
        }
    }
  </script>
  
  <style lang="scss" scoped>
    ::v-deep .el-calendar button-group {
      display: none;
    }
b1fef010   杨鑫   '最新代码'
493
494
495
496
497
498
499
500
501
502
503
504
505
506
    .zhuti {
      padding: 0 20px 20px 20px;
      min-height: calc(100vh - 50px - 20px);
      background-color: #fff;
    }
  
    .formSearch {
  
      display: flex;
      width: 100%;
      font-size: 14px;
      justify-content: space-between;
  
    }
8550d958   杨鑫   '最新'
507
508
  ::v-deep .el-calendar-table:not(.is-range)td.next{display: none;}
  ::v-deep .el-calendar-table:not(.is-range)td.prev{visibility:hidden;}
b1fef010   杨鑫   '最新代码'
509
  ::v-deep .el-calendar__button-group {display: none;}
8550d958   杨鑫   '最新'
510
  </style>