|
|
@@ -41,15 +41,12 @@
|
|
41
|
41
|
|
|
42
|
42
|
<div class="operation-container">
|
|
43
|
43
|
<el-button type="primary" plain icon="Plus" @click="handleAdd">新增</el-button>
|
|
44
|
|
- <el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate">修改</el-button>
|
|
45
|
|
- <el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete">删除</el-button>
|
|
46
|
44
|
<el-button type="info" plain icon="Upload" @click="handleImport">导入</el-button>
|
|
47
|
45
|
<el-button type="warning" plain icon="Download" @click="handleExport">导出</el-button>
|
|
48
|
46
|
</div>
|
|
49
|
47
|
|
|
50
|
48
|
<el-table v-loading="loading" :data="list" border fit highlight-current-row style="width: 100%; margin-top: 20px;"
|
|
51
|
|
- @selection-change="handleSelectionChange" @expand-change="handleExpandChange">
|
|
52
|
|
- <el-table-column type="selection" width="55" align="center" />
|
|
|
49
|
+ @expand-change="handleExpandChange">
|
|
53
|
50
|
<el-table-column type="expand">
|
|
54
|
51
|
<template #default="scope">
|
|
55
|
52
|
<div class="detail-container">
|
|
|
@@ -80,6 +77,12 @@
|
|
80
|
77
|
<el-table-column label="合同名称" prop="contractName" align="center" min-width="150" show-overflow-tooltip />
|
|
81
|
78
|
<el-table-column label="合同开始日期" prop="contractStartDate" align="center" min-width="130" />
|
|
82
|
79
|
<el-table-column label="合同结束日期" prop="contractEndDate" align="center" min-width="130" />
|
|
|
80
|
+ <el-table-column label="操作" align="center" width="150" fixed="right">
|
|
|
81
|
+ <template #default="scope">
|
|
|
82
|
+ <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)">修改</el-button>
|
|
|
83
|
+ <el-button link type="danger" icon="Delete" @click="handleDelete(scope.row)">删除</el-button>
|
|
|
84
|
+ </template>
|
|
|
85
|
+ </el-table-column>
|
|
83
|
86
|
</el-table>
|
|
84
|
87
|
|
|
85
|
88
|
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize"
|
|
|
@@ -203,9 +206,6 @@ const total = ref(0)
|
|
203
|
206
|
const list = ref([])
|
|
204
|
207
|
const queryFormRef = ref(null)
|
|
205
|
208
|
const formRef = ref(null)
|
|
206
|
|
-const ids = ref([])
|
|
207
|
|
-const single = ref(true)
|
|
208
|
|
-const multiple = ref(true)
|
|
209
|
209
|
const open = ref(false)
|
|
210
|
210
|
const title = ref('')
|
|
211
|
211
|
|
|
|
@@ -293,12 +293,6 @@ const resetQuery = () => {
|
|
293
|
293
|
handleQuery()
|
|
294
|
294
|
}
|
|
295
|
295
|
|
|
296
|
|
-const handleSelectionChange = (selection) => {
|
|
297
|
|
- ids.value = selection.map(item => item.id)
|
|
298
|
|
- single.value = selection.length !== 1
|
|
299
|
|
- multiple.value = !selection.length
|
|
300
|
|
-}
|
|
301
|
|
-
|
|
302
|
296
|
const handleExpandChange = async (row, expandedRows) => {
|
|
303
|
297
|
if (expandedRows.includes(row) && (!row.ledgerContractExpirationDetailList || row.ledgerContractExpirationDetailList.length === 0)) {
|
|
304
|
298
|
try {
|
|
|
@@ -318,17 +312,15 @@ const handleAdd = () => {
|
|
318
|
312
|
|
|
319
|
313
|
const handleUpdate = async (row) => {
|
|
320
|
314
|
reset()
|
|
321
|
|
- const id = row.id || ids.value[0]
|
|
322
|
|
- const res = await getContractExpirationLedger(id)
|
|
|
315
|
+ const res = await getContractExpirationLedger(row.id)
|
|
323
|
316
|
form.value = res.data || {}
|
|
324
|
317
|
open.value = true
|
|
325
|
318
|
title.value = '修改合同到期信息'
|
|
326
|
319
|
}
|
|
327
|
320
|
|
|
328
|
321
|
const handleDelete = (row) => {
|
|
329
|
|
- const deleteIds = row.id || ids.value
|
|
330
|
|
- proxy.$modal.confirm('是否确认删除合同到期信息编号为"' + deleteIds + '"的数据项?').then(() => {
|
|
331
|
|
- return delContractExpirationLedger(deleteIds)
|
|
|
322
|
+ proxy.$modal.confirm('是否确认删除合同到期信息编号为"' + row.id + '"的数据项?').then(() => {
|
|
|
323
|
+ return delContractExpirationLedger(row.id)
|
|
332
|
324
|
}).then(() => {
|
|
333
|
325
|
getList()
|
|
334
|
326
|
proxy.$modal.msgSuccess('删除成功')
|