refundList.vue 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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.refundSn}}</text>
  8. <text>操作:{{item.shopAdminName}}</text>
  9. <text style="color:#3385FF;">状态:{{ item.status==0?'退款中':item.status==1?'已完成':'已取消' }}</text>
  10. <text v-if="!$util.isEmpty(item.remark)" style="color:red;font-weight:bold;">备注:{{item.remark}}</text>
  11. </view>
  12. <view class="flex val">¥{{parseFloat(item.refundPrice)}} <view class="iconfont iconxiangyou"></view> </view>
  13. </view>
  14. </block>
  15. <block v-else>
  16. <app-wrapper-empty title="暂无数据" :is-empty="$util.isEmpty(list.data)" />
  17. </block>
  18. </view>
  19. </template>
  20. <script>
  21. import { list } from "@/mixins";
  22. import { getRefundList } from "@/api/cg-refund";
  23. export default {
  24. name: "refundList",
  25. components: {},
  26. mixins: [list],
  27. data() {
  28. return {
  29. };
  30. },
  31. onPullDownRefresh() {
  32. this.resetList();
  33. this.getRefundData().then((res) => {
  34. uni.stopPullDownRefresh();
  35. });
  36. },
  37. onReachBottom() {
  38. if (!this.list.finished) {
  39. this.getRefundData().then((res) => {
  40. uni.stopPullDownRefresh();
  41. });
  42. } else {
  43. uni.stopPullDownRefresh();
  44. }
  45. },
  46. mounted() {
  47. },
  48. onLoad(option) {
  49. },
  50. onShow() {
  51. this.resetList();
  52. this.getRefundData();
  53. },
  54. methods: {
  55. init(){
  56. },
  57. goDetail(item){
  58. this.$util.pageTo({url: '/pagesPurchase/refundDetail',query: {id: item.id}})
  59. },
  60. getRefundData() {
  61. return getRefundList({page: this.list.page,relateOrderSn:this.option.orderSn}).then((res) => {
  62. this.completes(res)
  63. });
  64. },
  65. },
  66. };
  67. </script>
  68. <style lang="scss" scoped>
  69. .app-content{
  70. .list{
  71. padding: 20upx 30upx;
  72. margin-bottom: 20upx;
  73. background: #FFFFFF;
  74. .label{
  75. position: relative;
  76. line-height: 50upx;
  77. text{
  78. display: block;
  79. }
  80. }
  81. .val{
  82. font-size: 25upx;
  83. .iconfont{
  84. margin-left: 12upx;
  85. color: #999999;
  86. }
  87. }
  88. }
  89. }
  90. </style>