feat(memberPoint): 列表添加排序

This commit is contained in:
woody 2025-09-26 17:24:49 +08:00
parent c4ea76d4ba
commit f326d950a2
1 changed files with 30 additions and 5 deletions

View File

@ -61,6 +61,7 @@
lass="content"
style="width: 100%;"
:row-class-name="tableRowClassName"
@sort-change="sortChange"
>
<el-table-column type="selection" />
@ -80,16 +81,19 @@
align="center"
prop="pointCount"
label="子点位总数"
sortable="custom"
/>
<el-table-column
align="center"
prop="waitPointCount"
label="待激活点位总数"
sortable="custom"
/>
<el-table-column
align="center"
prop="repPvBalance"
label="复购业绩余额"
sortable="custom"
/>
</el-table>
@ -117,7 +121,9 @@ const initParmas = {
pageNum: 1,
pageSize: 50,
memberSettlePeriodId: '',
memberCode: ''
memberCode: '',
sort: '',
sortColumn: ''
}
export default {
name: 'MemberPointInfo',
@ -191,6 +197,8 @@ export default {
...initParmas
}
this.queryParams.memberSettlePeriodId = this.memberSettlePeriodList[0].pkId
//
this.$refs.table.clearSort()
this.handleSearch()
},
tableRowClassName({ row, rowIndex }) {
@ -203,6 +211,27 @@ export default {
},
copyContent(content) {
// this.$message.success('')
},
//
sortChange({ column, prop, order }) {
if (order) {
//
const sortColumnMap = {
pointCount: 'POINT_COUNT',
waitPointCount: 'WAIT_POINT_COUNT',
repPvBalance: 'REP_PV_BALANCE'
}
this.queryParams.sortColumn = sortColumnMap[prop] || ''
this.queryParams.sort = order === 'ascending' ? 'ASC' : 'DESC'
} else {
//
this.queryParams.sortColumn = ''
this.queryParams.sort = ''
}
//
this.handleSearch()
}
}
@ -225,10 +254,6 @@ export default {
::v-deep .el-date-editor .el-range__icon{
margin-top: -10px;
}
::v-deep .el-input__inner{
//height:28px;
//line-height: 28px;
}
::v-deep .el-form-item__label{
color: #333;
font-weight: inherit;