Browse Source

出库状态 出库时间 排序

chenrui 3 years ago
parent
commit
75e5e33c08
1 changed files with 6 additions and 2 deletions
  1. 6 2
      src/views/outboundOrderManagement/outboundOrder/list.vue

+ 6 - 2
src/views/outboundOrderManagement/outboundOrder/list.vue

@@ -140,14 +140,18 @@ export default {
         { title: '总数量', dataIndex: 'productTotalQty', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '总售价', dataIndex: 'productTotalPrice', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '审核时间', dataIndex: 'auditTime', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '出库时间', dataIndex: 'outTime', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '出库状态', dataIndex: 'stateDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '出库时间', dataIndex: 'outTime', width: '12%', align: 'center', customRender: function (text) { return text || '--' }, sorter: true },
+        { title: '出库状态', dataIndex: 'stateDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' }, sorter: true },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
       ],
       selectedRowKeys: [], // Check here to configure the default column
       loading: false,
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
+        // 排序
+        if (parameter.sortField == 'stateDictValue') {
+          parameter.sortField = 'state'
+        }
         this.disabled = true
         this.spinning = true
         return stockOutList(Object.assign(parameter, this.queryParam)).then(res => {