storeOrderDelivery.vue 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306
  1. <template>
  2. <view>
  3. <view class="top-cont">
  4. <!-- 背景图片 -->
  5. <image class="bg" src="../../static/images/order_top_bg.png" mode=""></image>
  6. <view class="top-inner">
  7. <!-- 这里是状态栏 -->
  8. <view class="status_bar" :style="{height: statusBarHeight}"></view>
  9. <view class="back-box" @click="back">
  10. <image src="../../static/images/back_white.png" mode=""></image>
  11. <text class="title">物流信息</text>
  12. <text></text>
  13. </view>
  14. <!-- 运单号 -->
  15. <view class="waybill-number">
  16. <view class="inner">
  17. <view class="num-box">
  18. <text class="text">运单号</text>
  19. <text class="text">{{deliveryId}}</text>
  20. <view class="copy" @click="copyOrderSn(deliveryId)">复制</view>
  21. </view>
  22. <view class="kf-box">
  23. <text class="text">{{express.name}}</text>
  24. <!-- <text class="text">客服电话:95311</text> -->
  25. </view>
  26. </view>
  27. </view>
  28. <view class="content" v-if="expressList!=null">
  29. <!-- 物流信息 -->
  30. <view class="refund-steps" v-if="expressList.Traces!=null">
  31. <view v-for="(item,index) in expressList.Traces" :key="index" class="steps">
  32. <view class="title">
  33. <!-- <text v-if="index == 0" class="text black-text">已签收</text> -->
  34. <!-- <text class="text gray-bold">运输中</text> -->
  35. <!-- 左侧灰色圆点 -->
  36. <view class="dot"></view>
  37. <!-- 对号 -->
  38. <image class="img" src="../../static/images/complete.png" mode=""></image>
  39. <!-- 运输中图标 -->
  40. <image class="img" src="../../static/images/car40.png" mode=""></image>
  41. </view>
  42. <view class="desc-text">
  43. {{item.AcceptStation}}
  44. </view>
  45. <view class="time">{{item.AcceptTime}}</view>
  46. </view>
  47. </view>
  48. </view>
  49. </view>
  50. </view>
  51. </view>
  52. </template>
  53. <script>
  54. import {getMyStoreOrderById,cancelOrder,getExpress} from '@/api/storeOrder'
  55. export default {
  56. data() {
  57. return {
  58. statusBarHeight:uni.getStorageSync("menuInfo").statusBarHeight,
  59. orderId:null,
  60. deliveryId:null,
  61. express:{},
  62. expressList:[],
  63. };
  64. },
  65. onLoad(option) {
  66. this.orderId=option.orderId;
  67. this.getExpress();
  68. },
  69. methods: {
  70. getExpress(){
  71. var data={orderId:this.orderId};
  72. getExpress(data).then(res => {
  73. if(res.code==200){
  74. this.express=res.express;
  75. this.expressList=res.data;
  76. this.deliveryId=res.deliveryId
  77. }else{
  78. uni.showToast({
  79. icon:'none',
  80. title: "请求失败",
  81. });
  82. }
  83. });
  84. },
  85. // 返回上一页
  86. back() {
  87. uni.navigateBack()
  88. },
  89. // 复制运单号
  90. copyOrderSn(text) {
  91. // 复制方法
  92. uni.setClipboardData({
  93. data:text,
  94. success:()=>{
  95. uni.showToast({
  96. title:'内容已成功复制到剪切板',
  97. icon:'none'
  98. })
  99. }
  100. });
  101. },
  102. // 拨打电话
  103. callPhone(phone) {
  104. uni.makePhoneCall({
  105. phoneNumber: phone
  106. })
  107. }
  108. }
  109. }
  110. </script>
  111. <style lang="scss">
  112. .top-cont{
  113. width: 100%;
  114. height: 336upx;
  115. position: relative;
  116. .bg{
  117. width: 100%;
  118. height: 100%;
  119. position: absolute;
  120. top: 0;
  121. left: 0;
  122. z-index: 1;
  123. }
  124. .top-inner{
  125. width: 100%;
  126. height: 100%;
  127. position: absolute;
  128. top: 0;
  129. left: 0;
  130. z-index: 2;
  131. .back-box{
  132. height: 88upx;
  133. padding-left: 22upx;
  134. display: flex;
  135. align-items: center;
  136. justify-content: space-between;
  137. padding: 0 20upx;
  138. image{
  139. width: 40upx;
  140. height: 40upx;
  141. }
  142. .title{
  143. font-size: 36upx;
  144. font-family: PingFang SC;
  145. font-weight: 500;
  146. color: #FFFFFF;
  147. }
  148. }
  149. .waybill-number{
  150. padding: 0 20upx;
  151. margin-top: 66upx;
  152. .inner{
  153. box-sizing: border-box;
  154. height: 150upx;
  155. background: #FFFFFF;
  156. border-radius: 16upx;
  157. padding: 40upx 30upx;
  158. display: flex;
  159. flex-direction: column;
  160. justify-content: space-between;
  161. .num-box{
  162. display: flex;
  163. align-items: center;
  164. .text{
  165. font-size: 28upx;
  166. font-family: PingFang SC;
  167. font-weight: 500;
  168. color: #111111;
  169. line-height: 1;
  170. margin-right: 30upx;
  171. &:last-child{
  172. margin-right: 20upx;
  173. }
  174. }
  175. .copy{
  176. width: 58upx;
  177. height: 32upx;
  178. line-height: 32upx;
  179. text-align: center;
  180. font-size: 22upx;
  181. font-family: PingFang SC;
  182. font-weight: 500;
  183. color: #222222;
  184. background: #F5F5F5;
  185. border-radius: 4upx;
  186. }
  187. }
  188. .kf-box{
  189. display: flex;
  190. align-items: center;
  191. .text{
  192. font-size: 26upx;
  193. font-family: PingFang SC;
  194. font-weight: 500;
  195. color: #999999;
  196. line-height: 1;
  197. margin-right: 20upx;
  198. }
  199. }
  200. }
  201. }
  202. }
  203. }
  204. .content{
  205. margin: 20rpx 0rpx;
  206. padding: 0 20upx;
  207. .refund-steps{
  208. background: #FFFFFF;
  209. border-radius: 16upx;
  210. padding: 40upx 44upx;
  211. .steps{
  212. padding-left: 40upx;
  213. padding-bottom: 56upx;
  214. position: relative;
  215. &::after{
  216. content: "";
  217. width: 4upx;
  218. height: 100%;
  219. background: #F1F1F1;
  220. position: absolute;
  221. left: 0;
  222. top: 20upx;
  223. }
  224. &:last-child{
  225. padding-bottom: 0;
  226. &::after{
  227. display: none;
  228. }
  229. }
  230. .title{
  231. position: relative;
  232. .text{
  233. font-size: 30upx;
  234. font-family: PingFang SC;
  235. font-weight: 500;
  236. color: #666666;
  237. line-height: 38upx;
  238. &.black-text{
  239. color: #111111;
  240. font-weight: bold;
  241. }
  242. &.gray-bold{
  243. font-weight: bold;
  244. color: #666666;
  245. }
  246. }
  247. .dot{
  248. width: 16upx;
  249. height: 16upx;
  250. background: #EBEBEB;
  251. border-radius: 50%;
  252. position: absolute;
  253. left: -46upx;
  254. top: 11upx;
  255. z-index: 10;
  256. &.active{
  257. background-color: #018C39;
  258. }
  259. }
  260. .img{
  261. width: 40upx;
  262. height: 40upx;
  263. position: absolute;
  264. left: -57upx;
  265. top: 2upx;
  266. z-index: 10;
  267. }
  268. }
  269. .desc-text{
  270. font-size: 28upx;
  271. font-family: PingFang SC;
  272. font-weight: 500;
  273. color: #666666;
  274. line-height: 1.6;
  275. margin-top: 10upx;
  276. .phone{
  277. font-size: 28upx;
  278. font-family: PingFang SC;
  279. font-weight: 500;
  280. color: #018C39;
  281. line-height: 1.6;
  282. }
  283. }
  284. .time{
  285. font-size: 24upx;
  286. font-family: Gilroy;
  287. font-weight: 500;
  288. color: #999999;
  289. margin-top: 10upx;
  290. }
  291. }
  292. }
  293. }
  294. </style>