lilei 1 day ago
parent
commit
3bbdc915cb

+ 1 - 1
public/version.json

@@ -1,5 +1,5 @@
 {
   "message": "发现有新版本发布,确定更新系统?",
   "vendorJsVersion": "",
-  "version": 1753927891859
+  "version": 1754011731802
 }

+ 6 - 6
src/components/Table/index.js

@@ -137,7 +137,7 @@ export default {
     const columns = this.columns
     columns.forEach(item => {
       if(item.sorter){
-        item.sortDirections = ['descend', 'ascend']
+        item.sortDirections = ['descend', 'ascend','']
       }
     })
     this.needTotalList = this.initTotalList(columns)
@@ -176,8 +176,9 @@ export default {
      * @param {Object} sorter 排序条件
      */
     loadData (pagination, filters, sorter) {
-      console.log(sorter)
+      console.log(sorter,this.localSorter)
       this.localLoading = true
+      this.localSorter = sorter
       const parameter = Object.assign({
         pageNo: (pagination && pagination.current) ||
           this.showPagination && this.localPagination.current || this.pageNum,
@@ -186,17 +187,16 @@ export default {
         tableId: this.tableId,
         index: this.index
       },
-      (sorter && sorter.field && {
+      (sorter && sorter.field &&sorter.order && {
         sortField: sorter.field
-      }) || this.localSorter && {sortField: this.localSorter.field},
+      }) || this.localSorter && this.localSorter.order && {sortField: this.localSorter.field},
       (sorter && sorter.order && {
         sortOrder: sorter.order
       }) || this.localSorter && {sortOrder: this.localSorter.order}, {
         ...filters
       }
       )
-      this.localSorter = sorter
-      // console.log('parameter', parameter)
+      console.log('parameter', parameter)
       const result = this.data(parameter)
       // 对接自己的通用数据接口需要修改下方代码中的 r.pageNo, r.count, r.data
       // eslint-disable-next-line

+ 5 - 0
src/views/inventoryManagement/inventoryQuery/list.vue

@@ -228,6 +228,7 @@ export default {
         if (this.checkValueRange()) {
           this.disabled = true
           this.spinning = true
+          console.log(parameter, '------------')
           // 排序
           if (parameter.sortField == 'currentStockQty') {
             parameter.sortField = 'currentStockQty'
@@ -241,6 +242,10 @@ export default {
             parameter.sortField = 'unsalableDays'
             parameter.sortAlias = ''
           }
+          if (parameter.sortField == 'freezeQty') {
+            parameter.sortField = 'stockFreezeQty'
+            parameter.sortAlias = ''
+          }
           const params = Object.assign(parameter, this.queryParam)
           // 格式化数据
           params.zeroQtyFlag = params.zeroQtyFlag ? '0' : ''