This commit is contained in:
2025-09-20 13:00:53 +08:00
parent 9b107d665a
commit d857eca39f
12 changed files with 89 additions and 64 deletions

View File

@@ -152,6 +152,11 @@
uni.navigateTo({ url: '/pages/product/list' })
return
}
if (item.key === 'sale') {
// 进入开单页并预选“销售-出货”
uni.navigateTo({ url: '/pages/order/create?biz=sale&type=out' })
return
}
if (item.key === 'customer') {
uni.navigateTo({ url: '/pages/customer/select' })
return
@@ -165,6 +170,21 @@
uni.navigateTo({ url: '/pages/supplier/select' })
return
}
if (item.key === 'purchase') {
// 进入开单页并预选“进货-进货”
uni.navigateTo({ url: '/pages/order/create?biz=purchase&type=in' })
return
}
if (item.key === 'report') {
// 直接进入报表页
uni.navigateTo({ url: '/pages/report/index' })
return
}
if (item.key === 'otherPay') {
// 进入开单页并预选“其他支出”
uni.navigateTo({ url: '/pages/order/create?biz=expense' })
return
}
uni.showToast({ title: item.title + '(开发中)', icon: 'none' })
},
goProduct() {
@@ -181,7 +201,7 @@
},
goReport() {
this.activeTab = 'report'
uni.navigateTo({ url: '/pages/report/entry' })
uni.navigateTo({ url: '/pages/report/index' })
},
goMe() {
this.activeTab = 'me'

View File

@@ -201,9 +201,22 @@
return Number(p.cash||0) + Number(p.bank||0) + Number(p.wechat||0)
}
},
onLoad() {
this.fetchCategories()
},
onLoad(query) {
try {
const biz = query && query.biz
const type = query && query.type
if (biz === 'sale' || biz === 'purchase' || biz === 'income' || biz === 'expense') {
this.biz = biz
}
if (this.biz === 'sale' && (type === 'out' || type === 'return' || type === 'collect')) {
this.saleType = type
}
if (this.biz === 'purchase' && (type === 'in' || type === 'return' || type === 'pay')) {
this.purchaseType = type
}
} catch(e) {}
this.fetchCategories()
},
onShow() {
if (this.biz === 'sale') {
if (this.order.customerId && this.order.customerId !== this._lastCustomerId) {

View File

@@ -1,44 +0,0 @@
<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>