index.vue 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244
  1. <template>
  2. <view class="deliveryDetail" :style="colorStyle">
  3. <view class="header">
  4. <view class="title on" v-if="deliveryInfo.delivery_id">{{deliveryInfo.deliveryOrder.finish_code}}</view>
  5. <view class="title" v-else>待接单</view>
  6. <view class="tip">{{deliveryInfo.delivery_id?'稍后请将收货码告诉配送员':'等待配送员接单完成后开始派送'}}</view>
  7. <view class="picTxt acea-row row-between-wrapper" v-if="deliveryInfo.delivery_id">
  8. <view class="left acea-row row-middle">
  9. <view class="pictrue">
  10. <image src="../static/delivery.png"></image>
  11. </view>
  12. <view class="text">
  13. <view class="name line1">{{deliveryInfo.delivery_name}}</view>
  14. <view>{{deliveryInfo.delivery_id}}</view>
  15. </view>
  16. </view>
  17. <view class="icon" @click="call(deliveryInfo.delivery_id)">
  18. <text class="iconfont icon-dianhua"></text>
  19. </view>
  20. </view>
  21. <view class="picTxt acea-row row-between-wrapper" v-else>
  22. <view class="pictrue">
  23. <image src="../static/dispatch.png"></image>
  24. </view>
  25. <view class="text">系统派单中...</view>
  26. </view>
  27. </view>
  28. <view class="delivery">
  29. <view class="info">
  30. <view class="title">收件人信息</view>
  31. <view class="item acea-row row-between row-top">
  32. <view class="name">姓名:</view>
  33. <view class="text">{{deliveryInfo.deliveryOrder.user_name}}</view>
  34. </view>
  35. <view class="item acea-row row-between row-top">
  36. <view class="name">手机号:</view>
  37. <view class="text">{{deliveryInfo.deliveryOrder.receiver_phone}}</view>
  38. </view>
  39. <view class="item acea-row row-between row-top">
  40. <view class="name">地址:</view>
  41. <view class="text">{{deliveryInfo.deliveryOrder.to_address}}</view>
  42. </view>
  43. </view>
  44. <view class="list" v-if="expressList.length">
  45. <view class='item' v-for="(item,index) in expressList" :key="index">
  46. <view class='circular acea-row row-center-wrapper' :class='index === 0 ? "on":""'>
  47. <text class="iconfont icon-complete" v-if="index === 0"></text>
  48. </view>
  49. <view class='text' :class='index===0 ? "on-font":""'>
  50. <view>{{item.label}}</view>
  51. <view class='data' :class='index===0 ? "on-font on":""'>{{item.time}}</view>
  52. </view>
  53. </view>
  54. </view>
  55. </view>
  56. </view>
  57. </template>
  58. <script>
  59. import colors from '@/mixins/color.js';
  60. import {
  61. deliveryDetail
  62. } from '@/api/order.js';
  63. export default{
  64. mixins: [colors],
  65. data(){
  66. return{
  67. orderId: 0,
  68. deliveryInfo:{},
  69. expressList: []
  70. }
  71. },
  72. onLoad(options){
  73. this.orderId = options.orderId || 0
  74. this.orderDetail();
  75. },
  76. onShow(){},
  77. methods:{
  78. orderDetail(){
  79. deliveryDetail(this.orderId).then(res=>{
  80. this.deliveryInfo = res.data;
  81. this.expressList = res.data.order_log.city_delivery;
  82. }).catch(err=>{
  83. this.$util.Tips({
  84. title: err
  85. });
  86. })
  87. },
  88. call(phone){
  89. uni.makePhoneCall({ phoneNumber: phone });
  90. }
  91. }
  92. }
  93. </script>
  94. <style lang="scss">
  95. .deliveryDetail{
  96. padding: 14rpx 30rpx;
  97. .header{
  98. background-color: #fff;
  99. border-radius: 14rpx;
  100. text-align: center;
  101. padding: 56rpx 30rpx 0 30rpx;
  102. .title{
  103. font-size: 44rpx;
  104. font-weight: 500;
  105. color: #333333;
  106. &.on{
  107. font-size: 60rpx;
  108. font-weight: 600;
  109. }
  110. }
  111. .tip{
  112. font-size: 24rpx;
  113. font-weight: 400;
  114. color: #666666;
  115. margin-top: 14rpx;
  116. border-bottom: 1px dotted #D8D8D8;
  117. padding-bottom: 46rpx;
  118. }
  119. .picTxt{
  120. padding: 26rpx 0;
  121. .left{
  122. .text{
  123. width: 436rpx;
  124. margin-left: 20rpx;
  125. color: #666666;
  126. font-weight: 400;
  127. font-size: 24rpx;
  128. .name{
  129. color: #333333;
  130. font-size: 28rpx;
  131. margin-bottom: 2rpx;
  132. }
  133. }
  134. }
  135. .icon{
  136. width: 44rpx;
  137. height: 44rpx;
  138. background: #E7E7E7;
  139. border-radius: 50%;
  140. .iconfont{
  141. font-size: 24rpx;
  142. color: #666;
  143. }
  144. }
  145. .pictrue{
  146. width: 80rpx;
  147. height: 80rpx;
  148. image{
  149. width: 100%;
  150. height: 100%;
  151. }
  152. }
  153. .text{
  154. font-weight: 500;
  155. color: #333333;
  156. font-size: 28rpx;
  157. width: 520rpx;
  158. text-align: left;
  159. }
  160. }
  161. }
  162. .delivery{
  163. background-color: #fff;
  164. border-radius: 14rpx;
  165. margin-top: 14rpx;
  166. .info{
  167. padding: 24rpx 30rpx;
  168. border-bottom: 1px dotted #D8D8D8;
  169. .title{
  170. font-size: 30rpx;
  171. font-weight: 400;
  172. color: #333333;
  173. margin-bottom: 32rpx;
  174. }
  175. .item{
  176. font-weight: 400;
  177. font-size: 28rpx;
  178. color: #999999;
  179. margin-bottom: 26rpx;
  180. .name{
  181. color: #333333;
  182. }
  183. .text{
  184. width: 476rpx;
  185. text-align: right;
  186. }
  187. }
  188. }
  189. .list{
  190. margin-top: 34rpx;
  191. padding-bottom: 40rpx;
  192. .item {
  193. padding: 0 40rpx;
  194. position: relative;
  195. .circular {
  196. width: 20rpx;
  197. height: 20rpx;
  198. border-radius: 50%;
  199. position: absolute;
  200. top: -1rpx;
  201. left: 32rpx;
  202. background-color: #ddd;
  203. .iconfont{
  204. color: #fff;
  205. font-size: 20rpx;
  206. }
  207. &.on{
  208. width: 30rpx;
  209. height: 30rpx;
  210. background-color: var(--view-theme);
  211. left:28rpx;
  212. }
  213. }
  214. .text {
  215. font-size: 26rpx;
  216. color: #999;
  217. width: 615rpx;
  218. border-left: 2px solid #e6e6e6;
  219. padding: 0 0 60rpx 38rpx;
  220. &.on-font{
  221. color: var(--view-theme);
  222. }
  223. .data{
  224. font-size: 24rpx;
  225. color: #999;
  226. margin-top: 10rpx;
  227. &.on-font{
  228. color: var(--view-theme);
  229. }
  230. .time{
  231. margin-left: 15rpx;
  232. }
  233. }
  234. &.on{
  235. border-left-color: var(--view-minorColor);
  236. }
  237. }
  238. }
  239. }
  240. }
  241. }
  242. </style>