sbxx.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. <template>
  2. <div class="content">
  3. <back :title="titlename"></back>
  4. <!-- 快递公司 -->
  5. <div class="kdshow">
  6. <van-field readonly clickable name="picker" :value="value" label="报关方式" placeholder="请选择报关方式" @click="showPicker = true" />
  7. <van-popup v-model="showPicker" position="bottom">
  8. <van-picker
  9. show-toolbar
  10. :columns="columns"
  11. @confirm="onConfirm"
  12. @cancel="showPicker = false"
  13. />
  14. </van-popup>
  15. </div>
  16. <div class="addwp" v-show="wpshow">
  17. <van-field readonly clickable name="picker" label="申报物品" placeholder="添加" @click="wpshowPicker=true"/>
  18. <div class="wplist" v-for="(item,i) in wplist">
  19. <p>申报物品:{{item}}</p>
  20. <span @click="del(i)">删除</span>
  21. </div>
  22. </div>
  23. <!-- 寄件 -->
  24. <div class="btn-jj">
  25. <van-button type="info" color="#00c4b8">确定</van-button>
  26. </div>
  27. <van-popup v-model="wpshowPicker" position="center">
  28. <div class="wpcontent">
  29. <van-field clickable name="picker" label="申报物品" v-model.trim="wp" placeholder="请填写申报物品"/>
  30. <van-button type="info" color="#00c4b8" @click="add">确定</van-button>
  31. </div>
  32. </van-popup>
  33. </div>
  34. </template>
  35. <script>
  36. import {Toast} from "vant"
  37. import areaList from "@/script/areas.js"
  38. export default{
  39. data(){
  40. return {
  41. titlename:"申报信息",
  42. showPicker:false,//快递
  43. value:"",
  44. columns:["非正式报关","正式报关"],
  45. wpshow:false,
  46. wpshowPicker:false,
  47. wplist:[],
  48. wp:""
  49. }
  50. },
  51. created:function(){
  52. this.isLogin();
  53. //this.areaList=area.areaList
  54. },
  55. methods:{
  56. // 选择快递公司
  57. onConfirm(e){
  58. this.value=e
  59. this.showPicker=false
  60. if(this.value=='正式报关'){
  61. this.wpshow=true
  62. }
  63. else{
  64. this.wpshow=false
  65. }
  66. },
  67. add(){
  68. if(this.wp==""){
  69. Toast("请填写申报物品")
  70. return false
  71. }
  72. this.wplist.push(this.wp)
  73. console.log(this.wplist)
  74. this.wp=""
  75. this.wpshowPicker=false
  76. },
  77. del(i){
  78. this.wplist.splice(i)
  79. }
  80. },
  81. computed:{
  82. areaList(){
  83. return areaList
  84. }
  85. }
  86. }
  87. </script>
  88. <style scoped lang="less">
  89. .content{
  90. .kdshow{
  91. font-size: .3rem;
  92. padding: .3rem 0px;
  93. width: 6.84rem;
  94. background: white;
  95. border-radius: .05rem;
  96. margin: .2rem auto .2rem;
  97. /deep/.van-cell{
  98. padding: 0px .3rem;
  99. overflow: unset;
  100. input{
  101. text-align: right;
  102. height: .5rem;
  103. padding-right: .25rem;
  104. }
  105. }
  106. /deep/.van-cell::after{
  107. content: "";
  108. display: inline-block;
  109. border-right: .01rem solid #b0b0b0;
  110. border-bottom: .01rem solid #b0b0b0;
  111. transform: rotate(-45deg);
  112. left: unset;
  113. position: absolute;
  114. right: .3rem;
  115. bottom: .15rem;
  116. width: .2rem;
  117. height: .2rem;
  118. }
  119. }
  120. .addwp{
  121. font-size: .3rem;
  122. padding: .3rem 0px;
  123. width: 6.84rem;
  124. background: white;
  125. border-radius: .05rem;
  126. margin: 0rem auto .2rem;
  127. .wplist{
  128. padding: 0px .3rem;
  129. display: flex;
  130. justify-content: space-between;
  131. color: #646566;
  132. font-size: 14px;
  133. margin-top: .2rem;
  134. span{
  135. color:#00c4b8
  136. }
  137. }
  138. /deep/.van-cell{
  139. padding: 0px .3rem;
  140. overflow: unset;
  141. input{
  142. text-align: right;
  143. height: .5rem;
  144. //padding-right: .25rem;
  145. }
  146. }
  147. .van-cell::after{
  148. display: none;
  149. }
  150. }
  151. .btn-jj{
  152. padding: .33rem;
  153. font-size: .3rem;
  154. button{
  155. width: 100%;
  156. }
  157. }
  158. .wpcontent{
  159. width:6rem;
  160. padding: .3rem;
  161. text-align: center;
  162. /deep/.van-cell{
  163. input{
  164. text-align: right;
  165. }
  166. }
  167. button{
  168. width: 60%;
  169. height: 35px;
  170. line-height: 35px;
  171. }
  172. }
  173. }
  174. </style>