columns.js 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. import CONFIG from "@/config";
  2. export default function useColumns() {
  3. const TableColumns = [
  4. {
  5. item: { width:100,key: "puOrgName", title: "采购组织" },
  6. attr: {},
  7. },
  8. { item: { width:100,key: "materialName", title: "物料" }, attr: {} },
  9. { item: { width:100,key: "materialCode", title: "物料编码" }, attr: {} },
  10. { item: { width:100,key: "materialClassifyName", title: "物料一级分类" }, attr: {} },
  11. { item: { width:100,key: "manufacturerName", title: "生产厂家名称" }, attr: {} },
  12. { item: { width:100,key: "model", title: "物料型号" }, attr: {} },
  13. { item: { width:100,key: "specification", title: "物料规格" }, attr: {} },
  14. {
  15. item: { width:100,key: "supplierName", title: "供应商名称" },
  16. attr: {},
  17. },
  18. { item: { width:100,key: "customerName", title: "客户" }, attr: {} },
  19. {
  20. item: { width:100,key: "taxPrice", title: "主含税单价" },
  21. attr: {
  22. is: "el-computed-input-v2",
  23. formatter: (prop) => {
  24. return (prop * 1);
  25. },
  26. },
  27. },
  28. { item: { width:100,key: "unitName", title: "主单位" }, attr: {} },
  29. { item: { width:100,key: "effectiveDate", title: "价格生效日期" }, attr: {} },
  30. { item: { width:100,key: "endDate", title: "价格失效日期" }, attr: {} },
  31. { item: { width:100,key: "buyerName", title: "采购员" }, attr: {} },
  32. { item: { width:100,key: "source", title: "来源单据" }, attr: {
  33. is: "el-dict-tag",
  34. dictName: "price_source",
  35. } },
  36. {
  37. item: { width:100,key: "convertRate", title: "换算率" },
  38. attr: {
  39. is: "el-computed-input-v2",
  40. formatter: (prop) => {
  41. return (prop * 1);
  42. },
  43. },
  44. },
  45. {
  46. item: { width:100,key: "status", title: "有效状态" },
  47. attr: { is: "el-dict-tag", dictName: "is_effective" },
  48. },
  49. {
  50. item: { width:100,key: "enableStatus", title: "启用状态" },
  51. attr: { is: "el-dict-tag", dictName: "is_effective" },
  52. },
  53. {
  54. item: { width:100,key: "materialStatus", title: "物料启用状态" },
  55. attr: { is: "el-dict-tag", dictName: "is_effective" },
  56. },
  57. {
  58. item: { width:100,key: "isDistribution", title: "配送价" },
  59. attr: { is: "el-dict-tag", dictName: "is_effective" },
  60. },
  61. {
  62. item: { width:100,key: "priceType", title: "价格类型" },
  63. attr: { is: "el-dict-tag", dictName: "sys_price_type" },
  64. },
  65. { item: { width:100,key: "expiryEarly", title: "效期预警" }, attr: {} },
  66. { item: { width:100,key: "priority", title: "含税/无税优先" }, attr: {} },
  67. { item: { width:100,key: "createByName", title: "创建人" }, attr: {} },
  68. { item: { width:100,key: "updateByName", title: "更新人名称" }, attr: {} },
  69. ].map(({ item, attr }) => ({
  70. attr,
  71. item: { ...item, hidden: true, fixed: false },
  72. }));
  73. return { TableColumns };
  74. }