refundType.vue 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. <template>
  2. <!--mine/refundType/refundType.wxml-->
  3. <!-- <view class="list"> -->
  4. <!-- <view class="li" wx:for="{{products}}" wx:key="item" bindtap="toDetail" data-id="{{item.id}}">
  5. <view class="cimgs">
  6. <image src="{{item.pic}}" mode="aspectFit" class="cimg"></image>
  7. <image src="/pages/images/jishida.png" mode="aspectFit" class="type" wx:if="{{orderType == 5}}"></image>
  8. <image src="/pages/images/tuangou.png" mode="aspectFit" class="type" wx:if="{{orderType == 2}}"></image>
  9. </view>
  10. <view class="zhinfo">
  11. <view class="zhtit">{{item.title}}</view>
  12. <view wx:if="{{item.propertiesList}}" class="guigecontent">规格:
  13. <text wx:for="{{item.propertiesList}}" wx:for-item="itemGuige" class="guige" decode="{{true}}">{{itemGuige.value}}&nbsp;
  14. </text>
  15. </view>
  16. <view class="jiage">
  17. <view class="zhjia"><text class="money">¥</text><text class="size">{{item.salePrice}}</text></view>
  18. <view class="num">×{{item.quantity}}</view>
  19. </view>
  20. </view>
  21. </view>
  22. </view> -->
  23. <view class="list1">
  24. <view class="dpname">
  25. 请选择售后类型
  26. </view>
  27. <view class="li" @tap="state>=30?mes():toreturngoods()"
  28. >
  29. <!-- v-if="(state>1&&state<=4&&canRefund)||(state >=20&&state <30&&isOtc=='1'&&canRefund) " -->
  30. <image src="/mine/static/mine/images/tui.png" class="image"></image>
  31. <view class="cont">
  32. <text>仅退款</text>
  33. <view class="color">未收到货,或已与卖家协商一致,仅退款无需退货</view>
  34. </view>
  35. <image src="/static/pages/images/more.png" class="right"></image>
  36. </view>
  37. <view class="li" @tap="state>=30?mes():torefund()" v-if="(state>2&&state<=7)||stateName=='部分发货'">
  38. <image src="/mine/static/mine/images/tuihuo.png" class="image"></image>
  39. <view class="cont">
  40. <text>退货退款</text>
  41. <view class="color">已收到货,需要退换收到的货物</view>
  42. </view>
  43. <image src="/static/pages/images/more.png" class="right"></image>
  44. </view>
  45. <!-- <view class="li">
  46. <image src="/mine/images/huan.png" class="image"></image>
  47. <view class="cont">
  48. <text>我要换货</text>
  49. <view class="color">已收到货,需要更换已收到的货物</view>
  50. </view>
  51. <image src="/pages/images/more.png" class="right"></image>
  52. </view> -->
  53. </view>
  54. </template>
  55. <script>
  56. // mine/refundType/refundType.js
  57. const app = getApp();
  58. const req = require("../../../utils/request.js");
  59. // state : 1 未付款 2 待确认 3 待发货 4 待提货 5 配送中 6 已签收 7 订单完成
  60. // 8 订单取消 9 退货中 10 完成退货 11 支付失败 15 进行中
  61. // 售后状态
  62. // 30 售后待审核 32 售后审核失败 35 商品待退回 36 商品退回中
  63. // 39 退款申请 40 退款待支付 41 退款中 42 退款失败
  64. // 43 退款成功
  65. // 处方订单
  66. // 20 未开方 21 开方中 22 开方失败 25 待审方
  67. // 26 审方中 27 审方失败,
  68. // 49 用户取消售后
  69. export default {
  70. data() {
  71. return {
  72. ids: '',
  73. pageList: [],
  74. count: 0,
  75. money: 0,
  76. isRx: true
  77. };
  78. },
  79. components: {},
  80. props: {},
  81. /**
  82. * 生命周期函数--监听页面加载
  83. */
  84. onLoad: function (options) {
  85. let id = options.id;
  86. let that = this;
  87. that.query = options.id;
  88. },
  89. /**
  90. * 生命周期函数--监听页面显示
  91. */
  92. onShow: function () {
  93. req.getRequest('/api/order/detail', {
  94. id: this.query
  95. }, data => {
  96. this.setData(data);
  97. // if (data.canRefund==false) {
  98. // uni.navigateBack({
  99. // delta: 1
  100. // });
  101. // }
  102. });
  103. },
  104. methods: {
  105. torefund() {
  106. uni.redirectTo({
  107. url: '/mine/refund/applyRefund/applyRefund?id=' + this.query + '&isrefund=' + 2
  108. });
  109. },
  110. toreturngoods() {
  111. if(this.state == 5 || (this.stateName&&this.stateName.indexOf('部分发货') > -1)){
  112. req.msgConfirmText('快递已发出,如需退货请拒收,或申请退货退款','继续退款',res=>{
  113. this.toApplyRefund();
  114. })
  115. }else{
  116. this.toApplyRefund();
  117. }
  118. },
  119. toApplyRefund(){
  120. uni.redirectTo({
  121. url: '/mine/refund/applyRefund/applyRefund?id=' + this.query + '&isrefund=' + 1
  122. });
  123. },
  124. mes() {
  125. req.msg("订单正在退款中");
  126. }
  127. }
  128. };
  129. </script>
  130. <style>
  131. @import "./refundType.css";
  132. </style>