<template>
|
<u-card :title="title" >
|
<view class="" slot="body">
|
<u-grid :col="3">
|
<u-grid-item @tap="clickCoupon">
|
<u-icon name="order" :size="46"></u-icon>
|
<view class="grid-text">外协移库</view>
|
</u-grid-item>
|
<u-grid-item @tap="lock">
|
<u-icon name="car-fill" :size="46"></u-icon>
|
<view class="grid-text">外协入库</view>
|
</u-grid-item>
|
<u-grid-item @tap="AGV">
|
<u-icon name="car" :size="46"></u-icon>
|
<view class="grid-text">空盘</view>
|
</u-grid-item>
|
</u-grid>
|
</view>
|
</u-card>
|
</template>
|
|
<script>
|
export default {
|
data() {
|
return {
|
title: '操作功能'
|
}
|
},
|
onLoad() {
|
|
},
|
methods: {
|
clickCoupon(){
|
if(this.hasLogin()){
|
this.$u.route("pages/unpacking/unpacking")
|
}else{
|
this.$t.message.loading('登录失效请重新登录')
|
setTimeout(()=>{
|
this.$t.message.closeLoading()
|
this.$u.route({
|
type:'reLaunch',
|
url:'pages/login/login'
|
})
|
// this.$Router.replace({name:"tabbar"})
|
},1300)
|
}
|
},
|
lock(){
|
console.log("lock")
|
if(this.hasLogin()){
|
this.$u.route("pages/feeding/feeding")
|
}else{
|
this.$t.message.loading('登录失效请重新登录')
|
setTimeout(()=>{
|
|
this.$t.message.closeLoading()
|
this.$u.route({
|
type:'reLaunch',
|
url:'pages/login/login'
|
})
|
// this.$Router.replace({name:"tabbar"})
|
},1300)
|
}
|
},
|
AGV(){
|
console.log("AGV")
|
if(this.hasLogin()){
|
this.$u.route("pages/AGV/AGV")
|
}else{
|
this.$t.message.loading('登录失效请重新登录')
|
setTimeout(()=>{
|
|
this.$t.message.closeLoading()
|
this.$u.route({
|
type:'reLaunch',
|
url:'pages/login/login'
|
})
|
// this.$Router.replace({name:"tabbar"})
|
},1300)
|
}
|
},
|
|
//判断是否登录
|
hasLogin(){
|
let haslogin= uni.getStorageSync('jo_user')
|
if(haslogin==null||haslogin==""){
|
return false
|
}
|
else{
|
return true
|
}
|
}
|
}
|
}
|
</script>
|
|
<style lang="scss" scoped>
|
.grid-text {
|
font-size: 28rpx;
|
margin-top: 4rpx;
|
color: $u-type-info;
|
}
|
</style>
|