import { genBranchAuthSearchModal, genCargoownerAuthSearchModal } from '@/views/kzyWMS/SearchModal'
let grid = {
  span: 8,
  labelCol: { span: 8 }
}

const extendConfig = {
  mapper: { cargoOwnerId: 'consignorid', cargoOwnerName: 'consignorname', cargoOwnerCode: 'consignorcode' }
}
export function itemfun(self) {
  return [
    ...genBranchAuthSearchModal(1, true, false, null, null, grid, null),
    {
      name: 'branchid',
      hidden: true
    },
    ...genCargoownerAuthSearchModal(1, true, false, null, null, grid, extendConfig),
    {
      type: 'input',
      name: 'cargoOwnerCode',
      label: 'cargoOwnerCode',
      hidden: true
    },
    {
      type: 'input',
      name: 'cargoOwnerId',
      label: 'cargoOwnerId',
      hidden: true
    },
    {
      name: 'billno',
      label: '订单编号',
      type: 'input'
    },
    {
      name: 'isEmergency',
      label: '是否急单',
      type: 'select',
      options: [
        {
          label: '是',
          value: '1'
        },
        {
          label: '否',
          value: '0'
        }
      ]
    },
    {
      type: 'date',
      name: 'billDateStart',
      label: '订单开始时间',
      format: 'YYYY-MM-DD'
    },
    {
      type: 'date',
      name: 'billDateEnd',
      label: '订单结束时间',
      format: 'YYYY-MM-DD'
    },
    {
      name: 'status',
      label: '订单状态',
      type: 'select',
      value: '20',
      options: [
        {
          label: '未下发',
          value: '10'
        },
        {
          label: '已下发',
          value: '20'
        },
        {
          label: '已确认',
          value: '30'
        }
      ]
    },
  ]
}
