import moment from "moment";
import {upcloud_base_wh_inbound} from "@/config/serviceSettings";

export const manufacturerLotNum = {
  remoteUrl: { url: upcloud_base_wh_inbound+'/rcvHeaders/v1.0/getRcvItemLotNum', method: 'post' },
  // 组件用于form组件时，隐藏表单项含id code
  items: [
    // { hidden: true, type: 'input', name: 'bldgId', label: 'ID', value: '' },
    // { hidden: true, type: 'input', name: 'bldgCode', label: '编码', value: '' },
  ],

  // seach-modal配置
  defSearchConfig: {
    name: 'manufacturerLotNum', label: '批号', title: '批号', value: '',
    rowKey: 'batchId', destroyOnClose: true, /* targetClick: true, */
    targetValueKey: 'manufacturerLotNum',
  },

  // modal的搜索栏
  defToolBar: {
    items: []
  },

  // modal的table配置
  defTableCol: [
    { dataIndex: 'batchId', title: '批次ID', hidden: true, },
    { dataIndex: 'manufacturerLotNum', title: '批号' },
    // { dataIndex: 'showProductionDate', title: '显示生产日期' },
    // { dataIndex: 'showExpiredDate', title: '显示有效期至' },
    {
      dataIndex: 'batchProductionDate', title: '生产日期', customRender(text) {
        return moment(text).format('YYYY-MM-DD');
      }
    },
    {
      dataIndex: 'batchExpiredDate', title: '有效期至', customRender(text) {
        return moment(text).format('YYYY-MM-DD');
      }
    },
    { title: '质检报告单号', dataIndex: 'rqcReportNo', key: 'rqcReportNo' },

  ]

};

