content.config.ts 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. import { ContentConfig } from "/@/components/PageContent";
  2. import { httpList } from "/@/api/InvoiceSales/invoicePool";
  3. import dayjs from "dayjs";
  4. import { h } from "vue";
  5. import { ElTag } from "element-plus";
  6. import { invoiceTypeList, useTypeOptions } from "/@/utils/status";
  7. const columns = [
  8. // {
  9. // type: "selection",
  10. // width: 40,
  11. // align: "center",
  12. // hide: ({ checkList }) => !checkList.includes("勾选列")
  13. // },
  14. // {
  15. // label: "序号",
  16. // type: "index",
  17. // width: 70,
  18. // hide: ({ checkList }) => !checkList.includes("序号列")
  19. // },
  20. {
  21. label: "发票申请编码",
  22. prop: "invNo",
  23. width: 150
  24. },
  25. {
  26. label: "业务企业编码",
  27. prop: "inv_out",
  28. width: 150
  29. },
  30. {
  31. label: "业务公司名称",
  32. prop: "inv_company",
  33. minWidth: 160
  34. },
  35. {
  36. prop: "buyer_title",
  37. label: "客户发票抬头",
  38. minWidth: 160
  39. },
  40. {
  41. label: "税后金额",
  42. prop: "inv_value",
  43. width: 110
  44. },
  45. {
  46. label: "平台类型",
  47. prop: "platform_type",
  48. width: 110,
  49. cellRenderer: ({ row }) => {
  50. return h(ElTag, null, {
  51. default: () => {
  52. return (
  53. useTypeOptions.find(item => item.value == row.platform_type + "")
  54. ?.label || "--"
  55. );
  56. }
  57. });
  58. }
  59. },
  60. {
  61. label: "发票类型",
  62. width: 160,
  63. cellRenderer({ row }) {
  64. const current = invoiceTypeList.find(
  65. i => i.value === String(row.inv_type)
  66. );
  67. return h(ElTag, null, {
  68. default: () => current.label
  69. });
  70. }
  71. },
  72. {
  73. label: "申请人",
  74. prop: "apply_name",
  75. width: 80
  76. },
  77. {
  78. label: "申请时间",
  79. width: 170,
  80. prop: "addtime",
  81. formatter: ({ addtime }) =>
  82. addtime ? dayjs(addtime).format("YYYY-MM-DD HH:mm:ss") : ""
  83. },
  84. {
  85. label: "操作",
  86. fixed: "right",
  87. width: 55,
  88. slot: "operation"
  89. }
  90. ];
  91. const contentConfig: ContentConfig = {
  92. title: "发票公海池",
  93. inv: true,
  94. columns,
  95. apis: {
  96. httpList
  97. }
  98. };
  99. export default contentConfig;