index.vue 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <template>
  2. <view style="background-color: #FFFFFF;height: 100vh;">
  3. <view class="content">
  4. <view class="content-but" @click="goPage(1)">
  5. <text>
  6. 入库
  7. </text>
  8. </view>
  9. <view class="content-but" @click="goPage(2)">
  10. <text>
  11. 出库
  12. </text>
  13. </view>
  14. <view class="content-but" @click="goPage(3)">
  15. <text>
  16. 标签查询
  17. </text>
  18. </view>
  19. </view>
  20. </view>
  21. </template>
  22. <script>
  23. export default {
  24. data() {
  25. return {
  26. }
  27. },
  28. onLoad() {
  29. this.$u.get('/system/dict/data/type/storage_type').then(res => {
  30. uni.setStorageSync('storageType', res.data);
  31. })
  32. },
  33. onShow(){
  34. uni.setStorageSync('type',0);
  35. },
  36. methods: {
  37. goPage(row) {
  38. if (row == 1) {
  39. uni.navigateTo({
  40. url: 'inStock/index'
  41. });
  42. } else if (row == 2) {
  43. uni.navigateTo({
  44. url: 'outStock/index'
  45. });
  46. } else if (row == 3) {
  47. uni.navigateTo({
  48. url: 'tagQuery/index'
  49. });
  50. }
  51. }
  52. }
  53. }
  54. </script>
  55. <style lang="scss" scoped>
  56. .content {
  57. display: flex;
  58. flex-wrap: wrap;
  59. flex-direction: column;
  60. align-content: center;
  61. &-but {
  62. width: 98%;
  63. height: 200rpx;
  64. display: flex;
  65. justify-content: center;
  66. align-items: center;
  67. background-color: #409EFF;
  68. margin: 10rpx 0 0 0;
  69. border-radius: 10rpx;
  70. text {
  71. color: #fff;
  72. font-size: 36rpx;
  73. }
  74. }
  75. }
  76. </style>