<template>
	<view class="entry">
		<view class="section">
			<view class="section-title">资金报表</view>
			<view class="grid">
				<view class="btn" @click="go('sale','customer')">利润统计</view>
				<view class="btn" @click="go('sale','product')">营业员统计</view>
				<view class="btn" @click="go('sale','customer')">经营业绩</view>
			</view>
		</view>
		<view class="section">
			<view class="section-title">进销存报表</view>
			<view class="grid">
				<view class="btn" @click="go('sale','customer')">销售统计</view>
				<view class="btn" @click="go('purchase','supplier')">进货统计</view>
				<view class="btn" @click="go('inventory','qty')">库存统计</view>
				<view class="btn" @click="go('arap','ar')">应收对账单</view>
				<view class="btn" @click="go('arap','ap')">应付对账单</view>
			</view>
		</view>
	</view>
</template>

<script>
export default {
	methods: {
		go(mode, dim) {
			const q = `mode=${encodeURIComponent(mode)}&dim=${encodeURIComponent(dim||'')}`
			uni.navigateTo({ url: `/pages/report/index?${q}` })
		}
	}
}
</script>

<style>
.entry { padding: 20rpx; }
.section { margin-bottom: 24rpx; }
.section-title { background:#f1f4f8; color:#6a7a8a; padding: 14rpx 16rpx; border-radius: 12rpx; font-weight: 700; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18rpx; padding: 18rpx 6rpx 0; }
.btn { text-align: center; padding: 18rpx 8rpx; border: 1rpx solid #e5e9ef; border-radius: 12rpx; color:#333; background: #fff; }
.btn:active { background: #f6f8fa; }
</style>


