content.config.ts 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  1. import { ContentConfig } from "/@/components/PageContent";
  2. import { httpList } from "/@/api/InvoiceSales/sheetOrderPool";
  3. import { h } from "vue";
  4. import { ElTag } from "element-plus";
  5. import { TAG_TYPE } from "/@/utils/global";
  6. import { accAdd } from "/@/utils/calculation";
  7. import { cat_status, good_source, good_type } from "./search.config";
  8. const USE_STATUS = [
  9. {
  10. value: "0",
  11. label: "未对账"
  12. },
  13. {
  14. value: "1",
  15. label: "参与对账"
  16. },
  17. {
  18. value: "2",
  19. label: "参与核销对账"
  20. }
  21. ];
  22. const columns = [
  23. {
  24. type: "selection",
  25. width: 55,
  26. hide: ({ checkList }) => !checkList.includes("勾选列")
  27. },
  28. {
  29. label: "序号",
  30. type: "index",
  31. width: 70,
  32. hide: ({ checkList }) => !checkList.includes("序号列")
  33. },
  34. {
  35. label: "确认单编号",
  36. prop: "sequenceNo",
  37. width: 150
  38. },
  39. {
  40. label: "确认单名称",
  41. prop: "name",
  42. width: 150
  43. },
  44. {
  45. label: "销售员编号",
  46. prop: "ownerid",
  47. width: 100
  48. },
  49. {
  50. label: "销售员",
  51. prop: "ownerName"
  52. },
  53. {
  54. label: "客户编号",
  55. prop: "customerNo",
  56. width: 100
  57. },
  58. {
  59. label: "客户名称",
  60. prop: "customerName",
  61. width: 100
  62. },
  63. {
  64. label: "状态",
  65. prop: "ststus",
  66. width: 100,
  67. cellRenderer: ({ row }) =>
  68. h(ElTag, null, {
  69. default: () =>
  70. USE_STATUS.find(s => s.value === row.status)?.label || "--"
  71. })
  72. },
  73. {
  74. label: "部门",
  75. prop: "department",
  76. width: 100
  77. },
  78. {
  79. label: "平台名称",
  80. prop: "platName",
  81. width: 100
  82. },
  83. {
  84. label: "标签金额",
  85. prop: "tag_fee",
  86. width: 100
  87. },
  88. {
  89. label: "标签类型",
  90. prop: "tag_id",
  91. width: 100,
  92. cellRenderer: ({ row }) =>
  93. h(ElTag, null, {
  94. default: () =>
  95. TAG_TYPE.find(s => s.value === row.tag_id)?.label || "无标签"
  96. })
  97. },
  98. {
  99. label: "未开票",
  100. prop: "winv_fee",
  101. width: 100,
  102. cellRenderer: ({ row }) =>
  103. row.tag_id === "4"
  104. ? Number(row.winv_fee) - Number(row.tag_fee)
  105. : row.winv_fee
  106. },
  107. {
  108. label: "开票中",
  109. prop: "inv_fee"
  110. },
  111. {
  112. label: "已开票",
  113. prop: "ainv_fee",
  114. cellRenderer: ({ row }) =>
  115. row.tag_id === "4" ? accAdd(row.ainv_fee, row.tag_fee) : row.ainv_fee
  116. },
  117. {
  118. label: "未付款",
  119. prop: "wpay_fee",
  120. cellRenderer: ({ row }) =>
  121. row.tag_id === "3"
  122. ? Number(row.wpay_fee) - Number(row.tag_fee)
  123. : row.wpay_fee
  124. },
  125. {
  126. label: "付款中",
  127. prop: "pay_fee"
  128. },
  129. {
  130. label: "已付款",
  131. prop: "apay_fee",
  132. width: 100,
  133. cellRenderer: ({ row }) =>
  134. row.tag_id === "3" ? accAdd(row.apay_fee, row.tag_fee) : row.apay_fee
  135. },
  136. {
  137. label: "商品类型",
  138. width: 100,
  139. cellRenderer: ({ row }) =>
  140. h(ElTag, null, {
  141. default: () =>
  142. good_type.find(s => s.value === row.qrdType)?.label || "--"
  143. })
  144. },
  145. {
  146. label: "订单来源",
  147. width: 100,
  148. cellRenderer: ({ row }) =>
  149. h(ElTag, null, {
  150. default: () =>
  151. good_source.find(s => s.value === row.qrdSource)?.label || "--"
  152. })
  153. },
  154. {
  155. label: "标签id",
  156. prop: "tag_id",
  157. width: 100
  158. },
  159. {
  160. label: "标签添加人",
  161. prop: "tag_uname",
  162. width: 100
  163. },
  164. {
  165. label: "类目设置",
  166. cellRenderer: ({ row }) =>
  167. h(ElTag, null, {
  168. default: () =>
  169. cat_status.find(s => s.value === row.cat_status)?.label || "--"
  170. })
  171. },
  172. {
  173. label: "操作",
  174. fixed: "right",
  175. width: 120,
  176. slot: "operation"
  177. }
  178. ];
  179. const contentConfig: ContentConfig = {
  180. title: "确认单公海池",
  181. powers: ["001", "002", "003", "004", "005", "006", "007", "008"],
  182. columns,
  183. payProps: {
  184. prop: "sequenceNo",
  185. type: "3"
  186. },
  187. returnProps: {
  188. prop: "sequenceNo",
  189. type: "4"
  190. },
  191. apis: {
  192. httpList
  193. }
  194. };
  195. export default contentConfig;