index.vue 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. <template>
  2. <view class="content flex flex_column">
  3. <view class="tits">请选择产品的货架层号</view>
  4. <view class="tagbox flex">
  5. <view>
  6. <view class="tag" :class="curTag==item?'active':''" v-for="item in list" :key="item" @click="curTag=curTag==item?'':item">
  7. {{item}}层
  8. </view>
  9. </view>
  10. </view>
  11. <view class="newbtn flex justify_between" v-if="curTag">
  12. <u-button shape="circle" @click="searchProduct()" size="medium">按产品编码搜索</u-button>
  13. <u-button @click="scanProduct()" type='primary' shape="circle" size="medium">扫描条形码匹配</u-button>
  14. </view>
  15. </view>
  16. </template>
  17. <script>
  18. export default {
  19. data() {
  20. return {
  21. list:[],
  22. curTag: '',
  23. shelfSn: '',
  24. shelfName: '',
  25. customerSn: ''
  26. }
  27. },
  28. onLoad(opts) {
  29. this.list = 'A、B、C、D、E、F、G、H、I、J、K、L、M、N、O、P、Q、R、S、T、U、V、W、X、Y、Z'.split('、');
  30. this.shelfName = opts.shelfName
  31. this.shelfSn = opts.shelfSn
  32. this.customerSn = opts.customerSn
  33. },
  34. methods: {
  35. scanProduct(){
  36. uni.redirectTo({
  37. url: "/pages/batchShelves/scanProduct?shelfSn="+this.shelfSn+'&layer='+this.curTag+'&shelfName='+this.shelfName+'&customerSn='+this.customerSn
  38. })
  39. },
  40. searchProduct(){
  41. uni.redirectTo({
  42. url: "/pages/batchShelves/searchProduct?shelfSn="+this.shelfSn+'&layer='+this.curTag+'&shelfName='+this.shelfName+'&customerSn='+this.customerSn
  43. })
  44. }
  45. }
  46. }
  47. </script>
  48. <style lang="less">
  49. .content{
  50. width: 100%;
  51. height: 100vh;
  52. padding: 20upx;
  53. background-color: #fff;
  54. .tits{
  55. padding: 30upx 0;
  56. text-align: center;
  57. }
  58. .tagbox{
  59. flex-grow: 1;
  60. > view{
  61. margin: 0 auto;
  62. overflow: hidden;
  63. width: 100%;
  64. .tag{
  65. width: 16%;
  66. background-color: #fff;
  67. border:1rpx solid #aeaeae;
  68. box-shadow: 2rpx 4rpx 6rpx #eee;
  69. border-radius: 15rpx;
  70. text-align: center;
  71. padding: 10rpx 0;
  72. float: left;
  73. margin: 20rpx 2%;
  74. }
  75. .active{
  76. background-color: #55aaff;
  77. border-color: #55aaff;
  78. color: #fff;
  79. }
  80. }
  81. }
  82. .newbtn{
  83. padding: 30upx;
  84. button{
  85. width: 45%;
  86. }
  87. }
  88. }
  89. </style>