logisticsProgress.vue 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. <template>
  2. <view class="page">
  3. <view class="top-detail">
  4. <view class="title"> 发往仓库 </view>
  5. <image class="arrow" src="../../static/mine/339.png" mode=""></image>
  6. <view class="title"> 仓库打包 </view>
  7. <image class="arrow" src="../../static/mine/340.png" mode=""></image>
  8. <view class="title"> 洛杉矶 </view>
  9. </view>
  10. <view class="logistics">
  11. <view class="package" v-if="packageNum > 1">
  12. <view class="package-title">您的订单已被分成多个包裹发出:</view>
  13. <view></view>
  14. </view>
  15. <view class="warehouse-packaging" v-if="warehouse.length > 0">
  16. <Progress :logisticsList="warehouse" />
  17. </view>
  18. <view class="_detail-1">
  19. <text>已于11月24日送至平台仓库</text>
  20. <u-icon
  21. @click="putItAway"
  22. name="arrow-up"
  23. color="#666666"
  24. size="18"
  25. v-if="isShow"
  26. ></u-icon>
  27. <u-icon
  28. @click="putItAway"
  29. name="arrow-down"
  30. color="#666666"
  31. size="18"
  32. v-else
  33. ></u-icon>
  34. </view>
  35. <view class="logistics-detail" v-if="isShow">
  36. <view class="">
  37. {{ "顺丰快递" + "&nbsp;" + "|" + "&nbsp" + "订单号:" }}
  38. <text>JDV21093105892</text>
  39. </view>
  40. <view class="phone">
  41. <text @click="cope('JDV21093105892')">复制</text>
  42. {{ "&nbsp;" + "|" + "&nbsp" }}
  43. <text @click="makeCall">打电话</text>
  44. </view>
  45. </view>
  46. <view class="logistics-information" v-if="isShow">
  47. <Progress :logisticsList="logisticsList" />
  48. </view>
  49. </view>
  50. </view>
  51. </template>
  52. <script>
  53. import Progress from "./component/progress.vue";
  54. export default {
  55. components: {
  56. Progress,
  57. },
  58. data() {
  59. return {
  60. logisticsList: [
  61. {
  62. title: "已签收",
  63. time: "10:11",
  64. status: false,
  65. does: "您的快件已暂存至浦口东方万汇城北区2号楼超市店菜鸟驿站,请凭取件码及时领取。",
  66. },
  67. {
  68. title: "派送中",
  69. time: "10:11",
  70. status: false,
  71. does: "临沂市配送员【叶景瑞】 187626516732 正为您派送,感谢您的耐心等待",
  72. },
  73. {
  74. title: "",
  75. time: "10:11",
  76. status: false,
  77. does: "临沂市配送员【叶景瑞】 187626516732 正为您派送,感谢您的耐心等待",
  78. },
  79. {
  80. title: "运输中",
  81. time: "10:11",
  82. status: false,
  83. does: "快递离开******",
  84. },
  85. ],
  86. warehouse: [
  87. {
  88. title: "打包称重",
  89. time: "10:11",
  90. status: true,
  91. imageUrl: true,
  92. does: "商品已打包称重,待用户付款",
  93. },
  94. {
  95. title: "商品入库",
  96. time: "10:11",
  97. status: false,
  98. imageUrl: false,
  99. does: "商品已进入转入仓库,正在排队等待打包",
  100. },
  101. ],
  102. isShow: true,
  103. packageNum: 0, //包裹个数
  104. };
  105. },
  106. onLoad(options) {
  107. this.packageNum = options.package;
  108. },
  109. computed: {},
  110. methods: {
  111. cope(str) {
  112. uni.setClipboardData({
  113. data: str,
  114. success() {
  115. uni.showToast({
  116. title: "复制成功",
  117. icon: "none",
  118. });
  119. },
  120. });
  121. },
  122. makeCall() {
  123. uni.authorize({
  124. scope: "scope.makePhoneCall",
  125. success: () => {
  126. uni.makePhoneCall({
  127. phoneNumber: "手机号码",
  128. success: () => {
  129. console.log("拨打电话成功!");
  130. },
  131. fail: () => {
  132. console.error("拨打电话失败!");
  133. },
  134. });
  135. },
  136. fail: () => {
  137. console.error("授权失败,请允许拨打电话权限!");
  138. },
  139. });
  140. },
  141. putItAway() {
  142. this.isShow = !this.isShow;
  143. },
  144. },
  145. created() {
  146. uni.setNavigationBarTitle({
  147. title: "物流进度",
  148. });
  149. },
  150. };
  151. </script>
  152. <style scoped lang="scss">
  153. .page {
  154. padding: 20rpx 24rpx;
  155. .top-detail {
  156. display: flex;
  157. justify-content: space-around;
  158. align-items: center;
  159. height: 144rpx;
  160. background: linear-gradient(180deg, #f6e1de 0%, #efefef 100%);
  161. border-radius: 16rpx 16rpx 0 0;
  162. .title {
  163. color: rgba(34, 34, 34, 0.6);
  164. font-size: 32rpx;
  165. }
  166. .arrow {
  167. width: 98rpx;
  168. height: 8rpx;
  169. }
  170. }
  171. .logistics {
  172. background-color: #fff;
  173. border-radius: 16rpx;
  174. padding: 0 20rpx;
  175. position: relative;
  176. top: -20rpx;
  177. padding-bottom: 20rpx;
  178. .package {
  179. margin-top: 20rpx;
  180. }
  181. ._detail-1 {
  182. display: flex;
  183. justify-content: space-between;
  184. font-size: 28rpx;
  185. color: #666;
  186. align-items: center;
  187. border-top: 2rpx solid rgba(151, 151, 151, 0.1);
  188. padding-top: 28rpx;
  189. }
  190. .logistics-detail {
  191. display: flex;
  192. justify-content: space-between;
  193. font-size: 26rpx;
  194. color: #333;
  195. height: 104rpx;
  196. align-items: center;
  197. border-bottom: 2rpx solid rgba(151, 151, 151, 0.1);
  198. }
  199. .logistics-information {
  200. padding: 20rpx 0;
  201. .information {
  202. position: relative;
  203. }
  204. }
  205. }
  206. }
  207. </style>