DeliveryExpress.vue 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402
  1. <template>
  2. <view class="QueryExpressView">
  3. <view class="QueryExpContainer">
  4. <view class="QueryExpfrom">
  5. <view class="FromSelect">
  6. <view v-for="(item,index) in fromItem"
  7. class="selectItem"
  8. :class="{isSelect: index == currIndex }"
  9. @click="checkFrom(index)">
  10. {{ item }}
  11. </view>
  12. </view>
  13. <view class="informationFrom">
  14. <view class="fromItem">
  15. <view class="sender">
  16. </view>
  17. <view class="senderInformation" @click="getAddres('Send')">
  18. <p><span>{{SenderData.area}} <span class="DetailedAddress">{{SenderData.detailedArea}}</span>
  19. </span></p>
  20. <p :class="{isNone:!SenderData.name}"><span>{{SenderData.name?SenderData.name:'完善寄件人信息'}}</span><span v-if="SenderData.name"
  21. style="margin-left: 10rpx;">{{SenderData.mobile}}</span></p>
  22. </view>
  23. </view>
  24. <view class="fromItem">
  25. <view class="sender consignee">
  26. </view>
  27. <view class="senderInformation" @click="getAddres('Collect')">
  28. <!-- <p><span>广州省广州市</span><span>地址簿</span></p> -->
  29. <p><span>{{collecterData.area}}<span class="DetailedAddress">{{collecterData.detailedArea}}</span></span></p>
  30. <p><span>{{collecterData.name?collecterData.name:'完善寄件人信息'}}</span><span v-if="collecterData.name"
  31. style="margin-left: 10rpx;">{{collecterData.mobile}}</span></p>
  32. </view>
  33. </view>
  34. <view class="CargoInformation">
  35. <span>物品:{{'日用品/1公斤'}} ></span>
  36. <span>上门:{{'今天09:00-13:00'}} ></span>
  37. </view>
  38. </view>
  39. </view>
  40. </view>
  41. <view style="box-sizing: border-box; padding: 0rpx 18rpx; margin-top: 290rpx;">
  42. <scroll-view class="ExpressSelection" scroll-x="true">
  43. <view class="SelectionItem" @click="selectExpress(index)" :class="{itemSelect:exServerIndex == index}" :key="index" v-for="(item,index) in ECList">
  44. <view class="icfonts">
  45. <image :src="item.imgUrl" mode=""></image> <span>{{item.name}}</span>
  46. </view>
  47. <view class="NewMoney">
  48. <span>5.5</span>元起
  49. </view>
  50. <view class="OldMoney">
  51. 市场价:<span>10</span> 元
  52. </view>
  53. <view class="radio" :class="{isselectRadio:exServerIndex == index}">
  54. </view>
  55. </view>
  56. <!-- <view class="SelectionItem">
  57. <view class="icfonts">
  58. <image src="../image/yuantongyuanxing.png" mode=""></image> <span>圆通</span>
  59. </view>
  60. <view class="NewMoney">
  61. <span>5.5</span>元起
  62. </view>
  63. <view class="OldMoney">
  64. 市场价:<span>10</span> 元
  65. </view>
  66. <view class="radio">
  67. </view>
  68. </view> -->
  69. </scroll-view>
  70. <view class="orderSubmit">
  71. <button @click="goExpressDelivery()">去寄件</button>
  72. <view>
  73. <span>丢件必赔</span> <span>比价下单</span> <span>上门取件</span>
  74. </view>
  75. </view>
  76. </view>
  77. </view>
  78. </template>
  79. <script>
  80. // 写死的快递公司数据
  81. import { ECList } from "../ExpressData.js"
  82. export default {
  83. components: {
  84. },
  85. props: {
  86. SenderData: {
  87. type: Object,
  88. default: {
  89. }
  90. },
  91. collecterData: {
  92. type: Object,
  93. default: {
  94. }
  95. }
  96. },
  97. watch: {
  98. // SenderData: {
  99. // immediate: true,
  100. // handler(Val,oldVal) {
  101. // console.log(Val)
  102. // }
  103. // }
  104. },
  105. data() {
  106. return {
  107. ECList,
  108. fromItem: ["寄快件", "批量寄件", "寄大件", "国际港澳台"],
  109. currIndex: 0,
  110. exServerIndex: 0,
  111. expressCpns: {},
  112. }
  113. },
  114. created() {
  115. this.expressCpns = ECList[0]
  116. },
  117. methods: {
  118. selectExpress(index) {
  119. this.exServerIndex = index
  120. this.expressCpns = ECList[index]
  121. // console.log(this.expressCpns)
  122. },
  123. checkFrom(index) {
  124. this.currIndex = index
  125. if(index > 0) {
  126. uni.showToast({
  127. title: "服务暂时未开通,敬请期待!!!",
  128. icon: "none"
  129. })
  130. let timer = setTimeout(() => {
  131. this.currIndex = 0
  132. clearTimeout(timer)
  133. },1500)
  134. }
  135. },
  136. handleClick() {
  137. console.log("提交按钮")
  138. },
  139. getAddres(standing) {
  140. uni.navigateTo({
  141. url: `/pages_user/serve/kuai-di/kuaiDiForm?standing=${standing}`
  142. })
  143. },
  144. goExpressDelivery() {
  145. uni.navigateTo({
  146. url: `/pages_user/serve/kuai-di/ExpressDelivery?excomp=${JSON.stringify(this.expressCpns)}`
  147. })
  148. }
  149. }
  150. }
  151. </script>
  152. <style lang="scss" scoped>
  153. // .submitView {
  154. // display: flex;
  155. // justify-content: space-around;
  156. // }
  157. .QueryExpContainer {
  158. width: 100vw;
  159. height: 205rpx;
  160. background-color: #327ee4;
  161. display: flex;
  162. justify-content: center;
  163. .QueryExpfrom {
  164. margin-top: 10rpx;
  165. width: 712rpx;
  166. height: 460rpx;
  167. border-radius: 15rpx;
  168. background-color: white;
  169. .FromSelect {
  170. width: 100%;
  171. height: 70rpx;
  172. border-radius: 15rpx;
  173. background-color: #e8f4fd;
  174. display: flex;
  175. align-items: flex-end;
  176. .isSelect {
  177. font-weight: 600;
  178. height: 80rpx !important;
  179. background-color: white;
  180. border-top-right-radius: 15rpx;
  181. border-top-left-radius: 15rpx;
  182. }
  183. .selectItem {
  184. font-size: 32rpx;
  185. display: flex;
  186. align-items: center;
  187. justify-content: center;
  188. transition: height 0.3s ease;
  189. height: 70rpx;
  190. flex: 1;
  191. }
  192. }
  193. .informationFrom {
  194. margin-top: 10rpx;
  195. width: 100%;
  196. box-sizing: border-box;
  197. padding: 0rpx 18rpx 0rpx 18rpx;
  198. background-color: #fff;
  199. .fromItem {
  200. // width: 712rpx;
  201. // height: 145rpx;
  202. display: flex;
  203. align-items: center;
  204. .sender {
  205. margin-top: -30rpx;
  206. background-color: #afbbc2;
  207. color: #fff;
  208. width: 60rpx;
  209. height: 60rpx;
  210. border-radius: 50%;
  211. text-align: center;
  212. line-height: 60rpx;
  213. }
  214. .consignee {
  215. background-color: #0083ff;
  216. }
  217. .senderInformation {
  218. flex: 1;
  219. padding: 30rpx 0rpx;
  220. border-bottom: 1px dashed #afbbc2;
  221. margin-left: 20rpx;
  222. .DetailedAddress {
  223. margin-left: 10rpx;
  224. font-size: 26rpx;
  225. }
  226. >p:nth-of-type(1) {
  227. width: 100%;
  228. display: flex;
  229. justify-content: space-between;
  230. font-weight: 600;
  231. >span:nth-of-type(1) {
  232. max-width: 500rpx;
  233. max-height: 85rpx;
  234. overflow: hidden;
  235. text-overflow: ellipsis;
  236. font-size: 34rpx;
  237. }
  238. >span:nth-of-type(2) {
  239. margin-top: 5rpx;
  240. font-weight: normal;
  241. font-size: 26rpx;
  242. }
  243. }
  244. >p:nth-of-type(2) {
  245. margin-top: 12rpx;
  246. font-size: 26rpx;
  247. color: #b3b5ba;
  248. }
  249. .isNone {
  250. color: #d75b62 !important;
  251. }
  252. }
  253. }
  254. .CargoInformation {
  255. display: flex;
  256. align-items: center;
  257. justify-content: space-around;
  258. height: 80rpx;
  259. font-size: 26rpx;
  260. color: #afbbc2;
  261. }
  262. }
  263. }
  264. }
  265. .ExpressSelection {
  266. display: flex;
  267. display: inline-block;
  268. white-space: nowrap;
  269. .itemSelect {
  270. border: 5rpx solid #0083ff !important;
  271. }
  272. .SelectionItem {
  273. display: inline-flex;
  274. flex-direction: column;
  275. align-items: center;
  276. width: 176rpx;
  277. height: 252rpx;
  278. margin-right: 20px;
  279. border-radius: 15rpx;
  280. background-color: white;
  281. padding-bottom: 5rpx;
  282. border: 5rpx solid #0084ff00;
  283. .icfonts {
  284. margin-top: 2rpx;
  285. display: flex;
  286. align-items: center;
  287. padding: 10rpx 10rpx;
  288. border-radius: 15rpx;
  289. background-color: #dadbdc5f;
  290. >image {
  291. width: 50rpx;
  292. height: 50rpx;
  293. }
  294. >span {
  295. margin-left: 10rpx;
  296. font-size: 24rpx;
  297. }
  298. }
  299. .NewMoney {
  300. margin-top: 16rpx;
  301. font-size: 24rpx;
  302. letter-spacing: 2rpx;
  303. >span {
  304. letter-spacing: 1rpx;
  305. margin-right: 5rpx;
  306. font-size: 50rpx;
  307. color: #ff651a;
  308. }
  309. }
  310. .OldMoney {
  311. margin-top: 12rpx;
  312. font-size: 20rpx;
  313. color: #868e92;
  314. >span {
  315. margin: 0 5rpx;
  316. text-decoration: line-through;
  317. }
  318. }
  319. .radio {
  320. margin-top: 15rpx;
  321. width: 40rpx;
  322. height: 40rpx;
  323. font-size: 35rpx;
  324. text-align: center;
  325. line-height: 40rpx;
  326. border-radius: 50%;
  327. color: #fff;
  328. border: 1px solid #868e92;
  329. }
  330. .isselectRadio {
  331. background-color: #0083ff;
  332. border: 1px solid #0083ff;
  333. }
  334. }
  335. }
  336. .orderSubmit {
  337. border-radius: 15rpx;
  338. margin-top: 20rpx;
  339. width: 712rpx;
  340. height: 200rpx;
  341. background-color: #fff;
  342. display: flex;
  343. flex-direction: column;
  344. align-items: center;
  345. >button {
  346. margin-top: 30rpx;
  347. width: 664rpx;
  348. font-size: 40rpx;
  349. height: 88rpx;
  350. line-height: 88rpx;
  351. color: #fff;
  352. border-radius: 50rpx;
  353. background-color: #0173f3;
  354. }
  355. >view {
  356. margin-top: 15rpx;
  357. width: 470rpx;
  358. font-size: 30rpx;
  359. display: flex;
  360. justify-content: space-around;
  361. color: #868e92;
  362. }
  363. }
  364. </style>