content.config.ts 4.3 KB

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