content.config.ts 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  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 { purchPayStatusOptions } from "/@/utils/status";
  7. import { renderIconLabelLeft } from "/@/utils/columnRenderHelper";
  8. const columns = [
  9. {
  10. type: "selection",
  11. width: 40,
  12. align: "center",
  13. hide: ({ checkList }) => !checkList.includes("勾选列")
  14. },
  15. {
  16. label: "序号",
  17. type: "index",
  18. minWidth: 60,
  19. align: "left",
  20. hide: ({ checkList }) => !checkList.includes("序号列")
  21. },
  22. {
  23. label: "对账付款编码",
  24. prop: "dzNo",
  25. width: 150,
  26. align: "left"
  27. },
  28. {
  29. label: "对账编码",
  30. prop: "payNo",
  31. width: 150
  32. },
  33. {
  34. label: "状态",
  35. prop: "dstatus",
  36. width: 130,
  37. cellRenderer: ({ row, props }) =>
  38. h(
  39. ElTag,
  40. {
  41. size: props.size
  42. },
  43. {
  44. default: () =>
  45. purchPayStatusOptions.find(s => String(row.dstatus) === s.value)
  46. ?.label
  47. }
  48. )
  49. },
  50. {
  51. label: "本次付款金额",
  52. prop: "dpay_fee",
  53. width: 110,
  54. align: "left"
  55. },
  56. {
  57. label: "总额款",
  58. prop: "total_fee",
  59. width: 110
  60. },
  61. // {
  62. // label: "卖方公司编码",
  63. // prop: "supplierNo",
  64. // width: 150,
  65. // align: "left"
  66. // },
  67. {
  68. label: "卖出方公司",
  69. prop: "supplierName",
  70. minWidth: 180,
  71. ...renderIconLabelLeft('supplierNo', 'supplierName','卖出方公司编码:')
  72. },
  73. // {
  74. // label: "买方公司编码",
  75. // prop: "companyNo",
  76. // width: 150
  77. // },
  78. {
  79. label: "买入方公司名称",
  80. prop: "companyName",
  81. minWidth: 180,
  82. ...renderIconLabelLeft('companyNo', 'companyName','买入方公司编码:')
  83. },
  84. {
  85. label: "申请人",
  86. prop: "apply_name",
  87. width: 90,
  88. align: "left"
  89. },
  90. {
  91. label: "申请时间",
  92. width: 140,
  93. prop: "addtime",
  94. formatter: ({ addtime }) => dayjs(addtime).format("YYYY-MM-DD HH:mm:ss")
  95. },
  96. {
  97. label: "操作",
  98. fixed: "right",
  99. width: 100,
  100. slot: "operation"
  101. }
  102. ];
  103. const contentConfig: ContentConfig = {
  104. title: "采购付款",
  105. columns,
  106. deleteProp: "dzNo",
  107. showDelete: ({ dstatus }) => Number(dstatus) !== 3,
  108. companyProp: "supplierNo",
  109. superUserNoAction: true,
  110. listNoRelation: true,
  111. apis: {
  112. httpList,
  113. httpDelete,
  114. httpAdd: true
  115. }
  116. };
  117. export default contentConfig;