content.config.ts 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319
  1. import { ContentConfig } from "/@/components/PageContent";
  2. import { httpList } from "/@/api/invoiceInOut/inOutManager";
  3. import { h } from "vue";
  4. import { ElTag } from "element-plus";
  5. import { typeOptions, sourceOptions, statusOptions, managerStatusOptions } from "./shared";
  6. import { xs_inv_type_list } from "/@/utils/status";
  7. const columns = [
  8. {
  9. label: "业务编号",
  10. prop: "invoiceCode",
  11. width: 150
  12. },
  13. {
  14. label: "类型",
  15. width: 80,
  16. cellRenderer({ row }){
  17. return h(ElTag, { type: 'primary', size: 'small' }, {
  18. default: () => typeOptions.find(item => item.value == row.type)?.label
  19. })
  20. }
  21. },
  22. {
  23. label: '数据来源',
  24. width: 90,
  25. cellRenderer({ row }){
  26. return h(ElTag, { type: 'primary', size: 'small' }, {
  27. default: () => sourceOptions.find(item => item.value == row.source)?.label
  28. })
  29. }
  30. },
  31. {
  32. label: "状态",
  33. width: 90,
  34. cellRenderer({ row }) {
  35. return h(
  36. ElTag,
  37. { type: statusOptions.find(item => item.value == row.status)?.type, size: 'small' },
  38. { default: () => statusOptions.find(item => item.value == row.status)?.label }
  39. )
  40. }
  41. },
  42. {
  43. label: '异常原因',
  44. width: 120,
  45. prop: 'error_remark'
  46. },
  47. {
  48. label: '销售方公司纳税识别号',
  49. prop: 'seller_code',
  50. width: 150
  51. },
  52. {
  53. label: '销售方公司',
  54. prop: 'seller_name',
  55. width: 150
  56. },
  57. {
  58. label: '订单编号',
  59. prop: 'orderCode',
  60. width: 160
  61. },
  62. {
  63. label: "订单主编号",
  64. prop: "cxCode",
  65. width: 160
  66. },
  67. {
  68. label: "商品编号",
  69. prop: "goodNo",
  70. width: 120
  71. },
  72. {
  73. label: "商品名称",
  74. prop: "goodName",
  75. width: 120
  76. },
  77. {
  78. label: "单位",
  79. prop: "unit",
  80. width: 60
  81. },
  82. {
  83. label: '商品数量',
  84. prop: 'num',
  85. width: 100
  86. },
  87. {
  88. label: '商品单价',
  89. prop: 'goodPrice',
  90. width: 100
  91. },
  92. {
  93. label: '订单总金额',
  94. prop: 'totalPrice',
  95. width: 120
  96. },
  97. {
  98. label: '税目',
  99. prop: 'cat_code',
  100. width: 120
  101. },
  102. {
  103. label: '税率',
  104. width: 60,
  105. cellRenderer({ row }){
  106. return (row.tax * 100) + '%'
  107. }
  108. },
  109. {
  110. label: '关联金额',
  111. prop: 'inv_fee',
  112. width: 120
  113. },
  114. {
  115. label: '购买方公司名称',
  116. prop: 'buyer_name',
  117. width: 120
  118. },
  119. {
  120. label: '购买方公司纳税号',
  121. prop: 'buyer_code',
  122. width: 120
  123. },
  124. {
  125. label: '发票号码',
  126. prop: 'inv_number',
  127. width: 100
  128. },
  129. {
  130. label: '发票类型',
  131. width: 180,
  132. cellRenderer({ row }){
  133. return xs_inv_type_list.find((item) => item.value === row.inv_type)?.label
  134. }
  135. },
  136. {
  137. label: '销售方公司',
  138. prop: 'inv_seller_code',
  139. width: 180
  140. },
  141. {
  142. label: '销售方公司纳税号',
  143. prop: 'inv_seller_name',
  144. width: 180
  145. },
  146. {
  147. label: '发票明细ID',
  148. prop: 'inv_item_id',
  149. width: 100
  150. },
  151. {
  152. label: '货物或应税劳务、服务名称',
  153. prop: 'inv_good_name',
  154. width: 170
  155. },
  156. {
  157. label: '类目编号',
  158. prop: 'cat_code',
  159. width: 100
  160. },
  161. {
  162. label: '规格型号',
  163. prop: 'inv_spec',
  164. width: 80
  165. },
  166. {
  167. label: '发票商品单位',
  168. prop: 'inv_unit',
  169. width: 100
  170. },
  171. {
  172. label: '发票商品数量',
  173. prop: 'inv_num',
  174. width: 100
  175. },
  176. {
  177. label: '税前单价',
  178. prop: 'inv_subprice',
  179. width: 100
  180. },
  181. {
  182. label: '税前总价',
  183. prop: 'inv_subtotal',
  184. width: 100
  185. },
  186. {
  187. label: '发票税率',
  188. prop: 'inv_tax',
  189. width: 80
  190. },
  191. {
  192. label: '发票税额',
  193. prop: 'inv_tax_total',
  194. width: 80
  195. },
  196. {
  197. label: '税后单价',
  198. prop: 'inv_price',
  199. width: 100
  200. },
  201. {
  202. label: '税后总额',
  203. prop: 'inv_total',
  204. width: 100
  205. },
  206. {
  207. label: '类目编号状态',
  208. width: 100,
  209. cellRenderer({ row }){
  210. return h(ElTag, { size: 'small', type: row.cat_diff == '0' ? 'danger' : 'success' }, {
  211. default: () => row.cat_diff == '0' ? '不一致' : '一致'
  212. })
  213. }
  214. },
  215. {
  216. label: '税率状态',
  217. prop: 'TODO',
  218. width: 100,
  219. cellRenderer({ row }) {
  220. return h(
  221. ElTag,
  222. { size: 'small', type: row.tax_diff == '0' ? 'danger' : 'success' },
  223. { default: () => row.tax_diff == '0' ? '不一致' : '一致' }
  224. )
  225. }
  226. },
  227. {
  228. label: '备注',
  229. prop: 'remark',
  230. width: 100
  231. },
  232. {
  233. label: '业务类型',
  234. width: 80,
  235. cellRenderer({ row }){
  236. return managerStatusOptions.find((item) => item.value == row.manager_status)?.label
  237. }
  238. },
  239. {
  240. label: '关联商品ID',
  241. prop: 'goodNo',
  242. width: 80,
  243. cellRenderer({ row }){
  244. if (row.ProductRela.length === 0){
  245. return null
  246. }
  247. return row.ProductRela[0].id
  248. }
  249. },
  250. {
  251. label: '关联商品名称',
  252. prop: 'goodName',
  253. width: 100,
  254. cellRenderer({ row }) {
  255. if (row.ProductRela.length === 0) {
  256. return null
  257. }
  258. return row.ProductRela[0].goodName
  259. }
  260. },
  261. {
  262. label: "操作",
  263. fixed: "right",
  264. width: 50,
  265. slot: "operation"
  266. }
  267. ];
  268. const contentConfig: ContentConfig = {
  269. columns,
  270. title: "商品管理",
  271. permissions: ['007'],
  272. apis: {
  273. httpList: (parameter = {}) => httpList({ ...parameter, channel: [1, 2], manager_status: '3' }),
  274. httpAdd: true
  275. }
  276. };
  277. export default contentConfig;