orderInformation.vue 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688
  1. <template>
  2. <view class="page">
  3. <view class="top" v-if="orderInformation.type != 'group_package'">
  4. <view class="title">
  5. {{ orderTitle }}
  6. </view>
  7. <view class="prompt">
  8. {{ orderDetail }}
  9. </view>
  10. </view>
  11. <view class="packaging" v-if="orderInformation.type == 'group_package'">
  12. <view class="packaging-top">
  13. <view class="">
  14. {{
  15. orderInformation.goods[0].type_text +
  16. "&nbsp;" +
  17. "|" +
  18. "&nbsp" +
  19. orderInformation.containerBase.transport_type_name
  20. }}
  21. </view>
  22. <view style="color: #f83224"> {{ orderInformation.status_text }} </view>
  23. </view>
  24. <view class="packaging-center">
  25. <view class="packaging-left">
  26. <view class="left-top"> 东莞仓库 </view>
  27. <view class="left-bottom"> 始发地 </view>
  28. </view>
  29. <image class="jiantou" src="../../static/mine/339.png" mode=""></image>
  30. <view class="packaging-left">
  31. <view class="left-top">
  32. {{ orderInformation.containerBase.country_name }}
  33. </view>
  34. <view class="left-bottom"> 目的地 </view>
  35. </view>
  36. </view>
  37. <view class="packaging-time">
  38. <view class="time">
  39. <text>开始时间:</text>
  40. <text>{{
  41. orderInformation.containerBase.begin_date + "&emsp;"
  42. }}</text>
  43. </view>
  44. <view class="time">
  45. <text>截止时间:</text>
  46. <text>{{ orderInformation.containerBase.end_date }}</text>
  47. </view>
  48. </view>
  49. </view>
  50. <view class="photo" v-if="orderInformation.status == 'unpaid'">
  51. <view class="_weight">
  52. <text>称重重量</text>
  53. <text>{{ orderInformation.actual_weight }}kg</text>
  54. </view>
  55. <view class="_weight">
  56. <text>称重图片</text>
  57. <!-- <view class="_image"> </view> -->
  58. <image
  59. :src="orderInformation.weight_images"
  60. mode="scaleToFill"
  61. class="_image"
  62. />
  63. </view>
  64. <view class="photo-bottom">
  65. <text class="_text-1">需付款</text>
  66. <view class="price">
  67. <text style="font-size: 20rpx">¥</text>
  68. <text>{{ orderInformation.gap_price.split(".")[0] }}</text
  69. >.
  70. <text style="font-size: 20rpx">{{
  71. orderInformation.gap_price.split(".")[1]
  72. }}</text>
  73. </view>
  74. </view>
  75. </view>
  76. <view class="address">
  77. <view class="name-phone">
  78. <view class="send"> 寄 </view>
  79. <view class="name"> {{ orderInformation.from_name }} </view>
  80. <view class="phone"> {{ orderInformation.from_mobile }} </view>
  81. </view>
  82. <view class="address-detail">
  83. {{ orderInformation.from_full_address }}
  84. </view>
  85. <view class="name-phone">
  86. <view class="send"> 收 </view>
  87. <view class="name"> {{ orderInformation.to_name }} </view>
  88. <view class="phone"> {{ orderInformation.to_mobile }} </view>
  89. </view>
  90. <view class="address-detail _bottom">
  91. {{ orderInformation.to_full_address }}
  92. </view>
  93. <image
  94. style="height: 4rpx; margin-bottom: 40rpx"
  95. src="../../static/mine/338.png"
  96. mode=""
  97. ></image>
  98. <view class="_label-list" v-for="item in orderInformation.goods">
  99. <view class="information">
  100. <text class="_label">物品信息:</text>
  101. <text class="_value">{{ item.name }}</text>
  102. </view>
  103. <view class="information">
  104. <text class="_label">件数:</text>
  105. <text class="_value">{{ item.number }}</text>
  106. </view>
  107. <view class="information">
  108. <text class="_label">重量:</text>
  109. <text class="_value">{{ item.actual_weight }}kg</text>
  110. </view>
  111. <view class="information">
  112. <text class="_label">类型:</text>
  113. <text class="_value">{{ item.type_text }}</text>
  114. </view>
  115. <view style="display: flex">
  116. <text class="_label">跨境物流:</text>
  117. <view class="_value">
  118. <text
  119. >{{ orderInformation.transportType.name_cn + "&nbsp;" }}
  120. </text>
  121. <text> | {{ orderInformation.containerBase.name_cn }}</text>
  122. </view>
  123. </view>
  124. </view>
  125. </view>
  126. <view class="num-information">
  127. <view class="order" style="">
  128. <text class="_label-1">订单编号</text>
  129. <view class="num">
  130. <text>{{ orderInformation.order_no }}</text
  131. >{{ "&nbsp;" + "|" + "&nbsp;"
  132. }}<text @click="cope(orderInformation.order_no)">复制</text>
  133. </view>
  134. </view>
  135. <view class="order">
  136. <text class="_label-1">下单时间</text>
  137. <view class="num">{{ orderInformation.created_at }} </view>
  138. </view>
  139. <view
  140. class="order"
  141. v-if="
  142. orderInformation.status != 'domestic_undelivered' &&
  143. orderInformation.status != 'domestic_delivered' &&
  144. orderInformation.status != 'domestic_received'
  145. "
  146. >
  147. <text class="_label-1">付款时间</text>
  148. <view class="num"> {{ orderInformation.paid_at }} </view>
  149. </view>
  150. <view
  151. class="order"
  152. v-if="
  153. (orderInformation.status == 'overseas_delivered' &&
  154. orderInformation.status != 'domestic_delivered') ||
  155. orderInformation.status == 'finished'
  156. "
  157. >
  158. <text class="_label-1">发货时间</text>
  159. <view class="num"> {{ orderInformation.domestic_delivered_at }} </view>
  160. </view>
  161. <view class="order" v-if="orderInformation.status == 'finished'">
  162. <text class="_label-1">签收时间</text>
  163. <view class="num"> {{ orderInformation.overseas_received_at }} </view>
  164. </view>
  165. </view>
  166. <view
  167. class="pay"
  168. v-if="
  169. orderInformation.status != 'group_unpaid' &&
  170. orderInformation.status != 'unpaid'
  171. "
  172. >
  173. <text>{{
  174. orderInformation.status == "group_unpaid" ||
  175. orderInformation.status == "unpaid"
  176. ? "待付"
  177. : "已付"
  178. }}</text>
  179. <text style="color: #f83224; font-weight: 600">{{
  180. orderInformation.actual_price || orderInformation.estimated_price
  181. }}</text>
  182. </view>
  183. <view
  184. class="footer"
  185. v-if="
  186. orderInformation.status == 'domestic_delivered' ||
  187. orderInformation.status == 'overseas_delivered' ||
  188. orderInformation.status == 'finished'
  189. "
  190. >
  191. <button
  192. class="btn-1"
  193. @click="toLogistics"
  194. v-if="orderInformation.status == 'finished'"
  195. >
  196. 删除
  197. </button>
  198. <button class="btn-1" @click="toLogistics">查看物流</button>
  199. <button
  200. class="btn-1"
  201. @click="fillInformation"
  202. v-if="orderInformation.status == 'domestic_undelivered'"
  203. >
  204. 填写物流信息
  205. </button>
  206. <button
  207. class="btn-2"
  208. @click="toPay"
  209. v-if="orderInformation.status == 'unpaid'"
  210. >
  211. 立即付款
  212. </button>
  213. </view>
  214. <view
  215. class="footer"
  216. v-else-if="
  217. orderInformation.status == 'domestic_undelivered' ||
  218. orderInformation.status == 'unpaid' ||
  219. orderInformation.status == 'group_unpaid'
  220. "
  221. >
  222. <button
  223. class="btn-1"
  224. @click="fillInformation"
  225. v-if="
  226. orderInformation.type == 'mall_order' &&
  227. orderInformation.status == 'domestic_undelivered'
  228. "
  229. >
  230. 填写物流信息
  231. </button>
  232. <button
  233. class="btn-2"
  234. @click="toSending"
  235. v-if="
  236. (orderInformation.type == 'group_package' ||
  237. orderInformation.type == 'express_order') &&
  238. orderInformation.status == 'domestic_undelivered'
  239. "
  240. >
  241. 去寄件
  242. </button>
  243. <button
  244. class="btn-2"
  245. @click="toPay"
  246. v-if="
  247. orderInformation.status == 'unpaid' ||
  248. orderInformation.status == 'group_unpaid'
  249. "
  250. >
  251. 立即付款
  252. </button></view
  253. >
  254. <Fill :show="show" @close="close" />
  255. </view>
  256. </template>
  257. <script>
  258. import Fill from "./component/fill.vue";
  259. export default {
  260. components: {
  261. Fill,
  262. },
  263. data() {
  264. return {
  265. orderStauts: 0,
  266. orderTitle: "",
  267. orderDetail: "",
  268. packageId: "",
  269. orderInformation: {},
  270. show: false,
  271. };
  272. },
  273. computed: {},
  274. onLoad(options) {
  275. this.orderStauts = options.orderStatus;
  276. this.getDetail();
  277. },
  278. onShow() {
  279. this.getDetail();
  280. },
  281. created() {},
  282. methods: {
  283. cope(str) {
  284. uni.setClipboardData({
  285. data: str,
  286. success() {
  287. uni.showToast({
  288. title: "复制成功",
  289. icon: "none",
  290. });
  291. },
  292. });
  293. },
  294. //去寄件
  295. toSending() {
  296. uni.navigateTo({
  297. url: "/pageD/sending/sending?orderId=" + this.orderInformation.id,
  298. });
  299. },
  300. setStatus(num) {
  301. this.orderStauts = num;
  302. },
  303. //查看物流进度
  304. toLogistics() {
  305. uni.navigateTo({
  306. url: "/pageD/logisticsProgress/logisticsProgress",
  307. });
  308. },
  309. //填写物流信息
  310. fillInformation() {
  311. this.show = true;
  312. },
  313. //关闭弹窗
  314. close(value) {
  315. this.show = false;
  316. if (value.expressCode) {
  317. uni.$u.http
  318. .post(`/api/express-order/delivery/${this.orderInformation.id}`, {
  319. domestic_logistics_company_code: value.expressCode,
  320. domestic_logistics_no: value.expressNum,
  321. })
  322. .then((res) => {
  323. this.getDetail();
  324. uni.showToast({
  325. title: "已保存",
  326. });
  327. });
  328. }
  329. },
  330. //去支付
  331. toPay() {
  332. uni.navigateTo({
  333. url: `/pageD/paymentOrder/paymentOrder?money=${this.orderInformation.gap_price}&weight=${this.orderInformation.goods[0].actual_weight}&packageType=${this.orderInformation.goods[0].type_text}&num=${this.orderInformation.goods[0].number}&orderid=${this.orderInformation.id}&type=${this.orderInformation.type}`,
  334. });
  335. },
  336. getDetail() {
  337. uni.$u.http.get(`/api/express-order/${this.orderStauts}`).then((res) => {
  338. this.orderInformation = res;
  339. if (this.orderInformation.status == "domestic_delivered") {
  340. //设置顶部标题栏颜色
  341. uni.setNavigationBarColor({
  342. frontColor: "#000000",
  343. backgroundColor: "#f4f4f4",
  344. });
  345. this.orderDetail = "商品已寄往平台,正在运输中";
  346. this.orderTitle = this.orderInformation.status_text;
  347. } else if (this.orderInformation.status == "unpaid") {
  348. //设置顶部标题栏颜色
  349. uni.setNavigationBarColor({
  350. frontColor: "#000000",
  351. backgroundColor: "#f4f4f4",
  352. });
  353. this.orderDetail = "商品已打包称重,等待用户付款";
  354. this.orderTitle = this.orderInformation.status_text;
  355. } else if (this.orderInformation.status == "overseas_undelivered") {
  356. //设置顶部标题栏颜色
  357. uni.setNavigationBarColor({
  358. frontColor: "#000000",
  359. backgroundColor: "#f4f4f4",
  360. });
  361. this.orderDetail = "等待平台发货";
  362. this.orderTitle = this.orderInformation.status_text;
  363. } else if (this.orderInformation.status == "overseas_delivered") {
  364. //设置顶部标题栏颜色
  365. uni.setNavigationBarColor({
  366. frontColor: "#000000",
  367. backgroundColor: "#f4f4f4",
  368. });
  369. this.orderDetail = "商品已发出,很快将发货至您的手中";
  370. this.orderTitle = this.orderInformation.status_text;
  371. } else if (this.orderStauts == 4) {
  372. //设置顶部标题栏颜色
  373. uni.setNavigationBarColor({
  374. frontColor: "#000000",
  375. backgroundColor: "#ffffff",
  376. });
  377. uni.setNavigationBarTitle({
  378. title: "拼包详情",
  379. });
  380. } else if (
  381. this.orderInformation.status == "finished" ||
  382. this.orderInformation.status == "overseas_received"
  383. ) {
  384. //设置顶部标题栏颜色
  385. uni.setNavigationBarColor({
  386. frontColor: "#000000",
  387. backgroundColor: "#f4f4f4",
  388. });
  389. this.orderDetail = "订单签收,交易已完成";
  390. this.orderTitle = this.orderInformation.status_text;
  391. } else if (this.orderInformation.status == "domestic_received") {
  392. //设置顶部标题栏颜色
  393. uni.setNavigationBarColor({
  394. frontColor: "#000000",
  395. backgroundColor: "#f4f4f4",
  396. });
  397. this.orderDetail = "等待中转称重发出";
  398. this.orderTitle = this.orderInformation.status_text;
  399. } else if (this.orderInformation.status == "closed") {
  400. //设置顶部标题栏颜色
  401. uni.setNavigationBarColor({
  402. frontColor: "#000000",
  403. backgroundColor: "#f4f4f4",
  404. });
  405. this.orderDetail = "订单关闭";
  406. this.orderTitle = this.orderInformation.status_text;
  407. } else if (this.orderInformation.status == "refunded") {
  408. //设置顶部标题栏颜色
  409. uni.setNavigationBarColor({
  410. frontColor: "#000000",
  411. backgroundColor: "#f4f4f4",
  412. });
  413. this.orderDetail = "订单已退款";
  414. this.orderTitle = this.orderInformation.status_text;
  415. } else if (this.orderInformation.status == "refunding") {
  416. //设置顶部标题栏颜色
  417. uni.setNavigationBarColor({
  418. frontColor: "#000000",
  419. backgroundColor: "#f4f4f4",
  420. });
  421. this.orderDetail = "订单正在申请退款";
  422. this.orderTitle = this.orderInformation.status_text;
  423. } else if (this.orderInformation.status == "domestic_undelivered") {
  424. //设置顶部标题栏颜色
  425. uni.setNavigationBarColor({
  426. frontColor: "#000000",
  427. backgroundColor: "#f4f4f4",
  428. });
  429. this.orderDetail = "商品等待发货中";
  430. this.orderTitle = this.orderInformation.status_text;
  431. }
  432. });
  433. },
  434. },
  435. };
  436. </script>
  437. <style lang="scss" scoped>
  438. .page {
  439. padding: 20rpx 24rpx;
  440. position: relative;
  441. padding-bottom: 186rpx;
  442. .title {
  443. font-size: 44rpx;
  444. color: #222;
  445. font-weight: 600;
  446. }
  447. .prompt {
  448. font-size: 24rpx;
  449. color: rgba(34, 34, 34, 0.5);
  450. margin-top: 12rpx;
  451. }
  452. .packaging {
  453. border-radius: 16rpx;
  454. background-color: #fff;
  455. padding: 30rpx 20rpx;
  456. .packaging-top {
  457. display: flex;
  458. justify-content: space-between;
  459. font-size: 28rpx;
  460. color: #222;
  461. }
  462. .packaging-center {
  463. display: flex;
  464. justify-content: space-around;
  465. align-items: center;
  466. margin-top: 26rpx;
  467. background-color: #f5f5f5;
  468. border-radius: 10rpx;
  469. padding: 20rpx 0;
  470. .jiantou {
  471. width: 130rpx;
  472. height: 10rpx;
  473. }
  474. .packaging-left {
  475. text-align: center;
  476. .left-top {
  477. font-size: 32rpx;
  478. color: #222;
  479. font-weight: 600;
  480. }
  481. .left-bottom {
  482. margin-top: 10rpx;
  483. font-size: 24rpx;
  484. color: rgba(34, 34, 34, 0.5);
  485. }
  486. }
  487. }
  488. .packaging-time {
  489. font-size: 28rpx;
  490. display: flex;
  491. align-items: center;
  492. margin-top: 28rpx;
  493. }
  494. }
  495. .photo {
  496. background-color: #fff;
  497. border-radius: 16rpx;
  498. padding: 20rpx 20rpx;
  499. margin-top: 20rpx;
  500. ._weight {
  501. display: flex;
  502. justify-content: space-between;
  503. font-size: 26rpx;
  504. color: rgba(34, 34, 34, 0.8);
  505. margin-bottom: 32rpx;
  506. ._image {
  507. width: 160rpx;
  508. height: 90rpx;
  509. // background-color: #d8d8d8;
  510. border-radius: 4rpx;
  511. }
  512. }
  513. .photo-bottom {
  514. display: flex;
  515. justify-content: flex-end;
  516. align-items: center;
  517. border-top: 2rpx solid rgba(151, 151, 151, 0.1);
  518. padding-top: 24rpx;
  519. .price {
  520. color: #f83224;
  521. font-weight: 600;
  522. }
  523. ._text-1 {
  524. font-size: 26rpx;
  525. }
  526. }
  527. }
  528. .address {
  529. padding: 36rpx 34rpx;
  530. background-color: #fff;
  531. border-radius: 10rpx;
  532. margin-top: 32rpx;
  533. .name-phone {
  534. display: flex;
  535. align-items: flex-end;
  536. .send {
  537. width: 40rpx;
  538. height: 40rpx;
  539. background-color: #000;
  540. color: #fff;
  541. border-radius: 50%;
  542. font-size: 22rpx;
  543. text-align: center;
  544. line-height: 40rpx;
  545. }
  546. .name {
  547. font-weight: 600;
  548. font-size: 30rpx;
  549. color: #222;
  550. margin-right: 28rpx;
  551. margin-left: 28rpx;
  552. }
  553. .phone {
  554. font-size: 24rpx;
  555. color: #777;
  556. }
  557. }
  558. .address-detail {
  559. font-size: 26rpx;
  560. color: #555;
  561. margin-top: 16rpx;
  562. margin-left: 60rpx;
  563. padding-bottom: 36rpx;
  564. border-bottom: 2rpx solid rgba(151, 151, 151, 0.1);
  565. margin-bottom: 34rpx;
  566. }
  567. ._bottom {
  568. border: none;
  569. margin-bottom: 0;
  570. }
  571. ._label-list {
  572. display: flex;
  573. flex-wrap: wrap;
  574. justify-content: space-between;
  575. .information {
  576. width: 49%;
  577. margin-bottom: 28rpx;
  578. font-size: 28rpx;
  579. }
  580. ._label {
  581. color: #666;
  582. font-size: 28rpx;
  583. }
  584. ._value {
  585. font-size: 28rpx;
  586. color: #333;
  587. }
  588. }
  589. }
  590. .num-information {
  591. background-color: #fff;
  592. border-radius: 16rpx;
  593. margin-top: 20rpx;
  594. padding: 28rpx 20rpx 2rpx 28rpx;
  595. .order {
  596. display: flex;
  597. justify-content: space-between;
  598. font-size: 28rpx;
  599. margin-bottom: 28rpx;
  600. ._label-1 {
  601. color: #666;
  602. }
  603. .num {
  604. color: #333;
  605. }
  606. }
  607. }
  608. .pay {
  609. display: flex;
  610. padding: 22rpx 28rpx;
  611. justify-content: space-between;
  612. margin-top: 20rpx;
  613. background-color: #fff;
  614. border-radius: 16rpx;
  615. }
  616. .footer {
  617. display: flex;
  618. justify-content: flex-end;
  619. background-color: #fff;
  620. position: fixed;
  621. bottom: 0;
  622. left: 0;
  623. width: 100%;
  624. height: 146rpx;
  625. padding-top: 20rpx;
  626. .btn-1 {
  627. height: 76rpx;
  628. padding: 0;
  629. margin: 0;
  630. font-size: 28rpx;
  631. color: #222;
  632. min-width: 188rpx;
  633. background-color: #fff;
  634. border-radius: 38rpx;
  635. border: 2rpx solid #979797;
  636. margin-right: 20rpx;
  637. }
  638. .btn-2 {
  639. height: 76rpx;
  640. padding: 0;
  641. margin: 0;
  642. font-size: 28rpx;
  643. color: #fff;
  644. min-width: 188rpx;
  645. background-color: #f83224;
  646. border-radius: 38rpx;
  647. margin-right: 20rpx;
  648. }
  649. }
  650. }
  651. </style>