
import { driverAttr, consigneeMethod, driverAutoCompleteMethod, consigneeAttr, deliveryAttr, deviceAttr_scanPage, carAttr, vehicleTypeAttr, carrierAttr, containerAttr } from '@/blocks/components/searchModalConfig/index'
export default (self) => {
  const consignee = consigneeMethod('发货方');
  consignee.tableConfig.rowSelectType=2
  return [
    { name: 'containerCode', label: '容器编码', type: 'input' },
    {
      ...consignee,
      targetClick: false,
      name: 'shipperName', label: '发货方', type: 'searchModal'
    },
    driverAutoCompleteMethod(self, {
      type: 'searchModal',
      name: 'driverName',
      label: '司机姓名'
    }),

    {
      name: 'driverPhoneNumber',
      label: '司机电话',
      type: 'input',
      validateTrigger: 'blur',
    },
    {
      name: 'vehiclePlateNumber',
      label: '车辆',
      type: 'input',
    },
    {
      name: 'status',
      label: '状态',
      type: 'select',
      get options() {
        return self.options?.CONTAINER_BILL_STATUS?.filter(item=>~~item.value>2)
      }
    },


    {
      type: 'buttonGroup',
      span: 12,
      style: {
        textAlign: 'right'
      },
      options: [{
        value: '查询',
        icon: 'search',
        btnType: 'primary',
        style: 'margin-right:10px',
        htmlType: 'submit'
      },
      {
        value: '重置',
        icon: 'redo',
        on: {
          click: function (event, form) {
            form.resetFields()
            // this.$emit('reset', event, this.$refs.toolBar)
          }
        }
      }
      ]
    }

  ]

}