Forráskód Böngészése

出运明细-列表增加排序

jbb 2 éve
szülő
commit
9a926cf489
1 módosított fájl, 61 hozzáadás és 17 törlés
  1. 61 17
      src/views/shipment-details/shipmentList.vue

+ 61 - 17
src/views/shipment-details/shipmentList.vue

@@ -372,10 +372,11 @@ export default {
         {
           title: '账套',
           dataIndex: 'account',
-          width: 70,
+          width: 85,
            fixed: 'left',
           ellipsis: true,
-          className: 'replacecolor'
+          className: 'replacecolor',
+          sorter:(a, b) => a.account - b.account,
         },
         {
           title: '销售订单号',
@@ -384,35 +385,44 @@ export default {
           // customRender: t => ellipsis(t,17),
           width: 180,
            ellipsis: true,
-          className: 'replacecolor'
+          className: 'replacecolor',
+          sorter:(a, b) => a.orderNumber - b.orderNumber,
+
         },
         {
           title: '款号',
           dataIndex: 'itemNumber',
           width: 130,
           ellipsis: true,
-          className: 'replacecolor'
+          className: 'replacecolor',
+          sorter:(a, b) => a.itemNumber - b.itemNumber,
+
         },
         {
           title: '业务员',
           dataIndex: 'salesman',
           width: 100,
           ellipsis: true,
-          className: 'replacecolor'
+          className: 'replacecolor',
+          sorter:(a, b) => a.salesman - b.salesman,
+          
         },
         {
           title: '分销点',
           dataIndex: 'distributionPoint',
           width: 110,
           ellipsis: true,
-          className: 'replacecolor'
+          className: 'replacecolor',
+          sorter:(a, b) => a.distributionPoint - b.distributionPoint,
+
         },
         {
           title: '小po',
           dataIndex: 'smallPo',
           width: 110,
           ellipsis: true,
-          className: 'replacecolor'
+          className: 'replacecolor',
+          sorter:(a, b) => a.smallPo - b.smallPo,
         },
 
         {
@@ -421,6 +431,7 @@ export default {
           width: 220,
           className: 'replacecolor',
           ellipsis: true,
+          sorter:(a, b) => a.inventoryName - b.inventoryName,
         },
         {
           title: '报关品名',
@@ -428,11 +439,12 @@ export default {
           width: 110,
           className: 'replacecolor',
            ellipsis: true,
+          sorter:(a, b) => a.declarationName - b.declarationName,
         },
         {
           title: '是否TC',
           dataIndex: 'isTc',
-          width: 90,
+          width: 110,
           customRender: function(text) {
             if (text === '0') {
               return '否'
@@ -441,7 +453,9 @@ export default {
               return '是'
             }
           },
-          className: 'replacecolor'
+          className: 'replacecolor',
+          sorter:(a, b) => a.isTc - b.isTc,
+
         },
         {
           title: '预发货日期',
@@ -453,14 +467,18 @@ export default {
             return moment(text).format('YYYY-MM-DD')
           },
           ellipsis: true,
-          className: 'replacecolor'
+          className: 'replacecolor',
+          sorter:(a, b) => a.preDeliveryDate - b.preDeliveryDate,
+
         },
         {
           title: '数量',
           dataIndex: 'shipmentQuantity',
           width: 80,
           ellipsis: true,
-          className: 'replacecolor'
+          className: 'replacecolor',
+          sorter:(a, b) => a.shipmentQuantity - b.shipmentQuantity,
+
         },
         {
           title: '报关单价',
@@ -468,6 +486,8 @@ export default {
           width: 80,
           className: 'replacecolor',
            ellipsis: true,
+          sorter:(a, b) => a.customsDeclarationUnitPrice - b.customsDeclarationUnitPrice,
+
         },
         {
           title: '成衣工厂',
@@ -475,6 +495,8 @@ export default {
           width: 100,
           className: 'replacecolor',
           ellipsis: true,
+          sorter:(a, b) => a.garmentFactory - b.garmentFactory,
+
         },
         {
           title: 'HScode',
@@ -482,6 +504,8 @@ export default {
           width: 120,
           className: 'replacecolor',
            ellipsis: true,
+          sorter:(a, b) => a.hsCode - b.hsCode,
+
         },
         {
           title: '英文品名',
@@ -490,6 +514,8 @@ export default {
           className: 'replacecolor',
           // customRender: t => ellipsis(t),
            ellipsis: true,
+          sorter:(a, b) => a.englishProductName - b.englishProductName,
+
         },
         {
           title: '物料成分',
@@ -498,6 +524,8 @@ export default {
           ellipsis: true,
           className: 'replacecolor',
           ellipsis: true,
+          sorter:(a, b) => a.materialComposition - b.materialComposition,
+
         },
         {
           title: '采购/委外订单号',
@@ -505,6 +533,8 @@ export default {
           width: 140,
           className: 'replacecolor',
           ellipsis: true,
+          sorter:(a, b) => a.purOrSubOrder - b.purOrSubOrder,
+
         },
         {
           // (存货自定义项)
@@ -513,13 +543,17 @@ export default {
           width: 90,
           className: 'replacecolor',
            ellipsis: true,
+          sorter:(a, b) => a.numberOfSets - b.numberOfSets,
+
         },
         {
           title: 'pack id',
           dataIndex: 'packId',
           width: 110,
           ellipsis: true,
-          className: 'replacecolor'
+          className: 'replacecolor',
+          sorter:(a, b) => a.packId - b.packId,
+
         },
         {
           title: '客户简称',
@@ -527,14 +561,18 @@ export default {
           width: 100,
           align: 'left',
           ellipsis: true,
-          className: 'replacecolor'
+          className: 'replacecolor',
+          sorter:(a, b) => a.customerAbbreviation - b.customerAbbreviation,
+
         },
         {
           title: '部门',
           dataIndex: 'salesDepartment',
           width: 100,
           ellipsis: true,
-          className: 'replacecolor'
+          className: 'replacecolor',
+          sorter:(a, b) => a.salesDepartment - b.salesDepartment,
+
         },
 
         {
@@ -544,7 +582,9 @@ export default {
           align: 'left',
           width: 140,
           ellipsis: true,
-          className: 'replacecolor'
+          className: 'replacecolor',
+          sorter:(a, b) => a.documentNo - b.documentNo,
+
         },
   
         {
@@ -552,16 +592,20 @@ export default {
           dataIndex: 'pushState',
           scopedSlots: { customRender: 'pushState' },
           fixed: 'right',
-          width: 90,
+          width: 110,
           className: 'replacecolor',
+          sorter:(a, b) => a.pushState - b.pushState,
+
         },
         {
           title: '单据状态',
           dataIndex: 'submitStatus',
           scopedSlots: { customRender: 'state' },
           fixed: 'right',
-          width: 90,
+          width: 110,
           className: 'replacecolor',
+          sorter:(a, b) => a.submitStatus - b.submitStatus,
+
         },
         {
           title: '操作',