refundDetail.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. <template>
  2. <view class="app-content">
  3. <view class="flex refund-item">
  4. <view class="refund-label">退款方式:</view>
  5. <view class="flex list">
  6. <view class="flex" >{{refundType==1?'退货并退款':'仅退款'}}</view>
  7. </view>
  8. </view>
  9. <view class="refund-item-list" v-if="refundType==1">
  10. <view class="refund-label">退货商品:</view>
  11. <view>
  12. <view class="list" v-for="(res,i) in product" :key="i">
  13. <view class="flex list-title" >
  14. {{res.name}} ¥{{parseFloat(res.xhUnitPrice)}} x {{res.xhNum}}{{res.xhUnitName}} = ¥{{parseFloat(res.xhPrice)}}
  15. </view>
  16. </view>
  17. </view>
  18. </view>
  19. <view class="flex refund-item">
  20. <view class="refund-label"><text></text>退款金额:</view>
  21. <view class="list">¥{{refundPrice}}</view>
  22. </view>
  23. <view class=" refund-item">
  24. <view class="refund-label">备注信息:</view>
  25. <view class="list">{{remark}}</view>
  26. </view>
  27. <view style="text-align:center;">
  28. <button class="admin-button-com big blue" style="margin:30upx auto 10upx auto;width:50%;" @click="goBack()">返回</button>
  29. </view>
  30. <view style="text-align:center;">
  31. <button class="admin-button-com big blue" style="margin:20upx auto 10upx auto;width:50%;" @click="goWaste()">去报损</button>
  32. </view>
  33. </view>
  34. </template>
  35. <script>
  36. import { refundDetail } from "@/api/refund";
  37. export default {
  38. data() {
  39. return {
  40. product:'',
  41. refundPrice:0,
  42. refundType:1,
  43. remark:''
  44. };
  45. },
  46. onShow() {
  47. },
  48. methods: {
  49. goBack(){
  50. uni.navigateBack()
  51. },
  52. goWaste(){
  53. this.$util.pageTo({ url: '/pagesOrder/refundSuccess?id='+this.option.id})
  54. },
  55. init() {
  56. refundDetail({ id: this.option.id }).then(res=>{
  57. this.product = res.data.itemList||[];
  58. this.refundType = res.data.info.refundType||0;
  59. this.refundPrice = res.data.info.refundPrice ? parseFloat(res.data.info.refundPrice) : 0
  60. this.remark = res.data.info.remark;
  61. })
  62. }
  63. }
  64. };
  65. </script>
  66. <style lang="scss" scoped>
  67. .app-content{
  68. height: calc(100vh - 30upx * 2);
  69. padding: 30upx;
  70. background: #FFFFFF;
  71. .radioBtn{
  72. width: 30upx;
  73. height: 30upx;
  74. margin-right: 10upx;
  75. border: 1upx solid #ddd;
  76. border-radius: 50%;
  77. &.active{
  78. position: relative;
  79. border: 1upx solid #3385ff;
  80. &:after{
  81. content: '';
  82. position: absolute;
  83. width: 18upx;
  84. height: 18upx;
  85. background: #3385ff;
  86. border-radius: 50%;
  87. }
  88. }
  89. }
  90. .refund-item-list{
  91. display: flex;
  92. padding-bottom: 30upx;
  93. border-bottom: 1upx solid #dddddd;
  94. .refund-label{
  95. width: 200upx;
  96. text{color: red;}
  97. }
  98. .list{
  99. margin-bottom: 10upx;
  100. .list-title{
  101. height: 60upx;
  102. padding-bottom: 20upx;
  103. }
  104. .list-val{
  105. input{
  106. width: 150upx;
  107. border: 1upx solid #ddd;
  108. }
  109. text{
  110. padding: 0 30upx;
  111. }
  112. }
  113. }
  114. }
  115. .refund-item{
  116. display: flex;
  117. padding: 20upx 0;
  118. .refund-label{width: 200upx;text{color: red;}}
  119. input{
  120. border: 1upx solid #ddd;
  121. }
  122. textarea{
  123. width: calc(100% - 210upx);
  124. border: 1upx solid #ddd;
  125. height:150upx;
  126. }
  127. }
  128. .btn-box{
  129. .btn{
  130. width: 200upx;
  131. height: 60upx;
  132. border: 1upx solid #666666;
  133. border-radius: 10upx;
  134. &.active{
  135. background: #3385ff;
  136. color: #fff;
  137. border: 1upx solid #3385ff;
  138. }
  139. }
  140. }
  141. }
  142. </style>