解决商品库存报表里面的排序bug

This commit is contained in:
jishenghua 2023-12-23 19:00:15 +08:00
parent 16954db007
commit 018cf9ea6e
2 changed files with 9 additions and 3 deletions

View File

@ -255,8 +255,13 @@ export const JeecgListMixin = {
handleTableChange(pagination, filters, sorter) {
//分页排序筛选变化时触发
if (Object.keys(sorter).length > 0) {
this.isorter.column = sorter.field;
this.isorter.order = "ascend" == sorter.order ? "asc" : "desc"
if(sorter.order) {
this.isorter.column = sorter.field
this.isorter.order = 'ascend' === sorter.order ? 'asc' : 'desc'
} else {
this.isorter.column = 'createTime'
this.isorter.order = 'desc'
}
}
if(pagination && pagination.current) {
this.ipagination = pagination;

View File

@ -15,7 +15,7 @@
showSearch style="width: 100%"
placeholder="请选择仓库"
v-model="depotSelected">
<a-select-option v-for="(depot,index) in depotList" :value="depot.id">
<a-select-option v-for="(depot,index) in depotList" :key="index" :value="depot.id">
{{ depot.depotName }}
</a-select-option>
</a-select>
@ -167,6 +167,7 @@
categoryTree:[],
currentStock: '',
currentStockPrice: '',
currentWeight: '',
// 表头
columns: [
{