after-sales-order.ts 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. import { h } from 'vue';
  2. import { NImage } from 'naive-ui';
  3. import { fetchGetAllStoreList } from '@/service/api/goods/desk-category';
  4. import type { FormSchema } from '@/components/zt/Form/types/form';
  5. export const SearchForm: FormSchema[] = [
  6. {
  7. label: '门店名称',
  8. component: 'ApiSelect',
  9. field: 'shopId',
  10. componentProps: {
  11. api: fetchGetAllStoreList,
  12. labelFeild: 'shopName',
  13. valueFeild: 'shopId'
  14. }
  15. },
  16. {
  17. label: '退款编号',
  18. component: 'NInput',
  19. field: 'refundSn'
  20. },
  21. {
  22. label: '订单编号',
  23. component: 'NInput',
  24. field: 'orderNumber'
  25. },
  26. {
  27. label: '收货人姓名',
  28. component: 'NInput',
  29. field: 'receiver'
  30. },
  31. {
  32. label: '收货人手机号',
  33. component: 'NInput',
  34. field: 'userMobile'
  35. },
  36. {
  37. label: '申请方式',
  38. component: 'NSelect',
  39. field: 'applyType',
  40. componentProps: {
  41. options: [
  42. {
  43. label: '仅退款',
  44. value: 1
  45. },
  46. {
  47. label: '退货退款',
  48. value: 2
  49. },
  50. {
  51. label: '差价退款',
  52. value: 5
  53. }
  54. ]
  55. }
  56. },
  57. {
  58. label: '售后状态',
  59. component: 'NSelect',
  60. field: 'refundStatus',
  61. componentProps: {
  62. options: [
  63. {
  64. label: '申请退款',
  65. value: 1
  66. },
  67. {
  68. label: '退款成功',
  69. value: 2
  70. },
  71. {
  72. label: '部分退款成功',
  73. value: 3
  74. },
  75. {
  76. label: '退款失败',
  77. value: 4
  78. }
  79. ]
  80. }
  81. },
  82. {
  83. label: '下单时间',
  84. component: 'NDatePicker',
  85. field: 'createTime',
  86. componentProps: {
  87. type: 'datetimerange'
  88. }
  89. }
  90. ];
  91. export enum refundEnum {
  92. /**
  93. * 买家申请
  94. */
  95. BUYER_APPLY = 10,
  96. /**
  97. * 卖家同意
  98. */
  99. SELLER_AGREE = 60,
  100. /**
  101. * 卖家拒绝
  102. */
  103. SELLER_REFUSE = 30,
  104. /**
  105. * 退款成功
  106. */
  107. REFUND_SUCCESS = 70,
  108. /**
  109. * 买家发货
  110. */
  111. BUYER_DELIVERY = 65,
  112. /**
  113. * 撤回申请
  114. */
  115. REVOKE_APPLY = 40
  116. }
  117. export const refundStatus = {
  118. [refundEnum.BUYER_APPLY]: '买家申请',
  119. [refundEnum.SELLER_AGREE]: '卖家同意',
  120. [refundEnum.SELLER_REFUSE]: '卖家拒绝',
  121. [refundEnum.REFUND_SUCCESS]: '退款成功',
  122. [refundEnum.BUYER_DELIVERY]: '买家发货',
  123. [refundEnum.REVOKE_APPLY]: '撤回申请'
  124. };
  125. export const TypeText = ['仅退款', '退款退货', '差价退款'];
  126. export const orderColumns: NaiveUI.TableColumn<Api.delivery.OrderRefundSku>[] = [
  127. {
  128. title: '退款商品',
  129. key: 'goods',
  130. width: 300,
  131. render: row => {
  132. const goodsNodes = [
  133. h(NImage, { src: row.pic, width: 80, height: 80 }),
  134. h('div', { class: 'ml-2 ' }, [
  135. h('div', { class: 'text-15px font-semibold' }, row.skuName),
  136. h('div', { class: 'text-gray' }, `规格:${row.spec || '--'}`)
  137. ])
  138. ];
  139. return h('div', { class: 'flex items-center' }, goodsNodes);
  140. }
  141. },
  142. {
  143. title: '购买单价(元)',
  144. key: 'skuPrice',
  145. width: 150
  146. },
  147. {
  148. title: '购买数量',
  149. key: 'productCount',
  150. width: 150,
  151. render: row => {
  152. return row.orderItem.prodCount;
  153. }
  154. },
  155. {
  156. title: '小计/元',
  157. key: 'productTotalAmount',
  158. width: 100,
  159. render: row => {
  160. return row.orderItem.productTotalAmount;
  161. }
  162. },
  163. {
  164. title: '退款数量',
  165. key: 'productCount',
  166. width: 100
  167. },
  168. {
  169. title: '退款金额',
  170. key: 'skuPrice',
  171. width: 100
  172. }
  173. ];