orderInformation.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525
  1. <template>
  2. <view class="page">
  3. <view class="top">
  4. <view class="title">
  5. {{ orderTitle }}
  6. </view>
  7. <view class="prompt">
  8. {{ orderDetail }}
  9. </view>
  10. </view>
  11. <view class="packaging" v-if="orderStauts == 4">
  12. <view class="packaging-top">
  13. <view class="">
  14. {{ "普通包裹" + "&nbsp;" + "|" + "&nbsp" + "海运散货" }}
  15. </view>
  16. <view style="color: #f83224"> 拼包中 </view>
  17. </view>
  18. <view class="packaging-center">
  19. <view class="packaging-left">
  20. <view class="left-top"> 东莞仓库 </view>
  21. <view class="left-bottom"> 始发地 </view>
  22. </view>
  23. <image class="jiantou" src="../../static/mine/339.png" mode=""></image>
  24. <view class="packaging-left">
  25. <view class="left-top"> 澳大利亚 </view>
  26. <view class="left-bottom"> 目的地 </view>
  27. </view>
  28. </view>
  29. <view class="packaging-time">
  30. <view class="time">
  31. <text>开始时间:</text>
  32. <text>{{ "2024-5-25" + "&emsp;" }}</text>
  33. </view>
  34. <view class="time">
  35. <text>开始时间:</text>
  36. <text>2024-5-25</text>
  37. </view>
  38. </view>
  39. </view>
  40. <view class="photo" v-if="orderInformation.status == 'unpaid'">
  41. <view class="_weight">
  42. <text>称重重量</text>
  43. <text>{{ orderInformation.actual_weight }}kg</text>
  44. </view>
  45. <view class="_weight">
  46. <text>称重图片</text>
  47. <!-- <view class="_image"> </view> -->
  48. <image
  49. :src="orderInformation.weight_images"
  50. mode="scaleToFill"
  51. class="_image"
  52. />
  53. </view>
  54. <view class="photo-bottom">
  55. <text class="_text-1">需付款</text>
  56. <view class="price">
  57. <text style="font-size: 20rpx">¥</text>
  58. <text>{{ orderInformation.actual_price.split(".")[0] }}</text
  59. >.
  60. <text style="font-size: 20rpx">{{
  61. orderInformation.actual_price.split(".")[1]
  62. }}</text>
  63. </view>
  64. </view>
  65. </view>
  66. <view class="address">
  67. <view class="name-phone">
  68. <view class="send"> 寄 </view>
  69. <view class="name"> {{ orderInformation.from_name }} </view>
  70. <view class="phone"> {{ orderInformation.from_mobile }} </view>
  71. </view>
  72. <view class="address-detail">
  73. {{ orderInformation.from_full_address }}
  74. </view>
  75. <view class="name-phone">
  76. <view class="send"> 收 </view>
  77. <view class="name"> {{ orderInformation.to_name }} </view>
  78. <view class="phone"> {{ orderInformation.to_mobile }} </view>
  79. </view>
  80. <view class="address-detail _bottom">
  81. {{ orderInformation.to_full_address }}
  82. </view>
  83. <image
  84. style="height: 4rpx; margin-bottom: 40rpx"
  85. src="../../static/mine/338.png"
  86. mode=""
  87. ></image>
  88. <view class="_label-list" v-for="item in orderInformation.goods">
  89. <view class="information">
  90. <text class="_label">物品信息:</text>
  91. <text class="_value">{{ item.name }}</text>
  92. </view>
  93. <view class="information">
  94. <text class="_label">件数:</text>
  95. <text class="_value">{{ item.number }}</text>
  96. </view>
  97. <view class="information">
  98. <text class="_label">重量:</text>
  99. <text class="_value">{{ item.actual_weight }}kg</text>
  100. </view>
  101. <view class="information">
  102. <text class="_label">类型:</text>
  103. <text class="_value">{{ item.type_text }}</text>
  104. </view>
  105. <view style="display: flex">
  106. <text class="_label">跨境物流:</text>
  107. <view class="_value">
  108. <text
  109. >{{ orderInformation.transportType.name_cn + "&nbsp;" }}
  110. </text>
  111. <text> | {{ orderInformation.containerBase.name }}</text>
  112. </view>
  113. </view>
  114. </view>
  115. </view>
  116. <view class="num-information">
  117. <view class="order" style="">
  118. <text class="_label-1">订单编号</text>
  119. <view class="num">
  120. <text>{{ orderInformation.order_no }}</text
  121. >{{ "&nbsp;" + "|" + "&nbsp;"
  122. }}<text @click="cope(orderInformation.order_no)">复制</text>
  123. </view>
  124. </view>
  125. <view class="order">
  126. <text class="_label-1">下单时间</text>
  127. <view class="num">{{ orderInformation.created_at }} </view>
  128. </view>
  129. <view
  130. class="order"
  131. v-if="
  132. (orderInformation.status == 'overseas_undelivered' ||
  133. orderInformation.status == 'overseas_delivered' ||
  134. orderInformation.status == 'finished') &&
  135. orderInformation.status != 'domestic_delivered'
  136. "
  137. >
  138. <text class="_label-1">付款时间</text>
  139. <view class="num"> {{ orderInformation.paid_at }} </view>
  140. </view>
  141. <view
  142. class="order"
  143. v-if="
  144. (orderInformation.status == 'overseas_delivered' &&
  145. orderInformation.status != 'domestic_delivered') ||
  146. orderInformation.status == 'finished'
  147. "
  148. >
  149. <text class="_label-1">发货时间</text>
  150. <view class="num"> 2023-11-24 22:31 </view>
  151. </view>
  152. <view class="order" v-if="orderInformation.status == 'finished'">
  153. <text class="_label-1">签收时间</text>
  154. <view class="num"> 2023-11-24 22:31 </view>
  155. </view>
  156. </view>
  157. <view class="pay" v-if="orderInformation.status != 'domestic_delivered'">
  158. <text>已付</text>
  159. <text style="color: #f83224; font-weight: 600">123.1</text>
  160. </view>
  161. <view
  162. class="footer"
  163. v-if="
  164. orderInformation.status == 'domestic_delivered' ||
  165. orderInformation.status == 'overseas_delivered' ||
  166. orderInformation.status == 'finished'
  167. "
  168. >
  169. <button class="btn-1" @click="toLogistics">删除</button>
  170. <button class="btn-1" @click="toLogistics">查看物流</button>
  171. <button
  172. class="btn-2"
  173. @click="toPay"
  174. v-if="orderInformation.status == 'unpaid'"
  175. >
  176. 立即付款
  177. </button>
  178. </view>
  179. </view>
  180. </template>
  181. <script>
  182. export default {
  183. data() {
  184. return {
  185. orderStauts: 0,
  186. orderTitle: "",
  187. orderDetail: "",
  188. packageId: "",
  189. orderInformation: {},
  190. };
  191. },
  192. computed: {},
  193. onLoad(options) {
  194. this.orderStauts = options.orderStatus;
  195. this.getDetail();
  196. },
  197. created() {},
  198. methods: {
  199. cope(str) {
  200. uni.setClipboardData({
  201. data: str,
  202. success() {
  203. uni.showToast({
  204. title: "复制成功",
  205. icon: "none",
  206. });
  207. },
  208. });
  209. },
  210. setStatus(num) {
  211. this.orderStauts = num;
  212. },
  213. toLogistics() {
  214. uni.navigateTo({
  215. url: "/pageD/logisticsProgress/logisticsProgress",
  216. });
  217. },
  218. toPay() {
  219. uni.navigateTo({
  220. url: "/pageD/paymentOrder/paymentOrder",
  221. });
  222. },
  223. getDetail() {
  224. uni.$u.http.get(`/api/express-order/${this.orderStauts}`).then((res) => {
  225. this.orderInformation = res;
  226. if (this.orderInformation.status == "domestic_delivered") {
  227. //设置顶部标题栏颜色
  228. uni.setNavigationBarColor({
  229. frontColor: "#000000",
  230. backgroundColor: "#f4f4f4",
  231. });
  232. this.orderDetail = "商品已寄往平台,正在运输中";
  233. this.orderTitle = "待平台收货";
  234. } else if (this.orderInformation.status == "unpaid") {
  235. //设置顶部标题栏颜色
  236. uni.setNavigationBarColor({
  237. frontColor: "#000000",
  238. backgroundColor: "#f4f4f4",
  239. });
  240. this.orderDetail = "商品已打包称重,等待用户付款";
  241. this.orderTitle = "待付款";
  242. } else if (this.orderInformation.status == "overseas_undelivered") {
  243. //设置顶部标题栏颜色
  244. uni.setNavigationBarColor({
  245. frontColor: "#000000",
  246. backgroundColor: "#f4f4f4",
  247. });
  248. this.orderDetail = "等待平台发货";
  249. this.orderTitle = "待发货";
  250. } else if (this.orderInformation.status == "overseas_delivered") {
  251. //设置顶部标题栏颜色
  252. uni.setNavigationBarColor({
  253. frontColor: "#000000",
  254. backgroundColor: "#f4f4f4",
  255. });
  256. this.orderDetail = "商品已发出,很快将发货至您的手中";
  257. this.orderTitle = "已发货";
  258. } else if (this.orderStauts == 4) {
  259. //设置顶部标题栏颜色
  260. uni.setNavigationBarColor({
  261. frontColor: "#000000",
  262. backgroundColor: "#ffffff",
  263. });
  264. uni.setNavigationBarTitle({
  265. title: "拼包详情",
  266. });
  267. } else if (this.orderInformation.status == "finished") {
  268. //设置顶部标题栏颜色
  269. uni.setNavigationBarColor({
  270. frontColor: "#000000",
  271. backgroundColor: "#f4f4f4",
  272. });
  273. this.orderDetail = "订单签收,交易已完成";
  274. this.orderTitle = "已完成";
  275. }
  276. });
  277. },
  278. },
  279. };
  280. </script>
  281. <style lang="scss" scoped>
  282. .page {
  283. padding: 20rpx 24rpx;
  284. position: relative;
  285. .title {
  286. font-size: 44rpx;
  287. color: #222;
  288. font-weight: 600;
  289. }
  290. .prompt {
  291. font-size: 24rpx;
  292. color: rgba(34, 34, 34, 0.5);
  293. margin-top: 12rpx;
  294. }
  295. .packaging {
  296. border-radius: 16rpx;
  297. background-color: #fff;
  298. padding: 30rpx 20rpx;
  299. .packaging-top {
  300. display: flex;
  301. justify-content: space-between;
  302. font-size: 28rpx;
  303. color: #222;
  304. }
  305. .packaging-center {
  306. display: flex;
  307. justify-content: space-around;
  308. align-items: center;
  309. margin-top: 26rpx;
  310. background-color: #f5f5f5;
  311. border-radius: 10rpx;
  312. padding: 20rpx 0;
  313. .jiantou {
  314. width: 130rpx;
  315. height: 10rpx;
  316. }
  317. .packaging-left {
  318. text-align: center;
  319. .left-top {
  320. font-size: 32rpx;
  321. color: #222;
  322. font-weight: 600;
  323. }
  324. .left-bottom {
  325. margin-top: 10rpx;
  326. font-size: 24rpx;
  327. color: rgba(34, 34, 34, 0.5);
  328. }
  329. }
  330. }
  331. .packaging-time {
  332. font-size: 28rpx;
  333. display: flex;
  334. align-items: center;
  335. margin-top: 28rpx;
  336. }
  337. }
  338. .photo {
  339. background-color: #fff;
  340. border-radius: 16rpx;
  341. padding: 20rpx 20rpx;
  342. margin-top: 20rpx;
  343. ._weight {
  344. display: flex;
  345. justify-content: space-between;
  346. font-size: 26rpx;
  347. color: rgba(34, 34, 34, 0.8);
  348. margin-bottom: 32rpx;
  349. ._image {
  350. width: 160rpx;
  351. height: 90rpx;
  352. // background-color: #d8d8d8;
  353. border-radius: 4rpx;
  354. }
  355. }
  356. .photo-bottom {
  357. display: flex;
  358. justify-content: flex-end;
  359. align-items: center;
  360. border-top: 2rpx solid rgba(151, 151, 151, 0.1);
  361. padding-top: 24rpx;
  362. .price {
  363. color: #f83224;
  364. font-weight: 600;
  365. }
  366. ._text-1 {
  367. font-size: 26rpx;
  368. }
  369. }
  370. }
  371. .address {
  372. padding: 36rpx 34rpx;
  373. background-color: #fff;
  374. border-radius: 10rpx;
  375. margin-top: 32rpx;
  376. .name-phone {
  377. display: flex;
  378. align-items: flex-end;
  379. .send {
  380. width: 40rpx;
  381. height: 40rpx;
  382. background-color: #000;
  383. color: #fff;
  384. border-radius: 50%;
  385. font-size: 22rpx;
  386. text-align: center;
  387. line-height: 40rpx;
  388. }
  389. .name {
  390. font-weight: 600;
  391. font-size: 30rpx;
  392. color: #222;
  393. margin-right: 28rpx;
  394. margin-left: 28rpx;
  395. }
  396. .phone {
  397. font-size: 24rpx;
  398. color: #777;
  399. }
  400. }
  401. .address-detail {
  402. font-size: 26rpx;
  403. color: #555;
  404. margin-top: 16rpx;
  405. margin-left: 60rpx;
  406. padding-bottom: 36rpx;
  407. border-bottom: 2rpx solid rgba(151, 151, 151, 0.1);
  408. margin-bottom: 34rpx;
  409. }
  410. ._bottom {
  411. border: none;
  412. margin-bottom: 0;
  413. }
  414. ._label-list {
  415. display: flex;
  416. flex-wrap: wrap;
  417. justify-content: space-between;
  418. .information {
  419. width: 49%;
  420. margin-bottom: 28rpx;
  421. font-size: 28rpx;
  422. }
  423. ._label {
  424. color: #666;
  425. font-size: 28rpx;
  426. }
  427. ._value {
  428. font-size: 28rpx;
  429. color: #333;
  430. }
  431. }
  432. }
  433. .num-information {
  434. background-color: #fff;
  435. border-radius: 16rpx;
  436. margin-top: 20rpx;
  437. padding: 28rpx 20rpx 2rpx 28rpx;
  438. .order {
  439. display: flex;
  440. justify-content: space-between;
  441. font-size: 28rpx;
  442. margin-bottom: 28rpx;
  443. ._label-1 {
  444. color: #666;
  445. }
  446. .num {
  447. color: #333;
  448. }
  449. }
  450. }
  451. .pay {
  452. display: flex;
  453. padding: 22rpx 28rpx;
  454. justify-content: space-between;
  455. margin-top: 20rpx;
  456. background-color: #fff;
  457. border-radius: 16rpx;
  458. }
  459. .footer {
  460. display: flex;
  461. justify-content: flex-end;
  462. background-color: #fff;
  463. position: fixed;
  464. bottom: 0;
  465. left: 0;
  466. width: 100%;
  467. height: 146rpx;
  468. padding-top: 20rpx;
  469. .btn-1 {
  470. height: 76rpx;
  471. padding: 0;
  472. margin: 0;
  473. font-size: 28rpx;
  474. color: #222;
  475. min-width: 188rpx;
  476. background-color: #fff;
  477. border-radius: 38rpx;
  478. border: 2rpx solid #979797;
  479. margin-right: 20rpx;
  480. }
  481. .btn-2 {
  482. height: 76rpx;
  483. padding: 0;
  484. margin: 0;
  485. font-size: 28rpx;
  486. color: #fff;
  487. min-width: 188rpx;
  488. background-color: #f83224;
  489. border-radius: 38rpx;
  490. margin-right: 20rpx;
  491. }
  492. }
  493. }
  494. </style>