storeOrderDelivery.vue 7.0 KB

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