export default (self, expData = []) => {
  return [
    {
      dataIndex: 'shipbillNo',
      title: '运单号',
      sorter: (a, b) => a.shipbillNo?.localeCompare(b.shipbillNo),
      width: 200,
      customRender: (txt, record) => {
        const { recordTagWord,colorTagFontColor } = record
      let text= self._c(
          'a',
          {
            attrs: {
              href: 'javascript:void(0)',
            },
            style: {[colorTagFontColor&&'color']: colorTagFontColor},
            // on: {
            //   click: (event) => {
            //     event.stopPropagation()
            //     return self.handleView(record)
            //   },
            // },
          },
          [self._v(txt)])
        if (recordTagWord) {
          return self._c('a-space', {}, [text, self._c('a-badge', {
            attrs: {
              numberStyle:{boxShadow:'none'},
              count: recordTagWord,
              overflowCount:Infinity
            }
          },
          )])
        } else {
          return text
        }

      },
    },
    {
      dataIndex: 'itemCode',
      title: '商品编码',
      sorter: (a, b) => a.itemCode?.localeCompare(b.itemCode),
      width: 120
    },
    {
      dataIndex: 'itemName',
      title: '商品名称',
      sorter: (a, b) => a.itemName?.localeCompare(b.itemName),
      width: 160
    },
    {
      dataIndex: "planWarehousingDate",
      title: "计划入库时间",
      width: 150,
      sorter: (a, b) => {
        return +new Date(a.planWarehousingDate) - +new Date(b.planWarehousingDate);
      },
    },
    {
      dataIndex: "actualWarehousingDate",
      title: "实际入库时间",
      width: 150,
      sorter: (a, b) => {
        return +new Date(a.actualWarehousingDate) - +new Date(b.actualWarehousingDate);
      },
    },
    {
      dataIndex: "planDeliveryDate",
      title: "计划发运时间",
      width: 150,
      sorter: (a, b) => {
        return +new Date(a.localeCompare) - +new Date(b.localeCompare);
      },

    },

    {
      dataIndex: 'orderNo',
      title: '订单号',
      sorter: (a, b) => a.orderNo?.localeCompare(b.orderNo),
      width: 160
    },
    // {
    //   dataIndex: "mesOrderNo",
    //   title: "Mes单号",
    //   width: 120,
    //   sorter: (a, b) => {
    //     return a.mesOrderNo.localeCompare(b.mesOrderNo);
    //   }
    // },
    {
      dataIndex: "actualPcs",
      title: "实际箱数",
      width: 120,
      sorter: (a, b) => {
        return a.actualPcs - b.actualPcs;
      }
    },
    {
      dataIndex: "actualVehicleNumber",
      title: "实际车辆数",
      width: 120,
      sorter: (a, b) => {
        return a.actualVehicleNumber - b.actualVehicleNumber;
      }
    },
    {
      dataIndex: 'branchName',
      title: '仓库',

      sorter: (a, b) => a.branchName?.localeCompare(b.branchName),
      width: 140
    },
    {
      dataIndex: 'loadingLocation',
      title: '装货地点',
      sorter: (a, b) => a.loadingLocation?.localeCompare(b.loadingLocation),
      width: 120
    },

    {
      dataIndex: "pcs",
      title: "数量",
      width: 120,
      sorter: (a, b) => {
        return a.pcs - b.pcs;
      }
    },
    {
      dataIndex: "length",
      title: "长mm",
      width: 120,
      sorter: (a, b) => {
        return a.length - b.length;
      }
    },
    {
      dataIndex: "width",
      title: "宽mm",
      width: 120,
      sorter: (a, b) => {
        return a.width - b.width;
      }
    },
    {
      dataIndex: "height",
      title: "高mm",
      width: 120,
      sorter: (a, b) => {
        return a.height - b.height;
      }
    },
    {
      dataIndex: "weight",
      title: "重量kg",
      width: 120,
      sorter: (a, b) => {
        return a.weight - b.weight;
      }
    },
    {
      dataIndex: "isWeighName",
      title: "是否过磅",
      width: 120,
    },
    {
      dataIndex: 'transfiniteCommitDate',
      title: '超限提交日期',
      width: 160,
      sorter: (a, b) => {
        return +new Date(a.transfiniteCommitDate) - +new Date(b.transfiniteCommitDate);
      },
    },
     {
      dataIndex: 'transfiniteDescription',
       title: '超限说明',
       width:150,
      sorter: (a, b) => a.transfiniteDescription?.localeCompare(b.transfiniteDescription),
    },
    {
      dataIndex: 'isTransfiniteName',
       title: '是否超限',
       width:150,
      sorter: (a, b) => a.isTransfiniteName?.localeCompare(b.isTransfiniteName),
    },

    {
      dataIndex: 'createperson',
       title: '制单人',
       width:150,
      sorter: (a, b) => a.createperson?.localeCompare(b.createperson),
    },
    {
      dataIndex:'createtime',
       title: '制单日期',
       width:160,
       sorter: (a, b) => {
        return +new Date(a.createtime) - +new Date(b.createtime);
      }
    },









  ]
}



