Blame view

admin-web-master/src/views/customer/rsaManagement/tanpan.vue 14.6 KB
b1fef010   杨鑫   '最新代码'
1
  <template>
eb438c24   wesley88   1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
    <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>
  
  
          </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>
eb438c24   wesley88   1
26
27
28
29
30
31
32
33
34
35
36
37
  
        </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)">
8dca79c8   杨鑫   1
38
                  <div style="font-size:12px;margin-top:10px;">
eb438c24   wesley88   1
39
40
41
42
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
                    {{item.negotiationTime == data.day?item.negotiationResult:''}}
                  </div>
                </div>
              </div>
            </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>
          <el-form ref="tanform" :model="formInline" :rules="rulesOne" label-width="120px">
            <el-form-item label="谈判时间" prop="negotiationTime">
              <el-date-picker  v-model="formInline.negotiationTime" type="date"
                value-format="yyyy-MM-dd" placeholder="选择日期" style="width: 100%;">
              </el-date-picker>
            </el-form-item>
            <el-form-item label="谈判主题" prop="negotiationTheme" >
              <el-input v-model="formInline.negotiationTheme" ></el-input>
            </el-form-item>
            <el-form-item label="标段号" prop="bidSegmentNumber" >
              <el-input v-model="formInline.bidSegmentNumber" ></el-input>
            </el-form-item>
b1fef010   杨鑫   '最新代码'
70
71
  
            <el-form-item label="会议纪要" prop="meetingMinutes">
eb438c24   wesley88   1
72
              <el-input type="textarea" v-model="formInline.meetingMinutes" :rows="4" ></el-input>
b1fef010   杨鑫   '最新代码'
73
74
            </el-form-item>
            <el-form-item label="谈判内容" prop="negotiationContent">
eb438c24   wesley88   1
75
              <el-input type="textarea" v-model="formInline.negotiationContent" :rows="4" ></el-input>
b1fef010   杨鑫   '最新代码'
76
77
            </el-form-item>
            <el-form-item label="谈判结果" prop="negotiationResult">
eb438c24   wesley88   1
78
              <el-input type="textarea" v-model="formInline.negotiationResult" :rows="4" ></el-input>
b1fef010   杨鑫   '最新代码'
79
80
            </el-form-item>
            <el-form-item label="当前阶段" prop="currentStage">
eb438c24   wesley88   1
81
              <el-select v-model="formInline.currentStage" placeholder="请选择" style="width:100%" >
b1fef010   杨鑫   '最新代码'
82
83
84
85
86
                <el-option label="继续跟进" value="继续跟进" />
                <el-option label="达成共识" value="达成共识" />
              </el-select>
            </el-form-item>
            <el-form-item label="其他附件" prop="otherAttachments">
eb438c24   wesley88   1
87
88
              <upfile filePath="yixiang" inputtype="otherAttachments" :value="formInline.otherAttachments"
                 accept=".docx" @changimg="e=>changimg(e,'otherAttachments')"></upfile>
b1fef010   杨鑫   '最新代码'
89
            </el-form-item>
eb438c24   wesley88   1
90
            <el-form-item label="现场照片">
b1fef010   杨鑫   '最新代码'
91
              <upimg filePath="yixiang" inputtype="onSitePhotos" :value="formInline.onSitePhotos"
eb438c24   wesley88   1
92
                @changimg="e=>changimg(e,'onSitePhotos')" :limit="3" ></upimg>
b1fef010   杨鑫   '最新代码'
93
94
95
96
  
            </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"
eb438c24   wesley88   1
97
98
                 type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"
                align="right" @change="changeNext">
b1fef010   杨鑫   '最新代码'
99
100
              </el-date-picker>
            </el-form-item>
cf438595   wesley88   1
101
102
103
104
105
106
107
108
109
110
111
            <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>
b1fef010   杨鑫   '最新代码'
112
          </el-form>
eb438c24   wesley88   1
113
        </div>
eb438c24   wesley88   1
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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
      </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>
        <div>
          <el-form ref="tanform" :model="formInline"  label-width="120px">
            <el-form-item label="谈判时间" prop="negotiationTime">
              <div class="duiqi">{{formInline.negotiationTime  || '无'}}</div>
            </el-form-item>
            <el-form-item label="谈判主题" prop="negotiationTheme" >
              <div class="duiqi">{{formInline.negotiationTheme  || '无'}}</div>
            </el-form-item>
            <el-form-item label="标段号" prop="bidSegmentNumber" >
              <div class="duiqi">{{formInline.bidSegmentNumber  || '无'}}</div>
            </el-form-item>
  
            <el-form-item label="会议纪要" prop="meetingMinutes">
              <div class="duiqi">{{formInline.meetingMinutes  || '无'}}</div>
            </el-form-item>
            <el-form-item label="谈判内容" prop="negotiationContent">
              <div class="duiqi">{{formInline.negotiationContent  || '无'}}</div>
            </el-form-item>
            <el-form-item label="谈判结果" prop="negotiationResult">
              <div class="duiqi">{{formInline.negotiationResult  || '无'}}</div>
            </el-form-item>
            <el-form-item label="当前阶段" prop="currentStage">
              <div class="duiqi">{{formInline.currentStage  || '无'}}</div>
            </el-form-item>
            <el-form-item label="其他附件" prop="otherAttachments">
              <div class="duiqi greens"
                @click="formInline.otherAttachments?openfile(formInline.otherAttachments):''">
                {{formInline.otherAttachments?'查看详情':'暂无文件'}}</div>
            </el-form-item>
            <el-form-item label="现场照片">
              <div style="display:flex;flex-wrap: wrap">
                <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>
              </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[0]+' 至 '+formInline.plan_Time[1]:'无':'无'}}</div>
            </el-form-item>
          </el-form>
