storeOrderDelivery.vue 6.7 KB

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