order-details.vue 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231
  1. <template>
  2. <view class="apply">
  3. <view class="apply_head">
  4. <view class="apply_head_name">收货人信息</view>
  5. <view class="apply_head_ipt flex">
  6. <view class="apply_head_address">
  7. <view class="address_have_li_title">{{ details.province }} {{ details.city }} {{ details.area }}</view>
  8. <view class="address_have_li_txt">{{ details.detail }}</view>
  9. <view class="address_have_li_name flexs">
  10. <text>{{ details.username }}</text>
  11. <text>{{ details.mobile }}</text>
  12. </view>
  13. </view>
  14. </view>
  15. </view>
  16. <view class="apply_main">
  17. <view class="apply_main_name">订单信息</view>
  18. <view class="apply_main_ul">
  19. <view class="apply_main_li flexs">
  20. <view class="apply_main_li_img">
  21. <image :src="details.goods_image" mode="aspectFill"></image>
  22. </view>
  23. <view class="apply_main_li_main flex">
  24. <view class="apply_main_li_name">{{ details.goods_name }}</view>
  25. <view class="apply_main_li_time">开箱日期:{{ details.box_open_time }}</view>
  26. </view>
  27. </view>
  28. </view>
  29. </view>
  30. <view class="apply_order">
  31. <view class="apply_order_li flex">
  32. <text>付款金额</text>
  33. <text class="red">{{ details.pay_amount }}</text>
  34. </view>
  35. <view class="apply_order_li flex">
  36. <text>支付方式</text>
  37. <text>{{ details.pay_method }}</text>
  38. </view>
  39. </view>
  40. <view class="apply_order apply_order_number">
  41. <view class="apply_order_li flex">
  42. <text>订单号:{{ details.delivery_order_no}}</text>
  43. </view>
  44. <view class="apply_order_li flex">
  45. <text>下单时间:{{ details.delivery_apply_time }}</text>
  46. </view>
  47. <view class="apply_order_li flex" v-if="details.status == 'unreceived' || details.status == 'finished'">
  48. <text>发货时间:{{ details.delivery_time }}</text>
  49. </view>
  50. <view class="apply_order_li flex" v-if="details.status == 'unreceived' || details.status == 'finished'">
  51. <text>物流号:{{ details.delivery_number }}</text>
  52. <!-- <text class="logistics" @click="lookLogistics" v-if="details.status == 'unreceived'">查看物流</text> -->
  53. </view>
  54. <view class="apply_order_li flex" v-if="details.status == 'unreceived' || details.status == 'finished'">
  55. <text>物流名称:{{ details.post_name }}</text>
  56. <!-- <text class="logistics" @click="lookLogistics" v-if="details.status == 'unreceived'">查看物流</text> -->
  57. </view>
  58. <view class="apply_order_li flex" v-if="details.status == 'finished'">
  59. <text>收货时间:{{ details.receive_time }}</text>
  60. </view>
  61. </view>
  62. <button class="apply_btn" hover-class="hover-view" v-if="details.status == 'unreceived'" @click="affirm">确认收货</button>
  63. </view>
  64. </template>
  65. <script>
  66. export default {
  67. data() {
  68. return {
  69. id:'',//订单ID
  70. details:{},//详情
  71. };
  72. },
  73. methods:{
  74. //查看物流
  75. lookLogistics () {
  76. uni.navigateTo({url:'/pages/me/logistics'})
  77. },
  78. //获取订单详情
  79. getDetail () {
  80. this.$api.deliveryOrderDetail({delivery_order_id:this.id}).then(res=>{
  81. if (res.code === 1) {
  82. this.details = res.data
  83. }
  84. })
  85. },
  86. //确认收货
  87. affirm () {
  88. uni.showModal({
  89. content: '是否确认收货?',
  90. success: (res) => {
  91. if (res.confirm) {
  92. this.$api.confirmReceipt({delivery_order_id:this.id}).then(res=>{
  93. if (res.code === 1) {
  94. uni.showToast({title:res.msg})
  95. setTimeout(()=>{
  96. uni.navigateBack()
  97. },800)
  98. }
  99. })
  100. }
  101. }
  102. });
  103. }
  104. },
  105. onLoad ({id}) {
  106. this.id = id
  107. this.getDetail()
  108. }
  109. }
  110. </script>
  111. <style lang="scss">
  112. .apply {
  113. padding: 0 30rpx 38rpx 30rpx;
  114. .apply_head_name {
  115. padding: 30rpx 0;
  116. font-size: 28rpx;
  117. font-weight: bold;
  118. }
  119. .apply_head_ipt {
  120. padding: 30rpx;
  121. border-radius: 10rpx;
  122. background: #FFFFFF;
  123. input {
  124. font-size: 28rpx;
  125. }
  126. }
  127. .apply_head_address {
  128. .address_have_li_title {
  129. color: #666666;
  130. font-size: 28rpx;
  131. }
  132. .address_have_li_txt {
  133. font-size: 26rpx;
  134. margin: 20rpx 0;
  135. }
  136. .address_have_li_name {
  137. text {
  138. color: #999999;
  139. font-size: 30rpx;
  140. &:last-child {
  141. font-size: 28rpx;
  142. margin-left: 20rpx;
  143. }
  144. }
  145. }
  146. }
  147. }
  148. .apply_main_name {
  149. font-size: 28rpx;
  150. font-weight: bold;
  151. padding: 30rpx 0 20rpx 0;
  152. }
  153. .apply_main_li {
  154. padding: 30rpx;
  155. background: #FFFFFF;
  156. border-radius: 20rpx;
  157. .apply_main_li_img {
  158. width: 168rpx;
  159. height: 168rpx;
  160. image {
  161. border-radius: 10rpx;
  162. }
  163. margin-right: 20rpx;
  164. }
  165. .apply_main_li_main {
  166. height: 168rpx;
  167. align-items: flex-start;
  168. flex-direction: column;
  169. justify-content: space-around;
  170. }
  171. .apply_main_li_name {
  172. font-size: 28rpx;
  173. line-height: 36rpx;
  174. }
  175. .apply_main_li_time {
  176. color: #999999;
  177. }
  178. }
  179. .apply_order {
  180. padding: 0 30rpx 0 20rpx ;
  181. border-radius: 10rpx;
  182. background: #FFFFFF;
  183. margin-top: 20rpx;
  184. .apply_order_li {
  185. padding: 30rpx 0;
  186. text {
  187. font-size: 26rpx;
  188. &:last-child {
  189. color: #999999;
  190. }
  191. }
  192. .red {
  193. color: #CF271B !important;
  194. }
  195. }
  196. }
  197. .apply_order_number {
  198. padding: 30rpx 20rpx;
  199. .apply_order_li {
  200. padding: 0;
  201. margin-bottom: 30rpx;
  202. &:last-child {
  203. margin-bottom: 0;
  204. }
  205. .logistics {
  206. width: 130rpx;
  207. height: 44rpx;
  208. text-align: center;
  209. line-height: 44rpx;
  210. color: #FFFFFF !important;
  211. font-size: 24rpx;
  212. background: #F6AF32;
  213. border-radius: 22rpx;
  214. }
  215. }
  216. }
  217. .apply_btn {
  218. color: #333333;
  219. font-size: 30rpx;
  220. font-weight: bold;
  221. height: 98rpx;
  222. margin-top: 45rpx;
  223. background: #FFFFFF;
  224. box-shadow: 0rpx 0rpx 121rpx 0rpx rgba(63, 52, 2, 0.12);
  225. border-radius: 10rpx;
  226. }
  227. </style>