index.vue 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. <template>
  2. <view class="content-box">
  3. <uni-nav-bar fixed="true" statusBar="true" left-icon="back" title="领料" background-color="#157A2C"
  4. color="#fff" @clickLeft="back" right-icon="scan" @clickRight="HandlScanCode">
  5. </uni-nav-bar>
  6. <view class="top-wrapper">
  7. <view class="tab_box rx-sc">
  8. <view class="tab_item" :class="{active: tabType == 1}" @click="handTab(1)">生产工单列表</view>
  9. <view class="tab_item" :class="{active: tabType == 2}" @click="handTab(2)">领料工单列表</view>
  10. </view>
  11. </view>
  12. <view class="list_box">
  13. <u-list @scrolltolower="scrolltolower" v-if="tabType == 1">
  14. </u-list>
  15. </view>
  16. <view class="bottom-wrapper">
  17. 5555
  18. </view>
  19. </view>
  20. </template>
  21. <script>
  22. export default {
  23. data() {
  24. return {
  25. tabType: 1,
  26. }
  27. },
  28. methods: {
  29. handTab(type) {
  30. if (type != this.tabType) {
  31. this.tabType = type
  32. }
  33. },
  34. scrolltolower() {},
  35. // 相机扫码
  36. HandlScanCode () {
  37. let _this = this
  38. uni.scanCode({
  39. success: function (res) {
  40. console.log(res)
  41. }
  42. })
  43. //_this.Scancodedate('res')
  44. },
  45. }
  46. }
  47. </script>
  48. <style lang="scss" scoped>
  49. .content-box {
  50. height: 100vh;
  51. overflow: hidden;
  52. display: flex;
  53. flex-direction: column;
  54. background-color: $page-bg;
  55. }
  56. .tab_box {
  57. width: 100%;
  58. height: 68rpx;
  59. background: #fff;
  60. .tab_item {
  61. height: 68rpx;
  62. line-height: 68rpx;
  63. padding: 0 20rpx;
  64. font-size: 32rpx;
  65. color: #979C9E;
  66. }
  67. .active {
  68. box-sizing: border-box;
  69. border-bottom: 6rpx solid $theme-color;
  70. color: $theme-color;
  71. }
  72. }
  73. .list_box {
  74. flex: 1;
  75. overflow: hidden;
  76. padding: 4rpx 0;
  77. .u-list {
  78. height: 100% !important;
  79. }
  80. }
  81. </style>