Explorar el Código

成衣装箱单列表调整

huxy hace 20 horas
padre
commit
109e48a521
Se han modificado 1 ficheros con 25 adiciones y 9 borrados
  1. 25 9
      src/views/packing-list/clothes-list.vue

+ 25 - 9
src/views/packing-list/clothes-list.vue

@@ -368,7 +368,7 @@ export default {
           ellipsis: true,
           // fixed: 'left',
           className: 'replacecolor',
-          sorter:(a, b) => a.orderNumber - b.orderNumber
+          sorter:true
         },
          {
           title: '款号',
@@ -377,7 +377,7 @@ export default {
           width: 100,
           // fixed: 'left',
           className: 'replacecolor',
-          sorter:(a, b) => a.itemNumber - b.itemNumber
+          sorter:true
         },
         {
           title: '客户简称',
@@ -393,7 +393,7 @@ export default {
           width: 120,
           ellipsis: true,
           className: 'replacecolor',
-          sorter:(a, b) => a.hod - b.hod
+          sorter:true
         },
         {
           title: '小po',
@@ -401,7 +401,7 @@ export default {
           width: 120,
           ellipsis: true,
           className: 'replacecolor',
-          sorter:(a, b) => a.smallPo - b.smallPo
+          sorter:true
         },
         {
           title: '分销点',
@@ -409,7 +409,7 @@ export default {
           width: 100,
           ellipsis: true,
           className: 'replacecolor',
-          sorter:(a, b) => a.distributionPoint - b.distributionPoint
+          sorter:true
         },
           {
           title: '数量',
@@ -578,7 +578,10 @@ export default {
           className: 'replacecolor'
         }
       ],
-
+      isorter: {
+        column: 'createTime',
+        order: 'desc'
+      },
       clothesListData: [],
       pushState:[],
       selectedNumber:0,//已选择条数
@@ -620,16 +623,21 @@ export default {
      var that = this;
       this.$nextTick(() => {
         // this.queryParam.pageSize=50
-         this.loading = true
+        // alert('装箱单列表\t'+this.queryParam);
+        // console.log('装箱单列表\t'+this.queryParam);
+        // console.log('装箱单pageNo\t'+this.queryParam.pageNo);
+        // console.log('装箱单pageSize\t'+this.queryParam.pageSize);
+        // console.log('装箱单\t'+this.queryParam.column);
+        this.loading = true
         spltList(this.queryParam).then(res => {
-           this.loading = false
+          this.loading = false
           if (res.success) {
             that.clothesListData = res.result.records;
             that.clothesListData.map(item => {
               var str =item.hod
               var n=str.split(" ");
               item.hod = n[0]
-        })
+          })
         this.selectedRowKeys = []
             that.ipagination = {
               total: res.result.total,
@@ -1038,8 +1046,16 @@ export default {
     // 分页、排序、筛选变化时触发
     handleTableChange(pagination, filters, sorter) {
       // console.log('当前页信息>>>>',pagination)
+      if (Object.keys(sorter).length > 0) {
+        this.isorter.column = sorter.field
+        this.isorter.order = sorter.order == 'ascend' ? 'asc' : 'desc'
+      }
+      // console.log('装箱单排序字段  '+sorter.field);
+      // console.log('装箱单排序顺序  '+sorter.order);
       this.queryParam.pageNo = pagination.current
       this.queryParam.pageSize = pagination.pageSize
+      this.queryParam.column = this.isorter.column
+      this.queryParam.order = this.isorter.order
       this.getSpltList()
     }
   },