import { genWarehouseAuthSearchModal,genCargoownerAuthSearchModal } from "../../../SearchModal";

let grid = {
  labelCol: { span: 5 },
  wrapperCol: { span: 18 },
  span: 6,
};
export function setFormItems(self) {
  return [
    ...genWarehouseAuthSearchModal(1, true, false, null, null, grid),
    ...genCargoownerAuthSearchModal(1, true, false, null, null, grid,),
    {
      type: 'input', name: 'refBillId', label: '单据编号', ...grid, value: '',required:true,
      on: {
        pressEnter(p1, p2, p3) {
          self.getName()
        }
      }
    },
    { type: 'input', name: 'supplierOrShipperName', label: '单位名称', ...grid, value: '', disabled: true },
    { type: 'input', name: 'userName', label: '操作人', ...grid, value: '', disabled: true },
    {
      type: 'select', label: '监管类型', name: 'supervisionType', value: '',required:true,
      options: [
        { value: '0', label: '购进入库' },
        { value: '1', label: '销售退回' },
        { value: '2', label: '销售出库' },
        { value: '3', label: '购进退出' },
        { value: '4', label: '不合格' },
        { value: '5', label: '盘点' },
      ],
      ...grid,
      on:{
        change(){
          self.$nextTick(() => {
            self.getName()
          })
         
        }
      }
    },
    // { type: 'input', name: '5', label: '日期', ...grid, value: '', },
    {
      type: 'select', name: 'packLevel', label: '包装类型', ...grid, value: '',
      options: [
        { value: '0', label: '大包装' },
        { value: '1', label: '中包装' },
        { value: '2', label: '小包装' }
      ],
    },
  ]
}

export const tableColumnsConfig = [
  { hidden: true, title: 'id', dataIndex: 'id', },
  // { type:'select',title: '包装规格', dataIndex: 'packLevel', className: 'v_top', },
  {
    type: 'select',
    title: '包装规格',
    dataIndex: 'packLevel',
    key: 'packLevel',
    required: true,
    options: [
      { value: '0', label: '大包装' },
        { value: '1', label: '中包装' },
        { value: '2', label: '小包装' }
    ],
  },
  { title: '监管码', dataIndex: 'supervisionCode', className: 'v_top',required: true, },
]
