<!--index.wxml-->
<!-- 企业端 -->
<block wx:if="{{roles===1}}">
	<view class="iconPanel">
		<view bindtap="toHand" class="item">
			<i class="iconfont icon-fill"></i>
			<text class="text">开具</text>
		</view>
		<view bindtap="toScan" class="item">
			<i class="iconfont icon-scan"></i>
			<text class="text">扫码开具</text>
		</view>
		<view bindtap="toBuy" class="item">
			<i class="iconfont icon-qrcode"></i>
			<text class="text">购方开具</text>
		</view>
		<view bindtap="toWait" class="item">
			<i class="iconfont icon-edit2"></i>
			<text class="text">抬头开具</text>
		</view>
	</view>
	<!-- 分隔线———————————————————————————— -->
	<view class="topWrapper">
		<view bindtap="toSwitch" class="companySwitch">
			<text class="name">{{companyDefault.entName&&isLogin?companyDefault.entName:'点击登录'}}</text>
			<view class="switch">
				<text class="text">切换企业</text>
				<i class="iconfont icon-qiehuan"></i>
			</view>
		</view>
		<swiper class="swiper" indicator-dots="true" indicator-color="rgba(255, 255, 255, .3)" indicator-active-color="rgba(255, 255, 255, 1)">
			<swiper-item wx:for="{{bannerList}}" wx:key="item">
				<image class="pic" src="{{item}}"></image>
			</swiper-item>
		</swiper>
		<view class="iconList">
			<view bindtap="toSkip" data-path="{{item.path}}" wx:for="{{iconList}}" wx:key="index" class="item">
				<image class="icon" src="{{item.icon}}"></image>
				<text class="text">{{item.text}}</text>
			</view>
		</view>
	</view>
	<!-- 分隔线———————————————————————————— -->
	<view class="bottomWrapper">
		<!-- <view class="notice">
			<view class="label">
				<text class="text">圈子</text>
				<image class="icon" src="../../images/ico_notice@3x.png"></image>
			</view>
			<view wx:if="{{isLogin}}" class="content">
				<text bindtap="toDetail" data-id="{{item.msgId}}" wx:for="{{noticeList}}" wx:key="msgId" class="text">{{item.msgTitle}}</text>
			</view>
			<view wx:if="{{!isLogin}}" class="content">
				<text bindtap="toDetail" class="text">点击登录</text>
			</view>
			<view bindtap="toNotice" class="detail">详情</view>
		</view> -->
		<!-- <view class="lineGroup">
			<view class="item">
				<text class="label">抄报状态：</text>
				<view class="content">
					<text class="text blue">已抄报</text>
				</view>
			</view>
			<view class="item">
				<text class="label">清卡状态：</text>
				<view class="content">
					<text class="text green">已清卡</text>
				</view>
			</view>
		</view> -->
		<view class="totalHead">本月统计信息</view>
		<view class="lineGroup2">
			<view class="item">
				<text class="content">{{statistics.monthBluePupiaoCnt&&isLogin?statistics.monthBluePupiaoCnt:'0'}}</text>
				<text class="label">普票正数开具数量</text>
			</view>
			<view class="item">
				<text class="content">{{statistics.monthRedPupiaoCnt&&isLogin?statistics.monthRedPupiaoCnt:'0'}}</text>
				<text class="label">普票负数开具数量</text>
			</view>
		</view>
		<view class="lineGroup2">
			<view class="item">
				<text class="content">{{statistics.monthBlueZhuanpiaoCnt&&isLogin?statistics.monthBlueZhuanpiaoCnt:'0'}}</text>
				<text class="label">专票正数开具数量</text>
			</view>
			<view class="item">
				<text class="content">{{statistics.monthRedZhuanpiaoCnt&&isLogin?statistics.monthRedZhuanpiaoCnt:'0'}}</text>
				<text class="label">专票负数开具数量</text>
			</view>
		</view>
		<view class="tabWrapper">
			<view class="tabBar">
				<view bindtap="switchTab" data-index="{{0}}" class="item {{tabIndex===0?'active':''}}">普票</view>
				<view bindtap="switchTab" data-index="{{1}}" class="item {{tabIndex===1?'active':''}}">专票</view>
			</view>
			<view hidden="{{!(tabIndex===0)}}" class="tabContent">
				<view class="lineItem">
					<text class="label">实际销售金额</text>
					<text class="content">￥{{statistics.monthPupiaoAmt&&isLogin?statistics.monthPupiaoAmt:'0'}}</text>
				</view>
				<view class="lineItem">
					<text class="label">实际销项税额</text>
					<text class="content">￥{{remain.monthPupiaoTaxes&&isLogin?remain.monthPupiaoTaxes:0}}</text>
				</view>
				<view class="lineItem">
					<text class="label">销项负数金额</text>
					<text class="content">￥{{statistics.monthRedPupiaoAmt&&isLogin?statistics.monthRedPupiaoAmt:'0'}}</text>
				</view>
				<view class="lineItem">
					<text class="label">销项负数税额</text>
					<text class="content">￥{{statistics.monthRedPupiaoTaxes&&isLogin?statistics.monthRedPupiaoTaxes:'0'}}</text>
				</view>
			</view>
			<view hidden="{{!(tabIndex===1)}}" class="tabContent">
				<view class="lineItem">
					<text class="label">实际销售金额</text>
					<text class="content">￥{{statistics.monthZhuanpiaoAmt&&isLogin?statistics.monthZhuanpiaoAmt:'0'}}</text>
				</view>
				<view class="lineItem">
					<text class="label">实际销项税额</text>
					<text class="content">￥{{statistics.monthZhuanpiaoTaxes&&isLogin?statistics.monthZhuanpiaoTaxes:0}}</text>
				</view>
				<view class="lineItem">
					<text class="label">销项负数金额</text>
					<text class="content">￥{{statistics.monthRedZhuanpiaoAmt&&isLogin?statistics.monthRedZhuanpiaoAmt:'0'}}</text>
				</view>
				<view class="lineItem">
					<text class="label">销项负数税额</text>
					<text class="content">￥{{statistics.monthRedZhuanpiaoTaxes&&isLogin?statistics.monthRedZhuanpiaoTaxes:'0'}}</text>
				</view>
			</view>
		</view>
		<view class="lineGroup">
			<view class="item">
				<text class="label">网络：</text>
				<view class="content">
					<text class="text warning">已连接</text>
					<i class="iconfont icon-selected"></i>
					<!-- <i class="iconfont icon-fail"></i> -->
				</view>
			</view>
			<view class="item">
				<text class="label">税控：</text>
				<view class="content">
					<!-- <text class="text danger">已连接</text> -->
					<text class="text warning">已连接</text>
					<i class="iconfont icon-selected"></i>
				</view>
			</view>
		</view>
	</view>
