import moment from 'moment'
// 是否追溯，是否双人验收，上市许可证持有人、数量。
// 批号，显示生产日期（目前为生产日期并且显示不正确），
// 显示有效期至，存储分类，退货原因，采购审核意见需要显示
const columns = [
  { hidden: true, title: 'id', dataIndex: 'asnLineId', key: 'asnLineId', },
  { hidden: true, title: 'itemId', dataIndex: 'itemId', key: 'itemId', },
  { 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", },
  { hidden: true, title: "itemHealthRegisterNbr", dataIndex: "itemHealthRegisterNbr", key: "itemHealthRegisterNbr", },
  { hidden: true, title: "itemHealthProduceLicense", dataIndex: "itemHealthProduceLicense", key: "itemHealthProduceLicense", },

  {
    width: 80, title: "是否追溯", dataIndex: "isSupervise", key: "isSupervise", width: 120, type: "txt",
    customRender(text) {
      return text == '1' ? '是' : '否'
    }
  },
  { title: "是否双人验收", dataIndex: "itemHealthIsDouble", key: "itemHealthTwovoflag", customRender(text) { return text ? '是' : '否'; }, width: 150, },
  { title: '上市许可证持有人', dataIndex: 'itemHealthListedLicensor', key: 'itemHealthListedLicensor', width: 120 },
  { title: '商品助记码', dataIndex: 'itemZjm', key: 'itemZjm', width: 120 },
  { title: '商品编码', dataIndex: 'itemNum', key: 'itemNum', width: 120 },
  { title: '商品名称', dataIndex: 'itemName', key: 'itemName', width: 120 },
  // { title: '%商品规格', dataIndex: 'uom', key: 'uom', width: 120 },
  { title: '商品大类', dataIndex: 'categoryName', key: 'categoryName', width: 120 },
  { title: '生产厂家', dataIndex: 'manufacturerName', key: 'manufacturerName', width: 120 },
  { title: '产地', dataIndex: 'productionPlace', key: 'productionPlace', width: 120 },
  { title: "包装单位", dataIndex: "uom", width: 100, value: '' },
  { title: '包装数量', dataIndex: 'conversionRate', key: 'conversionRate', width: 120, },
  {
    title: '数量', dataIndex: 'qty', key: 'qty', width: 120,
    customRender(text, record) {
      return (+record.conversionRate || 0) * (+record.oddCaseQty || 0) + (+record.oddPieceQty || 0)
    }
  },
  { title: '批号', dataIndex: 'manufacturerLotNum', key: 'manufacturerLotNum', width: 120 },
  { title: '件数', dataIndex: 'oddCaseQty', key: 'oddCaseQty', width: 120, },
  { title: '零散数', dataIndex: 'oddPieceQty', key: 'oddPieceQty', width: 120, },
  // { title: '商品总量', dataIndex: 'pieceQty', key: 'pieceQty', },
  { title: '显示生产日期', dataIndex: 'showProductionDate', key: 'showProductionDate', width: 120 },
  { title: '显示有效期至', dataIndex: 'showExpiredDate', key: 'showExpiredDate', width: 120 },
  { title: '存储分类', dataIndex: 'itemHealthStoreCategory', key: 'itemHealthStoreCategory', width: 120 },
  // { title: '退货类型', dataIndex: 'returnType', key: 'returnType', width: 120 },
  { title: '退货原因', dataIndex: 'rcvRtReason', key: 'rcvRtReason', width: 120 },
  { title: '采购审核意见', dataIndex: 'poAuditOpinion', key: 'poAuditOpinion', width: 120 },
  { title: '库区列表', dataIndex: 'warehouseAreaCodes', key: 'warehouseAreaCodes', width: 120 },
  { title: '库别列表', dataIndex: 'warehouseAreaCategorys', key: 'warehouseAreaCategorys', width: 120 },
  { title: '未收数量', dataIndex: 'pieceQty', key: 'pieceQty', width: 120 },
  {
    title: '整散分离', dataIndex: 'isCaseOrPiece', key: 'isCaseOrPiece', width: 120, hidden: true, customRender(text) {
      return text == '1' ? '是' : '否'
    }
  },
]

export default columns
