storeOrderDelivery.vue 7.4 KB

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