time.vue 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257
  1. <template>
  2. <div class="bg" style="">
  3. <back :title="titlename"></back>
  4. <div class="content">
  5. <div class="add">
  6. <van-field
  7. v-model="jjadd"
  8. type="text"
  9. name="寄"
  10. label="寄"
  11. placeholder="选择寄件城市"
  12. />
  13. <van-field
  14. v-model="sjadd"
  15. class="shou"
  16. type="text"
  17. name="收"
  18. label="收"
  19. placeholder="选择收件城市"
  20. />
  21. </div>
  22. <div class="kdshow">
  23. <van-field
  24. readonly
  25. clickable
  26. name="picker"
  27. :value="value"
  28. label="快递公司"
  29. placeholder="请选择快递公司"
  30. @click="showPicker = true"
  31. />
  32. <van-popup v-model="showPicker" position="bottom">
  33. <van-picker
  34. show-toolbar
  35. :columns="columns"
  36. @confirm="onConfirm"
  37. @cancel="showPicker = false"
  38. />
  39. </van-popup>
  40. </div>
  41. <div class="steps">
  42. <van-field name="stepper" label="物品重量(KG)">
  43. <template #input>
  44. <van-stepper v-model="stepper" />
  45. </template>
  46. </van-field>
  47. </div>
  48. <div class="price">
  49. <p>12<span>元</span></p>
  50. <p>运费预估</p>
  51. </div>
  52. <p style="font-size: .24rem;color: #999;margin: .2rem 0rem 1rem;">
  53. 此价格为官方指导价,不包含增值服务费
  54. </p>
  55. <div class="btn">
  56. <van-button color="#0c2469">立即寄件</van-button>
  57. </div>
  58. </div>
  59. </div>
  60. </template>
  61. <script>
  62. export default {
  63. data() {
  64. return {
  65. titlename: "运费时效",
  66. jjadd: "",
  67. sjadd: "",
  68. stepper: 1,
  69. showPicker: false,
  70. value: "",
  71. columns: ["顺丰快递", "中通快递", "圆通快递"]
  72. };
  73. },
  74. methods: {
  75. // 选择快递公司
  76. onConfirm(e) {
  77. this.value = e;
  78. this.showPicker = false;
  79. }
  80. }
  81. };
  82. </script>
  83. <style scoped lang="less">
  84. .bg {
  85. background: url(../assets/images/bg.png) no-repeat bottom;
  86. background-size: 100%;
  87. min-height: 100vh;
  88. }
  89. .content {
  90. padding: 0.2rem 0.33rem;
  91. font-size: 0.3rem;
  92. border-radius: 0.05rem;
  93. .add {
  94. /deep/.shou {
  95. div:nth-of-type(1) {
  96. span {
  97. background: #fa9c22 !important;
  98. }
  99. }
  100. }
  101. > div:nth-of-type(1) {
  102. border-bottom: 0.01rem solid #ededed;
  103. }
  104. > div:nth-of-type(2) {
  105. }
  106. /deep/.van-field {
  107. padding: 0.3rem 16px;
  108. .van-field__label {
  109. width: auto;
  110. span {
  111. width: 0.5rem;
  112. height: 0.5rem;
  113. border-radius: 50%;
  114. color: white;
  115. display: inline-block;
  116. text-align: center;
  117. line-height: 0.5rem;
  118. }
  119. }
  120. .van-field__value {
  121. .van-field__body {
  122. input {
  123. height: 0.5rem;
  124. }
  125. }
  126. }
  127. div:nth-of-type(1) {
  128. span {
  129. background: #0c2469;
  130. }
  131. }
  132. }
  133. /deep/.van-field:after {
  134. content: "";
  135. display: inline-block;
  136. border-right: 0.01rem solid #b0b0b0;
  137. border-bottom: 0.01rem solid #b0b0b0;
  138. transform: rotate(-45deg);
  139. left: unset;
  140. position: absolute;
  141. right: 16px;
  142. bottom: 0.45rem;
  143. width: 0.2rem;
  144. height: 0.2rem;
  145. }
  146. }
  147. .steps {
  148. margin-top: 0.2rem;
  149. border-radius: 0.05rem;
  150. padding: 0.3rem 0rem;
  151. background: white;
  152. /deep/.van-field {
  153. display: block;
  154. overflow: unset;
  155. padding: 0rem 16px;
  156. .van-field__label {
  157. width: 100%;
  158. text-align: center;
  159. color: #999999;
  160. font-size: 0.3rem;
  161. font-weight: bold;
  162. }
  163. .van-field__value {
  164. margin-top: 0.4rem;
  165. .van-field__body {
  166. .van-field__control--custom {
  167. .van-stepper {
  168. margin: 0 auto;
  169. .van-stepper__minus {
  170. border-radius: 50%;
  171. color: #006094;
  172. background: white;
  173. border: 0.01rem solid #dcdcdc;
  174. width: 0.38rem;
  175. height: 0.38rem;
  176. }
  177. input {
  178. color: #172880;
  179. font-size: 0.54rem;
  180. background: white;
  181. width: 2rem;
  182. }
  183. .van-stepper__plus {
  184. border-radius: 50%;
  185. color: #006094;
  186. background: white;
  187. border: 0.01rem solid #dcdcdc;
  188. width: 0.38rem;
  189. height: 0.38rem;
  190. }
  191. }
  192. }
  193. }
  194. }
  195. }
  196. }
  197. .price {
  198. font-size: 0.3rem;
  199. padding: 0.3rem 16px;
  200. background: white;
  201. border-radius: 0.05rem;
  202. margin-top: 0.2rem;
  203. text-align: center;
  204. p:nth-of-type(1) {
  205. color: #172880;
  206. font-size: 0.54rem;
  207. margin-bottom: 0.2rem;
  208. span {
  209. font-size: 0.3rem;
  210. color: #999;
  211. }
  212. }
  213. p:nth-of-type(2) {
  214. color: #999999;
  215. font-size: 0.24rem;
  216. }
  217. }
  218. .btn {
  219. margin-top: 0.2rem;
  220. /deep/.van-button {
  221. width: 100%;
  222. }
  223. }
  224. .kdshow {
  225. font-size: 0.3rem;
  226. padding: 0.3rem 16px;
  227. background: white;
  228. border-radius: 0.05rem;
  229. margin-top: 0.2rem;
  230. /deep/.van-cell {
  231. padding: 0px;
  232. overflow: unset;
  233. input {
  234. text-align: right;
  235. height: 0.5rem;
  236. padding-right: 0.25rem;
  237. }
  238. }
  239. /deep/.van-cell::after {
  240. content: "";
  241. display: inline-block;
  242. border-right: 0.01rem solid #b0b0b0;
  243. border-bottom: 0.01rem solid #b0b0b0;
  244. transform: rotate(-45deg);
  245. left: unset;
  246. position: absolute;
  247. right: 0px;
  248. bottom: 0.15rem;
  249. width: 0.2rem;
  250. height: 0.2rem;
  251. }
  252. }
  253. }
  254. </style>