export default function useColumns() {

  const TableColumns = [
    {
      item: { key: "code", title: "需求单号", },
      attr: {},
    },
    {
      item: { key: "rowNo", title: "行号", hidden: false, width: 60, },
      attr: {},
    },
    {
      item: { key: "materialCode", title: "物料编码", },
      attr: {},
    },
    {
      item: { key: "materialName", title: "品名", },
      attr: {},
    },
    {
      item: { key: "specification", title: "规格", },
      attr: {},
    },
    {
      item: { key: "unit", title: "单位", width: 100, },
      attr: {},
    },
    {
      item: { key: "manufacturerName", title: "生产厂家/代理人", },
      attr: {},
    },
    {
      item: { key: "totalMonthlySales", title: "月销量", },
      attr: {},
    },
    {
      item: { key: "resDemandQty", title: "最终净需求量", },
      attr: {},
    },
    {
      item: { key: "puQtyRes", title: "最终采购量", },
      attr: {},
    },
    {
      item: { key: "closeQty", title: "关闭数量", hidden: false, width: 120, },
      attr: {},
    },
    {
      item: { key: "customerName", title: "需求客户", },
      attr: {},
    },
    {
      item: { key: "minPackage", title: "最小包装量", hidden: false, width: 120, },
      attr: {},
    },
    {
      item: { key: "minOrderQty", title: "最小订单量", },
      attr: {},
    },
    {
      item: { key: "minBatch", title: "最小批量", },
      attr: {},
    },
    {
      item: { key: "updateByName", title: "修改人", hidden: false, width: 120, },
      attr: {},
    },
    {
      item: { key: "updateCause", title: "修改原因", hidden: false, },
      attr: {},
    },
    {
      item: { key: "remark", title: "业务备注", },
      attr: {},
    },
    {
      item: { key: "expiry", title: "有效期", hidden: false, width: 120, },
      attr: {},
    },
    {
      item: { key: "expiryUnit", title: "有效期单位", hidden: false, width: 120, },
      attr: {},
    },
    {
      item: { key: "", title: "要求交货日期", hidden: false, width: 120, },
      attr: {},
    },
    {
      item: { key: "isUrgency", title: "紧急标识", width: 120, },
      attr: {
        is: "el-select",
        dictName: "sys_yes_no",
      },
    },
    {
      item: { key: "isReplenishment", title: "补单标识", width: 120, },
      attr: {
        is: "el-select",
        dictName: "sys_yes_no",
      },
    },
    {
      item: { key: "deliveryWarehouseName", title: "收货仓库名称", },
      attr: {
        is: "el-popover-select-v2",
        referName: "WAREHOUSE_PARAM",
        valueKey: "name",
        dataMapping: {
          deliveryWarehouse: "id",
        },
        queryParams: (params) => ({
          pkOrg: params.org
        })
      },
    },
    {
      item: { key: "deliveryAllocationName", title: "收货货位名称", },
      attr: {
        is: "el-popover-select-v2",
        referName: "ALLOCATION_PARAM",
        valueKey: "name",
        dataMapping: {
          deliveryAllocation: "id",
        },
        queryParams: (params) => ({
          stordocId: params.deliveryWarehouse
        })
      },
    },
    {
      item: { key: "buyerName", title: "采购员名称", width: 120, },
      attr: {},
    },
    {
      item: { key: "billMaker", title: "制单人", width: 120, },
      attr: {},
    },
    {
      item: { key: "approver", title: "审核人员", hidden: false, width: 120, },
      attr: {},
    },
    {
      item: { key: "status", title: "行状态", width: 120, },
      attr: {
        is: "el-dict-tag",
        dictName: "sys_row_status",
      },
    },
    {
      item: { key: "registrant", title: "注册人", hidden: false, width: 120, },
      attr: {},
    },
    {
      item: { key: "lastWarehouseQty", title: "末级供应仓库存量", hidden: false, width: 120, },
      attr: {},
    },
    {
      item: { key: "additionalSupplierName", title: "补单供应商名称", },
      attr: {
        is: "el-popover-select-v2",
        referName: "SUPPLIER_PARAM",
        valueKey: "name",
        dataMapping: {
          additionalSupplier: "id",
        },
      },
    },
    {
      item: { key: "lastWarehouseName", title: "供应仓库", hidden: false, },
      attr: {},
    },
    {
      item: { key: "lastAllocationName", title: "供应货位", hidden: false, },
      attr: {},
    },
    {
      item: { key: "billType", title: "业务类型", width: 120, },
      attr: {
        is: "el-dict-tag",
        dictName: "xqcl_business_type",
      },
    },
    {
      item: { key: "materialCategory", title: "品类", },
      attr: {},
    },
    {
      item: { key: "forecastClassify", title: "集团预测分类", hidden: false, },
      attr: {},
    },
    {
      item: { key: "updateTime", title: "修改时间", hidden: false, width: 120, },
      attr: {},
    },
    {
      item: { key: "puPeriod", title: "采购周期", hidden: false, width: 120, },
      attr: {},
    },
    {
      item: { key: "orgName", title: "采购组织名称", },
      attr: {
        is: "el-popover-select-v2",
        referName: "ORG_PARAM",
        valueKey: "name",
        dataMapping: {
          org: "id",
        },
      },
    },
    {
      item: { key: "demandDeptName", title: "需求部门名称", hidden: false, },
      attr: {
        is: "el-popover-select-v2",
        referName: "DEPT_PARAM",
        valueKey: "name",
        dataMapping: {
          demandDept: "id",
        },
        queryParams: (params) => ({
          pkOrg: params.org
        })
      },
    },
    {
      item: { key: "isBatchLock", title: "批号锁定标识", hidden: false, width: 120, },
      attr: {
        is: "el-select",
        dictName: "sys_yes_no",
      },
    },
    {
      item: { key: "approveName", title: "采购需求审批人", hidden: false, width: 120, },
      attr: {},
    },
    {
      item: { key: "approverFinishTime", title: "需求单审批时间", hidden: false, width: 120, },
      attr: {},
    },
    {
      item: { key: "createTime", title: "需求单提交时间", hidden: false, width: 120, },
      attr: {},
    },
    {
      item: { key: "createByName", title: "需求提交人", width: 120, },
      attr: {},
    },
    {
      item: { key: "processTime", title: "需求处理时间", hidden: false, width: 120, },
      attr: {},
    },
    {
      item: { key: "puManagerApproverDate", title: "处理审批时间", hidden: false, width: 120, },
      attr: {},
    },
    {
      item: { key: "processPersonal", title: "处理需求人员", hidden: false, },
      attr: {},
    },
    {
      item: { key: "priceType", title: "价格类型", width: 120, },
      attr: {
        is: "el-dict-tag",
        dictName: "sys_price_type",
      },
    },
    // {
    //   item: { key: "", title: "需求客户近1月用量", },
    //   attr: {},
    // },
    // {
    //   item: { key: "", title: "需求客户近3月月均用量", },
    //   attr: {},
    // },
    // {
    //   item: { key: "", title: "近1月均销售量", },
    //   attr: {},
    // },
    // {
    //   item: { key: "", title: "近3月均销售量", },
    //   attr: {},
    // },
    // {
    //   item: { key: "", title: "在途数量", },
    //   attr: {},
    // },
    // {
    //   item: { key: "", title: "中心公共库存", },
    //   attr: {},
    // },
    // {
    //   item: { key: "", title: "中心仓专属货位", },
    //   attr: {},
    // },
    // {
    //   item: { key: "", title: "客户专属货位库存", },
    //   attr: {},
    // },
    // {
    //   item: { key: "", title: "呆滞库存", },
    //   attr: {},
    // },
    // {
    //   item: { key: "", title: "项目仓库存", },
    //   attr: {},
    // },
    // {
    //   item: { key: "", title: "电商库存", },
    //   attr: {},
    // },
    // {
    //   item: { key: "", title: "近效期数量", },
    //   attr: {},
    // },
  ];

  return { TableColumns }
}