diff --git a/src/views/inventory/InvPreInProductsDetail.vue b/src/views/inventory/InvPreInProductsDetail.vue index 05b999b9..f6198c40 100644 --- a/src/views/inventory/InvPreInProductsDetail.vue +++ b/src/views/inventory/InvPreInProductsDetail.vue @@ -58,7 +58,9 @@ - + @@ -147,6 +151,7 @@ export default { list: [], total: 0, loading: false, + defaultSort: {prop: 'orderTime', order: 'desc'}, }; }, methods: { @@ -176,6 +181,17 @@ export default { this.invPreProductDetailQuery.page = val; this.getList(); }, + + handleSortChange(column, prop, order) { + if (column.order === 'descending') { + this.invPreProductDetailQuery.sort = 'desc' + } else { + this.invPreProductDetailQuery.sort = 'asc' + } + this.invPreProductDetailQuery.orderBy = column.prop; + this.getList(); + }, + getList() { this.loading = true; this.invPreProductDetailQuery.relId = this.inputQuery.relId; diff --git a/src/views/inventory/InvPreProductsDetail.vue b/src/views/inventory/InvPreProductsDetail.vue index 796a0c96..7d4a6f0c 100644 --- a/src/views/inventory/InvPreProductsDetail.vue +++ b/src/views/inventory/InvPreProductsDetail.vue @@ -58,7 +58,9 @@ - + @@ -142,7 +146,8 @@ export default { deptCode: null, invCode: null, page: 1, - limit: 10 + limit: 10, + defaultSort: {prop: 'orderTime', order: 'desc'}, }, list: [], total: 0, @@ -176,6 +181,17 @@ export default { this.invPreProductDetailQuery.page = val; this.getList(); }, + + handleSortChange(column, prop, order) { + if (column.order === 'descending') { + this.invPreProductDetailQuery.sort = 'desc' + } else { + this.invPreProductDetailQuery.sort = 'asc' + } + this.invPreProductDetailQuery.orderBy = column.prop; + this.getList(); + }, + getList() { this.loading = true; this.invPreProductDetailQuery.relId = this.inputQuery.relId; diff --git a/src/views/inventory/InvProductsDetail.vue b/src/views/inventory/InvProductsDetail.vue index 14ed1419..cfa1b21b 100644 --- a/src/views/inventory/InvProductsDetail.vue +++ b/src/views/inventory/InvProductsDetail.vue @@ -56,7 +56,10 @@ - + @@ -144,6 +149,7 @@ export default { list: [], total: 0, loading: false, + defaultSort: {prop: 'orderTime', order: 'desc'}, }; }, methods: { @@ -173,6 +179,17 @@ export default { this.invProductDetailQuery.page = val; this.getList(); }, + + handleSortChange(column, prop, order) { + if (column.order === 'descending') { + this.invProductDetailQuery.sort = 'desc' + } else { + this.invProductDetailQuery.sort = 'asc' + } + this.invProductDetailQuery.orderBy = column.prop; + this.getList(); + }, + getList() { this.loading = true; this.invProductDetailQuery.relId = this.inputQuery.relId;