<template>
|
<!-- 工作台 -->
|
<view class="container" @click="isShow=false">
|
<!-- #ifndef H5 -->
|
<view class="status_bar"></view>
|
<!-- #endif -->
|
<view class="header">
|
<text class="font-16 dark-gray">{{userInfo.shopName}}</text>
|
<view class="flex align-center">
|
<text class="icon gray iconfont iconsousuo" @click="linkToMember"></text>
|
<text class="icon gray iconfont iconjia" @click.stop="isShow=!isShow"></text>
|
</view>
|
<popover class="popup-content" v-show="isShow">
|
<view class="popup-content-item">
|
<navigator url="../member/editMember" hover-class="none">
|
<text class="icon iconfont iconjia"></text>
|
<text class="text">新增会员</text>
|
</navigator>
|
</view>
|
<view class="popup-content-item">
|
<text class="icon iconfont iconsaomiao"></text>
|
<text class="text">扫一扫</text>
|
</view>
|
</popover>
|
</view>
|
<view class="condition flex justify-around">
|
<view class="eyes">
|
<text class="iconfont"
|
:class="isShowAssets?'iconyanjing2':'iconbiyan'"
|
@click="toggleAssets">
|
</text>
|
</view>
|
<view class="flex flex-v align-center">
|
<text class="font-17">¥ {{handleAssets(userAchieve.orderCash,userAchieve.cash)}}</text>
|
<text>今日订单</text>
|
</view>
|
<view class="flex flex-v align-center">
|
<text class="font-17">¥ {{handleAssets(userAchieve.freeConsume,userAchieve.hisConsume)}}</text>
|
<text>今日消耗</text>
|
</view>
|
<view class="flex flex-v align-center">
|
<text class="font-17">¥ {{handleAssets(userAchieve.projCommission)}}</text>
|
<text>手工提成</text>
|
</view>
|
|
</view>
|
<view class="content-item mt-10" v-if="this.$utils.hasPermission('ddgl,xfjl,linyong')">
|
<text class="title">订单</text>
|
<view class="flex align-center mt-10">
|
<view class="list-item" v-if="this.$utils.hasPermission('ddgl.add')">
|
<navigator url="./selectCustomer" hover-class="none">
|
<image class="icon" src="../../static/images/order1.png"></image>
|
<text>新建订单</text>
|
</navigator>
|
</view>
|
<template v-if="$utils.hasPermission('xfjl')">
|
<view class="list-item">
|
<navigator url="./orderList?status=1" hover-class="none">
|
<image class="icon" src="../../static/images/order2.png"></image>
|
<text>待付款</text>
|
</navigator>
|
</view>
|
<view class="list-item">
|
<navigator url="./orderList?status=2" hover-class="none">
|
<image class="icon" src="../../static/images/order3.png"></image>
|
<text>已付款</text>
|
</navigator>
|
</view>
|
</template>
|
<view class="list-item" v-if="this.$utils.hasPermission('linyong')">
|
<navigator url="./receive" hover-class="none">
|
<image class="icon" src="../../static/images/order4.png"></image>
|
<text>领用</text>
|
</navigator>
|
</view>
|
</view>
|
</view>
|
<view class="content-item mt-10" v-if="this.$utils.hasPermission('fwdgl,fwjl')">
|
<text class="title">项目/服务</text>
|
<view class="flex align-center mt-10">
|
<view class="list-item" v-if="this.$utils.hasPermission('fwdgl.add')">
|
<navigator url="./selectCustomer?type=2" hover-class="none">
|
<image class="icon" src="../../static/images/order1.png"></image>
|
<text>新建服务单</text>
|
</navigator>
|
</view>
|
<template v-if="$utils.hasPermission('fwjl')">
|
<view class="list-item">
|
<navigator url="./serviceOrderList?status=1" hover-class="none">
|
<image class="icon" src="../../static/images/sever1.png"></image>
|
<text>待确定</text>
|
</navigator>
|
</view>
|
<view class="list-item">
|
<navigator url="./serviceOrderList?status=4" hover-class="none">
|
<image class="icon" src="../../static/images/sever2.png"></image>
|
<text>待服务</text>
|
</navigator>
|
</view>
|
<view class="list-item">
|
<navigator url="./serviceOrderList?status=5" hover-class="none">
|
<image class="icon" src="../../static/images/sever3.png"></image>
|
<text>服务中</text>
|
</navigator>
|
</view>
|
</template>
|
</view>
|
</view>
|
<view class="content-item mt-10" v-if="this.$utils.hasPermission('appKanban')">
|
<text class="title">待办</text>
|
<view class="flex align-center mt-10">
|
<view class="list-item" v-if="this.$utils.hasPermission('appKanban,gjjl,notice')">
|
<navigator url="./board" hover-class="none">
|
<image class="icon" src="../../static/images/commission1.png"></image>
|
<text>看板</text>
|
</navigator>
|
</view>
|
<view class="list-item" v-if="this.$utils.hasPermission('gjjl')">
|
<navigator url="./followRecords/index" hover-class="none">
|
<image class="icon" src="../../static/images/commission2.png"></image>
|
<text>跟进记录</text>
|
</navigator>
|
</view>
|
<view class="list-item" v-if="this.$utils.hasPermission('notice')">
|
<navigator url="./" hover-class="none">
|
<image class="icon" src="../../static/images/commission3.png"></image>
|
<text>通知</text>
|
</navigator>
|
</view>
|
</view>
|
</view>
|
<view class="content-item mt-10" v-if="this.$utils.hasPermission('kccx,pandian')">
|
<text class="title">仓库</text>
|
<view class="flex align-center mt-10">
|
<view class="list-item" v-if="this.$utils.hasPermission('kccx')">
|
<navigator url="./stockSearch" hover-class="none">
|
<image class="icon" src="../../static/images/warehouse1.png"></image>
|
<text>库存查询</text>
|
</navigator>
|
</view>
|
<view class="list-item" v-if="this.$utils.hasPermission('pandian')">
|
<navigator url="./check/index" hover-class="none">
|
<image class="icon" src="../../static/images/warehouse2.png"></image>
|
<text>盘点</text>
|
</navigator>
|
</view>
|
</view>
|
</view>
|
</view>
|
</template>
|
|
<script>
|
import popover from "../../components/popover/index.vue"
|
export default{
|
components:{
|
popover
|
},
|
data(){
|
return{
|
userInfo: {},
|
userAchieve: {},
|
isShow:false,
|
isShowAssets: false
|
}
|
},
|
onShow() {
|
this.getUserAchieve();
|
this.getUserInfo();
|
},
|
onHide() {
|
this.isShow = false;
|
},
|
methods:{
|
linkToMember(){
|
getApp().globalData.isFocus = true;
|
uni.switchTab({
|
url: '../member/index'
|
});
|
},
|
getUserInfo(){
|
let roleInfo = this.$httpUtils.getRoleInfo();
|
this.userInfo = roleInfo || {};
|
},
|
getUserAchieve(){
|
this.$httpUtils.request('/api/user/findUserAchieve/1').then((res) => {
|
if(res.status == 200){
|
let {achieve} = res.mapInfo;
|
this.userAchieve = achieve || {};
|
}else{
|
this.userAchieve = {};
|
}
|
})
|
},
|
// 显示隐藏业绩
|
toggleAssets(){
|
this.isShowAssets = !this.isShowAssets;
|
},
|
handleAssets(val, val2 = 0){
|
if(this.isShowAssets){
|
return this.$filters.formatNum(val+val2);
|
}
|
return '***';
|
},
|
linkTo(val){
|
uni.navigateTo({
|
url:val
|
})
|
}
|
}
|
}
|
</script>
|
|
<style>
|
page{
|
background: #F6F6F8;
|
height: 100%;
|
}
|
|
.container{
|
padding: 0 10px;
|
min-height: 100%;
|
}
|
.header{
|
position: relative;
|
padding: 0 5px 10px;
|
display: flex;
|
align-items: center;
|
justify-content: space-between;
|
}
|
.header .icon {
|
font-size: 16px;
|
padding-left: 15px;
|
text-align: center;
|
font-family: texticons;
|
}
|
.condition{
|
position: relative;
|
background: #518EFF;
|
padding: 20px 20px;
|
border-radius: 4px;
|
font-size: 14px;
|
color: #FFFFFF;
|
line-height: 30px;
|
}
|
.condition .eyes{
|
position: absolute;
|
right: 10px;
|
top: 10px;
|
}
|
.condition .eyes .iconfont{
|
font-size: 18px;
|
}
|
.content-item{
|
background: #FFFFFF;
|
padding: 15px 0;
|
border-radius: 4px;
|
margin: 10px 0;
|
}
|
.title{
|
font-size: 14px;
|
color: #666666;
|
padding-left: 15px;
|
padding-bottom: 10px;
|
}
|
.list-item{
|
width: 25%;
|
text-align: center;
|
font-size: 12px;
|
color: #111111;
|
}
|
.list-item .icon{
|
width: 26px;
|
height: 26px;
|
display: block;
|
margin: 0 auto 10px;
|
}
|
|
.popup-content{
|
position: absolute;
|
z-index: 999;
|
right: 0;
|
top: 32px;
|
padding: 5px 0;
|
}
|
.popup-content-item{
|
padding: 0 10px;
|
color: #FFFFFF;
|
font-size: 14px;
|
}
|
.popup-content-item .icon{
|
font-size: 14px;
|
margin-right: 10px;
|
}
|
.popup-content-item .text{
|
border-bottom: 1px solid gray;
|
line-height: 38px;
|
display: inline-block;
|
}
|
.popup-content-item:nth-last-of-type(1) .text{
|
border-bottom: 0;
|
}
|
</style>
|