Blame view

admin-web-master/src/views/customer/rsaManagement/genjin.vue 19.4 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
145
146
147
148
149
150
151
152
153
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
            </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>
          </el-form>
        </div>
        <div style="display: flex;">
          <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>
        </div>
      </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   杨鑫   '最新代码'
205
              </div>
eb438c24   wesley88   1
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
            </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   杨鑫   '最新'
232
233
234
  </template>
  
  <script>
eb438c24   wesley88   1
235
    import zy from "@/components/change/zy"
b1fef010   杨鑫   '最新代码'
236
    import {
eb438c24   wesley88   1
237
238
239
240
241
      genGetAll,
      genAdd,
      genEdit,
      genDel,
      rsaManEdit
b1fef010   杨鑫   '最新代码'
242
243
244
    } from '../../../api/followup.js'
    import upimg from "@/components/ImageUpload/index"
    import {
eb438c24   wesley88   1
245
      getAlls
b1fef010   杨鑫   '最新代码'
246
247
248
249
    } from '../../../api/information.js'
    import {
      getAlls as map1
    } from '../../../api/map1'
c3f8e431   wesley88   1
250
    import allimg from '@/components/chakan/allimg.vue';
8550d958   杨鑫   '最新'
251
    export default {
b1fef010   杨鑫   '最新代码'
252
      components: {
eb438c24   wesley88   1
253
254
255
256
257
258
259
260
261
262
        upimg,
        allimg,
        zy
      },
      props: {
        message: {
          type: Number, // 指定数据的类型
          required: true, // 指定该数据是必需的
          default: null, // 指定默认值
        }
b1fef010   杨鑫   '最新代码'
263
      },
8550d958   杨鑫   '最新'
264
265
      data() {
        return {
eb438c24   wesley88   1
266
267
268
          ontype: "1",
          formSel: {
            yytime: ''
8550d958   杨鑫   '最新'
269
          },
eb438c24   wesley88   1
270
271
272
273
274
275
276
277
278
279
280
281
282
          formInline: {
            followUpTime: '', //跟进时间
            followUpType: '', //跟进类型
            customerLevel: '',
            potentialCustomer: '', //意向客户
            intendedResource: '', //意向资源
            currentStage: '', //当前阶段
            contentFeedback: '', //内容反馈
            onSitePhotos: '', //现场照片
            plan_Time: null,
            nextFollowUpStartTime: '', //下次跟进开始时间
            nextFollowUpEndTime: '', //下次跟进结束时间
            status: '1' //状态
b1fef010   杨鑫   '最新代码'
283
          },
eb438c24   wesley88   1
284
285
          addziyuanData: [],
          ziyuanData: [], //资源
b1fef010   杨鑫   '最新代码'
286
          morenCard: new Date(),
eb438c24   wesley88   1
287
288
289
          multipleSelection: [],
          addziyuan: false,
          pageSize: 10,
b1fef010   杨鑫   '最新代码'
290
291
          currentPage: 1,
          total: 0,
eb438c24   wesley88   1
292
          ggXin: false,
b1fef010   杨鑫   '最新代码'
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
          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   杨鑫   '最新代码'
326
327
            pageNumber: 0,
            pageSize: 10,
eb438c24   wesley88   1
328
329
330
331
332
333
334
335
336
            potentialCustomer: null
          },
          zipageindex: {
            pageNumber: 0,
            pageSize: 10,
          },
          tableData: [],
          msgEit: false,
          imgList: []
8550d958   杨鑫   '最新'
337
338
339
340
341
        }
      },
      created() {
  
      },
b1fef010   杨鑫   '最新代码'
342
343
344
345
      mounted() {
        this.pageindex.potentialCustomer = this.message
        this.getAll()
      },
eb438c24   wesley88   1
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
      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   杨鑫   '最新'
363
  
eb438c24   wesley88   1
364
365
366
          if (typeof item.onSitePhotos == 'string') {
            this.imgList = item.onSitePhotos.split(',') || []
          }
4e955529   杨鑫   '1'
367
  
eb438c24   wesley88   1
368
369
370
          this.ontype = '3'
        },
        onSubmit() {
b1fef010   杨鑫   '最新代码'
371
372
          this.morenCard = this.formSel.yytime
          this.getAll()
eb438c24   wesley88   1
373
374
        },
        resetting() {
b1fef010   杨鑫   '最新代码'
375
376
377
          this.morenCard = new Date()
          this.formSel.yytime = ''
          this.getAll()
eb438c24   wesley88   1
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
        },
        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   杨鑫   '最新代码'
406
          }
eb438c24   wesley88   1
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
        },
        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   杨鑫   '最新代码'
428
  
b1fef010   杨鑫   '最新代码'
429
  
eb438c24   wesley88   1
430
431
432
433
434
435
436
437
438
439
440
441
442
443
          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版'
444
  
eb438c24   wesley88   1
445
446
          this.formInline.nextFollowUpStartTime = e[0]
          this.formInline.nextFollowUpEndTime = e[1]
cfcb44ef   杨鑫   '改bug版'
447
  
eb438c24   wesley88   1
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
        },
        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版'
473
              }
eb438c24   wesley88   1
474
475
476
477
478
479
480
              console.log(this.formInline)
              // return
              genAdd(this.formInline).then(() => {
                this.ontype = '1'
                this.addziyuanData = []
                this.getAll()
              })
cfcb44ef   杨鑫   '改bug版'
481
  
eb438c24   wesley88   1
482
483
484
485
486
487
488
489
490
491
492
            } else {
              this.$message({
                message: '请填写完整信息',
                type: 'error'
              })
  
            }
          })
  
        },
      }
8550d958   杨鑫   '最新'
493
494
495
496
497
498
499
    }
  </script>
  
  <style lang="scss" scoped>
    ::v-deep .el-calendar button-group {
      display: none;
    }
eb438c24   wesley88   1
500
  
b1fef010   杨鑫   '最新代码'
501
502
    .zhuti {
      padding: 0 20px 20px 20px;
eb438c24   wesley88   1
503
     min-height: calc(100vh - 50px - 20px);
b1fef010   杨鑫   '最新代码'
504
      background-color: #fff;
eb438c24   wesley88   1
505
      box-sizing: border-box;
b1fef010   杨鑫   '最新代码'
506
507
508
509
510
511
512
513
514
515
    }
  
    .formSearch {
  
      display: flex;
      width: 100%;
      font-size: 14px;
      justify-content: space-between;
  
    }
eb438c24   wesley88   1
516
517
518
519
520
521
522
523
524
525
526
527
  
    ::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   杨鑫   '最新'
528
  </style>