Blame view

admin-web-master/src/views/shopRental/manage/index.vue 14 KB
3f535f30   杨鑫   '初始'
1
2
  <template>
    <div style="background-color:#f7f7f7;padding:10px 10px;">
93c8bac5   李宇   1
3
      <div class="zhuti" v-if="onaction == '1'">
3f535f30   杨鑫   '初始'
4
5
6
7
8
9
10
11
        <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>
          <!-- 搜索 -->
          <div class="formSearch">
93c8bac5   李宇   1
12
            <el-form :inline="true" :model="pagequery">
4373acf5   wesley88   1
13
              <el-form-item label="合同名称">
93c8bac5   李宇   1
14
                <el-input v-model="pagequery.contractName" placeholder="请输入" style="width:168px;" />
3f535f30   杨鑫   '初始'
15
              </el-form-item>
3f535f30   杨鑫   '初始'
16
            </el-form>
8550d958   杨鑫   '最新'
17
  
3f535f30   杨鑫   '初始'
18
19
20
21
22
23
24
25
26
            <div>
              <el-button @click="onSubmit" style="background-color: #3F9B6A;color: #fff">查询
              </el-button>
              <el-button @click="resetting" class="buttonHover"
                style="color: #606266;border: 1px solid #dddfe5;background-color: #fff;">重置
              </el-button>
            </div>
          </div>
          <div style="margin-bottom: 20px;">
93c8bac5   李宇   1
27
            <el-button @click="removeonaction('2')" style="background-color: #3F9B6A;color: #fff;padding:8px 15px;"
3f535f30   杨鑫   '初始'
28
29
30
31
32
              icon="el-icon-circle-plus-outline">新增</el-button>
            <!-- <el-button @click="" style="background-color: #3F9B6A;color: #fff">批量导入</el-button> -->
          </div>
          <!-- 表格 -->
  
93c8bac5   李宇   1
33
          <el-table :data="tableData"
3f535f30   杨鑫   '初始'
34
            :header-cell-style="{fontSize: '14px',color:'#0009',fontWeight: 'normal',backgroundColor:'#F2F3F5'}">
900ab311   李宇   1
35
            <el-table-column label="合同名称">
3f535f30   杨鑫   '初始'
36
              <template slot-scope="scope">
fb82c607   李宇   1
37
                {{scope.row.contractName}}
3f535f30   杨鑫   '初始'
38
39
40
  
              </template>
            </el-table-column>
900ab311   李宇   1
41
            <el-table-column label="合同金额">
93c8bac5   李宇   1
42
              <template slot-scope="scope">
fb82c607   李宇   1
43
                {{scope.row.contractAmount}}
3f535f30   杨鑫   '初始'
44
  
93c8bac5   李宇   1
45
              </template>
3f535f30   杨鑫   '初始'
46
            </el-table-column>
900ab311   李宇   1
47
            <el-table-column label="签订日期">
93c8bac5   李宇   1
48
              <template slot-scope="scope">
900ab311   李宇   1
49
                {{scope.row.contractSigningDate}}
3f535f30   杨鑫   '初始'
50
  
93c8bac5   李宇   1
51
              </template>
3f535f30   杨鑫   '初始'
52
            </el-table-column>
900ab311   李宇   1
53
            <el-table-column label="终止日期">
3f535f30   杨鑫   '初始'
54
              <template slot-scope="scope">
900ab311   李宇   1
55
                {{scope.row.contractTerminationDate}}
3f535f30   杨鑫   '初始'
56
57
58
  
              </template>
            </el-table-column>
900ab311   李宇   1
59
            <el-table-column label="姓名">
93c8bac5   李宇   1
60
              <template slot-scope="scope">
900ab311   李宇   1
61
                {{scope.row.tenantName}}
3f535f30   杨鑫   '初始'
62
  
93c8bac5   李宇   1
63
              </template>
3f535f30   杨鑫   '初始'
64
            </el-table-column>
900ab311   李宇   1
65
            <el-table-column label="联系电话">
3f535f30   杨鑫   '初始'
66
              <template slot-scope="scope">
900ab311   李宇   1
67
                {{scope.row.tenantTelephone}}
3f535f30   杨鑫   '初始'
68
69
70
  
              </template>
            </el-table-column>
3f535f30   杨鑫   '初始'
71
            </el-table-column>
900ab311   李宇   1
72
            <el-table-column label="合同类型">
