/*
 * @Date: 2023-04-03 14:10:30
 * @LastEditors: 陈禹琨 cyk910622@163.com
 * @LastEditTime: 2023-04-23 12:09:44
 * @FilePath: \yingjiang\src\views\inBound\pendingOrders\js\config.js
 * @Description: cyk
 */
let grid = {
  labelCol: { span: 4 },
  span: 8,
}
export function formItems(self) {
  let _this = self
  return [
    // {
    //   type: 'select',
    //   name: 'goodsOwnertype',
    //   label: '上架类型',
    //   ...grid,
    //   value: '0',
    //   options: [
    //     { value: '1', label: '容器上架' },
    //     { value: '0', label: 'AGV上架' },
    //   ],
    //   on: {
    //     change(p1, p2) {
    //       console.log(p1)
    //       self.rackingType(p1)
    //     },
    //   },
    // },
    { type: 'input', name: 'itemCode', label: '商品条码', ...grid, value: '' },
    { type: 'input', name: 'itemName', label: '商品名称', ...grid, value: '' },
    { type: 'input', name: 'billNo', label: '单据编号', ...grid, value: '' },
    { type: 'input', name: 'cargoOwnerName', label: '货主', ...grid, value: '' },
    {
      type: 'row',
      label: '挂起时间',
      ...grid,
      list: [
        {
          type: 'date',
          name: 'startTime',
          placeholder: '请输入开始日期',
          value: '',
          format: 'YYYY-MM-DD',
          style: 'padding-right:5px;',
        },
        {
          type: 'date',
          name: 'endTime',
          placeholder: '请输入结束日期',
          format: 'YYYY-MM-DD',
          value: '',
        },
      ],
    },
    { type: 'input', name: 'hangUpUser', label: '挂起人', ...grid, value: '' },
    {
      type: 'buttonGroup',
      style: { textAlign: 'right' },
      span: 24,
      options: [
        {
          value: '查询',
          icon: 'search',
          btnType: 'primary',
          style: 'margin-right:10px',
          htmlType: 'submit',
        },
        {
          value: '重置',
          icon: 'redo',
          style: 'margin-left:10px',
          on: {
            click: () => {
              self.$refs.formTarget.form.resetFields()
            },
          },
        },
      ],
    },
  ]
}

export const tableColumns = [
  { hidden: true, title: 'id', dataIndex: 'id' },
  { title: '货主', dataIndex: 'cargoOwnerName' },
  { title: '商品条码', dataIndex: 'itemCode' },
  { title: '商品名称', dataIndex: 'itemName' },
  { title: '规格', dataIndex: 'goodsType', className: 'v_top' },
  { title: '批号', dataIndex: 'lotId', className: 'v_top' },
  { title: '数量', dataIndex: 'qty', className: 'v_top' },
  { title: '单据编号', dataIndex: 'billNo', className: 'v_top' },
  { title: '挂起时间', dataIndex: 'hangUpTime', className: 'v_top' },
  { title: '挂起人', dataIndex: 'hangUpUser', className: 'v_top' },
  { title: '分配货位', dataIndex: 'goodsAllocation', className: 'v_top' },
]
