logisticsProgress.vue 6.2 KB

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