
const columns = [
  // { type: 'txt', hidden: true, title: 'taskRqcId', dataIndex: 'taskRqcId', key: 'taskRqcId' },
  { title: "id", dataIndex: "taskRqcId", key: "taskRqcId", hidden: true },
  { title: "storeTemperature", dataIndex: "storeTemperature", key: "storeTemperature", hidden: true },
  // { title: 'mtlOwnerName', dataIndex: 'mtlOwnerName', key: 'mtlOwnerName', hidden: true },
  { title: "商品助记码", dataIndex: "itemZjm", key: "itemZjm", width: 100, hidden: true },
  { title: "单位助记码", dataIndex: "shipperZjm", key: "shipperZjm", width: 100, hidden: true },

  {
    title: "是否追溯",
    dataIndex: "isSupervise",
    key: "isSupervise",
    width: 120,
    type: "txt",
    customRender(text) {
      text == 0 && (text = "无");
      text == 1 && (text = "监管码");
      text == 2 && (text = "序列号");
      return text;
    },
  },
    { title: "是否双人验收", dataIndex: "itemHealthIsDouble", key: "itemHealthTwovoflag", customRender(text) { return text ? '是' : '否'; }, width: 150, },
  { title: "商品编码", dataIndex: "itemNum", key: "itemNum", width: 100 },
  { title: "商品名称", dataIndex: "itemName", key: "itemName", width: 100 },
  { title: "商品规格", dataIndex: "specification", key: "specification", width: 100 },
  { title: "商品大类", dataIndex: "categoryName", key: "categoryName", width: 100 },
  { title: "生产厂家", dataIndex: "manufacturerName", key: "manufacturerName", width: 100 },
  { title: "产地", dataIndex: "productionPlace", key: "productionPlace", width: 100 },
  { title: "上市许可证持有人", dataIndex: "itemHealthListedLicensor", key: "itemHealthListedLicensor", width: 140 },
  { title: "包装单位", dataIndex: "uom", key: "uom", width: 100 },
  { title: "件包装", dataIndex: "conversionRate", key: "conversionRate", width: 100 },
  { title: "容器号", dataIndex: "containerCode", key: "containerCode", width: 100 },
  { title: "批号", dataIndex: "manufacturerLotNum", key: "manufacturerLotNum", width: 100 },
  // { title: '显示生产日期', dataIndex: 'showProductionDate', key: 'showProductionDate', width: 100, },
  // { title: '显示有效期至', dataIndex: 'showExpiredDate', key: 'showExpiredDate', width: 100, },
  {
    title: "显示生产日期",
    dataIndex: "showProductionDate",
    key: "showProductionDate",
    width: 120,
    customRender(text) {
      let batchProductionDate = text ? text.substring(0, 10) : "";
      return batchProductionDate.replace(/-/g, "");
      // return text ? moment(text).format('YYYY-MM') : '';
    },
  },
  {
    title: "显示有效期至",
    dataIndex: "showExpiredDate",
    key: "showExpiredDate",
    width: 120,
    customRender(text) {
      let batchExpiredDate = text ? text.substring(0, 10) : "";
      return batchExpiredDate.replace(/-/g, "");
      // return text ? moment(text).format('YYYY-MM') : '';
    },
  },
  { title: "收货数量", dataIndex: "pieceQty", key: "pieceQty", width: 100 },
  { title: "收货件数", dataIndex: "caseQty", key: "caseQty", width: 100 },
  { title: "收货零散数", dataIndex: "oddPieceQty", key: "oddPieceQty", width: 100 },
  {
    title: "验收结论",
    dataIndex: "stockStatus",
    key: "stockStatus",
    width: 80,
    value: "",
    customRender(text) {
      let options = [
        // 合格0/不合格1/待处理2/拒绝3
        { value: "0", label: "合格" },
        { value: "1", label: "不合格" },
        { value: "2", label: "待处理" },
        { value: "3", label: "拒收" },
      ];
      return options.find((t) => t.value == text).label;
    },
  },
  {
    cusType: "autoComplete",
    title: "处理原因",
    dataIndex: "handlingReason",
    width: 140,
    scopedSlots: { customRender: "handlingReason" },
  },
  {
    cusType: "autoComplete",
    title: "不足原因",
    dataIndex: "defReason",
    width: 140,
    scopedSlots: { customRender: "defReason" },
  },
  { title: "不足原因补充", dataIndex: "rcvReason3", key: "rcvReason3", width: 100 },
  { title: "存储分类", dataIndex: "itemHealthStoreCategory", key: "itemHealthStoreCategory", width: 100 },
  { title: "批准文号", dataIndex: "approvalNumber", key: "approvalNumber", width: 100 },
  { title: "注册证号", dataIndex: "itemHealthRegisterNbr", key: "itemHealthRegisterNbr", width: 100 },

  // { title: '商品名称', dataIndex: 'itemName', key: 'itemName', width: 100, },
  // { title: '商品编码', dataIndex: 'itemNum', key: 'itemNum', width: 100, },
  // { title: '商品规格', dataIndex: 'specification', key: 'specification', width: 100, },
  // { title: '商品助记码', dataIndex: 'itemZjm', key: 'itemZjm', width: 100, },
  // { title: '上市许可持有人', dataIndex: 'itemHealthListedLicensor', key: 'itemHealthListedLicensor', width: 150, },
  // { title: '生产企业许可证号', dataIndex: 'itemHealthProduceLicense', key: 'itemHealthProduceLicense', width: 150, },
  // { title: '商品整散分离标识', dataIndex: 'itemIsPieceOrCase', key: 'itemIsPieceOrCase', width: 150, },
  // {
  //   title: '生产日期', dataIndex: 'batchProductionDate', key: 'batchProductionDate', customRender(text) {
  //     return moment(text).format('YYYY-MM-DD')
  //   },
  //   width: 100,
  // },
  // { title: '有效期天数', dataIndex: 'shelfLifeDays', key: 'shelfLifeDays', width: 100, },
  // { title: '件数', dataIndex: 'caseQty', key: 'caseQty', width: 100, },
  // { title: '零散数', dataIndex: 'oddPieceQty', key: 'oddPieceQty', width: 100, },
  // { title: '备注', dataIndex: 'comments', key: 'comments', width: 100, },
  // { title: "是否双人质检", dataIndex: "itemHealthIsDouble", key: "itemHealthTwovoflag", customRender(text) { return text ? '是' : '否'; }, width: 150, },
  // { title: '商品是否无菌', dataIndex: 'isBacteria', key: 'isBacteria', customRender(text) { return text ? '是' : '否'; }, width: 150, },
  // { title: '商品是否代管', dataIndex: 'isHosted', key: 'isHosted', customRender(text) { return text ? '是' : '否'; }, width: 150, },
  // { title: '注册证号', dataIndex: 'itemHealthRegisterNbr', key: 'itemHealthRegisterNbr' },
  // { title: '商品是否锁定', dataIndex: 'itemIsLock', key: 'itemIsLock', customRender(text) { return text ? '是' : '否'; }, width: 150, },
  // { title: '入库预留保质天数', dataIndex: 'inStoreDay', key: 'inStoreDay', width: 150, },
];
export default columns;
