orderInformation.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563
  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 (
  243. this.orderInformation.status == "overseas_undelivered" ||
  244. this.orderInformation.status == "domestic_undelivered"
  245. ) {
  246. //设置顶部标题栏颜色
  247. uni.setNavigationBarColor({
  248. frontColor: "#000000",
  249. backgroundColor: "#f4f4f4",
  250. });
  251. this.orderDetail = "等待平台发货";
  252. this.orderTitle = "待发货";
  253. } else if (this.orderInformation.status == "overseas_delivered") {
  254. //设置顶部标题栏颜色
  255. uni.setNavigationBarColor({
  256. frontColor: "#000000",
  257. backgroundColor: "#f4f4f4",
  258. });
  259. this.orderDetail = "商品已发出,很快将发货至您的手中";
  260. this.orderTitle = "已发货";
  261. } else if (this.orderStauts == 4) {
  262. //设置顶部标题栏颜色
  263. uni.setNavigationBarColor({
  264. frontColor: "#000000",
  265. backgroundColor: "#ffffff",
  266. });
  267. uni.setNavigationBarTitle({
  268. title: "拼包详情",
  269. });
  270. } else if (
  271. this.orderInformation.status == "finished" ||
  272. this.orderInformation.status == "overseas_received"
  273. ) {
  274. //设置顶部标题栏颜色
  275. uni.setNavigationBarColor({
  276. frontColor: "#000000",
  277. backgroundColor: "#f4f4f4",
  278. });
  279. this.orderDetail = "订单签收,交易已完成";
  280. this.orderTitle = "已完成";
  281. } else if (this.orderInformation.status == "domestic_received") {
  282. //设置顶部标题栏颜色
  283. uni.setNavigationBarColor({
  284. frontColor: "#000000",
  285. backgroundColor: "#f4f4f4",
  286. });
  287. this.orderDetail = "等待中转称重发出";
  288. this.orderTitle = "中转已签收";
  289. } else if (this.orderInformation.status == "closed") {
  290. //设置顶部标题栏颜色
  291. uni.setNavigationBarColor({
  292. frontColor: "#000000",
  293. backgroundColor: "#f4f4f4",
  294. });
  295. this.orderDetail = "订单关闭";
  296. this.orderTitle = "订单已关闭";
  297. } else if (this.orderInformation.status == "refunded") {
  298. //设置顶部标题栏颜色
  299. uni.setNavigationBarColor({
  300. frontColor: "#000000",
  301. backgroundColor: "#f4f4f4",
  302. });
  303. this.orderDetail = "订单已退款";
  304. this.orderTitle = "已退款";
  305. } else if (this.orderInformation.status == "refunding") {
  306. //设置顶部标题栏颜色
  307. uni.setNavigationBarColor({
  308. frontColor: "#000000",
  309. backgroundColor: "#f4f4f4",
  310. });
  311. this.orderDetail = "订单正在申请退款";
  312. this.orderTitle = "退款中";
  313. }
  314. });
  315. },
  316. },
  317. };
  318. </script>
  319. <style lang="scss" scoped>
  320. .page {
  321. padding: 20rpx 24rpx;
  322. position: relative;
  323. .title {
  324. font-size: 44rpx;
  325. color: #222;
  326. font-weight: 600;
  327. }
  328. .prompt {
  329. font-size: 24rpx;
  330. color: rgba(34, 34, 34, 0.5);
  331. margin-top: 12rpx;
  332. }
  333. .packaging {
  334. border-radius: 16rpx;
  335. background-color: #fff;
  336. padding: 30rpx 20rpx;
  337. .packaging-top {
  338. display: flex;
  339. justify-content: space-between;
  340. font-size: 28rpx;
  341. color: #222;
  342. }
  343. .packaging-center {
  344. display: flex;
  345. justify-content: space-around;
  346. align-items: center;
  347. margin-top: 26rpx;
  348. background-color: #f5f5f5;
  349. border-radius: 10rpx;
  350. padding: 20rpx 0;
  351. .jiantou {
  352. width: 130rpx;
  353. height: 10rpx;
  354. }
  355. .packaging-left {
  356. text-align: center;
  357. .left-top {
  358. font-size: 32rpx;
  359. color: #222;
  360. font-weight: 600;
  361. }
  362. .left-bottom {
  363. margin-top: 10rpx;
  364. font-size: 24rpx;
  365. color: rgba(34, 34, 34, 0.5);
  366. }
  367. }
  368. }
  369. .packaging-time {
  370. font-size: 28rpx;
  371. display: flex;
  372. align-items: center;
  373. margin-top: 28rpx;
  374. }
  375. }
  376. .photo {
  377. background-color: #fff;
  378. border-radius: 16rpx;
  379. padding: 20rpx 20rpx;
  380. margin-top: 20rpx;
  381. ._weight {
  382. display: flex;
  383. justify-content: space-between;
  384. font-size: 26rpx;
  385. color: rgba(34, 34, 34, 0.8);
  386. margin-bottom: 32rpx;
  387. ._image {
  388. width: 160rpx;
  389. height: 90rpx;
  390. // background-color: #d8d8d8;
  391. border-radius: 4rpx;
  392. }
  393. }
  394. .photo-bottom {
  395. display: flex;
  396. justify-content: flex-end;
  397. align-items: center;
  398. border-top: 2rpx solid rgba(151, 151, 151, 0.1);
  399. padding-top: 24rpx;
  400. .price {
  401. color: #f83224;
  402. font-weight: 600;
  403. }
  404. ._text-1 {
  405. font-size: 26rpx;
  406. }
  407. }
  408. }
  409. .address {
  410. padding: 36rpx 34rpx;
  411. background-color: #fff;
  412. border-radius: 10rpx;
  413. margin-top: 32rpx;
  414. .name-phone {
  415. display: flex;
  416. align-items: flex-end;
  417. .send {
  418. width: 40rpx;
  419. height: 40rpx;
  420. background-color: #000;
  421. color: #fff;
  422. border-radius: 50%;
  423. font-size: 22rpx;
  424. text-align: center;
  425. line-height: 40rpx;
  426. }
  427. .name {
  428. font-weight: 600;
  429. font-size: 30rpx;
  430. color: #222;
  431. margin-right: 28rpx;
  432. margin-left: 28rpx;
  433. }
  434. .phone {
  435. font-size: 24rpx;
  436. color: #777;
  437. }
  438. }
  439. .address-detail {
  440. font-size: 26rpx;
  441. color: #555;
  442. margin-top: 16rpx;
  443. margin-left: 60rpx;
  444. padding-bottom: 36rpx;
  445. border-bottom: 2rpx solid rgba(151, 151, 151, 0.1);
  446. margin-bottom: 34rpx;
  447. }
  448. ._bottom {
  449. border: none;
  450. margin-bottom: 0;
  451. }
  452. ._label-list {
  453. display: flex;
  454. flex-wrap: wrap;
  455. justify-content: space-between;
  456. .information {
  457. width: 49%;
  458. margin-bottom: 28rpx;
  459. font-size: 28rpx;
  460. }
  461. ._label {
  462. color: #666;
  463. font-size: 28rpx;
  464. }
  465. ._value {
  466. font-size: 28rpx;
  467. color: #333;
  468. }
  469. }
  470. }
  471. .num-information {
  472. background-color: #fff;
  473. border-radius: 16rpx;
  474. margin-top: 20rpx;
  475. padding: 28rpx 20rpx 2rpx 28rpx;
  476. .order {
  477. display: flex;
  478. justify-content: space-between;
  479. font-size: 28rpx;
  480. margin-bottom: 28rpx;
  481. ._label-1 {
  482. color: #666;
  483. }
  484. .num {
  485. color: #333;
  486. }
  487. }
  488. }
  489. .pay {
  490. display: flex;
  491. padding: 22rpx 28rpx;
  492. justify-content: space-between;
  493. margin-top: 20rpx;
  494. background-color: #fff;
  495. border-radius: 16rpx;
  496. }
  497. .footer {
  498. display: flex;
  499. justify-content: flex-end;
  500. background-color: #fff;
  501. position: fixed;
  502. bottom: 0;
  503. left: 0;
  504. width: 100%;
  505. height: 146rpx;
  506. padding-top: 20rpx;
  507. .btn-1 {
  508. height: 76rpx;
  509. padding: 0;
  510. margin: 0;
  511. font-size: 28rpx;
  512. color: #222;
  513. min-width: 188rpx;
  514. background-color: #fff;
  515. border-radius: 38rpx;
  516. border: 2rpx solid #979797;
  517. margin-right: 20rpx;
  518. }
  519. .btn-2 {
  520. height: 76rpx;
  521. padding: 0;
  522. margin: 0;
  523. font-size: 28rpx;
  524. color: #fff;
  525. min-width: 188rpx;
  526. background-color: #f83224;
  527. border-radius: 38rpx;
  528. margin-right: 20rpx;
  529. }
  530. }
  531. }
  532. </style>