import moment from "moment";

export const columns = [
  { hidden: true, title: "id", dataIndex: "asnLineId", key: "asnLineId" },
  { hidden: true, title: "categoryId", dataIndex: "categoryId", key: "categoryId" },
  { hidden: true, title: "整件堆垛库存数", dataIndex: "stackStockCount", key: "stackStockCount" },
  { hidden: true, title: "整件堆垛空货位数", dataIndex: "remainStackStockCount", key: "remainStackStockCount" },
  { hidden: true, title: "整件货架库存数", dataIndex: "shelfStockCount", key: "shelfStockCount" },
  { hidden: true, title: "整件货架空货位数", dataIndex: "remainShelfStockCount", key: "remainShelfStockCount" },

  { title: "商品编码", dataIndex: "itemNum", key: "itemNum", width: 120 },
  { title: "商品名称", dataIndex: "itemName", key: "itemName", width: 160 },
  { title: "商品规格", dataIndex: "specification", key: "specification", width: 100 },
  { title: "商品大类", dataIndex: "categoryName", key: "categoryName", width: 100 },
  { hidden: true, title: "商品助记码", dataIndex: "itemZjm", key: "itemZjm", width: 100 },
  { title: "生产厂家", dataIndex: "manufacturerName", key: "manufacturerName", width: 100 },
  { title: "产地", dataIndex: "productionPlace", key: "productionPlace", width: 100 },
  { title: "上市许可证持有人", dataIndex: "itemHealthListedLicensor", key: "itemHealthListedLicensor", width: 100 },
  { title: "包装单位", dataIndex: "uom", key: "uom", width: 100 },
  { title: "包装含量", dataIndex: "conversionRate", key: "conversionRate", width: 100 },
  { title: "原订单数量", dataIndex: "preQty", key: "preQty", width: 100 },
  { title: "件数", dataIndex: "oddCaseQty", key: "oddCaseQty", width: 100 },
  { title: "零散数", dataIndex: "oddPieceQty", key: "oddPieceQty", 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: "warehouseAreaCodes", key: "warehouseAreaCodes", width: 100 },
  { title: "库别列表", dataIndex: "warehouseAreaCategorys", key: "warehouseAreaCategorys", width: 100 },
  { title: "库房列表", dataIndex: "warehouseRoomCodes", key: "warehouseRoomCodes", width: 100 },
  // { title: '要货部门', dataIndex: 'needDept', key: 'needDept',width:100 },
  // { title: '要货业务员', dataIndex: 'needUser', key: 'needUser' ,width:100},
  { hidden: true, title: "代理商", dataIndex: "agent", key: "agent", width: 100 },
  { title: "批号", dataIndex: "manufacturerLotNum", key: "manufacturerLotNum", width: 100 },
  {
    title: "显示生产日期",
    dataIndex: "showProductionDate",
    key: "showProductionDate",
    width: 100,
    customRender(text) {
      let showProductionDate = text ? text.substring(0, 10) : "";
      return showProductionDate.replace(/-/g, "");
      // return text ? moment(text).format('YYYY-MM') : '';
    },
  },
  {
    title: "显示有效期至",
    dataIndex: "showExpiredDate",
    key: "showExpiredDate",
    width: 100,
    customRender(text) {
      let showExpiredDate = text ? text.substring(0, 10) : "";
      return showExpiredDate.replace(/-/g, "");
      // return text ? moment(text).format('YYYY-MM') : '';
    },
  },
  { title: "未收数量", dataIndex: "pieceQty", key: "pieceQty", width: 100 },
  {
    title: "整散分离",
    dataIndex: "isCaseOrPiece",
    key: "isCaseOrPiece",
    width: 100,
    hidden: true,
    customRender(text) {
      return text == "1" ? "整散分开" : "整散合一";
    },
  },
];
