171 lines
3.7 KiB
Vue
171 lines
3.7 KiB
Vue
<template>
|
|
<view class="home-page">
|
|
<uni-nav-bar leftText=" " :fixed="true" :border="false" @clickLeft="leftClick" color="#fff" backgroundColor="rgb(79 137 247)" :statusBar="true" title="X-Server"></uni-nav-bar>
|
|
<view>
|
|
<view class="cards">
|
|
<view class="title">审批管理</view>
|
|
<u-grid :border="false" col="5" >
|
|
<u-grid-item
|
|
v-for="(listItem,listIndex) in list"
|
|
:key="listIndex"
|
|
@click="navTo(listItem.url)"
|
|
>
|
|
<image class="icons" src="/static/image/icon.png" mode=""></image>
|
|
<text class="grid-text">{{listItem.title}}</text>
|
|
</u-grid-item>
|
|
</u-grid>
|
|
</view>
|
|
<view class="cards">
|
|
<view class="title">物品借用</view>
|
|
<u-grid :border="false" col="5" >
|
|
<u-grid-item @click="navTo('/pages/borrow/borrow')">
|
|
<image class="icons" src="/static/image/borrow.png" mode=""></image>
|
|
<text class="grid-text">借用申请</text>
|
|
</u-grid-item>
|
|
<u-grid-item @click="navTo('/pages/borrow/borrow_list')">
|
|
<image class="icons" src="/static/image/borrow-list.png" mode=""></image>
|
|
<text class="grid-text">借用列表</text>
|
|
</u-grid-item>
|
|
</u-grid>
|
|
</view>
|
|
<view class="cards">
|
|
<view class="title">备货单</view>
|
|
<u-grid :border="false" col="5" >
|
|
<u-grid-item
|
|
v-for="(listItem,listIndex) in list2"
|
|
:key="listIndex"
|
|
@click="navTo('/pages/stock/stock_list')"
|
|
>
|
|
<image class="icons" src="/static/image/icon.png" mode=""></image>
|
|
<text class="grid-text">{{listItem.title}}</text>
|
|
</u-grid-item>
|
|
</u-grid>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import { request,showToast } from '@/api/apiT.js'
|
|
export default {
|
|
data() {
|
|
return {
|
|
list: [
|
|
{
|
|
title: '备货单审批',
|
|
url:''
|
|
},
|
|
{
|
|
title: '借用审批',
|
|
url:'/pages/approval/borrow_approval'
|
|
},
|
|
{
|
|
title: '归还审批',
|
|
url:'/pages/approval/return_approval'
|
|
}
|
|
],
|
|
list2: [
|
|
{
|
|
title: '备货单'
|
|
}
|
|
],
|
|
bannerList: [],
|
|
contList: [],
|
|
}
|
|
},
|
|
onLoad() {
|
|
if (uni.getStorageSync('token')) {
|
|
this.getinfo()
|
|
}
|
|
},
|
|
onShow() {
|
|
},
|
|
methods: {
|
|
getinfo(){
|
|
request({
|
|
url:'common/user/info',
|
|
method:'get',
|
|
}).then(res => {
|
|
this.userinfo=res.data.data.user
|
|
})
|
|
},
|
|
navTo(url) {
|
|
uni.navigateTo({
|
|
url: url
|
|
});
|
|
},
|
|
bannerListfn(){
|
|
request({
|
|
url:'common/banner/list',
|
|
method:'get',
|
|
data:{
|
|
module:'home_module'
|
|
}
|
|
}).then(res => {
|
|
this.bannerList = res.data.data
|
|
})
|
|
},
|
|
// 点击商品项
|
|
navToList(item) {
|
|
uni.navigateTo({
|
|
url: '/pages/square/detiles?id='+item.id
|
|
});
|
|
},
|
|
queryList(pageNo, pageSize) {
|
|
this.loading = true;
|
|
var that = this;
|
|
request({
|
|
url:'common/post/list',
|
|
method:'get',
|
|
data: {
|
|
current:pageNo,
|
|
size:10
|
|
}
|
|
}).then(res => {
|
|
if(res.data.code ==200){
|
|
var datas = res.data.data.records;
|
|
this.$refs.paging.complete(datas);
|
|
}else{
|
|
// this.$refs.paging.complete(null);
|
|
// that.listlength=0
|
|
}
|
|
uni.stopPullDownRefresh();
|
|
//
|
|
})
|
|
},
|
|
addCar(){
|
|
uni.navigateTo({
|
|
url: '/pages/carinfo/index'
|
|
});
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss">
|
|
.home-page{
|
|
min-height: 100vh;
|
|
background: linear-gradient(180.05deg, #3074F7 0.04%, #F4F6F8 34.07%);
|
|
box-sizing: border-box;
|
|
padding-bottom: 120rpx;
|
|
padding: 0px 28rpx;
|
|
}
|
|
.cards{
|
|
margin-top: 20rpx;
|
|
background: #fff;
|
|
border-radius: 6px;
|
|
padding: 28rpx;
|
|
}
|
|
.title{
|
|
font-size: 32rpx;
|
|
font-weight: 500;
|
|
margin-bottom: 40rpx;
|
|
}
|
|
.icons{
|
|
width: 80rpx;
|
|
height: 80rpx;
|
|
}
|
|
.grid-text{
|
|
font-size: 20rpx;
|
|
}
|
|
</style> |