search.vue 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. <template>
  2. <view>
  3. <u-popup :show="show" closeOnClickOverlay mode="right" @close="closePopup">
  4. <view class="popupBox">
  5. <view class="popupCent">
  6. <view class="tit">筛选</view>
  7. <view class="itemBox">
  8. <view class="tit">创建时间</view>
  9. <uni-datetime-picker start-placeholder="开始时间" end-placeholder="结束时间" class="datetimeBox"
  10. v-model="popupInfo.range" type="daterange" :clear-icon="false" @maskClick="maskClick" />
  11. </view>
  12. <view class="itemBox">
  13. <view class="tit">单号</view>
  14. <view class="putBox"><input v-model="popupInfo.OrderNo" placeholder="请输入单号" /></view>
  15. </view>
  16. <view class="itemBox">
  17. <view class="tit">订单来源</view>
  18. <view class="putBox"><input v-model="popupInfo.OrderSource" placeholder="请输入订单来源" /></view>
  19. </view>
  20. <view class="itemBox">
  21. <view class="tit">执行人</view>
  22. <view class="putBox"><input v-model="popupInfo.executor" placeholder="请输入执行人" /></view>
  23. </view>
  24. <view class="itemBox">
  25. <view class="tit">单据状态</view>
  26. <view class="tagsBox">
  27. <view :class="popupInfo.status == 1?'on':''" @click="popupInfo.status = 1">已创建</view>
  28. <view :class="popupInfo.status == 2?'on':''" @click="popupInfo.status = 2">已驳回</view>
  29. <view :class="popupInfo.status == 3?'on':''" @click="popupInfo.status = 3">已提交</view>
  30. <view :class="popupInfo.status == 4?'on':''" @click="popupInfo.status = 4">审核中</view>
  31. <view :class="popupInfo.status == 5?'on':''" @click="popupInfo.status = 5">审核完成</view>
  32. <view :class="popupInfo.status == 6?'on':''" @click="popupInfo.status = 6">指派中</view>
  33. </view>
  34. </view>
  35. <view class="itemBox">
  36. <view class="tit">申请机构</view>
  37. <view class="tagsBox">
  38. <view class="col2" :class="popupInfo.unit == 1?'on':''" @click="popupInfo.unit = 1">省林业局
  39. </view>
  40. <view class="col2" :class="popupInfo.unit == 2?'on':''" @click="popupInfo.unit = 2">省计检委
  41. </view>
  42. </view>
  43. </view>
  44. <view class="itemBox">
  45. <view class="tit">仓库</view>
  46. <view class="tagsBox">
  47. <view class="col2" :class="popupInfo.wareroom == 1?'on':''" @click="popupInfo.wareroom = 1">
  48. 湖南弘达仓库</view>
  49. <view class="col2" :class="popupInfo.wareroom == 2?'on':''" @click="popupInfo.wareroom = 2">
  50. 远航黄兴仓库</view>
  51. <view class="col2" :class="popupInfo.wareroom == 3?'on':''" @click="popupInfo.wareroom = 3">
  52. 交通厅虚拟仓</view>
  53. <view class="col2" :class="popupInfo.wareroom == 4?'on':''" @click="popupInfo.wareroom = 4">
  54. 1号云虚拟仓库</view>
  55. </view>
  56. </view>
  57. </view>
  58. <view class="footerBtn" @click="getFilter">选择</view>
  59. </view>
  60. </u-popup>
  61. </view>
  62. </template>
  63. <script>
  64. export default {
  65. name: "getsearch",
  66. props: {
  67. show:{
  68. type: Boolean,
  69. default: false
  70. }
  71. },
  72. data() {
  73. return {
  74. popupInfo: {
  75. range: ['', ''], //日期范围
  76. OrderNo: '', //订单单号
  77. OrderSource: '', //订单来源
  78. executor: '', //执行人
  79. status: '', //单据状态
  80. unit: '', //申请机构
  81. wareroom: '', //仓库
  82. },
  83. }
  84. },
  85. mounted() {
  86. },
  87. methods: {
  88. //验证
  89. getFilter(){
  90. //必填验证
  91. if(!this.popupInfo.OrderNo){
  92. uni.showToast({
  93. icon:"none",
  94. title: '请输入单号'
  95. });
  96. return;
  97. }
  98. this.$emit("openPopup");
  99. this.$emit("getPopupInfo",this.popupInfo);
  100. },
  101. //关闭窗口
  102. closePopup() {
  103. this.$emit("openPopup");
  104. },
  105. //时间点击
  106. maskClick(e) {
  107. console.log('maskClick事件:', e);
  108. },
  109. }
  110. }
  111. </script>
  112. <style lang="scss" scoped>
  113. /*右弹层*/
  114. .popupBox {
  115. width: calc(100vw - 20vw);
  116. position: relative;
  117. .popupCent {
  118. padding: 20rpx 40rpx 120rpx 40rpx;
  119. height: calc(100vh - 100rpx);
  120. overflow-y: auto;
  121. }
  122. .tit {
  123. font-weight: bold;
  124. }
  125. .itemBox {
  126. margin: 40rpx 0;
  127. .tit {
  128. font-size: 28rpx;
  129. }
  130. .datetimeBox {
  131. margin-top: 20rpx;
  132. }
  133. /deep/ .uni-date-x--border {
  134. border: none !important;
  135. .uni-date-range {
  136. background: #f2f2f2 !important;
  137. border-radius: 60rpx;
  138. }
  139. }
  140. .putBox {
  141. margin-top: 20rpx;
  142. input {
  143. height: 74rpx;
  144. line-height: 74rpx;
  145. border-radius: 60rpx;
  146. background: #f2f2f2 !important;
  147. padding: 0 40rpx;
  148. font-size: 28rpx;
  149. }
  150. }
  151. .tagsBox {
  152. margin-top: 20rpx;
  153. display: flex;
  154. flex-wrap: wrap;
  155. justify-content: space-between;
  156. view {
  157. width: 30%;
  158. height: 60rpx;
  159. line-height: 60rpx;
  160. margin-bottom: 20rpx;
  161. background: #f2f2f2;
  162. text-align: center;
  163. border-radius: 60rpx;
  164. font-size: 28rpx;
  165. overflow: hidden;
  166. white-space: nowrap;
  167. text-overflow: ellipsis;
  168. -o-text-overflow: ellipsis;
  169. }
  170. view.on {
  171. background: $u-success-dark;
  172. color: #fff;
  173. }
  174. view.col2 {
  175. width: 47.5% !important;
  176. }
  177. }
  178. }
  179. .footerBtn {
  180. position: absolute;
  181. bottom: 40rpx;
  182. left: 0;
  183. width: 100%;
  184. height: 80rpx;
  185. line-height: 80rpx;
  186. text-align: center;
  187. color: #fff;
  188. background: $u-success-dark;
  189. }
  190. }
  191. </style>