3f535f30   杨鑫   '初始'
73
              <template slot-scope="scope">
900ab311   李宇   1
74
                {{scope.row.contractType}}
3f535f30   杨鑫   '初始'
75
76
77
  
              </template>
            </el-table-column>
900ab311   李宇   1
78
            <el-table-column prop="dataStatus" label="合同状态">
3f535f30   杨鑫   '初始'
79
              <template slot-scope="scope">
900ab311   李宇   1
80
81
82
83
                <span v-if='scope.row.dataStatus == 1'>使用中</span>
                <span v-else-if='scope.row.dataStatus == 2'>往期合同</span>
                <span v-else-if='scope.row.dataStatus == 3'>已终止</span>
                <span v-else>-</span>
3f535f30   杨鑫   '初始'
84
85
86
              </template>
            </el-table-column>
  
900ab311   李宇   1
87
88
            <el-table-column label="操作" min-width="150" fixed="right">
              <template slot-scope="scope">
3f535f30   杨鑫   '初始'
89
                <div @click="details(scope.row)" class="tableBtn greens">查看</div>
4373acf5   wesley88   1
90
91
92
                <div v-if='scope.row.dataStatus == 1' @click="removeinfo(scope.row,'合同变更')" class="tableBtn greens">合同变更</div>
                <div v-if='scope.row.dataStatus == 1' @click="removeinfo(scope.row,'合同续约')" class="tableBtn greens">合同续约</div>
                <div v-if='scope.row.dataStatus == 1' @click="removeinfozz(scope.row,'合同终止')" class="tableBtn greens">合同终止</div>
900ab311   李宇   1
93
94
                <!-- <div @click="handleDelete(scope.row)" class="tableBtn greens">删除</div> -->
              </template>
3f535f30   杨鑫   '初始'
95
96
            </el-table-column>
          </el-table>
93c8bac5   李宇   1
97
98
          <div style="display: flex;justify-content: space-between;" class="bom">
            <div style="font-size: 14px;">共 <span style="color: #3F9B6A;">{{total}}</span> 项数据</div>
4373acf5   wesley88   1
99
100
            <el-pagination :current-page="pagequery.pageNumber+1" :page-sizes="[10, 20, 50, 100]" :page-size="10"
              background small layout="prev, pager, next" :total="total" @size-change="handleSizeChange"
93c8bac5   李宇   1
101
102
              @current-change="handleCurrentChange">
            </el-pagination>
3f535f30   杨鑫   '初始'
103
          </div>
3f535f30   杨鑫   '初始'
104
  
3f535f30   杨鑫   '初始'
105
106
107
        </div>
  
      </div>
3f535f30   杨鑫   '初始'
108
  
3f535f30   杨鑫   '初始'
109
  
3f535f30   杨鑫   '初始'
110
  
3f535f30   杨鑫   '初始'
111
  
3f535f30   杨鑫   '初始'
112
  
93c8bac5   李宇   1
113
114
115
116
117
118
  
      <div class="zhuti" v-if="onaction == '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>
3f535f30   杨鑫   '初始'
119
  
8550d958   杨鑫   '最新'
120
        <div style="padding: 20px 20px 20px 0;">
93c8bac5   李宇   1
121
          <add :info="formInline" @removeonaction="removeonaction"></add>
8550d958   杨鑫   '最新'
122
123
        </div>
      </div>
900ab311   李宇   1
124
125
126
127
128
129
      <div class="zhuti" v-if="onaction == '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>
4373acf5   wesley88   1
130
          <busCha :info="detailsinfo" @removeonaction="removeonaction"></busCha>
900ab311   李宇   1
131
        </div>
4373acf5   wesley88   1
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
        <!-- <div>
          <el-button class="buttonHover"
            style="color: #606266;border: 1px solid #dddfe5;background-color: #fff;margin-top: 20px;"
            @click="removeonaction('1')">返回</el-button>
        </div> -->
      </div>
      <div class="zhuti" v-if="onaction == '4'">
        <div style="height:58px;line-height:58px;">
          <div style="color:#0006"> <span>合同管理</span> <span style="padding:0 5px;">></span> <span
              style="color:#000000e6">{{contractChangeReason}}</span></div>
        </div>
  
        <div style="padding: 20px 20px 20px 0;">
          <addremove :info="detailsinfo" :contractChangeReason="contractChangeReason" @removeonaction="removeonaction">
          </addremove>
