content.config.ts 2.1 KB

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