export const setQuery = self => {
  return [
    { name: 'orderNo', label: '订单号', type: 'input' },
    { name: 'shipbillNo', label: '运单号', type: 'input' },
    { name: 'cargoOwnerName', label: '货主', type: 'input' },
    { name: 'shipperUnitName', label: '发货方单位', type: 'input' },
    { name: 'consigneeUnitName', label: '收货方单位', type: 'input' },
    {
      offset: 16,
      span: 7,
      type: 'buttonGroup',
      style: { textAlign: 'right' },
      options: [
        {
          value: '查询',
          icon: 'search',
          btnType: 'primary',
          style: 'margin-right:10px',
          htmlType: 'submit'
        },
        {
          value: '重置',
          name: 'ccz',
          style: 'margin-right:10px',
          on: {
            click(event, form) {
              form.resetFields()
            }
          }
        }
      ]
    }
  ]
}

export const setColumns = self => {
  return [
    { dataIndex: 'shipbillId', title: 'ID', hidden: true },
    { dataIndex: 'shipbillNo', title: '运单号', width: 120 },
    { dataIndex: 'cargoOwnerName', title: '货主', width: 120 },
    { dataIndex: 'orderNo', title: '订单号', width: 120 },
    { dataIndex: 'shipperUnitName', title: '发货方单位', width: 120 },
    { dataIndex: 'shipperName', title: '发货方', width: 120 },
    { dataIndex: 'shipperAddress', title: '详细地址', width: 120 },
    { dataIndex: 'shipperLongitude', title: '经度', width: 120 },
    { dataIndex: 'shipperLatitude', title: '纬度', width: 120 },
    { dataIndex: 'consigneeUnitName', title: '收货方单位', width: 120 },
    { dataIndex: 'consigneeName', title: '收货方', width: 120 },
    { dataIndex: 'consigneeAddress', title: '详细地址', width: 120 },
    { dataIndex: 'consigneeLongitude', title: '经度', width: 120 },
    { dataIndex: 'consigneeLatitude', title: '纬度', width: 120 }
  ]
}

