fix(finance): 修复财务报表数据查询和权限控制问题

- 修复应付票据明细查询中关联核销单的SQL逻辑
- 修复应收收款明细查询中关联核销单的SQL逻辑
- 在收款对话框上传按钮添加权限控制指令
- 在收款对话框上传按钮添加权限控制指令
- 将报表中毛利字段标签从"金额"更正为"毛利"
- 注释掉业务计收时间和财务计收时间列以修复数据显示问题
dev_1.0.0
chenhao 2026-01-08 18:13:30 +08:00
parent f2cbf8f9cb
commit 74ed165f71
7 changed files with 47 additions and 45 deletions

View File

@ -97,20 +97,20 @@
</template>
</el-table-column>
<el-table-column label="已计收未税金额" align="center" prop="chargedWithoutTax" width="120" v-if="columns.chargedWithoutTax.visible" key="chargedWithoutTax"/>
<el-table-column label="金额" align="center" prop="grossProfit" width="120" v-if="columns.grossProfit.visible" key="grossProfit"/>
<el-table-column label="毛利" align="center" prop="grossProfit" width="120" v-if="columns.grossProfit.visible" key="grossProfit"/>
<el-table-column label="毛利率" align="center" prop="grossProfitRate" width="100" v-if="columns.grossProfitRate.visible" key="grossProfitRate"/>
</el-table-column>
<el-table-column label="业务计收时间" align="center" prop="bizChargeDate" width="180" v-if="columns.bizChargeDate.visible" key="bizChargeDate">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.bizChargeDate, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="财务计收时间" align="center" prop="financeChargeDate" width="180" v-if="columns.financeChargeDate.visible" key="financeChargeDate">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.financeChargeDate, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<!-- <el-table-column label="业务计收时间" align="center" prop="bizChargeDate" width="180" v-if="columns.bizChargeDate.visible" key="bizChargeDate">-->
<!-- <template slot-scope="scope">-->
<!-- <span>{{ parseTime(scope.row.bizChargeDate, '{y}-{m}-{d}') }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="财务计收时间" align="center" prop="financeChargeDate" width="180" v-if="columns.financeChargeDate.visible" key="financeChargeDate">-->
<!-- <template slot-scope="scope">-->
<!-- <span>{{ parseTime(scope.row.financeChargeDate, '{y}-{m}-{d}') }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- 应付 -->
<el-table-column label="应付单" align="center">
@ -210,8 +210,8 @@ export default {
chargedWithoutTax: { label: "已计收未税金额", visible: true },
grossProfit: { label: "毛利", visible: true },
grossProfitRate: { label: "毛利率", visible: true },
bizChargeDate: { label: "业务计收时间", visible: true },
financeChargeDate: { label: "财务计收时间", visible: true },
// bizChargeDate: { label: "", visible: true },
// financeChargeDate: { label: "", visible: true },
payableWithTax: { label: "应付含税总价", visible: true },
payableWithoutTax: { label: "应付未税总价", visible: true },
payableTax: { label: "应付税额", visible: true },

View File

@ -5,7 +5,7 @@
</div>
<div v-else class="receipt-dialog-body">
<div v-if="canUpload" class="upload-btn-container">
<el-button type="primary" icon="el-icon-upload" @click="openUploadDialog">{{ titleText }}</el-button>
<el-button type="primary" icon="el-icon-upload" v-hasPermi="['finance:receipt:upload']" @click="openUploadDialog">{{ titleText }}</el-button>
</div>
<el-timeline v-if="attachments.length > 0">

View File

@ -5,7 +5,7 @@
</div>
<div v-else class="receipt-dialog-body">
<div v-if="canUpload" class="upload-btn-container">
<el-button type="primary" icon="el-icon-upload" @click="openUploadDialog">{{ titleText }}</el-button>
<el-button type="primary" icon="el-icon-upload" v-hasPermi="['finance:receive:upload']" @click="openUploadDialog">{{ titleText }}</el-button>
</div>
<el-timeline v-if="attachments.length > 0">

View File

@ -106,20 +106,20 @@
</template>
</el-table-column>
<el-table-column label="已计收未税金额" align="center" prop="chargedWithoutTax" width="120" v-if="columns.chargedWithoutTax.visible" key="chargedWithoutTax"/>
<el-table-column label="金额" align="center" prop="grossProfit" width="120" v-if="columns.grossProfit.visible" key="grossProfit"/>
<el-table-column label="毛利" align="center" prop="grossProfit" width="120" v-if="columns.grossProfit.visible" key="grossProfit"/>
<el-table-column label="毛利率" align="center" prop="grossProfitRate" width="100" v-if="columns.grossProfitRate.visible" key="grossProfitRate"/>
</el-table-column>
<el-table-column label="业务计收时间" align="center" prop="bizChargeDate" width="180" v-if="columns.bizChargeDate.visible" key="bizChargeDate">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.bizChargeDate, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="财务计收时间" align="center" prop="financeChargeDate" width="180" v-if="columns.financeChargeDate.visible" key="financeChargeDate">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.financeChargeDate, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<!-- <el-table-column label="业务计收时间" align="center" prop="bizChargeDate" width="180" v-if="columns.bizChargeDate.visible" key="bizChargeDate">-->
<!-- <template slot-scope="scope">-->
<!-- <span>{{ parseTime(scope.row.bizChargeDate, '{y}-{m}-{d}') }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="财务计收时间" align="center" prop="financeChargeDate" width="180" v-if="columns.financeChargeDate.visible" key="financeChargeDate">-->
<!-- <template slot-scope="scope">-->
<!-- <span>{{ parseTime(scope.row.financeChargeDate, '{y}-{m}-{d}') }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- 收款 -->
<el-table-column label="收款单" align="center" >
@ -215,8 +215,8 @@ export default {
chargedWithoutTax: { label: "已计收未税金额", visible: true },
grossProfit: { label: "毛利", visible: true },
grossProfitRate: { label: "毛利率", visible: true },
bizChargeDate: { label: "业务计收时间", visible: true },
financeChargeDate: { label: "财务计收时间", visible: true },
// bizChargeDate: { label: "", visible: true },
// financeChargeDate: { label: "", visible: true },
receiptStatus: { label: "收款状态", visible: true },
receivedWithTax: { label: "已收款含税金额", visible: true },
receivedWithoutTax: { label: "已收款未税金额", visible: true },

View File

@ -136,20 +136,20 @@
</template>
</el-table-column>
<el-table-column label="已计收未税金额" align="center" prop="chargedWithoutTax" width="120" v-if="columns.chargedWithoutTax.visible" key="chargedWithoutTax"/>
<el-table-column label="金额" align="center" prop="grossProfit" width="120" v-if="columns.grossProfit.visible" key="grossProfit"/>
<el-table-column label="毛利" align="center" prop="grossProfit" width="120" v-if="columns.grossProfit.visible" key="grossProfit"/>
<el-table-column label="毛利率" align="center" prop="grossProfitRate" width="100" v-if="columns.grossProfitRate.visible" key="grossProfitRate"/>
</el-table-column>
<el-table-column label="业务计收时间" align="center" prop="bizChargeDate" width="180" v-if="columns.bizChargeDate.visible" key="bizChargeDate">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.bizChargeDate, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="财务计收时间" align="center" prop="financeChargeDate" width="180" v-if="columns.financeChargeDate.visible" key="financeChargeDate">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.financeChargeDate, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<!-- <el-table-column label="业务计收时间" align="center" prop="bizChargeDate" width="180" v-if="columns.bizChargeDate.visible" key="bizChargeDate">-->
<!-- <template slot-scope="scope">-->
<!-- <span>{{ parseTime(scope.row.bizChargeDate, '{y}-{m}-{d}') }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="财务计收时间" align="center" prop="financeChargeDate" width="180" v-if="columns.financeChargeDate.visible" key="financeChargeDate">-->
<!-- <template slot-scope="scope">-->
<!-- <span>{{ parseTime(scope.row.financeChargeDate, '{y}-{m}-{d}') }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- 收款 -->
<el-table-column label="收款单" align="center" >
@ -290,8 +290,8 @@ export default {
chargedWithoutTax: { label: "已计收未税金额", visible: true },
grossProfit: { label: "毛利", visible: true },
grossProfitRate: { label: "毛利率", visible: true },
bizChargeDate: { label: "业务计收时间", visible: true },
financeChargeDate: { label: "财务计收时间", visible: true },
// bizChargeDate: { label: "", visible: true },
// financeChargeDate: { label: "", visible: true },
receiptStatus: { label: "收款状态", visible: true },
receivedWithTax: { label: "已收款含税金额", visible: true },
receivedWithoutTax: { label: "已收款未税金额", visible: true },

View File

@ -94,8 +94,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select t1.payment_amount, t2.payable_bill_code,t2.product_type, t4.project_name, t4.project_code, t2.total_price_with_tax
from (SELECT sum(payment_amount) payment_amount,
payable_bill_id
FROM oms_payable_ticket_detail
WHERE write_off_id is null and ticket_bill_code in
FROM oms_payable_ticket_detail t1
left join oms_ticket_write_off t2 on t1.write_off_id=t2.id
WHERE (t1.write_off_id is null or t1.payment_bill_code=t2.payment_bill_code) and ticket_bill_code in
<foreach item="item" collection="list" separator="," open="(" close=")" index="">
#{item}
</foreach>

View File

@ -96,8 +96,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select t1.receipt_amount, t2.receivable_bill_code, t4.project_name, t4.project_code, t2.total_price_with_tax,t2.product_type
from (SELECT sum(receipt_amount) receipt_amount,
receivable_bill_id
FROM oms_receivable_receipt_detail
WHERE write_off_id is null and receipt_bill_code in
FROM oms_receivable_receipt_detail t1
left join oms_receivable_write_off t2 on t1.write_off_id = t2.id
WHERE (t1.write_off_id is null or t1.receipt_bill_code=t2.receipt_bill_code) and receipt_bill_code in
<foreach item="item" collection="list" separator="," open="(" close=")" index="">
#{item}
</foreach>