This commit is contained in:
parent
4cb2da49d8
commit
1f07d5db26
@ -117,7 +117,8 @@ onMounted(()=>{
|
|||||||
const query = reactive({
|
const query = reactive({
|
||||||
page: 1,
|
page: 1,
|
||||||
size:6,
|
size:6,
|
||||||
rate_sort: null
|
rate_sort: null,
|
||||||
|
disc_sort: null,
|
||||||
})
|
})
|
||||||
|
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
@ -160,6 +161,13 @@ const columns = computed(()=>[
|
|||||||
dataIndex: 'usPrice',
|
dataIndex: 'usPrice',
|
||||||
key: 'usPrice',
|
key: 'usPrice',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: '折扣力度',
|
||||||
|
dataIndex: 'discPercent',
|
||||||
|
key: 'discPercent',
|
||||||
|
sorter:true,
|
||||||
|
sortOrder: query.disc_sort
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: '成本(CNY)',
|
title: '成本(CNY)',
|
||||||
dataIndex: 'cnyPrice',
|
dataIndex: 'cnyPrice',
|
||||||
@ -248,6 +256,8 @@ const doUpdate=()=>{
|
|||||||
const tableChange = (pagination, filters, sorter, { action, currentDataSource })=>{
|
const tableChange = (pagination, filters, sorter, { action, currentDataSource })=>{
|
||||||
if(sorter.columnKey === 'rate') {
|
if(sorter.columnKey === 'rate') {
|
||||||
query.rate_sort = sorter.order
|
query.rate_sort = sorter.order
|
||||||
|
}else if (sorter.columnKey === 'discPercent'){
|
||||||
|
query.disc_sort = sorter.order
|
||||||
}
|
}
|
||||||
list()
|
list()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user