addpick.vue 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391
  1. <template>
  2. <view class="mainBox">
  3. <uni-nav-bar
  4. fixed="true"
  5. statusBar="true"
  6. left-icon="back"
  7. title="添加领料"
  8. @clickLeft="back"
  9. >
  10. </uni-nav-bar>
  11. <div class="search">
  12. <div class="search-top">
  13. <uni-search-bar
  14. @input="search"
  15. v-model="searchKey"
  16. cancelButton="none"
  17. placeholder="编码/名称"
  18. >
  19. </uni-search-bar>
  20. <view class="fixed screen" @click="filter">
  21. <span>筛选</span>
  22. <uni-icons custom-prefix="iconfont" type="icon-shaixuan" size="16" color="#000"></uni-icons>
  23. </view>
  24. </div>
  25. <div class="search-btm">
  26. <div>已选 0/245</div>
  27. <div>全选</div>
  28. </div>
  29. </div>
  30. <uni-forms class="list" ref="form">
  31. <div class="list-item" v-for="(item,index) in list" :key="index">
  32. <div class="item-title">
  33. <div>小型舟皿(39202323)</div>
  34. <div class="del" @click="choose(item,index)">仓库1号</div>
  35. </div>
  36. <div class="item-content">
  37. <div class="content-line">
  38. <div class="line-left">
  39. <span>分类</span>
  40. <p>舟皿-挤压舟皿</p>
  41. </div>
  42. </div>
  43. <div class="content-line">
  44. <div class="line-left">
  45. <span>规格</span>
  46. <p>3.0*9.0</p>
  47. </div>
  48. <div class="line-left">
  49. <span>型号</span>
  50. <p>WΦ100</p>
  51. </div>
  52. </div>
  53. <div class="content-line">
  54. <div class="line-left">
  55. <span>单位</span>
  56. <p>个</p>
  57. </div>
  58. <div class="line-left">
  59. <span>库存</span>
  60. <p>100</p>
  61. </div>
  62. </div>
  63. </div>
  64. <checkbox :checked="item.checked" class="item-check" size="5"/>
  65. </div>
  66. </uni-forms>
  67. <div class="footer">
  68. <div class="footer-left" @click="cancel">取消</div>
  69. <div class="footer-right" @click="submit">确认添加</div>
  70. </div>
  71. <uni-popup ref="popup" type="bottom">
  72. <div class="popup">
  73. <div class="popup-top">
  74. <div class="top-left">选择仓库</div>
  75. <div class="top-right">
  76. <button @click="close">关闭</button>
  77. <button>确定</button>
  78. </div>
  79. </div>
  80. <div class="popup-list">
  81. <div class="list-item" v-for="(item,index) in warehouseList" :key="index">
  82. {{item.name}}
  83. </div>
  84. </div>
  85. </div>
  86. </uni-popup>
  87. <uni-popup ref="filter" type="bottom">
  88. <div class="popup">
  89. <div class="popup-top">
  90. <div class="top-left">类型筛选</div>
  91. <div class="top-right">
  92. <button @click="closeFilter">关闭</button>
  93. <button>确定</button>
  94. </div>
  95. </div>
  96. <div class="popup-list">
  97. <div class="list-item" v-for="(item,index) in warehouseList" :key="index">
  98. {{item.name}}
  99. </div>
  100. </div>
  101. </div>
  102. </uni-popup>
  103. </view>
  104. </template>
  105. <script>
  106. import { post, postJ, get, getJ } from '@/utils/api.js'
  107. export default {
  108. data () {
  109. return {
  110. list:[
  111. {id:0, show:false},
  112. {id:1, show:false},
  113. {id:2, show:false},
  114. {id:3, show:false},
  115. {id:4, show:false}
  116. ],
  117. warehouseList:[
  118. {name:'仓库1号'},
  119. {name:'仓库2号'},
  120. {name:'仓库3号'},
  121. {name:'仓库4号'},
  122. {name:'仓库5号'},
  123. {name:'仓库2号'},
  124. {name:'仓库3号'},
  125. {name:'仓库4号'},
  126. {name:'仓库5号'}
  127. ],
  128. searchKey:''
  129. }
  130. },
  131. onLoad ({ id }) {
  132. if (id) {
  133. // this._getDetail(id)
  134. }
  135. },
  136. methods: {
  137. filter(){
  138. this.$refs.filter.open('bottom')
  139. },
  140. closeFilter(){
  141. this.$refs.filter.close()
  142. },
  143. search (e) {
  144. this.searchKey = e
  145. },
  146. choose(item,index){
  147. this.$refs.popup.open('bottom')
  148. },
  149. close() {
  150. this.$refs.popup.close()
  151. },
  152. submit() {
  153. uni.navigateBack({
  154. delta: 1
  155. })
  156. },
  157. cancel(){
  158. uni.navigateBack({
  159. delta: 1
  160. })
  161. }
  162. }
  163. }
  164. </script>
  165. <style lang="scss" scoped>
  166. .search{
  167. width: 100%;
  168. position: fixed;
  169. top: 90rpx;
  170. left: 0;
  171. height: 160rpx;
  172. background-color: rgba(242, 242, 242, 1);
  173. z-index: 1;
  174. .search-top{
  175. width: 96%;
  176. margin: 16rpx auto;
  177. display: flex;
  178. align-items: center;
  179. justify-content: space-between;
  180. .uni-searchbar{
  181. width: 75%;
  182. background-color: #fff;
  183. padding: 0;
  184. border-radius: 20rpx;
  185. /deep/.uni-searchbar__box{
  186. background-color: #fff!important;
  187. justify-content: flex-start;
  188. }
  189. }
  190. }
  191. .search-btm{
  192. width: 96%;
  193. margin: 0 auto;
  194. display: flex;
  195. align-items: center;
  196. justify-content: space-between;
  197. div:last-child{
  198. color: #70B603;
  199. }
  200. }
  201. }
  202. .list{
  203. width: 100%;
  204. margin: 160rpx auto 0;
  205. padding: 10rpx 0 100rpx;
  206. .list-item:last-child{
  207. border: none;
  208. }
  209. .list-item{
  210. width: 100%;
  211. margin: 20rpx auto;
  212. border-bottom: 1rpx solid #ccc;
  213. position: relative;
  214. .item-check{
  215. position: absolute;
  216. bottom: 40rpx;
  217. right: 30rpx;
  218. transform:scale(2)
  219. }
  220. .item-title{
  221. padding: 0 30rpx;
  222. display: flex;
  223. align-items: center;
  224. justify-content: space-between;
  225. font-size: 30rpx;
  226. color: #000;
  227. height: 80rpx;
  228. line-height: 80rpx;
  229. span{
  230. margin-left: 15rpx;
  231. }
  232. .del{
  233. color: #EC808D;
  234. }
  235. }
  236. .item-content{
  237. padding: 0 20rpx 10rpx;
  238. .content-line{
  239. padding: 0 12rpx;
  240. display: flex;
  241. align-items: center;
  242. justify-content: flex-start;
  243. height: 80rpx;
  244. line-height: 80rpx;
  245. .line-left{
  246. display: flex;
  247. align-items: center;
  248. justify-content: flex-start;
  249. flex: 1;
  250. span{
  251. width: 90rpx;
  252. text-align: right;
  253. color: rgb(127, 127, 127);
  254. margin-right: 20rpx;
  255. }
  256. p{
  257. color: #333333;
  258. display: flex;
  259. align-items: center;
  260. justify-content: flex-start;
  261. .uni-easyinput{
  262. width: 220rpx;
  263. margin-right: 10rpx;
  264. }
  265. }
  266. }
  267. .line-right{
  268. display: flex;
  269. align-items: center;
  270. justify-content: flex-end;
  271. .right-minus{
  272. width: 80rpx;
  273. height: 51rpx;
  274. text-align: center;
  275. line-height: 51rpx;
  276. color: #fff;
  277. background: #F59A23;
  278. }
  279. .right-add{
  280. width: 80rpx;
  281. height: 51rpx;
  282. text-align: center;
  283. line-height: 51rpx;
  284. color: #fff;
  285. background: #70B603;
  286. margin-left: 10rpx;
  287. }
  288. .right-choose.u-button--info{
  289. border-color:#70B603;
  290. color: #70B603;
  291. }
  292. }
  293. }
  294. .content-line:last-child{
  295. border-bottom: none;
  296. }
  297. }
  298. }
  299. }
  300. .footer{
  301. width: 100%;
  302. height: 90rpx;
  303. display: flex;
  304. align-items: center;
  305. justify-content: center;
  306. position: fixed;
  307. bottom: 0;
  308. left: 0;
  309. .footer-left{
  310. width: 50%;
  311. height: 90rpx;
  312. line-height: 90rpx;
  313. text-align: center;
  314. font-size: 34rpx;
  315. color: #fff;
  316. background: #4B7902;
  317. }
  318. .footer-right{
  319. width: 50%;
  320. height: 90rpx;
  321. line-height: 90rpx;
  322. text-align: center;
  323. font-size: 34rpx;
  324. color: #fff;
  325. background: #70B603;
  326. }
  327. }
  328. .popup{
  329. width: 100%;
  330. height: 600rpx;
  331. background: #fff;
  332. .popup-top{
  333. width: 100%;
  334. display: flex;
  335. align-items: center;
  336. justify-content: space-between;
  337. height: 80rpx;
  338. background: rgba(21, 122, 44, 1);
  339. color: #fff;
  340. .top-left{
  341. font-size: 32rpx;
  342. margin-left: 10rpx;
  343. }
  344. .top-right{
  345. display: flex;
  346. align-items: center;
  347. justify-content: flex-end;
  348. margin-right: 10rpx;
  349. uni-button{
  350. background: rgba(21, 122, 44, 1);
  351. color: #fff;
  352. width: 100rpx;
  353. height: 60rpx;
  354. line-height: 60rpx;
  355. font-size: 28rpx;
  356. padding: 0;
  357. border: 1rpx solid #fff;
  358. margin-left: 20rpx;
  359. }
  360. }
  361. }
  362. .popup-list{
  363. width: 100%;
  364. height: 520rpx;
  365. overflow-y: auto;
  366. background-color: rgba(242, 242, 242, 1);
  367. .list-item{
  368. width: 100%;
  369. height: 80rpx;
  370. text-align: center;
  371. line-height: 80rpx;
  372. border-bottom: 1rpx solid #fff;
  373. }
  374. .list-item:last-child{
  375. border: none;
  376. }
  377. .list-item:hover{
  378. background: rgba(254,64,102,.25)
  379. }
  380. }
  381. }
  382. </style>