storeOrderRefundApply.vue 5.4 KB

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