/*
 * @Author: 陈禹琨 cyk910622@163.com
 * @Date: 2022-06-10 09:46:42
 * @LastEditors: 陈禹琨 chenyukun@prolog-int.com
 * @LastEditTime: 2023-12-15 14:28:26
 * @FilePath: /eis-3.0-fe-pc/src/views/EIS/project/qingniuEIS/mergeContainer/config.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */

import { QN_BASEURL } from '../serviceSettings'
const baseUrl = QN_BASEURL
const config = {
  remoteUrl: {
    url: baseUrl + '/api/v1/pc/mergeContainerList',
    headers: {
      'Content-Type': 'application/JSON',
    },
    method: 'post',
  },
  items: [
    {
      span: 8,
      type: 'input',
      name: 'containerNo',
      label: '容器号',
      value: '',
    },
    // {
    //   span: 8,
    //   type: 'select',
    //   name: 'isMode',
    //   label: '库区',
    //   value: '',
    //   options: [
    //     { value: 0, label: '否' },
    //     { value: 1, label: '是' },
    //   ],
    // },
    {
      span: 8,
      type: 'input',
      name: 'itemName',
      label: '商品名称',
      value: '',
    },
    {
      span: 8,
      type: 'input',
      name: 'barCode',
      label: '商品条码',
      value: '',
    },
    {
      span: 8,
      type: 'input',
      name: 'itemCode',
      label: '助记码',
      value: '',
    },
    {
      span: 8,
      type: 'row',
      label: '创建时间',
      list: [
        {
          type: 'date',
          name: 'createTimeStart',
          placeholder: '请输入开始时间',
          value: '',
          format: 'YYYY-MM-DD HH:mm:ss',
          showTime: true,
          itemStyle: 'min-width:100%',
          style: 'padding-right:5px;',
        },
        {
          type: 'date',
          name: 'createTimeEnd',
          placeholder: '请输入结束时间',
          format: 'YYYY-MM-DD HH:mm:ss',
          value: '',
        },
      ],
    },

    {
      span: 6,
      type: 'buttonGroup',
      style: { textAlign: 'center', marginLeft: '50px' },
      options: [
        {
          value: '查询',
          icon: 'search',
          btnType: 'primary',
          style: 'margin-right:10px',
          htmlType: 'submit',
        },
        {
          value: '重置',
          icon: 'redo',
          style: 'margin-right:50px',
          on: {
            click: (event, form) => {
              console.log(form)
              form.resetFields()
            },
          },
        },
      ],
    },
  ],
  columns: [
    {
      dataIndex: 'containerNo',
      key: 'containerNo',
      align: 'center',
      ellipsis: true,
      title: '容器号',
    },

    // barCode

    // {
    //   title: '库区',
    //   key: 'count',
    //   ellipsis: true,
    //   dataIndex: 'count',
    //   align: 'center',
    //   //   ...remote('eis_cfg_auto_carry_task_type'),
    // },
    {
      title: '状态',
      dataIndex: 'taskStatus',
      align: 'center',
      ellipsis: true,
      key: 'taskStatus',
      customRender(text) {
        // 状态 0空闲 10入库中 20出库中 30回库中
        text == 0 && (text = '空闲')
        text == 10 && (text = '入库中')
        text == 20 && (text = '出库中')
        text == 30 && (text = '回库中')
        text == 88 && (text = '出库到位')

        return text
      },
    },
    {
      title: '创建时间',
      dataIndex: 'createTime',
      align: 'center',
      key: 'createTime',
    },
  ],

  Subcolumns: [
    {
      dataIndex: 'itemCode',
      key: 'itemCode',
      align: 'center',
      ellipsis: true,
      title: '商品编码',
    },

    {
      title: '商品名称',
      key: 'itemName',
      ellipsis: true,
      dataIndex: 'itemName',
      align: 'center',
      //   ...remote('eis_cfg_auto_carry_task_type'),
    },
    {
      title: '商品条码',
      dataIndex: 'barCode',
      align: 'center',
      ellipsis: true,
      key: 'barCode',
      //   customRender(text) {
      //     text == 0 && (text = '不锁定')
      //     text == 1 && (text = '锁定')
      //     return text
      //   },
    },
    {
      title: '批次',
      dataIndex: 'lotNo',
      align: 'center',
      key: 'lotNo',
    },

    {
      title: '包装数',
      dataIndex: 'packQty',
      align: 'center',
      key: 'packQty',
    },

    {
      title: '件数',
      dataIndex: 'itemQty',
      align: 'center',
      key: 'itemQty',
    },

    {
      title: '零散数',
      dataIndex: 'scatteredQty',
      align: 'center',
      key: 'scatteredQty',
    },

    {
      title: '数量',
      dataIndex: 'qty',
      align: 'center',
      key: 'qty',
    },
  ],
  //   :columns="config.Model.columns"
}
export default config
