box.vue 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314
  1. <template>
  2. <div>
  3. <p style="text-align: center;font-size: .36rem;margin-top: .2rem;">快递列表</p>
  4. <div class="content">
  5. <div class="sm">
  6. <van-search placeholder="点击搜索" readonly @click="addshow=true"/>
  7. </div>
  8. <!-- table切换 -->
  9. <div class="tab">
  10. <div>
  11. <p @click="tab(1)" :class="[index==1?'active':'']">寄件</p>
  12. <p @click="tab(2)" :class="[index==2?'active':'']">收件</p>
  13. </div>
  14. </div>
  15. <!-- 快件查询列表 -->
  16. <div class="jjlist">
  17. <div class="listinfo">
  18. <div class="list_top">
  19. <div class="list_top_left">
  20. <img src="../assets/images/ad_icon1.png" alt="">
  21. <div>
  22. <p>内单 432432432123</p>
  23. <p><span>收</span>王伟</p>
  24. <p>5幢-6层 销售部</p>
  25. </div>
  26. </div>
  27. <p class="staus1" @click="slide">{{options}}</p>
  28. </div>
  29. </div>
  30. </div>
  31. <div class="jjlist">
  32. <div class="listinfo">
  33. <div class="list_top">
  34. <div class="list_top_left">
  35. <img src="../assets/images/ad_icon1.png" alt="">
  36. <div>
  37. <p>内单 432432432</p>
  38. <p><span>收</span>王伟</p>
  39. <p>5幢-6层 销售部</p>
  40. </div>
  41. </div>
  42. <p class="staus2">待派件</p>
  43. </div>
  44. </div>
  45. </div>
  46. </div>
  47. <!-- 选择下拉 -->
  48. <van-popup v-model="showPicker" position="bottom">
  49. <van-picker title="" show-toolbar :columns="columns" @confirm="onConfirm" @cancel="showPicker=false" />
  50. </van-popup>
  51. <!-- 筛选 -->
  52. <van-popup round v-model="addshow" class="whrite_add" closeable>
  53. <div>
  54. <p style="font-size: 16px;text-align: center;margin-bottom: 16px;">筛选</p>
  55. <van-form @submit="search">
  56. <van-field v-model="box" name="寄包柜" label="寄包柜" placeholder="请选择" readonly/>
  57. <van-field v-model="name" name="收件人" label="收件人" placeholder="请输入收件人"/>
  58. <van-field v-model="starttime" name="开始时间" label="开始时间" placeholder="请选择" readonly @click="time(1)"/>
  59. <van-field v-model="endtime" name="结束时间" label="结束时间" placeholder="请选择" readonly @click="time(2)"/>
  60. <van-field v-model="staus" name="状态" label="状态" placeholder="请选择" readonly @click="ztshow=true"/>
  61. <div style="margin-top: 16px;">
  62. <van-button color="#00c4b8" block type="info" native-type="submit">确定</van-button>
  63. </div>
  64. </van-form>
  65. </div>
  66. </van-popup>
  67. <!-- 时间 -->
  68. <van-popup v-model="timeshow" position="bottom">
  69. <van-datetime-picker
  70. v-model="currentDate"
  71. type="datetime"
  72. title="选择时间"
  73. :min-date="minDate"
  74. @confirm="timedate"
  75. @cancel="timeshow=false"
  76. />
  77. </van-popup>
  78. <!-- 状态 -->
  79. <van-popup v-model="ztshow" position="bottom">
  80. <van-picker title="标状态" show-toolbar :columns="ztlist" @confirm="zt" @cancel="ztshow=false"/>
  81. </van-popup>
  82. </div>
  83. </template>
  84. <script>
  85. export default{
  86. data(){
  87. return{
  88. titlename:"寄包柜子",
  89. showPicker:false,
  90. columns:["未派件","待派件"],
  91. options:"待揽件",
  92. index:1,
  93. addshow:false,
  94. name:"",
  95. timeshow:false,
  96. box:"",
  97. starttime:"",
  98. endtime:"",
  99. staus:"",
  100. currentDate:"",
  101. minDate:new Date(),
  102. timetype:"",//时间类别1开始、2结束
  103. ztshow:false,
  104. ztlist:["状态一","状态二"],
  105. }
  106. },
  107. created:function(){
  108. },
  109. methods:{
  110. // tab切换
  111. tab(obj){
  112. this.index=obj
  113. },
  114. // 下拉选择属性
  115. slide(){
  116. this.showPicker=true
  117. },
  118. // 下拉选择赋值
  119. onConfirm(e){
  120. this.options=e
  121. this.showPicker=false
  122. },
  123. search(){},
  124. timedate(e){
  125. var date=new Date(e)
  126. var year=date.getFullYear()
  127. var month=date.getMonth()+1
  128. month=month>9?month:'0'+month
  129. var day=date.getDate()
  130. day=day>9?day:'0'+day
  131. var hour=date.getHours()
  132. hour=hour>9?hour:'0'+hour
  133. var minute=date.getMinutes()
  134. minute=minute>9?minute:'0'+minute
  135. console.log(month)
  136. if(this.timetype==1){
  137. this.starttime=year+'-'+month+'-'+day+' '+hour+':'+minute
  138. }
  139. if(this.timetype==2){
  140. this.endtime=year+'-'+month+'-'+day+' '+hour+':'+minute
  141. }
  142. this.timeshow=false
  143. },
  144. time(obj){
  145. this.timeshow=true
  146. this.timetype=obj
  147. },
  148. // 状态显示
  149. zt(e){
  150. this.staus=e
  151. this.ztshow=false
  152. }
  153. },
  154. mounted:function(){
  155. }
  156. }
  157. </script>
  158. <style scoped lang="less">
  159. .content{
  160. padding: 0.25rem .37rem;
  161. .tab{
  162. font-size: .36rem;
  163. color: #00c4b8;
  164. background: white;
  165. div{
  166. display: flex;
  167. text-align: center;
  168. border-radius: .05rem;
  169. p{
  170. flex: 1;
  171. padding: .2rem 0rem;
  172. color: #333;
  173. }
  174. p.active{
  175. border-bottom:.01rem solid #00c4b8;
  176. color: #00c4b8;
  177. }
  178. }
  179. }
  180. .sm{
  181. margin-bottom: .2rem;
  182. /deep/.van-search{
  183. width: 100%;
  184. height: .76rem;
  185. border-radius: 25px;
  186. overflow: hidden;
  187. padding: 0rem;
  188. background-color: white;
  189. .van-search__content{
  190. background-color: white;
  191. }
  192. input{
  193. background-color: white;
  194. }
  195. }
  196. img{
  197. width:.4rem;
  198. height: .4rem;
  199. position: relative;
  200. top: .18rem;
  201. }
  202. }
  203. .jjlist {
  204. font-size: .3rem;
  205. color: #999999;
  206. .listinfo {
  207. background: white;
  208. padding: .33rem .33rem .2rem;
  209. border-radius: .05rem;
  210. margin-bottom: .2rem;
  211. position: relative;
  212. .list_top {
  213. display: flex;
  214. justify-content: space-between;
  215. .list_top_left {
  216. img {
  217. display: inline-block;
  218. width: .9rem;
  219. height: .9rem;
  220. position: relative;
  221. top: -.1rem;
  222. }
  223. div {
  224. width: 3.8rem;
  225. margin-left: .2rem;
  226. display: inline-block;
  227. position: relative;
  228. p:nth-of-type(1) {
  229. font-size: .28rem;
  230. color: #333;
  231. font-weight: bold;
  232. }
  233. p:nth-of-type(2) {
  234. font-size: .22rem;
  235. margin: .1rem 0rem;
  236. display: flex;
  237. align-items: center;
  238. span{
  239. background: #fa9c22;
  240. color: white;
  241. border-radius:50% ;
  242. display: inline-block;
  243. width: .4rem;
  244. height: .4rem;
  245. text-align: center;
  246. line-height: .4rem;
  247. margin-right: .1rem;
  248. }
  249. }
  250. p:nth-of-type(3) {
  251. font-size: .22rem;
  252. }
  253. }
  254. }
  255. >p {
  256. font-size: .24rem;
  257. font-weight: bold;
  258. display: flex;
  259. align-items: center;
  260. }
  261. >p:after{
  262. content: "";
  263. width: .1rem;
  264. height: .1rem;
  265. display: inline-block;
  266. border-right: .01rem solid #7a7a7a;
  267. border-bottom: .01rem solid #7a7a7a;
  268. transform: rotate(45deg);
  269. position: relative;
  270. margin-left: .05rem;
  271. top: -.02rem;
  272. }
  273. .staus1{
  274. color: #f5693d;
  275. }
  276. .staus2{
  277. color: #3d82f5;
  278. }
  279. }
  280. }
  281. }
  282. }
  283. .whrite_add{
  284. width: 6.6rem;
  285. padding: .4rem .2rem;
  286. /deep/.van-field__value{
  287. input{
  288. text-align: right;
  289. }
  290. }
  291. /deep/.van-popup__close-icon--top-right{
  292. top: 5px;
  293. right: 10px;
  294. }
  295. }
  296. </style>