cf438595   wesley88   1
161
162
163
164
165
          <div>
            <el-button class="buttonHover" style="color: #606266;border: 1px solid #dddfe5;background-color: #fff;"
              @click="closeFn">返回
            </el-button>
          </div>
eb438c24   wesley88   1
166
        </div>
cf438595   wesley88   1
167
  
eb438c24   wesley88   1
168
169
      </div>
    </div>
b1fef010   杨鑫   '最新代码'
170
171
172
173
  </template>
  
  <script>
    import {
eb438c24   wesley88   1
174
175
176
177
      tanGetAll,
      tanAdd,
      tanEdit,
      tanDel,
b1fef010   杨鑫   '最新代码'
178
179
180
    } from '../../../api/inr.js'
    import upimg from "@/components/ImageUpload/index"
    import upfile from "@/components/fujianUpload/fujianList"
c3f8e431   wesley88   1
181
    import allimg from '@/components/chakan/allimg.vue';
b1fef010   杨鑫   '最新代码'
182
    import {
eb438c24   wesley88   1
183
      getAlls
b1fef010   杨鑫   '最新代码'
184
185
186
187
188
189
190
    } from '../../../api/information.js'
    import {
      getAlls as map1
    } from '../../../api/map1'
    export default {
      components: {
        upimg,
c3f8e431   wesley88   1
191
192
        upfile,
        allimg
b1fef010   杨鑫   '最新代码'
193
      },
eb438c24   wesley88   1
194
195
196
197
198
199
200
      props: {
        message: {
          type: Number, // 指定数据的类型
          required: true, // 指定该数据是必需的
          default: null, // 指定默认值
        }
      },
b1fef010   杨鑫   '最新代码'
201
202
      data() {
        return {
eb438c24   wesley88   1
203
204
205
          ontype:'1',
          formSel: {
            yytime: ''
b1fef010   杨鑫   '最新代码'
206
          },
eb438c24   wesley88   1
207
208
209
210
211
212
213
214
215
216
217
218
219
          formInline: {
            negotiationTime: '',
            negotiationTheme: '',
            bidSegmentNumber: '',
            meetingMinutes: '',
            negotiationContent: '',
            negotiationResult: '',
            otherAttachments: '',
            onSitePhotos: '',
            nextNegotiationStartTime: '',
            nextNegotiationEndTime: '',
            potentialCustomer: '',
            plan_Time: [],
b1fef010   杨鑫   '最新代码'
220
          },
eb438c24   wesley88   1
221
          addziyuanData: [],
b1fef010   杨鑫   '最新代码'
222
223
  
          morenCard: new Date(),
eb438c24   wesley88   1
224
          pageSize: 10,
b1fef010   杨鑫   '最新代码'
225
226
          currentPage: 1,
          total: 0,
eb438c24   wesley88   1
227
          ggXin: false,
b1fef010   杨鑫   '最新代码'
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
          rulesOne: {
            negotiationTime: [{
              required: true,
              message: '请选择谈判时间',
              trigger: 'change'
            }, ],
            negotiationTheme: [{
              required: true,
              message: '请输入谈判主题',
              trigger: 'blur'
            }],
            bidSegmentNumber: [{
              required: true,
              message: '请输入标段号',
              trigger: 'blur'
            }],
            meetingMinutes: [{
              required: true,
              message: '请输入会议纪要',
              trigger: 'blur'
            }, ],
            negotiationResult: [{
              required: true,
              message: '请输入谈判结果',
              trigger: 'blur'
            }],
            otherAttachments: [{
              required: true,
              message: '请选择其他附件',
              trigger: 'change'
            }, ],
          },
          pageindex: {
b1fef010   杨鑫   '最新代码'
261
262
            pageNumber: 0,
            pageSize: 10,
eb438c24   wesley88   1
263
264
265
266
267
268
269
270
271
            potentialCustomer: null
          },
          zipageindex: {
            pageNumber: 0,
            pageSize: 10,
          },
          tableData: [],
          msgEit: false,
          imgList: []
b1fef010   杨鑫   '最新代码'
272
273
274
275
276
277
278
279
280
        }
      },
      created() {
  
      },
      mounted() {
        this.pageindex.potentialCustomer = this.message
        this.getAll()
      },
eb438c24   wesley88   1
281
282
283
284
285
286
287
288
      methods: {
        openfile(e) {
          if (e) {
            const fullUrl = this.$baseURL + e;
            try {
              window.open(fullUrl, '_blank'); // 在新标签页中打开文件
            } catch (error) {
              console.error('打开文件失败:', error);
b1fef010   杨鑫   '最新代码'
289
            }
eb438c24   wesley88   1
290
291
292
293
294
295
296
297
298
          } else {
            console.error('无文件可查看');
          }
        },
        changimg(e, type) {
          // if(type == 'onSitePhotos'){
          //   this.imgList.push(e)
          // }
          this.formInline[type] = e
b1fef010   杨鑫   '最新代码'
299
  
eb438c24   wesley88   1
300
301
302
303
304
305
306
307
308
309
310
        },
        async getAll() {
          const res = await tanGetAll(this.pageindex)
          this.tableData = res.data.content
        },
        genjinMsg(item) {
          
          this.msgEit = true
          this.formInline = {}
          this.formInline = item
          this.formInline.plan_Time = [item.nextNegotiationStartTime, item.nextNegotiationEndTime]
b1fef010   杨鑫   '最新代码'
311
  
eb438c24   wesley88   1
312
313
314
315
316
317
318
319
320
321
322
          if (typeof item.intendedResource == 'string' && item.intendedResource != '') {
            this.addziyuanData = JSON.parse(item.intendedResource)
          }
          if (typeof item.onSitePhotos == 'string') {
            this.imgList = item.onSitePhotos.split(',') || []
          }
  
          this.ggXin = true
          this.ontype = '3'
        },
        onSubmit() {
b1fef010   杨鑫   '最新代码'
323
324
          this.morenCard = this.formSel.yytime
          this.getAll()
eb438c24   wesley88   1
325
326
        },
        resetting() {
b1fef010   杨鑫   '最新代码'
327
328
329
          this.morenCard = new Date()
          this.formSel.yytime = ''
          this.getAll()
eb438c24   wesley88   1
330
        },
b1fef010   杨鑫   '最新代码'
331
  
eb438c24   wesley88   1
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
        genad() {
  
          this.formInline = {
            negotiationTime: '',
            negotiationTheme: '',
            bidSegmentNumber: '',
            meetingMinutes: '',
            negotiationContent: '',
            negotiationResult: '',
            otherAttachments: '',
            onSitePhotos: '',
            nextNegotiationStartTime: '',
            nextNegotiationEndTime: '',
            potentialCustomer: '',
            plan_Time: []
b1fef010   杨鑫   '最新代码'
347
          }
eb438c24   wesley88   1
348
349
350
351
352
353
354
355
          this.ontype = '2'
          // this.msgEit = false
          // this.ggXin = true
          // this.$refs.tanform.resetFields()
        },
        closeGenjin() {
          this.$emit('cancel', false)
        },
b1fef010   杨鑫   '最新代码'
356
357
  
  
eb438c24   wesley88   1
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
        changeNext(e) {
          this.formInline.nextNegotiationStartTime = e[0]
          this.formInline.nextNegotiationEndTime = e[1]
  
        },
  
        closemsg(index) {
          this.addziyuanData.splice(index, 1);
        },
        closeFn(val) {
          this.formInline.plan_Time = []
  
          // this.ggXin = false
           this.ontype = '1'
        },
        // 新增确定按钮
        addCheck(val) {
  
          this.$refs.tanform.validate((valid) => {
            if (valid) {
              this.formInline.potentialCustomer = this.message
              // this.formInline.onSitePhotos  =  this.imgList.join(',')
              if (this.formInline.currentStage == '达成共识') {
                this.formInline.status = '2'
              }
              tanAdd(this.formInline).then(() => {
                // this.ggXin = false
                this.getAll()
                this.ontype = '1'
              })
            } else {
              this.$message({
                message: '请填写完整信息',
                type: 'error'
              })
  
            }
          })
  
        },
      }
b1fef010   杨鑫   '最新代码'
399
400
401
402
403
404
405
    }
  </script>
  
  <style lang="scss" scoped>
    ::v-deep .el-calendar button-group {
      display: none;
    }
eb438c24   wesley88   1
406
  
b1fef010   杨鑫   '最新代码'
407
408
409
410
411
412
413
414
415
416
417
418
419
420
    .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;
  
    }
eb438c24   wesley88   1
421
  
b1fef010   杨鑫   '最新代码'
422
423
424
    .greens {
      color: #3F9B6A;
    }
eb438c24   wesley88   1
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
  
    ::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;
    }
  
    ::v-deep .el-backtop,
    .el-calendar-table td.is-today {
      color: #3F9B6A;
    }
  
    ::v-deep .el-calendar-table .el-calendar-day {
      min-height: 85px;
    }
b1fef010   杨鑫   '最新代码'
446
  </style>