From 409a6c46741422f0d6dc00acc38b5f7dc1f35e9f Mon Sep 17 00:00:00 2001
From: tuqin <tuqin@tuqin.cn>
Date: 星期四, 24 九月 2026 10:53:07 +0800
Subject: [PATCH] feat: 现场需求前端改动
---
src/views/procurementManagement/procurementReport/index.vue | 26 +++++++++++++++++++++++++-
1 files changed, 25 insertions(+), 1 deletions(-)
diff --git a/src/views/procurementManagement/procurementReport/index.vue b/src/views/procurementManagement/procurementReport/index.vue
index bf07e6e..70ffa09 100644
--- a/src/views/procurementManagement/procurementReport/index.vue
+++ b/src/views/procurementManagement/procurementReport/index.vue
@@ -70,6 +70,7 @@
:is-show-pagination="true"
:page="page"
@pagination="handlePagination"
+ @sort-change="handleSortChange"
/>
</div>
</el-card>
@@ -165,7 +166,8 @@
{
label: '褰曞叆鏃ユ湡',
prop: 'entryDate',
- width: 120
+ width: 120,
+ sortable: 'custom'
}
])
@@ -178,6 +180,22 @@
current: 1,
size: 50,
})
+
+// 鎺掑簭鐘舵�侊紙鎸夊綍鍏ユ棩鏈熸帓搴忥級
+const sortState = reactive({ prop: '', order: '' })
+
+// 琛ㄦ牸鎺掑簭鍙樺寲
+const handleSortChange = ({ prop, order }) => {
+ if (order) {
+ sortState.prop = prop
+ sortState.order = order === 'ascending' ? 'asc' : 'desc'
+ } else {
+ sortState.prop = ''
+ sortState.order = ''
+ }
+ page.current = 1
+ handleSearch()
+}
// 杞崲浜у搧鏍戞暟鎹紝灏� id 鏀逛负 value
function convertIdToValue(data) {
@@ -243,6 +261,12 @@
params.current = page.current
params.size = page.size
+ // 鎺掑簭鍙傛暟锛堟寜褰曞叆鏃ユ湡锛�
+ if (sortState.prop) {
+ params.orderByColumn = sortState.prop
+ params.isAsc = sortState.order
+ }
+
const res = await procurementBusinessSummaryListPage(params)
if (res && res.data) {
// 鍏煎鍚庣鍙兘鐩存帴杩斿洖鏁扮粍/鎴栬繑鍥炲垎椤靛璞�
--
Gitblit v1.9.3