content.config.ts 2.4 KB

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