storeOrderDelivery.vue 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340
  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. console.log(this.expressList)
  87. console.log(this.ExpressMulti)
  88. }
  89. })
  90. },
  91. getExpress(){
  92. var data={orderId:this.orderId};
  93. getExpress(data).then(res => {
  94. if(res.code==200){
  95. this.express=res.express;
  96. this.expressList=res.data;
  97. this.deliveryId=res.deliveryId
  98. }else{
  99. uni.showToast({
  100. icon:'none',
  101. title: "请求失败",
  102. });
  103. }
  104. });
  105. },
  106. // 返回上一页
  107. back() {
  108. uni.navigateBack()
  109. },
  110. // 复制运单号
  111. copyOrderSn(text) {
  112. // 复制方法
  113. uni.setClipboardData({
  114. data:text,
  115. success:()=>{
  116. uni.showToast({
  117. title:'内容已成功复制到剪切板',
  118. icon:'none'
  119. })
  120. }
  121. });
  122. },
  123. // 拨打电话
  124. callPhone(phone) {
  125. uni.makePhoneCall({
  126. phoneNumber: phone
  127. })
  128. }
  129. }
  130. }
  131. </script>
  132. <style lang="scss">
  133. .itemlistall{
  134. display: flex;
  135. }
  136. .itemlist{
  137. background-color: #fff;
  138. margin: 10rpx;
  139. padding: 10rpx 30rpx;
  140. border-radius: 10rpx;
  141. }
  142. .itemact{
  143. color: #2BC7B9;
  144. }
  145. .top-cont{
  146. width: 100%;
  147. height: 336upx;
  148. position: relative;
  149. .bg{
  150. width: 100%;
  151. height: 100%;
  152. position: absolute;
  153. top: 0;
  154. left: 0;
  155. z-index: 1;
  156. }
  157. .top-inner{
  158. width: 100%;
  159. height: 100%;
  160. position: absolute;
  161. top: 0;
  162. left: 0;
  163. z-index: 2;
  164. .back-box{
  165. height: 88upx;
  166. padding-left: 22upx;
  167. display: flex;
  168. align-items: center;
  169. justify-content: space-between;
  170. padding: 0 20upx;
  171. image{
  172. width: 40upx;
  173. height: 40upx;
  174. }
  175. .title{
  176. font-size: 36upx;
  177. font-family: PingFang SC;
  178. font-weight: 500;
  179. color: #FFFFFF;
  180. }
  181. }
  182. .waybill-number{
  183. padding: 0 20upx;
  184. margin-top: 66upx;
  185. .inner{
  186. box-sizing: border-box;
  187. height: 150upx;
  188. background: #FFFFFF;
  189. border-radius: 16upx;
  190. padding: 40upx 30upx;
  191. display: flex;
  192. flex-direction: column;
  193. justify-content: space-between;
  194. .num-box{
  195. display: flex;
  196. align-items: center;
  197. .text{
  198. font-size: 28upx;
  199. font-family: PingFang SC;
  200. font-weight: 500;
  201. color: #111111;
  202. line-height: 1;
  203. margin-right: 30upx;
  204. &:last-child{
  205. margin-right: 20upx;
  206. }
  207. }
  208. .copy{
  209. width: 58upx;
  210. height: 32upx;
  211. line-height: 32upx;
  212. text-align: center;
  213. font-size: 22upx;
  214. font-family: PingFang SC;
  215. font-weight: 500;
  216. color: #222222;
  217. background: #F5F5F5;
  218. border-radius: 4upx;
  219. }
  220. }
  221. .kf-box{
  222. display: flex;
  223. align-items: center;
  224. .text{
  225. font-size: 26upx;
  226. font-family: PingFang SC;
  227. font-weight: 500;
  228. color: #999999;
  229. line-height: 1;
  230. margin-right: 20upx;
  231. }
  232. }
  233. }
  234. }
  235. }
  236. }
  237. .content{
  238. margin: 20rpx 0rpx;
  239. padding: 0 20upx;
  240. .refund-steps{
  241. background: #FFFFFF;
  242. border-radius: 16upx;
  243. padding: 40upx 44upx;
  244. .steps{
  245. padding-left: 40upx;
  246. padding-bottom: 56upx;
  247. position: relative;
  248. &::after{
  249. content: "";
  250. width: 4upx;
  251. height: 100%;
  252. background: #F1F1F1;
  253. position: absolute;
  254. left: 0;
  255. top: 20upx;
  256. }
  257. &:last-child{
  258. padding-bottom: 0;
  259. &::after{
  260. display: none;
  261. }
  262. }
  263. .title{
  264. position: relative;
  265. .text{
  266. font-size: 30upx;
  267. font-family: PingFang SC;
  268. font-weight: 500;
  269. color: #666666;
  270. line-height: 38upx;
  271. &.black-text{
  272. color: #111111;
  273. font-weight: bold;
  274. }
  275. &.gray-bold{
  276. font-weight: bold;
  277. color: #666666;
  278. }
  279. }
  280. .dot{
  281. width: 16upx;
  282. height: 16upx;
  283. background: #EBEBEB;
  284. border-radius: 50%;
  285. position: absolute;
  286. left: -46upx;
  287. top: 11upx;
  288. z-index: 10;
  289. &.active{
  290. background-color: #2BC7B9;
  291. }
  292. }
  293. .img{
  294. width: 40upx;
  295. height: 40upx;
  296. position: absolute;
  297. left: -57upx;
  298. top: 2upx;
  299. z-index: 10;
  300. }
  301. }
  302. .desc-text{
  303. font-size: 28upx;
  304. font-family: PingFang SC;
  305. font-weight: 500;
  306. color: #666666;
  307. line-height: 1.6;
  308. margin-top: 10upx;
  309. .phone{
  310. font-size: 28upx;
  311. font-family: PingFang SC;
  312. font-weight: 500;
  313. color: #2BC7B9;
  314. line-height: 1.6;
  315. }
  316. }
  317. .time{
  318. font-size: 24upx;
  319. font-family: Gilroy;
  320. font-weight: 500;
  321. color: #999999;
  322. margin-top: 10upx;
  323. }
  324. }
  325. }
  326. }
  327. </style>