900ab311   李宇   1
147
148
        </div>
      </div>
3f535f30   杨鑫   '初始'
149
150
151
152
153
154
155
    </div>
  
  
  </template>
  
  <script>
    import {
93c8bac5   李宇   1
156
      contractGetAllnew,
4373acf5   wesley88   1
157
158
159
160
161
162
163
    } from '@/api/manage.js'
    import add from '@/components/add/addht.vue'
    import addremove from '@/components/add/addremoveht.vue'
    import busCha from '@/components/buscha/busCha'
    import {
      cereContractInformation
    } from '@/api/commodityLease.js'
3f535f30   杨鑫   '初始'
164
    export default {
3f535f30   杨鑫   '初始'
165
166
      data() {
        return {
4373acf5   wesley88   1
167
168
          contractChangeReason: '',
          detailsinfo: {},
93c8bac5   李宇   1
169
          pagequery: {
4373acf5   wesley88   1
170
            dataStatus:'1',
900ab311   李宇   1
171
            pageNumber: 0,
3f535f30   杨鑫   '初始'
172
            pageSize: 10,
4373acf5   wesley88   1
173
            contractName: ''
3f535f30   杨鑫   '初始'
174
          },
93c8bac5   李宇   1
175
176
177
178
179
180
181
182
183
          tableData: [],
          total: 0,
          onaction: '1',
          formInline: {
            // 合同类型
            contractType: '',
            // 合同编号
            contractNumber: '',
            // 标段号
3f535f30   杨鑫   '初始'
184
            sectionNumber: '',
93c8bac5   李宇   1
185
            // 合同名称
3f535f30   杨鑫   '初始'
186
            contractName: '',
93c8bac5   李宇   1
187
            // 押金
3f535f30   杨鑫   '初始'
188
            earnestMoney: '',
93c8bac5   李宇   1
189
            // 合同签订日期
3f535f30   杨鑫   '初始'
190
            contractSigningDate: '',
93c8bac5   李宇   1
191
            // 合同终止日期
3f535f30   杨鑫   '初始'
192
            contractTerminationDate: '',
93c8bac5   李宇   1
193
            // 起租日期
3f535f30   杨鑫   '初始'
194
            leaseStartDate: '',
93c8bac5   李宇   1
195
196
197
198
199
200
201
            // 付款周期
            paymentCycle: '',
            // 合同金额(租金)
            contractAmount: '',
            // 付款日
            paymentDay: '',
            // 承租人名称
3f535f30   杨鑫   '初始'
202
            tenantName: '',
93c8bac5   李宇   1
203
            // 承租人联系电话
3f535f30   杨鑫   '初始'
204
            tenantTelephone: '',
93c8bac5   李宇   1
205
            // 承租人银行账号
3f535f30   杨鑫   '初始'
206
            tenantBankAccount: '',
93c8bac5   李宇   1
207
208
209
210
            // 关联商家
            relatedMerchants: '',
            // 商铺编号(绑定资源)
            shopNumber: ''
3f535f30   杨鑫   '初始'
211
          },
3f535f30   杨鑫   '初始'
212
213
        }
      },
93c8bac5   李宇   1
214
      components: {
4373acf5   wesley88   1
215
216
217
        add,
        busCha,
        addremove
93c8bac5   李宇   1
218
      },
3f535f30   杨鑫   '初始'
219
220
      created() {
        this.getAll()
3f535f30   杨鑫   '初始'
221
222
      },
      methods: {
4373acf5   wesley88   1
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
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
        gettime() {
          // 获取当前时间
          let currentTime = new Date();
  
          // 获取年份
          let year = currentTime.getFullYear();
  
          // 获取月份(注意月份是从0开始计数的,所以需要加1)
          let month = currentTime.getMonth() + 1;
  
          // 获取日期
          let day = currentTime.getDate();
  
          // 获取小时
          let hours = currentTime.getHours();
  
          // 获取分钟
          let minutes = currentTime.getMinutes();
  
          // 获取秒数
          let seconds = currentTime.getSeconds();
  
          // 获取毫秒数
          let milliseconds = currentTime.getMilliseconds();
  
          // 格式化时间为 YYYY-MM-DD
          let formattedDate = `${year}-${month.toString().padStart(2, '0')}-${day.toString().padStart(2, '0')}`;
  
          // 格式化时间为 HH:MM:SS
          let formattedTime =
            `${hours.toString().padStart(2, '0')}:${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}`;
  
          // 格式化时间为 YYYY-MM-DD HH:MM:SS
          let formattedDateTime = `${formattedDate} ${formattedTime}`;
          return formattedDateTime
  
        },
        removeinfozz(row, e) {
          let that = this
          this.$confirm('确定要终止合同吗?', '提示', {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
            type: 'warning'
          }).then(() => {
            cereContractInformation({
              ...row,
              contractChangeReason: e,
              dataStatus: '3',
              originalContractCode: row.contractNumber,
              updateDate: that.gettime(),
              createDate: that.gettime(),
              contractChangeTime: that.gettime(),
              updateUser:localStorage.getItem('roleName')
            }).then(res => {
              console.error(res)
              if (res.code == 200) {
                this.$message({
                  message: '终止成功',
                  type: 'success'
                })
                this.$emit('removeonaction', '1')
              } else {
                this.$message({
                  message: res.msg,
                  type: 'error'
                })
              }
  
            })
          })
        },
900ab311   李宇   1
294
295
296
297
        details(row) {
          this.detailsinfo = row
          this.onaction = '3'
        },
4373acf5   wesley88   1
298
299
300
301
        removeinfo(row, e) {
          this.contractChangeReason = e
          this.detailsinfo = row
          this.onaction = '4'
900ab311   李宇   1
302
        },
93c8bac5   李宇   1
303
304
        async getAll() {
          const res = await contractGetAllnew(this.pagequery)
3f535f30   杨鑫   '初始'
305
          this.tableData = res.data.content
900ab311   李宇   1
306
          this.total = res.data.totalElements
3f535f30   杨鑫   '初始'
307
        },
93c8bac5   李宇   1
308
309
310
        removeonaction(e) {
          console.error(e)
          this.onaction = e
4373acf5   wesley88   1
311
312
          this.pagequery.pageNumber = 0
          this.getAll()
3f535f30   杨鑫   '初始'
313
314
        },
        handleCurrentChange(val) {
4373acf5   wesley88   1
315
          this.pagequery.pageNumber = val - 1
900ab311   李宇   1
316
          this.getAll()
3f535f30   杨鑫   '初始'
317
        },
93c8bac5   李宇   1
318
319
        handleSizeChange(val) {
          this.pagequery.pageSize = val
3f535f30   杨鑫   '初始'
320
        },
4373acf5   wesley88   1
321
        // 查询按钮
3f535f30   杨鑫   '初始'
322
        async onSubmit() {
900ab311   李宇   1
323
          this.pagequery.pageNumber = 0
93c8bac5   李宇   1
324
          this.getAll()
3f535f30   杨鑫   '初始'
325
326
327
        },
        //重置按钮
        resetting() {
93c8bac5   李宇   1
328
          this.pagequery = {
900ab311   李宇   1
329
              pageNumber: 0,
93c8bac5   李宇   1
330
              pageSize: 10,
4373acf5   wesley88   1
331
332
              dataStatus:'1',
              contractName: ''
93c8bac5   李宇   1
333
            },
3f535f30   杨鑫   '初始'
334
335
            this.getAll()
        },
3f535f30   杨鑫   '初始'
336
      }
93c8bac5   李宇   1
337
  
3f535f30   杨鑫   '初始'
338
339
340
341
    }
  </script>
  
  <style scoped>
