columns.js 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. export default function useColumns() {
  2. const TableColumns = [
  3. { item: { key: "code", title: "订单生成单号" }, attr: {} },
  4. {
  5. item: { key: "status", title: "状态" },
  6. attr: {
  7. is: "el-dict-tag",
  8. dictName: "purchase_task_status",
  9. },
  10. },
  11. { item: { key: "existPrice", title: "是否有价格",width :150 ,}, attr: {
  12. is: "el-dict-tag",
  13. dictName: "sys_true_false",
  14. } },
  15. { item: { key: "demandCode", title: "需求单号" }, attr: {} },
  16. { item: { key: "materialName", title: "物料" }, attr: {} },
  17. {
  18. item: { key: "materialCode", title: "物料编码" },
  19. attr: {},
  20. },
  21. {
  22. item: { key: "materialDesc", title: "物料描述" },
  23. attr: {},
  24. },
  25. {
  26. item: { key: "manufacturerName", title: "生产厂家" },
  27. attr: {},
  28. },
  29. { item: { key: "puQty", title: "采购数量" }, attr: {} },
  30. {
  31. item: { key: "executeQty", title: "已执行数量" },
  32. attr: {},
  33. },
  34. {
  35. item: { key: "residueQty", title: "未执行数量" },
  36. attr: {},
  37. },
  38. {
  39. item: { key: "priceType", title: "价格类型" },
  40. attr: { is: "el-dict-tag", dictName: "sys_price_type" },
  41. },
  42. { item: { key: "puUnitName", title: "采购单位" }, attr: {} },
  43. { item: { key: "buyerName", title: "采购员" }, attr: {} },
  44. {
  45. item: { key: "supplierName", title: "建议供应商" },
  46. attr: {},
  47. },
  48. { item: { key: "puOrgName", title: "采购组织" }, attr: {} },
  49. { item: { key: "currencyName", title: "币种" }, attr: {} },
  50. { item: { key: "source", title: "需求来源" }, attr: {} },
  51. {
  52. item: { key: "customerName", title: "收货客户" },
  53. attr: {},
  54. },
  55. {
  56. item: { key: "assignSupplierName", title: "指定供应商" },
  57. attr: {},
  58. },
  59. { item: { key: "demandDate", title: "需求时间" }, attr: {} },
  60. { item: { key: "projectName", title: "项目名称" }, attr: {} },
  61. {
  62. item: { key: "demandPersonalName", title: "需求人" },
  63. attr: {},
  64. },
  65. {
  66. item: { key: "demandOrgName", title: "需求组织" },
  67. attr: {},
  68. },
  69. {
  70. item: { key: "demandDeptName", title: "需求部门" },
  71. attr: {},
  72. },
  73. {
  74. item: { key: "isBack", title: "是否退回" },
  75. attr: { is: "el-dict-tag", dictName: "sys_yes_no" },
  76. },
  77. { item: { key: "baskCause", title: "退回原因" }, attr: {} },
  78. { item: { key: "backDate", title: "退回日期" }, attr: {} },
  79. { item: { key: "unitName", title: "单位" }, attr: {} },
  80. ].map(({ item, attr }) => ({
  81. attr,
  82. item: { ...item, hidden: true, fixed: false },
  83. }));
  84. return { TableColumns };
  85. }