bodyOfBottle.vue 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <template>
  2. <view class="bodyOfBottle">
  3. <view class="top">
  4. <view class="input">
  5. <input type="text" v-model="code" placeholder="请输入瓶身码 例: 201806021234567" @input="input">
  6. </view>
  7. <view class="input">
  8. <input type="text" v-model="production" @input="input">
  9. </view>
  10. <view class="btn">
  11. <button type="default" :disabled="disabled">搜索</button>
  12. </view>
  13. </view>
  14. <view class="bom">
  15. <view class="list" v-for="(v,i) in list" :key="i" @click="production = v">
  16. {{v}}
  17. </view>
  18. </view>
  19. </view>
  20. </template>
  21. <script>
  22. export default {
  23. data() {
  24. return {
  25. code: '',
  26. production: '',
  27. disabled: true,
  28. list: ['1号生产线', '2号生产线', '3号生产线', '9号生产线', '6号生产线', '4号生产线 (20L)', '8号生产线', '5号生产线', '10号生产线', '一号车间中2号生产线', '一号车间中3号生产线', '7号生产线', '4号生产线 (10L)', ]
  29. };
  30. },
  31. onLoad() {
  32. },
  33. methods:{
  34. input(){
  35. if (this.code && this.production){
  36. this.disabled = false
  37. }else{
  38. this.disabled = true
  39. }
  40. }
  41. }
  42. }
  43. </script>
  44. <style lang="scss">
  45. .bodyOfBottle{
  46. .top{
  47. padding: 10rpx 30rpx 0;
  48. .input{
  49. height: 80rpx;
  50. border-bottom: 1rpx solid #dfdfdf;
  51. input{
  52. height: 100%;
  53. }
  54. }
  55. .btn{
  56. padding: 0 30rpx;
  57. margin-top: 30rpx;
  58. }
  59. }
  60. .bom{
  61. padding: 30rpx 20rpx 0;
  62. .list{
  63. padding: 20rpx 0;
  64. border-bottom: 1rpx solid #e7e7e7;
  65. &:last-child{
  66. border-bottom: 0;
  67. }
  68. }
  69. }
  70. }
  71. </style>