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>
|
900ab311
李宇
1
|
71
|
<el-table-column label="合同类型">
|
3f535f30
杨鑫
'初始'
|
72
|
<template slot-scope="scope">
|
900ab311
李宇
1
|
73
|
{{scope.row.contractType}}
|
3f535f30
杨鑫
'初始'
|
74
75
76
|
</template>
</el-table-column>
|
900ab311
李宇
1
|
77
|
<el-table-column prop="dataStatus" label="合同状态">
|
3f535f30
杨鑫
'初始'
|
78
|
<template slot-scope="scope">
|
900ab311
李宇
1
|
79
80
81
82
|
<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
杨鑫
'初始'
|
83
84
85
|
</template>
</el-table-column>
|
900ab311
李宇
1
|
86
87
|
<el-table-column label="操作" min-width="150" fixed="right">
<template slot-scope="scope">
|
3f535f30
杨鑫
'初始'
|
88
|
<div @click="details(scope.row)" class="tableBtn greens">查看</div>
|
4373acf5
wesley88
1
|
89
90
91
|
<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
|
92
93
|
<!-- <div @click="handleDelete(scope.row)" class="tableBtn greens">删除</div> -->
</template>
|
3f535f30
杨鑫
'初始'
|
94
95
|
</el-table-column>
</el-table>
|
93c8bac5
李宇
1
|
96
97
|
<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
|
98
99
|
<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
|
100
101
|
@current-change="handleCurrentChange">
</el-pagination>
|
3f535f30
杨鑫
'初始'
|
102
|
</div>
|
3f535f30
杨鑫
'初始'
|
103
|
|
3f535f30
杨鑫
'初始'
|
104
105
106
|
</div>
</div>
|
3f535f30
杨鑫
'初始'
|
107
|
|
3f535f30
杨鑫
'初始'
|
108
|
|
3f535f30
杨鑫
'初始'
|
109
|
|
3f535f30
杨鑫
'初始'
|
110
|
|
3f535f30
杨鑫
'初始'
|
111
|
|
93c8bac5
李宇
1
|
112
113
114
115
116
117
|
<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
杨鑫
'初始'
|
118
|
|
8550d958
杨鑫
'最新'
|
119
|
<div style="padding: 20px 20px 20px 0;">
|
93c8bac5
李宇
1
|
120
|
<add :info="formInline" @removeonaction="removeonaction"></add>
|
8550d958
杨鑫
'最新'
|
121
122
|
</div>
</div>
|
900ab311
李宇
1
|
123
124
125
126
127
128
|
<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
|
129
|
<busCha :info="detailsinfo" @removeonaction="removeonaction"></busCha>
|
900ab311
李宇
1
|
130
|
</div>
|
4373acf5
wesley88
1
|
131
132
133
134
135
136
137
138
139
140
141
142
143
|
<!-- <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;">
|
9a707dae
wesley88
1
|
144
145
146
|
<!-- <addremove :info="detailsinfo" :contractChangeReason="contractChangeReason" @removeonaction="removeonaction">
</addremove> -->
<add :info="detailsinfo" :contractChangeReason="contractChangeReason" @removeonaction="removeonaction"></add>
|
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
|
tableData: [],
total: 0,
onaction: '1',
|
9a707dae
wesley88
1
|
178
|
formInline: {},
|
3f535f30
杨鑫
'初始'
|
179
180
|
}
},
|
93c8bac5
李宇
1
|
181
|
components: {
|
4373acf5
wesley88
1
|
182
183
184
|
add,
busCha,
addremove
|
93c8bac5
李宇
1
|
185
|
},
|
3f535f30
杨鑫
'初始'
|
186
187
|
created() {
this.getAll()
|
3f535f30
杨鑫
'初始'
|
188
189
|
},
methods: {
|
4373acf5
wesley88
1
|
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
|
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'
})
|
6abe0316
wesley88
1
|
250
251
|
// this.$emit('removeonaction', '1')
this.getAll()
|
4373acf5
wesley88
1
|
252
253
254
255
256
257
258
259
260
261
|
} else {
this.$message({
message: res.msg,
type: 'error'
})
}
})
})
},
|
900ab311
李宇
1
|
262
263
264
265
|
details(row) {
this.detailsinfo = row
this.onaction = '3'
},
|
4373acf5
wesley88
1
|
266
267
|
removeinfo(row, e) {
this.contractChangeReason = e
|
9a707dae
wesley88
1
|
268
|
// console.error(this.contractChangeReason)
|
4373acf5
wesley88
1
|
269
270
|
this.detailsinfo = row
this.onaction = '4'
|
900ab311
李宇
1
|
271
|
},
|
93c8bac5
李宇
1
|
272
273
|
async getAll() {
const res = await contractGetAllnew(this.pagequery)
|
3f535f30
杨鑫
'初始'
|
274
|
this.tableData = res.data.content
|
900ab311
李宇
1
|
275
|
this.total = res.data.totalElements
|
3f535f30
杨鑫
'初始'
|
276
|
},
|
93c8bac5
李宇
1
|
277
278
279
|
removeonaction(e) {
console.error(e)
this.onaction = e
|
4373acf5
wesley88
1
|
280
281
|
this.pagequery.pageNumber = 0
this.getAll()
|
3f535f30
杨鑫
'初始'
|
282
283
|
},
handleCurrentChange(val) {
|
4373acf5
wesley88
1
|
284
|
this.pagequery.pageNumber = val - 1
|
900ab311
李宇
1
|
285
|
this.getAll()
|
3f535f30
杨鑫
'初始'
|
286
|
},
|
93c8bac5
李宇
1
|
287
288
|
handleSizeChange(val) {
this.pagequery.pageSize = val
|
3f535f30
杨鑫
'初始'
|
289
|
},
|
4373acf5
wesley88
1
|
290
|
// 查询按钮
|
3f535f30
杨鑫
'初始'
|
291
|
async onSubmit() {
|
900ab311
李宇
1
|
292
|
this.pagequery.pageNumber = 0
|
93c8bac5
李宇
1
|
293
|
this.getAll()
|
3f535f30
杨鑫
'初始'
|
294
295
296
|
},
//重置按钮
resetting() {
|
93c8bac5
李宇
1
|
297
|
this.pagequery = {
|
900ab311
李宇
1
|
298
|
pageNumber: 0,
|
93c8bac5
李宇
1
|
299
|
pageSize: 10,
|
4373acf5
wesley88
1
|
300
301
|
dataStatus:'1',
contractName: ''
|
93c8bac5
李宇
1
|
302
|
},
|
3f535f30
杨鑫
'初始'
|
303
304
|
this.getAll()
},
|
3f535f30
杨鑫
'初始'
|
305
|
}
|
93c8bac5
李宇
1
|
306
|
|
3f535f30
杨鑫
'初始'
|
307
308
309
310
|
}
</script>
<style scoped>
|
93c8bac5
李宇
1
|
311
|
.el-table {
|
900ab311
李宇
1
|
312
|
/* height: calc(100vh - 330px); */
|
93c8bac5
李宇
1
|
313
|
}
|
900ab311
李宇
1
|
314
|
|
3f535f30
杨鑫
'初始'
|
315
316
317
318
319
320
321
322
323
324
325
326
327
|
.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
|
328
|
/* /deep/ .el-form-item__content {
|
3f535f30
杨鑫
'初始'
|
329
|
line-height: 0;
|
93c8bac5
李宇
1
|
330
|
} */
|
3f535f30
杨鑫
'初始'
|
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
|
.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
杨鑫
'最新'
|
358
|
justify-content: space-between;
|
3f535f30
杨鑫
'初始'
|
359
360
361
362
363
364
|
}
/deep/ .el-pagination.is-background .el-pager li:not(.disabled).active {
background-color: #3F9B6A;
}
|
3f535f30
杨鑫
'初始'
|
365
|
|
3f535f30
杨鑫
'初始'
|
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
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
|
.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
杨鑫
'最新'
|
418
|
|
3f535f30
杨鑫
'初始'
|
419
420
421
422
423
424
425
426
|
.dialog-footer {
display: flex;
justify-content: flex-end;
border-top: solid rgba(209, 209, 209, 0.2) 2px;
padding-top: 20px;
}
|
3f535f30
杨鑫
'初始'
|
427
|
|
3f535f30
杨鑫
'初始'
|
428
|
|
3f535f30
杨鑫
'初始'
|
429
430
431
432
433
|
.el-select-dropdown__item.selected {
color: #3F9B6A;
}
|
93c8bac5
李宇
1
|
434
435
436
437
|
::v-deep .el-dialog__title {
color: #000;
}
|
3f535f30
杨鑫
'初始'
|
438
439
440
441
442
443
|
::v-deep .el-dialog__wrapper {
.dialog_css {
margin-right: 12px;
margin-top: 61px !important;
|
3f535f30
杨鑫
'初始'
|
444
445
446
447
448
449
450
451
452
|
}
.diaslog_zhong {
margin-left: 222px;
margin-top: 61px !important;
}
}
|
3f535f30
杨鑫
'初始'
|
453
454
455
456
457
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
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
|
/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
|
512
513
514
|
::v-deep .el-dialog__body {
padding: 0 0 !important;
}
|
3f535f30
杨鑫
'初始'
|
515
|
|
118fc86d
wesley88
1
|
516
|
|
3f535f30
杨鑫
'初始'
|
517
|
</style>
|