import type { TableColumnProps } from '@/types/basic-table';

const TABLE_OPTIONS = {
  emptyText: '暂无数据',
  loading: true,
  maxHeight: 'calc(70vh - 150px)',
};

/** 劳防用品采购申请列表列：申请单号、申请人、申请人部门、状态、当前流程节点、操作（后端字段：applyCode, applicantName, deptName, statusName, nodeDescription） */
const PURCHASE_APPLY_TABLE_COLUMNS: TableColumnProps[] = [
  {
    label: '编号',
    type: 'index',
    align: 'center',
    width: '80px',
  },
  {
    label: '申请单号',
    prop: 'applyCode',
    align: 'left',
    minWidth: '140px',
  },
  {
    label: '申请人',
    prop: 'applicantName',
    align: 'left',
    minWidth: '100px',
  },
  {
    label: '申请部门',
    prop: 'deptName',
    align: 'left',
    minWidth: '140px',
  },
  {
    label: '状态',
    prop: 'status',
    slot: 'status',
    align: 'center',
    minWidth: '100px',
  },
  {
    label: '当前流程节点',
    prop: 'nodeDescription',
    align: 'left',
    minWidth: '140px',
  },
  {
    label: '操作',
    prop: 'action',
    slot: 'action',
    fixed: 'right',
    width: '220px',
    align: 'left',
  },
];

export { TABLE_OPTIONS, PURCHASE_APPLY_TABLE_COLUMNS };
