refundList.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. <template>
  2. <view class="app-content">
  3. <block v-if="!$util.isEmpty(list.data)">
  4. <view class="flex-space list" v-for="(item, index) in list.data" :key="index" @click="goDetail(item)">
  5. <view class="label">
  6. <text>日期:{{item.addTime.substr(5,11)}}</text>
  7. <text>单号:{{item.orderSn}}</text>
  8. <text>操作:{{item.shopAdminName}}</text>
  9. <text>类型:{{item.book == 1 ? '预订单多退少补' :'普通'}}</text>
  10. <text v-if="!$util.isEmpty(item.remark)">备注:{{item.remark}}</text>
  11. <text style="position:absolute;right:-425upx;top:0upx;">{{ item.status==0?'退款中':item.status==1?'已完成':'退款中' }}</text>
  12. </view>
  13. <view class="flex val">¥{{parseFloat(item.refundPrice)}} <view class="iconfont iconxiangyou"></view> </view>
  14. </view>
  15. </block>
  16. <block v-else>
  17. <app-wrapper-empty title="暂无数据" :is-empty="$util.isEmpty(list.data)" />
  18. </block>
  19. </view>
  20. </template>
  21. <script>
  22. import { list } from "@/mixins";
  23. import { refundList } from "@/api/refund";
  24. export default {
  25. name: "refundList",
  26. components: {},
  27. mixins: [list],
  28. data() {
  29. return {
  30. };
  31. },
  32. onPullDownRefresh() {
  33. this.resetList();
  34. this._list().then((res) => {
  35. uni.stopPullDownRefresh();
  36. });
  37. },
  38. onReachBottom() {
  39. if (!this.list.finished) {
  40. this._list().then((res) => {
  41. uni.stopPullDownRefresh();
  42. });
  43. } else {
  44. uni.stopPullDownRefresh();
  45. }
  46. },
  47. mounted() {
  48. },
  49. onLoad(option) {
  50. },
  51. onShow() {
  52. this.resetList();
  53. this._list();
  54. },
  55. methods: {
  56. goDetail(item){
  57. if(item.book == 1){
  58. this.$msg('预订单多退少补')
  59. return false
  60. }
  61. this.$util.pageTo({url: '/pagesOrder/refundDetail',query: {id: item.id}})
  62. },
  63. _list() {
  64. return refundList({
  65. page: this.list.page,
  66. orderSn:this.option.orderSn
  67. }).then((res) => {
  68. this.completes(res);
  69. if (this.$util.isEmpty(res.data)){
  70. return false
  71. }
  72. });
  73. },
  74. },
  75. };
  76. </script>
  77. <style lang="scss" scoped>
  78. .app-content{
  79. .list{
  80. padding: 20upx 30upx;
  81. margin-bottom: 20upx;
  82. background: #FFFFFF;
  83. .label{
  84. position: relative;
  85. line-height: 50upx;
  86. text{
  87. display: block;
  88. }
  89. }
  90. .val{
  91. font-size: 25upx;
  92. .iconfont{
  93. margin-left: 12upx;
  94. color: #999999;
  95. }
  96. }
  97. }
  98. }
  99. </style>