123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206 |
- <template>
- <view class="home">
- <!-- <uni-notice-bar show-icon scrollable
- text="uni-app 版正式发布,开发一次,同时发布iOS、Android、H5、微信小程序、支付宝小程序、百度小程序、头条小程序等7大平台。" /> -->
- <!-- <uni-card v-for="i in userInfoData.menus" :key="i.id">
- <view class="title">
- {{i.name}}
- </view>
- <view class="menu-list-warp">
- <view class="menu-list-box" v-for="j in i.children" :key="j.id" @click="toRouter(j)">
- <image :src="'../static/' + j.icon" mode=""></image>
- <view class="">
- {{j.name}}
- </view>
- </view>
- </view>
- </uni-card> -->
- <uni-card>
- <view class="title">
- 库存
- </view>
- <view class="menu-list-warp">
- <view class="menu-list-box" @click="toRouter('/submit/submit')">
- <image :src="'../static/smck.png'" mode=""></image>
- <view class="">
- 异常上报
- </view>
- </view>
- <view class="menu-list-box" @click="toRouter('/usedTotal/usedTotal')" v-if="isRoom">
- <image :src="'../static/tj.png'" mode=""></image>
- <view class="">
- 库存统计
- </view>
- </view>
- <view class="menu-list-box" @click="toRouter('/total/personalStat')">
- <image :src="'../static/czzj.png'" mode=""></image>
- <view class="">
- 个人面料概况
- </view>
- </view>
- </view>
- </uni-card>
- <uni-card>
- <view class="title">
- 出库管理
- </view>
- <view class="menu-list-warp">
- <view class="menu-list-box" @click="toRouter('/usedTotal/warehouse-list')">
- <image :src="'../static/smrk.png'" mode=""></image>
- <view class="">
- 物料接收
- </view>
- </view>
- <view class="menu-list-box" @click="toRouter('/usedTotal/materialReceiving')" v-if="isRoom3">
- <image :src="'../static/kcpd.png'" mode=""></image>
- <view class="">
- 待物料接收
- </view>
- </view>
- <view class="menu-list-box" @click="toRouter('/usedTotal/return-warehouse')">
- <image :src="'../static/tc.png'" mode=""></image>
- <view class="">
- 物料退仓
- </view>
- </view>
- <view class="menu-list-box" @click="toRouter('/usedTotal/fabric-correction')">
- <image :src="'../static/kccx.png'" mode=""></image>
- <view class="">
- 面料修正
- </view>
- </view>
- <!-- <view class="menu-list-box" @click="toRouter('/materialTransfer/materialTransfer')">
- <image :src="'../static/xcjj.png'" mode=""></image>
- <view class="">
- 面料转仓
- </view>
- </view> -->
- <view class="menu-list-box" @click="toRouter('/materialTransfer/transferCompositeList')" v-if="isRoom2">
- <image :src="'../static/fh.png'" mode=""></image>
- <view class="">
- 转仓复核
- </view>
- </view>
- </view>
- </uni-card>
- <!-- <button style="background: blue;color: #fff;margin: 40rpx;"></button> -->
- <view class="logout" @click="logout">
- 退出
- </view>
- </view>
- </template>
- <script>
- import {
- getInfo
- } from "@/util/api.js";
- import Vue from 'vue'
- export default {
- data() {
- return {
- userInfoData: [],
- notificationData: [],
- isRoom: false,
- isRoom2:false,
- isRoom3:false,
- }
- },
- onLoad() {
- // wx.requestSubscribeMessage({
- // tmplIds: ['Tt0C6SOrtd2QXIdLqrm0CNdarUE4LG_lNJblUnkqTPM'],
- // success(res) {
-
- // },
- // fail(err){
- // console.log(err)
- // }
- // })
- const v = this
- if (
- Vue.prototype.$token.role_id == '1552548151620026370' ||
- Vue.prototype.$token.role_id == '1552550790307004417' ||
- Vue.prototype.$token.role_id == '1552550978346041346') {
- this.isRoom = true
- }
- if (
- Vue.prototype.$token.role_id == '1569881723951472642' ||
- Vue.prototype.$token.role_id == '1552550978346041346' ||
- Vue.prototype.$token.role_id == '1552548151620026370') {
- this.isRoom2 = true
- }
- if (
- Vue.prototype.$token.role_id == '1552548151620026370' ||
- Vue.prototype.$token.role_id == '1552550978346041346' ||
- Vue.prototype.$token.role_id == '1580170639715688449') {
- this.isRoom3 = true
- }
- // v.$post('/wx/login/getUserInfo').then(res => {
- // v.userInfoData = res.data
- // Vue.prototype.$userInfo = res.data
- // uni.setStorage({
- // key: "userInfo",
- // data: res.data,
- // success(res) {
- // },
- // fail(res) {}
- // })
- // })
- // v.$post('/wx/message/notification',{}).then(res=>{
- // v.notificationData = res.data
- // })
- },
- methods: {
- logout(){
- uni.setStorage({
- key: 'automaticLogin',
- data: false,
- success: function () {
- uni.navigateTo({
- url: '/pages/user/login'
- })
- }
- });
- },
- toRouter(j) {
- console.log(j)
- wx.requestSubscribeMessage({
- tmplIds: ['Tt0C6SOrtd2QXIdLqrm0CNdarUE4LG_lNJblUnkqTPM'],
- success(res) {
-
- },
- fail(err){
- console.log(err)
- }
- })
- uni.navigateTo({
- url: '/pages' + j
- })
- },
- },
- }
- </script>
- <style lang="less">
- .logout{
- text-align: center;
- position: fixed;
- bottom: 0;
- left: 0;
- right: 0;
- line-height: 80rpx;
- }
- .menu-list-warp {
- .menu-list-box {
- width: 25%;
- text-align: center;
- float: left;
- padding: 20rpx;
- image {
- width: 100rpx;
- height: 100rpx;
- }
- }
- }
- </style>
|