storeOrderDelivery.vue 6.7 KB

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