refundOrderProduct.vue 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249
  1. <template>
  2. <view class="content">
  3. <view class="inner">
  4. <view class="goods-list">
  5. <view v-if="order!=null&&order.isPackage!=1" class="item" v-for="(item,index) in items" :key="index">
  6. <!-- <label style="margin-right: 30upx;">
  7. <checkbox :value="item.checked" :checked="item.checked" @click="checkChange(item)" />
  8. </label> -->
  9. <image class="goods-img" :src="JSON.parse(item.jsonInfo).image" mode="aspectFit"></image>
  10. <view class="info">
  11. <view class="top">
  12. <view class="title ellipsis2">{{ JSON.parse(item.jsonInfo).productName}}</view>
  13. <view class="spec">{{JSON.parse(item.jsonInfo).sku}}</view>
  14. </view>
  15. <view class="price-num">
  16. <view class="price-box">
  17. <text class="unit">¥</text>
  18. <text class="price">{{JSON.parse(item.jsonInfo).price.toFixed(2)}}</text>
  19. </view>
  20. <view class="num">x{{JSON.parse(item.jsonInfo).num}}</view>
  21. </view>
  22. </view>
  23. </view>
  24. <view v-if="order!=null&&order.isPackage==1&&order.packageJson!=null" class="item">
  25. <image class="goods-img" :src="JSON.parse(order.packageJson).imgUrl" mode="aspectFit"></image>
  26. <view class="info">
  27. <view class="top">
  28. <view class="title ellipsis2">
  29. <view class="tag">套餐</view>{{JSON.parse(order.packageJson).title}}
  30. </view>
  31. <view class="spec">{{JSON.parse(order.packageJson).descs}}</view>
  32. </view>
  33. </view>
  34. </view>
  35. </view>
  36. </view>
  37. <!-- 底部按钮 -->
  38. <view class="btn-box">
  39. <view class="text">提交申请后,客服会与您电话沟通,请保持手机通畅</view>
  40. <view class="btns">
  41. <view class="left"></view>
  42. <view class="right">
  43. <view class="btn cancel" v-if="order.status==1 || order.status==2" @click="submit(0)" >仅退款</view>
  44. <view class="btn cancel" v-if="order.status==3||order.status==4" @click="submit(1)" >退款退货</view>
  45. </view>
  46. </view>
  47. </view>
  48. </view>
  49. </template>
  50. <script>
  51. // import {getMyStoreOrderItemByOrderId,applyAfterSales} from '@/api/storeAfterSales'
  52. export default {
  53. data() {
  54. return {
  55. order:null,
  56. items:[],
  57. }
  58. },
  59. onLoad(option) {
  60. this.orderId=option.orderId;
  61. this.getMyStoreOrderItemByOrderId()
  62. },
  63. methods: {
  64. checkChange(item){
  65. item.checked=!item.checked;
  66. },
  67. submit(type){
  68. uni.redirectTo({
  69. url: '/pages_shop/refundOrder?orderId='+this.order.id+"&type="+type+"&orderCode="+this.order.orderCode
  70. })
  71. },
  72. getMyStoreOrderItemByOrderId(){
  73. var data={orderId:this.orderId};
  74. getMyStoreOrderItemByOrderId(data).then(res => {
  75. if(res.code==200){
  76. this.order=res.order;
  77. this.items=res.items;
  78. }else{
  79. uni.showToast({
  80. icon:'none',
  81. title: "请求失败",
  82. });
  83. }
  84. });
  85. },
  86. }
  87. }
  88. </script>
  89. <style lang="scss">
  90. .content{
  91. margin-bottom: 170upx;
  92. .inner{
  93. padding: 20upx;
  94. .goods-list{
  95. .item{
  96. box-sizing: border-box;
  97. height: 221upx;
  98. background: #FFFFFF;
  99. padding: 30upx;
  100. display: flex;
  101. align-items: center;
  102. &:last-child{
  103. margin-bottom: 0;
  104. }
  105. .goods-img{
  106. width: 160upx;
  107. height: 160upx;
  108. background: #FFFFFF;
  109. margin-right: 30upx;
  110. flex-shrink: 0;
  111. }
  112. .info{
  113. width: calc(100% - 160upx);
  114. height: 160upx;
  115. display: flex;
  116. flex-direction: column;
  117. justify-content: space-between;
  118. .top{
  119. .title{
  120. font-size: 28upx;
  121. font-family: PingFang SC;
  122. font-weight: 500;
  123. color: #111111;
  124. line-height: 1.4;
  125. .tag{
  126. display: inline-block;
  127. padding: 0 6upx;
  128. height: 30upx;
  129. background: linear-gradient(90deg, #66b2ef 0%, #0bb3f2 100%);
  130. border-radius: 4upx;
  131. margin-right: 10upx;
  132. font-size: 22upx;
  133. font-family: PingFang SC;
  134. font-weight: bold;
  135. color: #FFFFFF;
  136. line-height: 30upx;
  137. float: left;
  138. margin-top: 7upx;
  139. }
  140. }
  141. .spec{
  142. font-size: 24upx;
  143. font-family: PingFang SC;
  144. font-weight: 500;
  145. color: #999999;
  146. line-height: 1;
  147. margin-top: 14upx;
  148. }
  149. }
  150. .price-num{
  151. display: flex;
  152. align-items: center;
  153. justify-content: space-between;
  154. .price-box{
  155. display: flex;
  156. align-items: flex-end;
  157. .unit{
  158. font-size: 24upx;
  159. font-family: PingFang SC;
  160. font-weight: 500;
  161. color: #111111;
  162. line-height: 1.2;
  163. margin-right: 5upx;
  164. }
  165. .price{
  166. font-size: 32upx;
  167. font-family: PingFang SC;
  168. font-weight: 500;
  169. color: #111111;
  170. line-height: 1;
  171. }
  172. }
  173. .num{
  174. font-size: 24upx;
  175. font-family: PingFang SC;
  176. font-weight: bold;
  177. color: #666666;
  178. }
  179. }
  180. }
  181. }
  182. }
  183. }
  184. .btn-box{
  185. width: 100%;
  186. height: 160upx;
  187. position: fixed;
  188. bottom: 0;
  189. background: #FFFFFF;
  190. .text{
  191. font-size: 24upx;
  192. font-family: PingFang SC;
  193. font-weight: 500;
  194. color: #999999;
  195. line-height: 1;
  196. padding: 28upx 0;
  197. text-align: center;
  198. }
  199. .btns{
  200. padding: 0upx 30upx;
  201. display: flex;
  202. flex-direction: row;
  203. justify-content: space-between;
  204. align-items: center;
  205. .left{
  206. font-size: 24upx;
  207. font-family: PingFang SC;
  208. font-weight: 500;
  209. color: #999999;
  210. }
  211. .right{
  212. display: flex;
  213. flex-direction: row;
  214. justify-content: flex-end;
  215. align-items: center;
  216. .btn{
  217. width: 155upx;
  218. height: 64upx;
  219. line-height: 64upx;
  220. font-size: 26upx;
  221. font-family: PingFang SC;
  222. font-weight: 500;
  223. text-align: center;
  224. border-radius: 32upx;
  225. margin-left: 15upx;
  226. &.cancel{
  227. border: 1px solid #DDDDDD;
  228. color: #666666;
  229. }
  230. }
  231. }
  232. }
  233. }
  234. }
  235. </style>