93c8bac5   李宇   1
342
    .el-table {
900ab311   李宇   1
343
      /* height: calc(100vh - 330px); */
93c8bac5   李宇   1
344
    }
900ab311   李宇   1
345
  
3f535f30   杨鑫   '初始'
346
347
348
349
350
351
352
353
354
355
356
357
358
    .zhuti {
      padding: 0 20px 20px 20px;
      min-height: calc(100vh - 50px - 20px);
      background-color: #Fff;
  
    }
  
    .chengeXia {
      border-bottom: 6px solid #3F9B6A;
      padding-bottom: 4px;
      color: #3F9B6A;
    }
  
93c8bac5   李宇   1
359
    /* /deep/ .el-form-item__content {
3f535f30   杨鑫   '初始'
360
      line-height: 0;
93c8bac5   李宇   1
361
    } */
3f535f30   杨鑫   '初始'
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
  
    .tableBtn {
      display: inline-block;
      margin-right: 10px;
      color: #ACACAC;
    }
  
    .formSearch {
      display: flex;
      width: 100%;
      font-size: 14px;
      justify-content: space-between;
    }
  
    .greens {
      color: #3F9B6A;
    }
  
    /deep/ .el-table__row {
      font-size: 14px;
      color: #000000e6;
      height: 42px;
    }
  
    .fenye {
      margin-top: 20px;
      display: flex;
8550d958   杨鑫   '最新'
389
      justify-content: space-between;
3f535f30   杨鑫   '初始'
390
391
392
393
394
395
    }
  
    /deep/ .el-pagination.is-background .el-pager li:not(.disabled).active {
      background-color: #3F9B6A;
    }
  
