home.vue 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. <template>
  2. <view class="home">
  3. <!-- <uni-notice-bar show-icon scrollable
  4. text="uni-app 版正式发布,开发一次,同时发布iOS、Android、H5、微信小程序、支付宝小程序、百度小程序、头条小程序等7大平台。" /> -->
  5. <!-- <uni-card v-for="i in userInfoData.menus" :key="i.id">
  6. <view class="title">
  7. {{i.name}}
  8. </view>
  9. <view class="menu-list-warp">
  10. <view class="menu-list-box" v-for="j in i.children" :key="j.id" @click="toRouter(j)">
  11. <image :src="'../static/' + j.icon" mode=""></image>
  12. <view class="">
  13. {{j.name}}
  14. </view>
  15. </view>
  16. </view>
  17. </uni-card> -->
  18. <uni-card>
  19. <view class="title">
  20. 库存
  21. </view>
  22. <view class="menu-list-warp">
  23. <view class="menu-list-box" @click="toRouter('/submit/submit')">
  24. <image :src="'../static/smck.png'" mode=""></image>
  25. <view class="">
  26. 异常上报
  27. </view>
  28. </view>
  29. <view class="menu-list-box" @click="toRouter('/usedTotal/usedTotal')" v-if="isRoom">
  30. <image :src="'../static/tj.png'" mode=""></image>
  31. <view class="">
  32. 库存统计
  33. </view>
  34. </view>
  35. </view>
  36. </uni-card>
  37. <uni-card>
  38. <view class="title">
  39. 出库管理
  40. </view>
  41. <view class="menu-list-warp">
  42. <view class="menu-list-box" @click="toRouter('/usedTotal/warehouse-list')">
  43. <image :src="'../static/smrk.png'" mode=""></image>
  44. <view class="">
  45. 物料接收
  46. </view>
  47. </view>
  48. <view class="menu-list-box" @click="toRouter('/usedTotal/return-warehouse')">
  49. <image :src="'../static/tc.png'" mode=""></image>
  50. <view class="">
  51. 物料退仓
  52. </view>
  53. </view>
  54. <view class="menu-list-box" @click="toRouter('/usedTotal/fabric-correction')">
  55. <image :src="'../static/kccx.png'" mode=""></image>
  56. <view class="">
  57. 面料修正
  58. </view>
  59. </view>
  60. <view class="menu-list-box" @click="toRouter('/materialTransfer/materialTransfer')">
  61. <image :src="'../static/xcjj.png'" mode=""></image>
  62. <view class="">
  63. 面料转仓
  64. </view>
  65. </view>
  66. <view class="menu-list-box" @click="toRouter('/materialTransfer/transferCompositeList')" v-if="isRoom2">
  67. <image :src="'../static/fh.png'" mode=""></image>
  68. <view class="">
  69. 转仓复核
  70. </view>
  71. </view>
  72. </view>
  73. </uni-card>
  74. </view>
  75. </template>
  76. <script>
  77. import {
  78. getInfo
  79. } from "@/util/api.js";
  80. import Vue from 'vue'
  81. export default {
  82. data() {
  83. return {
  84. userInfoData: [],
  85. notificationData: [],
  86. isRoom: false,
  87. isRoom2:false,
  88. }
  89. },
  90. onLoad() {
  91. // wx.requestSubscribeMessage({
  92. // tmplIds: ['Tt0C6SOrtd2QXIdLqrm0CNdarUE4LG_lNJblUnkqTPM'],
  93. // success(res) {
  94. // },
  95. // fail(err){
  96. // console.log(err)
  97. // }
  98. // })
  99. const v = this
  100. if (
  101. Vue.prototype.$token.role_id == '1552548151620026370' ||
  102. Vue.prototype.$token.role_id == '1552550790307004417' ||
  103. Vue.prototype.$token.role_id == '1552550978346041346') {
  104. this.isRoom = true
  105. }
  106. if (
  107. Vue.prototype.$token.role_id == '1569881723951472642' ||
  108. Vue.prototype.$token.role_id == '1552550978346041346' ||
  109. Vue.prototype.$token.role_id == '1552548151620026370') {
  110. this.isRoom2 = true
  111. }
  112. // v.$post('/wx/login/getUserInfo').then(res => {
  113. // v.userInfoData = res.data
  114. // Vue.prototype.$userInfo = res.data
  115. // uni.setStorage({
  116. // key: "userInfo",
  117. // data: res.data,
  118. // success(res) {
  119. // },
  120. // fail(res) {}
  121. // })
  122. // })
  123. // v.$post('/wx/message/notification',{}).then(res=>{
  124. // v.notificationData = res.data
  125. // })
  126. },
  127. methods: {
  128. toRouter(j) {
  129. console.log(j)
  130. wx.requestSubscribeMessage({
  131. tmplIds: ['Tt0C6SOrtd2QXIdLqrm0CNdarUE4LG_lNJblUnkqTPM'],
  132. success(res) {
  133. },
  134. fail(err){
  135. console.log(err)
  136. }
  137. })
  138. uni.navigateTo({
  139. url: '/pages' + j
  140. })
  141. },
  142. },
  143. }
  144. </script>
  145. <style lang="less">
  146. .menu-list-warp {
  147. .menu-list-box {
  148. width: 25%;
  149. text-align: center;
  150. float: left;
  151. padding: 20rpx;
  152. image {
  153. width: 100rpx;
  154. height: 100rpx;
  155. }
  156. }
  157. }
  158. </style>