content.config.ts 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. import { ContentConfig } from "/@/components/PageContent";
  2. import { httpList, httpDelete } from "/@/api/purchase/orderPay";
  3. import { h } from "vue";
  4. import { ElTag } from "element-plus";
  5. import { statusOptions } from "./_options";
  6. const columns = [
  7. {
  8. label: "对账付款编号",
  9. prop: "dzNo",
  10. width: 160,
  11. align: "left"
  12. },
  13. {
  14. label: "对账编号",
  15. prop: "payNo",
  16. width: 160
  17. },
  18. {
  19. label: "状态",
  20. prop: "dstatus",
  21. minWidth: 140,
  22. transform: dstatus =>
  23. statusOptions.find(s => String(dstatus) === s.value)?.label,
  24. cellRenderer: ({ row, props }) =>
  25. h(
  26. ElTag,
  27. {
  28. size: props.size
  29. },
  30. {
  31. default: () =>
  32. statusOptions.find(s => String(row.dstatus) === s.value)?.label
  33. }
  34. )
  35. },
  36. {
  37. label: "对账总金额",
  38. prop: "total_fee",
  39. width: 110
  40. },
  41. {
  42. label: "本次付款金额",
  43. prop: "dpay_fee",
  44. width: 110,
  45. align: "left"
  46. },
  47. {
  48. label: "卖方公司编号",
  49. prop: "supplierNo",
  50. width: 160,
  51. align: "left"
  52. },
  53. {
  54. label: "卖方公司名称",
  55. prop: "supplierName",
  56. minWidth: 180
  57. },
  58. {
  59. label: "买方公司编号",
  60. prop: "companyNo",
  61. width: 160
  62. },
  63. {
  64. label: "买方公司名称",
  65. prop: "companyName",
  66. minWidth: 180
  67. },
  68. {
  69. label: "申请人",
  70. prop: "apply_name",
  71. minWidth: 90,
  72. align: "left"
  73. },
  74. {
  75. label: "申请时间",
  76. width: 160,
  77. prop: "addtime"
  78. },
  79. {
  80. label: "操作",
  81. fixed: "right",
  82. width: 100,
  83. slot: "operation"
  84. }
  85. ];
  86. const contentConfig: ContentConfig = {
  87. title: "采购付款",
  88. columns,
  89. deleteProp: "dzNo",
  90. superUserNoAction: true,
  91. showDelete: ({ dstatus }) => Number(dstatus) === 1,
  92. apis: {
  93. httpList,
  94. httpDelete,
  95. httpAdd: true
  96. }
  97. };
  98. export default contentConfig;