3f535f30   杨鑫   '初始'
396
  
3f535f30   杨鑫   '初始'
397
398
399
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
  
    .el-col {
      border-radius: 4px;
    }
  
    .bg-purple-dark {
      background: #99a9bf;
    }
  
    .bg-purple {
      background: #d3dce6;
    }
  
    .bg-purple-light {
      background: #e5e9f2;
    }
  
    .grid-content {
      border-radius: 4px;
      min-height: 36px;
    }
  
    .row-bg {
      padding: 10px 0;
      background-color: #f9fafc;
    }
  
    /deep/ .bg-purple[data-v-0e3fe4ec] {
      background: #fff;
      height: 50px;
    }
  
    /deep/ .bg-purple[data-v-3bebae82] {
      background: #fff;
      height: 50px;
    }
  
    ::v-deep .bg-purple {
      background: #fff;
      height: 50px;
    }
  
    /deep/ .el-form--label-top .el-form-item__label {
      padding: 0;
    }
  
    ::v-deep .el-dialog__wrapper {
      .el-dialog__header {
        background-color: #fff;
      }
    }
  
8550d958   杨鑫   '最新'
449
  
3f535f30   杨鑫   '初始'
450
451
452
453
454
455
456
457
  
    .dialog-footer {
      display: flex;
      justify-content: flex-end;
      border-top: solid rgba(209, 209, 209, 0.2) 2px;
      padding-top: 20px;
    }
  
3f535f30   杨鑫   '初始'
458
  
3f535f30   杨鑫   '初始'
459
  
3f535f30   杨鑫   '初始'
460
461
462
463
464
  
    .el-select-dropdown__item.selected {
      color: #3F9B6A;
    }
  
93c8bac5   李宇   1
465
466
467
468
    ::v-deep .el-dialog__title {
      color: #000;
    }
  
3f535f30   杨鑫   '初始'
469
470
471
472
473
474
    ::v-deep .el-dialog__wrapper {
  
      .dialog_css {
        margin-right: 12px;
        margin-top: 61px !important;
  
3f535f30   杨鑫   '初始'
475
476
477
478
479
480
481
482
483
      }
  
      .diaslog_zhong {
        margin-left: 222px;
        margin-top: 61px !important;
      }
  
    }
  
3f535f30   杨鑫   '初始'
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
    /deep/ .el-table_1_column_8 .hetong {
      color: #7DBB9A;
      text-decoration: underline;
    }
  
    /deep/ .first-column-bg {
      background-color: #FAFAFA !important;
    }
  
    .el-table tr {
      height: 56px;
    }
  
    ::v-deep .table3 {
      .el-table__empty-block {
        display: none;
      }
    }
  
    ::v-deep .textarea {
      width: 85%;
  
      .el-textarea__inner {
        width: 100%;
      }
    }
  
    ::v-deep .el-button--mini {
      padding: 7px 10px;
    }
  
    ::v-deep .pass_input {
      width: 100%;
  
      .el-input__inner {
        border: none;
        padding: 0;
      }
    }
  
    ::v-deep .pass_select {
      width: 100%;
  
      .el-input__inner {
        border: none;
        padding: 0;
      }
  
      .el-icon-arrow-up:before {
        content: ''
      }
  
    }
  
    /deep/ .el-table--enable-row-hover .el-table__body tr:hover>td.el-table__cell {
      background-color: #fff;
    }
  </style>
  <style lang="scss" scoped>
93c8bac5   李宇   1
543
544
545
    ::v-deep .el-dialog__body {
      padding: 0 0 !important;
    }
3f535f30   杨鑫   '初始'
546
  
118fc86d   wesley88   1
547
  
3f535f30   杨鑫   '初始'
548
  </style>