解决商品库存报表里面的排序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) { handleTableChange(pagination, filters, sorter) {
//分页、排序、筛选变化时触发 //分页、排序、筛选变化时触发
if (Object.keys(sorter).length > 0) { if (Object.keys(sorter).length > 0) {
this.isorter.column = sorter.field; if(sorter.order) {
this.isorter.order = "ascend" == sorter.order ? "asc" : "desc" 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) { if(pagination && pagination.current) {
this.ipagination = pagination; this.ipagination = pagination;

View File

@@ -15,7 +15,7 @@
showSearch style="width: 100%" showSearch style="width: 100%"
placeholder="请选择仓库" placeholder="请选择仓库"
v-model="depotSelected"> 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 }} {{ depot.depotName }}
</a-select-option> </a-select-option>
</a-select> </a-select>
@@ -167,6 +167,7 @@
categoryTree:[], categoryTree:[],
currentStock: '', currentStock: '',
currentStockPrice: '', currentStockPrice: '',
currentWeight: '',
// 表头 // 表头
columns: [ columns: [
{ {