From 342138f9afa5b0bf35485162fbf051e142981aba Mon Sep 17 00:00:00 2001 From: panxinyu-YUYwp Date: Wed, 30 Sep 2026 11:52:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=98=AF=E5=90=A6=E5=AD=98?= =?UTF-8?q?=E6=A1=A3=E6=9F=A5=E8=AF=A2=EF=BC=8C=E5=90=88=E5=90=8C=E6=97=A5?= =?UTF-8?q?=E4=B8=8E=E5=90=88=E5=90=8C=E6=97=A5=E6=9C=9F=E5=8F=AF=E4=BB=A5?= =?UTF-8?q?=E8=BF=9B=E8=A1=8C=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/contract/info.vue | 120 ++++++++++++++++++---------- 1 file changed, 80 insertions(+), 40 deletions(-) diff --git a/src/views/modules/contract/info.vue b/src/views/modules/contract/info.vue index bdbcc68..8a6e2eb 100644 --- a/src/views/modules/contract/info.vue +++ b/src/views/modules/contract/info.vue @@ -46,6 +46,13 @@ value-format="yyyy-MM-dd" placeholder="结束日期" size="small" style="width: 100px;margin-top: 2px"> + + + + + + 查询 重置 @@ -55,30 +62,42 @@ - - + + - + + + + + + + + + + @@ -378,6 +391,7 @@ export default { validEndDateEnd: '', archiveDateStart: '', archiveDateEnd: '', + whetherArchive: '', page: 1, limit: 20 }, @@ -394,9 +408,14 @@ export default { '往来单位类型': 'partnerType', '有效期起始': 'validStartDate', '有效期终止': 'validEndDate', + '是否存档': { field: 'whetherArchive', callback: (v) => v === 'Y' ? '是' : '否' }, + '存档人': { field: 'archivePerson', callback: (v) => v || '-' }, + '存档日期': { field: 'archiveDate', callback: (v) => (v || '').substring(0, 10) }, '备注': 'remark' }, pageIndex: 1, + sortField: '', + sortOrder: '', pageSize: 20, totalPage: 0, showContractModal: false, @@ -417,7 +436,6 @@ export default { previewType: '', previewName: '', showArchiveModal: false, - archiveMode: 'edit', archiveModalTitle: '', currentArchiveRow: null, rowAttachmentMap: {}, @@ -485,6 +503,7 @@ export default { validEndDateEnd: '', archiveDateStart: '', archiveDateEnd: '', + whetherArchive: '', page: 1, limit: this.pageSize } @@ -501,6 +520,8 @@ export default { this.rowAttachmentMap = {} this.searchData.page = this.pageIndex this.searchData.limit = this.pageSize + this.searchData.sidx = this.sortField + this.searchData.order = this.sortOrder contractData(this.searchData).then(({data}) => { if (data.code === 0) { this.contractList = data.page.list @@ -513,6 +534,12 @@ export default { console.error(err) }) }, + handleSortChange({ prop, order }) { + this.sortField = order ? prop : '' + this.sortOrder = order === 'ascending' ? 'asc' : order === 'descending' ? 'desc' : '' + this.pageIndex = 1 + this.fetchContracts() + }, searchContract() { this.pageIndex = 1 this.fetchContracts() @@ -1093,7 +1120,6 @@ export default { archivePerson: this.$store.state.user.userDisplay, archiveDate: d.getFullYear() + '-' + pad(d.getMonth() + 1) + '-' + pad(d.getDate()) } - this.archiveMode = 'edit' this.archiveModalTitle = '存档' this.showArchiveModal = true } else { @@ -1121,15 +1147,17 @@ export default { // 确定存档 confirmArchive() { - if (!this.archiveForm.archivePerson || !this.archiveForm.archiveDate) { + const person = (this.archiveForm.archivePerson || '').trim() + const date = (this.archiveForm.archiveDate || '').trim() + if (!person || !date) { this.$message.error('请填写存档人和存档日期') return } contractArchive({ id: this.currentArchiveRow.id, whetherArchive: 'Y', - archivePerson: this.archiveForm.archivePerson, - archiveDate: this.archiveForm.archiveDate + ' 00:00:00' + archivePerson: person, + archiveDate: date + ' 00:00:00' }).then(({data}) => { if (data && data.code === 0) { this.$message.success('存档成功') @@ -1143,18 +1171,6 @@ export default { this.$message.error('存档失败') }) }, - - // 查看存档详情 - viewArchiveDetail(row) { - this.archiveMode = 'view' - this.currentArchiveRow = row - this.archiveModalTitle = '存档详情' - this.archiveForm = { - archivePerson: row.archivePerson || '', - archiveDate: row.archiveDate || '' - } - this.showArchiveModal = true - }, // 操作列"取消存档"入口:复用原有取消逻辑(带二次确认) cancelArchive(row) { this.handleArchiveChange(false, row) @@ -1270,4 +1286,28 @@ export default { .contract-maintenance td.op-col .cell > .el-dropdown:nth-child(4) { text-align: left; } +/* 固定列克隆层没有底色(主题里 .el-table__fixed-right 只有 box-shadow,还被设成 none), + 主表列从它下面透出来 → 重影。补不透明背景,表格越宽越必要 */ +.contract-maintenance .el-table__fixed-right, +.contract-maintenance .el-table__fixed-right .el-table__fixed-header-wrapper, +.contract-maintenance .el-table__fixed-right .el-table__fixed-body-wrapper { + background-color: #fff; +} +/* 排序箭头:global.scss:77 已把 caret-wrapper 压到 20px,所以只能在 20px 里排布。 + ▲ 的可见部分在它盒子下半 → 要它在上就得让盒子往负方向挂;▼ 反之。 + border-width 控大小(每 +1px → 三角宽 +2 高 +1),两条 top 之差控间隙 */ +.contract-maintenance .el-table .sort-caret { + border-width: 6px; + left: 6px; +} + +.contract-maintenance .el-table .sort-caret.ascending { + top: -4px; + bottom: auto; +} + +.contract-maintenance .el-table .sort-caret.descending { + top: 8px; + bottom: auto; +}