content.config.ts 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  1. import { ContentConfig } from "/@/components/PageContent";
  2. import { httpList } from "/@/api/InvoiceSales/sheetOrderPool";
  3. import { h } from "vue";
  4. import { ElImage, ElTag } from "element-plus";
  5. import {
  6. useTypeOptions,
  7. send_status_list,
  8. xs_order_type_options,
  9. xs_order_source_options
  10. } from "/@/utils/status";
  11. import { inv_open_status, retrun_status } from "./search.config";
  12. const columns = [
  13. {
  14. type: "selection",
  15. width: 40,
  16. align: "center",
  17. fixed: "left"
  18. },
  19. // {
  20. // label: "序号",
  21. // type: "index",
  22. // width: 70,
  23. // hide: ({ checkList }) => !checkList.includes("序号列")
  24. // },
  25. {
  26. label: "业务订单编码",
  27. prop: "sequenceNo",
  28. width: 150
  29. },
  30. {
  31. label: "销售订单主编码",
  32. prop: "cxCode",
  33. width: 150
  34. },
  35. {
  36. label: "平台类型",
  37. width: 80,
  38. cellRenderer: ({ row }) =>
  39. h(ElTag, null, {
  40. default: () =>
  41. useTypeOptions.find(s => s.value === row.platform_type)?.label || "--"
  42. })
  43. },
  44. {
  45. label: "卖方公司编码",
  46. prop: "companyNo",
  47. width: 150
  48. },
  49. {
  50. label: "卖方公司名称",
  51. prop: "companyName",
  52. minWidth: 160
  53. },
  54. {
  55. label: "客户编码",
  56. prop: "customerNo",
  57. width: 150
  58. },
  59. {
  60. label: "客户名称",
  61. prop: "customerName",
  62. minWidth: 160
  63. },
  64. {
  65. label: "平台名称",
  66. prop: "platName",
  67. width: 100
  68. },
  69. {
  70. label: "商品类型",
  71. width: 100,
  72. cellRenderer: ({ row }) =>
  73. h(ElTag, null, {
  74. default: () =>
  75. xs_order_type_options.find(s => s.value === row.qrdType)?.label ||
  76. "--"
  77. })
  78. },
  79. {
  80. label: "发货状态",
  81. width: 100,
  82. cellRenderer: ({ row }) =>
  83. h(ElTag, null, {
  84. default: () =>
  85. send_status_list.find(s => s.value === row.sendStatus)?.label || "--"
  86. })
  87. },
  88. {
  89. label: "订单来源",
  90. width: 100,
  91. cellRenderer: ({ row }) =>
  92. h(ElTag, null, {
  93. default: () =>
  94. xs_order_source_options.find(s => s.value === row.qrdSource)?.label ||
  95. "--"
  96. })
  97. },
  98. {
  99. label: "开票状态",
  100. width: 100,
  101. cellRenderer: ({ row }) =>
  102. h(ElTag, null, {
  103. default: () =>
  104. inv_open_status.find(s => s.value === row.inv_status)?.label || "--"
  105. })
  106. },
  107. {
  108. label: "已开票",
  109. prop: "ainv_fee",
  110. width: 110
  111. },
  112. {
  113. label: "开票中",
  114. prop: "inv_fee",
  115. width: 110
  116. },
  117. {
  118. label: "未开票",
  119. prop: "winv_fee",
  120. width: 110
  121. },
  122. {
  123. label: "开票标签金额",
  124. prop: "inv_tag_fee",
  125. width: 110
  126. },
  127. {
  128. label: "标签图片",
  129. width: "70px",
  130. cellRenderer({ row }) {
  131. if (!row.inv_tag_img) return null;
  132. return h(ElImage, {
  133. src: row.inv_tag_img,
  134. previewSrcList: [row.inv_tag_img],
  135. previewTeleported: true,
  136. style: {
  137. height: "20px",
  138. width: "20px"
  139. }
  140. });
  141. }
  142. },
  143. {
  144. label: "回款状态",
  145. width: 100,
  146. cellRenderer: ({ row }) => {
  147. return h(ElTag, null, {
  148. default: () =>
  149. retrun_status.find(s => s.value === row.pay_status)?.label
  150. });
  151. }
  152. },
  153. {
  154. label: "已回款",
  155. prop: "apay_fee",
  156. width: 110
  157. },
  158. {
  159. label: "回款中",
  160. prop: "pay_fee",
  161. width: 110
  162. },
  163. {
  164. label: "未回款",
  165. prop: "wpay_fee",
  166. width: 110
  167. },
  168. {
  169. label: "回款标签金额",
  170. prop: "pay_tag_fee",
  171. width: 110
  172. },
  173. {
  174. label: "标签图片",
  175. width: "70px",
  176. cellRenderer({ row }) {
  177. if (!row.pay_tag_img) return null;
  178. return h(ElImage, {
  179. src: row.pay_tag_img,
  180. previewSrcList: [row.pay_tag_img],
  181. previewTeleported: true,
  182. style: {
  183. height: "20px",
  184. width: "20px"
  185. }
  186. });
  187. }
  188. },
  189. {
  190. label: "销售员",
  191. prop: "ownerName",
  192. width: 70
  193. },
  194. {
  195. label: "部门",
  196. prop: "department",
  197. width: 70
  198. },
  199. {
  200. label: "操作",
  201. fixed: "right",
  202. width: 120,
  203. slot: "operation"
  204. }
  205. ];
  206. const contentConfig: ContentConfig = {
  207. title: "销售订单公海池",
  208. columns,
  209. superUserNoAction: true,
  210. payProps: {
  211. prop: "sequenceNo",
  212. type: "3"
  213. },
  214. returnProps: {
  215. prop: "sequenceNo",
  216. type: "4"
  217. },
  218. showPayTagFn: (_, permissions) => permissions.includes("016"),
  219. showReturnTagFn: (_, permissions) => permissions.includes("015"),
  220. apis: {
  221. httpList
  222. }
  223. };
  224. export default contentConfig;