104 lines
2.4 KiB
Vue
104 lines
2.4 KiB
Vue
<!-- 首页菜单 -->
|
|
<template>
|
|
<view class="sy">
|
|
<image src="../static/img/sybg.png" class="sybg" mode=""></image>
|
|
<view class="sy_info">
|
|
<view class="sy_txt">
|
|
<text class="t1">hello</text>
|
|
<text class="t2">你好,{{name}}</text>
|
|
</view>
|
|
<image src="../static/img/out.png" class="syoutico" mode="" @click="logoutfn"></image>
|
|
</view>
|
|
<view class="sy_meuns">
|
|
<view class="sy_item" @click="otherPage(1)">
|
|
<image src="../static/img/syico1.png" class="symeunico"></image>
|
|
<text class="t1">入库</text>
|
|
</view>
|
|
<view class="sy_item" @click="otherPage(2)">
|
|
<image src="../static/img/syico3.png" class="symeunico"></image>
|
|
<text class="t1">出库</text>
|
|
</view>
|
|
<view class="sy_item" @click="otherPage(3)">
|
|
<image src="../static/img/syico2.png" class="symeunico"></image>
|
|
<text class="t1">其他库内操作</text>
|
|
</view>
|
|
<view class="sy_item" @click="otherPage(4)">
|
|
<image src="../static/img/syico4.png" class="symeunico"></image>
|
|
<text class="t1">盘点</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
data() {
|
|
return {
|
|
title: 'Hello',
|
|
name: ''
|
|
}
|
|
},
|
|
onLoad() {
|
|
this.name = uni.getStorageSync('userInfo').nickname
|
|
this.getlxlist()
|
|
},
|
|
// 物理键盘的监听
|
|
onBackPress(e) {
|
|
this.$util.appgoBack(e, 'login')
|
|
return true
|
|
},
|
|
methods: {
|
|
//获取系统类型所需要下拉列表
|
|
getlxlist() {
|
|
this.$api.get("/SysConfig/GetStatus").then(res => {
|
|
if (res.status == 200) {
|
|
uni.setStorageSync('allTypelist', res.data)
|
|
}
|
|
})
|
|
},
|
|
// 跳转页面
|
|
otherPage(type) {
|
|
//入库
|
|
if (type == 1) {
|
|
uni.navigateTo({
|
|
url: "/pages/warehous/index"
|
|
})
|
|
}
|
|
//出库
|
|
if (type == 2) {
|
|
uni.navigateTo({
|
|
url: "/pages/outbound/index"
|
|
})
|
|
}
|
|
//其他内库操作
|
|
if (type == 3) {
|
|
uni.navigateTo({
|
|
url: "/pages/otherUnderwear/index"
|
|
})
|
|
}
|
|
//盘点
|
|
if (type == 4) {
|
|
uni.navigateTo({
|
|
url: "/pages/Inventory/index"
|
|
})
|
|
}
|
|
},
|
|
//退出
|
|
logoutfn() {
|
|
this.$api.post('/Login/LoginOut').then(res => {
|
|
if (res.status == 200) {
|
|
uni.reLaunch({
|
|
url: "/pages/login"
|
|
})
|
|
uni.clearStorageSync()
|
|
}
|
|
console.log("退出", res)
|
|
})
|
|
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
<style lang="scss">
|
|
@import "@/static/public.scss";
|
|
</style> |