storeOrderDelivery.vue 6.1 KB

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