import { genWarehouseAuthSearchModal, genWarehouseAreaSearchModal } from '../../../SearchModal'
const extendConfig = {
  mapper: { warehouseAreaCode: 'workarea' }
}
let grid = {
  span: 8,
  labelCol: { span: 6 }
}

export const searchItems = function(self) {
  return [
    ...genWarehouseAuthSearchModal(1, true, false, null, function (rowDate, form) {
      if(rowDate) {
        self.queryWarehouseId = rowDate[0].companyId
      } else {
          self.queryWarehouseId = ''
      }
    }, grid),
    ...genWarehouseAreaSearchModal(1, false, false, self.remoteBefore, null, grid, extendConfig),
    {
      type: 'input',
      name: 'params',
      label: '名称/工号',
      value: ''
    }
  ]
}