</block>
<!-- 服务端 -->
<block wx:if="{{roles===2}}">
	<view class="topWrapper service">
		<view class="companySwitch">
			<text class="name">{{ispName&&isLogin?ispName:'您尚未登录'}}</text>
		</view>
		<swiper class="swiper" indicator-dots="true" indicator-color="rgba(255, 255, 255, .3)" indicator-active-color="rgba(255, 255, 255, 1)">
			<swiper-item wx:for="{{bannerList}}" wx:key="item">
				<image class="pic" src="{{item}}"></image>
			</swiper-item>
		</swiper>
		<view class="iconList">
			<view bindtap="toSkip" data-path="{{item.path}}" wx:for="{{ispList}}" wx:key="index" class="item">
				<image class="icon" src="{{item.icon}}"></image>
				<text class="text">{{item.text}}</text>
			</view>
		</view>
	</view>
	<view class="bottomWrapper">
		<view class="notice">
			<view class="label">
				<text class="text">圈子</text>
				<image class="icon" src="../../images/ico_notice@3x.png"></image>
			</view>
			<view wx:if="{{isLogin}}" class="content">
				<text bindtap="toDetail" data-id="{{item.msgId}}" wx:for="{{noticeList}}" wx:key="msgId" class="text">{{item.msgTitle}}</text>
			</view>
			<view wx:if="{{!isLogin}}" class="content">
				<text bindtap="toDetail" class="text">点击登录</text>
			</view>
			<view bindtap="toNotice" class="detail">详情</view>
		</view>
		<view class="totalHead">统计信息</view>
		<view bindtap="toBusiness" class="lineGroup2">
			<view class="item">
				<text class="content">{{statistics.onlineEntCnt&&isLogin?statistics.onlineEntCnt:'0'}}</text>
				<text class="label">在线企业数</text>
			</view>
			<view class="item">
				<text class="content">{{statistics.entCnt&&isLogin?statistics.entCnt:'0'}}</text>
				<text class="label">所有企业数</text>
			</view>
		</view>
		<view class="lineGroup2">
			<view bindtap="toServers" class="item">
				<text class="content">{{statistics.machineCnt&&isLogin?statistics.machineCnt:'0'}}</text>
				<text class="label">服务器数量</text>
			</view>
			<view class="item">
				<text class="content">{{statistics.newInitEntCnt&&isLogin?statistics.newInitEntCnt:'0'}}</text>
				<text class="label">月新增上架企业数</text>
			</view>
		</view>
		<view bindtap="toTicket" class="lineGroup2">
			<view class="item">
				<text class="content">{{statistics.monthInvoiceCnt&&isLogin?statistics.monthInvoiceCnt:'0'}}</text>
				<text class="label">月累计开票数量</text>
			</view>
			<view class="item">
				<view class="content"><text class="unit">￥</text>{{statistics.monthInvoiceAmt&&isLogin?statistics.monthInvoiceAmt:'0.00'}}</view>
				<text class="label">月累计开票金额</text>
			</view>
		</view>
	</view>
