selectLab.vue 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256
  1. <!-- 选择实验室 -->
  2. <template>
  3. <view id="gasCylinderSelectLab">
  4. <view class="top-input-max-box">
  5. <view class="input-box">
  6. <uni-icons type="search" class="icon-box" color="#7C7C7C" size="25"></uni-icons>
  7. <input class="uni-input input-min" confirm-type="search" @confirm="getList()"
  8. v-model="inputData" maxlength="20" placeholder="搜索实验室" />
  9. </view>
  10. <view class="picker-box">
  11. <picker @change="bindPickerChangeA" :value="indexA" :range="arrayA">
  12. <view class="picker-min-box">
  13. <view>{{indexA==null?'学院':arrayA[indexA]}}</view>
  14. <uni-icons type="down" class="icon-box" size="15"></uni-icons>
  15. </view>
  16. </picker>
  17. <picker @change="bindPickerChangeB" :value="indexB" :range="arrayB">
  18. <view class="picker-min-box">
  19. <view>{{indexB==null?'楼栋':arrayB[indexB]}}</view>
  20. <uni-icons type="down" class="icon-box" size="15"></uni-icons>
  21. </view>
  22. </picker>
  23. <picker @change="bindPickerChangeC" :value="indexC" :range="arrayC">
  24. <view class="picker-min-box">
  25. <view>{{indexC==null?'楼层':arrayC[indexC]}}</view>
  26. <uni-icons type="down" class="icon-box" size="15"></uni-icons>
  27. </view>
  28. </picker>
  29. </view>
  30. </view>
  31. <view class="content-box">
  32. <view class="null-p" v-if="!dataList[0]">暂无数据</view>
  33. <view class="for-max-big-box" @click="checkButton(item)"
  34. v-for="(item,index) in dataList" :key="index">
  35. <view class="for-title-box">
  36. <view>实验室名称:</view>
  37. <view>{{item.data1}}</view>
  38. </view>
  39. <view class="for-text-box">
  40. <view>楼栋:</view>
  41. <view>{{item.data2}}</view>
  42. </view>
  43. <view class="for-text-box">
  44. <view>楼层:</view>
  45. <view>{{item.data3}}</view>
  46. </view>
  47. <view class="for-text-box">
  48. <view>房间号:</view>
  49. <view>{{item.data4}}</view>
  50. </view>
  51. </view>
  52. </view>
  53. <uni-icons class="sao-code-box" type="scan" color="#fff" size="25"></uni-icons>
  54. </view>
  55. </template>
  56. <script>
  57. export default {
  58. data() {
  59. return {
  60. fromPage:'',
  61. inputData:'',
  62. arrayA:[],
  63. indexA:null,
  64. arrayB:[],
  65. indexB:null,
  66. arrayC:[],
  67. indexC:null,
  68. dataList:[
  69. {
  70. data1:'实验室A',
  71. data2:'名义楼',
  72. data3:'8L',
  73. data4:'803',
  74. },
  75. {
  76. data1:'实验室A',
  77. data2:'名义楼',
  78. data3:'8L',
  79. data4:'803',
  80. },
  81. {
  82. data1:'实验室A',
  83. data2:'名义楼',
  84. data3:'8L',
  85. data4:'803',
  86. },
  87. {
  88. data1:'实验室A',
  89. data2:'名义楼',
  90. data3:'8L',
  91. data4:'803',
  92. },
  93. {
  94. data1:'实验室A',
  95. data2:'名义楼',
  96. data3:'8L',
  97. data4:'803',
  98. },
  99. {
  100. data1:'实验室A',
  101. data2:'名义楼',
  102. data3:'8L',
  103. data4:'803',
  104. },
  105. {
  106. data1:'实验室A',
  107. data2:'名义楼',
  108. data3:'8L',
  109. data4:'803',
  110. },
  111. {
  112. data1:'实验室A',
  113. data2:'名义楼',
  114. data3:'8L',
  115. data4:'803',
  116. },
  117. ],
  118. }
  119. },
  120. onLoad(options) {
  121. this.fromPage = options.from;
  122. },
  123. onShow() {
  124. },
  125. methods: {
  126. bindPickerChangeA(e) {
  127. this.indexA = e.detail.value
  128. },
  129. bindPickerChangeB(e) {
  130. this.indexB = e.detail.value
  131. },
  132. bindPickerChangeC(e) {
  133. this.indexC = e.detail.value
  134. },
  135. getList(){
  136. },
  137. checkButton(item){
  138. if(this.fromPage == 1){
  139. uni.redirectTo({
  140. url: '/pages_supplierCylinderManagement/views/gasCylinderManagement/inbound?form='+encodeURIComponent(JSON.stringify(item))+'&pageType=2'
  141. });
  142. }else if(this.fromPage == 2){
  143. uni.redirectTo({
  144. url: '/pages_supplierCylinderManagement/views/gasCylinderManagement/outbound?form='+encodeURIComponent(JSON.stringify(item))+'&pageType=2'
  145. });
  146. }
  147. },
  148. }
  149. }
  150. </script>
  151. <style lang="stylus" scoped>
  152. #gasCylinderSelectLab {
  153. height: 100%;
  154. width: 100%;
  155. display flex ;
  156. flex-direction column;
  157. overflow: hidden;
  158. position: relative;
  159. .top-input-max-box{
  160. background-color: #fff;
  161. .input-box{
  162. display: flex;
  163. border-radius:40rpx;
  164. background-color: #D4D4D4;
  165. margin:20rpx 20rpx 0 20rpx;
  166. color:#7C7C7C;
  167. .icon-box{
  168. margin:15rpx;
  169. }
  170. .input-min{
  171. height:80rpx;
  172. line-height:80rpx;
  173. flex:1;
  174. }
  175. }
  176. .picker-box{
  177. display: flex;
  178. .picker-min-box{
  179. height:80rpx;
  180. line-height:80rpx;
  181. display: flex;
  182. padding:0 30rpx;
  183. .icon-box{
  184. margin-left:10rpx;
  185. }
  186. }
  187. }
  188. }
  189. .content-box{
  190. flex:1;
  191. display flex ;
  192. flex-direction column;
  193. overflow: scroll
  194. padding-bottom:200rpx;
  195. .null-p{
  196. text-align: center;
  197. line-height:300rpx;
  198. color:#999;
  199. }
  200. .for-max-big-box{
  201. padding:20rpx 30rpx;
  202. background-color: #fff;
  203. border-radius:10rpx;
  204. margin:25rpx 25rpx 0;
  205. .for-title-box{
  206. display: flex;
  207. margin-bottom:20rpx;
  208. view{
  209. padding-bottom:20rpx;
  210. line-height: 60rpx
  211. border-bottom:1rpx solid #dedede;
  212. font-weight:700;
  213. }
  214. view:nth-child(1){
  215. color:#666666;
  216. }
  217. view:nth-child(2){
  218. flex:1;
  219. text-align: right;
  220. }
  221. }
  222. .for-text-box{
  223. display: flex;
  224. view{
  225. line-height: 60rpx
  226. font-weight:700;
  227. }
  228. view:nth-child(1){
  229. color:#666666;
  230. }
  231. view:nth-child(2){
  232. flex:1;
  233. text-align: right;
  234. }
  235. }
  236. }
  237. }
  238. .sao-code-box{
  239. width:100rpx;
  240. height:100rpx;
  241. line-height:100rpx;
  242. text-align: center;
  243. background-color: #266FFF;
  244. border-radius:50%;
  245. position: absolute;
  246. bottom:60rpx;
  247. left:50%;
  248. margin-left:-50rpx;
  249. }
  250. }
  251. </style>