index.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454
  1. <!-- 售后列表 -->
  2. <template>
  3. <view>
  4. <JHeader title="我的售后" width="50" height="50" style="padding: 24upx 0 0;"></JHeader>
  5. <view class="content">
  6. <view class="order-list-box">
  7. <view>
  8. <view v-for="item in findReturnDatalist" class="item">
  9. <view class="order-list-top">
  10. <view class="top-l" @click="go(`/another-tf/another-user/shop/shop-detail?shopId=${item.shopId}`)">
  11. <image :src="common.seamingImgUrl(item.shopLogo)" class="shop-img"></image>
  12. <text class="shop-name">{{ item.shopName }}</text>
  13. <tui-icon name="arrowright" :size="24" unit="upx" color="#999999" margin="0 0 0 15upx"></tui-icon>
  14. </view>
  15. <view class="top-r">
  16. <tui-icon name="wealth" :size="50" unit="upx" color="#c5aa7b" margin="0 8upx 0 0"></tui-icon>
  17. <text class="order-status">{{ item.afterType == 1 ? '退款' : '退货' }}</text>
  18. </view>
  19. </view>
  20. <view v-for="(itemlist, index) in item.skus" :key="index" class="order-info-box">
  21. <view
  22. class="order-info"
  23. @click="go(`/another-tf/another-serve/goodsDetails/index?shopId=${itemlist.shopId}&productId=${itemlist.productId}&skuId=${itemlist.skuId}`)"
  24. >
  25. <view class="order-info-item">
  26. <image :src="common.seamingImgUrl(itemlist.image)" class="product-img"></image>
  27. <view class="info-box">
  28. <text class="product-name">{{ itemlist.productName }}</text>
  29. <view class="product-sku">{{ itemlist.value }}</view>
  30. <view class="price-sku-box">
  31. <text class="product-price">退款:<text class="fuhao">¥{{ itemlist.total }}</text></text>
  32. </view>
  33. </view>
  34. </view>
  35. </view>
  36. </view>
  37. <view class="total-price-box">
  38. <!-- 退款 -->
  39. <view v-if="item.afterType == 1">
  40. <text v-if="item.afterState == 1" class="total-price-l">审核中</text>
  41. <text v-if="item.afterState == 2" class="total-price-l">退款中</text>
  42. <text v-if="item.afterState == 4" class="total-price-l">退款完成</text>
  43. <text v-if="item.afterState == 5" class="total-price-l">退款失败</text>
  44. <text v-if="item.afterState == 6" class="total-price-l">审核不通过</text>
  45. <text v-if="item.afterState == 7" class="total-price-l">评审中</text>
  46. <text v-if="item.afterState == 9" class="total-price-l">撤销申请</text>
  47. <text v-if="item.afterState == 10" class="total-price-l">审核通过</text>
  48. </view>
  49. <!-- 退货 -->
  50. <view v-if="item.afterType == 2">
  51. <text v-if="item.afterState == 1" class="total-price-l">退货审核中</text>
  52. <text v-if="item.afterState == 3" class="total-price-l">退货中</text>
  53. <text v-if="item.afterState == 4" class="total-price-l">已退款</text>
  54. <text v-if="item.afterState == 2" class="total-price-l">退款中</text>
  55. <text v-if="item.afterState == 5" class="total-price-l">退款失败</text>
  56. <text v-if="item.afterState == 6" class="total-price-l">审核不通过</text>
  57. <text v-if="item.afterState == 7" class="total-price-l">评审中</text>
  58. <text v-if="item.afterState == 8" class="total-price-l">退货完成,拒绝退款</text>
  59. <text v-if="item.afterState == 9" class="total-price-l">撤销申请</text>
  60. <text v-if="item.afterState == 10" class="total-price-l">审核通过</text>
  61. </view>
  62. <text v-if="item.afterState != 0" class="total-price-r mar-left-30">
  63. 退款金额 ¥ {{ item.price }}
  64. </text>
  65. </view>
  66. <!-- 退款 -->
  67. <view v-if="item.afterType == 1" class="order-btn-box">
  68. <text class="btn l" @click="deleteRecord(item)">删除记录</text>
  69. <text
  70. v-if="(((item.afterType == 1) && (item.afterState == 1)) || ((item.returnType == 2) && (item.afterState == 6)))"
  71. class="btn l" @click="cancelRefundTap(item)"
  72. >
  73. 撤销退款
  74. </text>
  75. <!-- 退款查看详情 -->
  76. <text
  77. class="btn viewDetail l"
  78. @click="go(`/another-tf/another-serve/refundDetails/index?item=${JSON.stringify(item)}`)"
  79. >
  80. 查看详情
  81. </text>
  82. </view>
  83. <!-- 退货 -->
  84. <view v-if="item.afterType == 2" class="order-btn-box">
  85. <text class="btn l" @click="deleteRecord(item)">删除记录</text>
  86. <text
  87. v-if="(((item.afterType == 2) && (item.afterState == 1)) || ((item.afterType == 2) && (item.afterState == 10)) || (item.afterState == 6))"
  88. class="btn l" @click="cancelRefundTaphuo(item)"
  89. >
  90. 撤销退货
  91. </text>
  92. <!-- 退货查看详情 -->
  93. <text
  94. class="btn viewDetail l"
  95. @click="go(`/another-tf/another-serve/returnDetails/index?item=${JSON.stringify(item)}`)"
  96. >
  97. 查看详情
  98. </text>
  99. </view>
  100. </view>
  101. </view>
  102. <view style="padding-bottom: 45upx;">
  103. <LoadingMore
  104. :status="!isEmpty && !findReturnDatalist.length
  105. ? 'loading' : !isEmpty && findReturnDatalist.length && (findReturnDatalist.length >= findReturnDatalistTotal) ? 'no-more' : ''"
  106. >
  107. </LoadingMore>
  108. <tui-no-data v-if="isEmpty" :fixed="false" style="margin-top: 60upx;">暂无数据</tui-no-data>
  109. </view>
  110. </view>
  111. </view>
  112. <!-- 优惠券领取 -->
  113. <tui-modal :show="delRecord" :custom="true" :fadein="true">
  114. <view class="Put-box1">
  115. <view class="text-align fs34 fs-bold">
  116. 是否删除此记录
  117. </view>
  118. <view class="flex-display flex-sp-between">
  119. <view class="btn" @click="delRecord = false">
  120. 取消
  121. </view>
  122. <view class="btn submit" @click="delRecordFn">
  123. 确定
  124. </view>
  125. </view>
  126. </view>
  127. </tui-modal>
  128. </view>
  129. </template>
  130. <script>
  131. import { getAllFindReturnListApi, updateDeleteAfterRecordApi, updateCancelReturnRefundApi, updateCancelReturnGoodsApi } from '../../../api/anotherTFInterface'
  132. export default {
  133. name: 'AfterSale',
  134. data() {
  135. return {
  136. FindReturnData: [],
  137. moneyReturnId: {
  138. id: ''
  139. },
  140. sellPriceitem: '',
  141. findReturnDatalist: [],
  142. page: 1, // 当前页
  143. pageSize: 20, // 每页记录数
  144. findReturnDatalistTotal: 0,
  145. isEmpty: false,
  146. delRecord: false,
  147. currentAfterId: ''
  148. }
  149. },
  150. onLoad() {
  151. this.getFindReturn()
  152. },
  153. methods: {
  154. // 获取售后列表数据
  155. getFindReturn(isLoadmore) {
  156. uni.showLoading()
  157. getAllFindReturnListApi({
  158. page: this.page,
  159. pageSize: this.pageSize
  160. })
  161. .then((res) => {
  162. this.findReturnDatalistTotal = res.data.total
  163. if (isLoadmore) {
  164. this.findReturnDatalist.push(...res.data.list)
  165. } else {
  166. this.findReturnDatalist = res.data.list
  167. }
  168. this.isEmpty = this.findReturnDatalist.length === 0
  169. uni.hideLoading()
  170. })
  171. .catch(() => {
  172. uni.hideLoading()
  173. })
  174. },
  175. // 删除记录
  176. deleteRecord(item) {
  177. this.currentAfterId = item.afterId
  178. this.delRecord = true
  179. },
  180. delRecordFn() {
  181. this.delRecord = false
  182. uni.showLoading({
  183. title: '正在删除...'
  184. })
  185. updateDeleteAfterRecordApi({
  186. id: this.currentAfterId
  187. }).then((res) => {
  188. uni.hideLoading()
  189. uni.showToast({
  190. title: '删除成功',
  191. icon: 'none',
  192. duration: 1500
  193. })
  194. this.currentAfterId = ''
  195. setTimeout(() => {
  196. this.page = 1
  197. this.findReturnDatalist = []
  198. this.getFindReturn()
  199. }, 2000)
  200. })
  201. .catch((e) => {
  202. uni.hideLoading()
  203. })
  204. },
  205. // 撤销申请
  206. cancelRefundTap(item) {
  207. this.Delete(item)
  208. },
  209. // 退款
  210. Delete(item) {
  211. uni.showLoading({
  212. title: '正在撤销退款...'
  213. })
  214. updateCancelReturnRefundApi({
  215. afterId: item.afterId,
  216. orderId: item.orderId
  217. }).then((res) => {
  218. uni.hideLoading()
  219. uni.showToast({
  220. title: '撤销成功',
  221. icon: 'none',
  222. duration: 2000
  223. })
  224. setTimeout(() => {
  225. this.page = 1
  226. this.findReturnDatalist = []
  227. this.getFindReturn()
  228. }, 2500)
  229. })
  230. .catch((e) => {
  231. uni.hideLoading()
  232. })
  233. },
  234. // 撤销退货
  235. cancelRefundTaphuo(item) {
  236. this.Deletehuo(item)
  237. },
  238. // 退货
  239. Deletehuo(item) {
  240. updateCancelReturnGoodsApi({
  241. afterId: item.afterId,
  242. orderId: item.orderId
  243. }).then((res) => {
  244. uni.showToast({
  245. title: '撤销成功',
  246. icon: 'none',
  247. duration: 2000
  248. })
  249. setTimeout(() => {
  250. this.page = 1
  251. this.findReturnDatalist = []
  252. this.getFindReturn()
  253. }, 2500)
  254. })
  255. }
  256. },
  257. onReachBottom() {
  258. if (this.findReturnDatalist.length < this.findReturnDatalistTotal) {
  259. ++this.page
  260. this.getFindReturn(true)
  261. }
  262. }
  263. }
  264. </script>
  265. <style lang="scss" scoped>
  266. page {
  267. background-color: #F7F7F7;
  268. }
  269. .Put-box1 {
  270. .btn {
  271. text-align: center;
  272. margin-top: 40rpx;
  273. border: 2rpx solid #333333;
  274. height: 80upx;
  275. line-height: 80upx;
  276. width: 100%;
  277. color: #333333;
  278. }
  279. .submit {
  280. background-color: #333333;
  281. color: #FFEBC4;
  282. margin-left: 20rpx;
  283. }
  284. }
  285. .order-list-box {
  286. padding: 20upx 30upx 0;
  287. box-sizing: border-box;
  288. }
  289. .order-list-box .item {
  290. margin-bottom: 20upx;
  291. background: #fff;
  292. border-radius: 10upx;
  293. }
  294. .order-list-top {
  295. height: 96upx;
  296. padding: 0 30upx;
  297. box-sizing: border-box;
  298. display: flex;
  299. flex-direction: row;
  300. align-items: center;
  301. justify-content: space-between;
  302. border-bottom: 1px solid #eee;
  303. }
  304. .top-l {
  305. display: flex;
  306. flex-direction: row;
  307. align-items: center;
  308. }
  309. .shop-img {
  310. width: 36upx;
  311. height: 36upx;
  312. margin-right: 10upx;
  313. }
  314. .shop-name {
  315. font-size: 30upx;
  316. color: #333;
  317. font-weight: bold;
  318. }
  319. .top-r {
  320. display: flex;
  321. flex-direction: row;
  322. align-items: center;
  323. }
  324. .order-status {
  325. font-size: 32rpx;
  326. color: #C5AA7B;
  327. }
  328. .order-info-box {
  329. padding: 0 30upx;
  330. box-sizing: border-box;
  331. }
  332. .order-info-item {
  333. display: flex;
  334. flex-direction: row;
  335. padding: 20upx 0;
  336. }
  337. .product-img {
  338. width: 180upx;
  339. height: 180upx;
  340. border-radius: 10upx;
  341. margin-right: 30upx;
  342. }
  343. .info-box {
  344. flex: 1;
  345. display: flex;
  346. flex-direction: column;
  347. justify-content: space-between;
  348. }
  349. .product-name {
  350. font-size: 26upx;
  351. color: #333;
  352. height: 68upx;
  353. line-height: 34upx;
  354. display: -webkit-box;
  355. overflow: hidden;
  356. text-overflow: ellipsis;
  357. word-break: break-all;
  358. -webkit-box-orient: vertical;
  359. -webkit-line-clamp: 2;
  360. }
  361. .price-sku-box {
  362. display: flex;
  363. flex-direction: row;
  364. justify-content: space-between;
  365. }
  366. .product-sku {
  367. font-size: 24upx;
  368. color: #999;
  369. }
  370. .product-price {
  371. font-size: 28upx;
  372. color: #333;
  373. font-weight: 400;
  374. }
  375. .product-price .fuhao {
  376. font-size: 32upx;
  377. color: #C83732;
  378. font-weight: bold;
  379. }
  380. .total-price-box {
  381. font-size: 26upx;
  382. color: #333;
  383. border: 2rpx solid #E4E5E6;
  384. display: flex;
  385. flex-direction: row;
  386. align-items: center;
  387. height: 70upx;
  388. line-height: 70upx;
  389. margin: 0 30rpx;
  390. }
  391. .total-price-l {
  392. width: 170upx;
  393. margin-left: 40upx;
  394. font-size: 30upx;
  395. color: #333;
  396. }
  397. .total-price-r {
  398. text-align: left;
  399. }
  400. .order-btn-box {
  401. padding: 30upx 0;
  402. display: flex;
  403. flex-direction: row;
  404. justify-content: flex-end;
  405. }
  406. .order-btn-box .btn {
  407. display: inline-view;
  408. width: 140upx;
  409. height: 58upx;
  410. text-align: center;
  411. line-height: 58upx;
  412. font-size: 26upx;
  413. color: #333;
  414. margin-left: 20upx;
  415. }
  416. .order-btn-box .btn.l {
  417. color: #333;
  418. border: 2rpx solid #333333;
  419. }
  420. .order-btn-box .viewDetail {
  421. background: #333333;
  422. border: none;
  423. color: #FFEBC4 !important;
  424. }
  425. </style>