</block>
<!-- 运营端 -->
<block wx:if="{{roles===3}}">
	<view class="topWrapper service">
		<view class="companySwitch">
			<text class="name">{{operName&&isLogin?operName:'您尚未登录'}}</text>
		</view>
		<swiper class="swiper" indicator-dots="true" indicator-color="rgba(255, 255, 255, .3)" indicator-active-color="rgba(255, 255, 255, 1)">
			<swiper-item wx:for="{{bannerList}}" wx:key="item">
				<image class="pic" src="{{item}}"></image>
			</swiper-item>
		</swiper>
		<view class="iconList">
			<view bindtap="toSkip" data-path="{{item.path}}" wx:for="{{operList}}" wx:key="index" class="item">
				<image class="icon" src="{{item.icon}}"></image>
				<text class="text">{{item.text}}</text>
			</view>
		</view>
	</view>
	<view class="bottomWrapper">
		<view class="notice">
			<view class="label">
				<text class="text">圈子</text>
				<image class="icon" src="../../images/ico_notice@3x.png"></image>
			</view>
			<view wx:if="{{isLogin}}" class="content">
				<text bindtap="toDetail" data-id="{{item.msgId}}" wx:for="{{noticeList}}" wx:key="msgId" class="text">{{item.msgTitle}}</text>
			</view>
			<view wx:if="{{!isLogin}}" class="content">
				<text bindtap="toDetail" class="text">点击登录</text>
			</view>
			<view bindtap="toNotice" class="detail">详情</view>
		</view>
		<view class="totalHead">统计信息</view>
		<view class="lineGroup2">
			<view class="item">
				<text class="content">{{statistics.onlineIspCnt&&isLogin?statistics.onlineIspCnt:'0'}}</text>
				<text class="label">服务商在线数量</text>
			</view>
			<view class="item">
				<text class="content">{{statistics.ispCnt&&isLogin?statistics.ispCnt:'0'}}</text>
				<text class="label">服务商总数</text>
			</view>
		</view>
		<view class="lineGroup2">
			<view class="item">
				<text class="content">{{statistics.onlineEntCnt&&isLogin?statistics.onlineEntCnt:'0'}}</text>
				<text class="label">企业在线数量</text>
			</view>
			<view class="item">
				<text class="content">{{statistics.entCnt&&isLogin?statistics.entCnt:'0'}}</text>
				<text class="label">企业总数</text>
			</view>
		</view>
		<view class="lineGroup2">
			<view class="item">
				<text class="content">{{statistics.onlineUserCnt&&isLogin?statistics.onlineUserCnt:'0'}}</text>
				<text class="label">在线人员数量</text>
			</view>
			<view class="item">
				<view class="content">{{statistics.userCnt&&isLogin?statistics.userCnt:'0'}}</view>
				<text class="label">总注册人数</text>
			</view>
		</view>
	</view>
</block>
<tabbar-placeholder></tabbar-placeholder>