feat(finance): 添加提交日期筛选功能和金额汇总功能

- 在收票、红冲、付款等审批页面添加提交日期范围筛选功能
- 在财务页面表格中添加金额汇总显示功能
- 修复收票单详情页面字段显示问题
- 优化数据库查询时间范围处理逻辑
- 添加附件金额相关字段支持
dev_1.0.1
chenhao 2025-12-25 17:57:27 +08:00
parent b21c54a901
commit 389deac133
31 changed files with 594 additions and 149 deletions

View File

@ -75,3 +75,16 @@ export function revokeReceipt(id) {
method: 'put'
})
}
// 申请红冲(带附件)
export function applyRedRush(data) {
return request({
url: '/finance/ticket/applyRefund',
method: 'post',
headers: {
'Content-Type': 'multipart/form-data'
},
data: data,
needLoading: true
})
}

View File

@ -10,6 +10,17 @@
<el-form-item label="项目名称" prop="projectName">
<el-input v-model="queryParams.projectName" placeholder="请输入项目名称" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="提交日期">
<el-date-picker
v-model="dateRange"
style="width: 240px"
value-format="yyyy-MM-dd"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
></el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
@ -21,6 +32,11 @@
<el-table-column label="收票编号" align="center" prop="ticketBillCode" />
<el-table-column label="供应商" align="center" prop="vendorName" />
<el-table-column label="金额" align="center" prop="totalPriceWithTax" />
<el-table-column label="提交日期" align="center" prop="applyTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.applyTime) }}</span>
</template>
</el-table-column>
<el-table-column label="审批节点" align="center" prop="approveNode" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="200">
<template slot-scope="scope">
@ -97,6 +113,7 @@ export default {
processKey: 'fianance_ticket',
projectName: null
},
dateRange: [],
detailDialogVisible: false,
detailLoading: false,
form: {},
@ -111,7 +128,7 @@ export default {
methods: {
getList() {
this.loading = true;
listInvoiceReceiptApproved(this.queryParams).then(response => {
listInvoiceReceiptApproved(this.addDateRange(this.queryParams, this.dateRange, 'ApplyTime')).then(response => {
this.invoiceReceiptList = response.rows;
this.total = response.total;
this.loading = false;
@ -122,6 +139,7 @@ export default {
this.getList();
},
resetQuery() {
this.dateRange = [];
this.resetForm("queryForm");
this.handleQuery();
},

View File

@ -1,16 +1,17 @@
<template>
<div class="invoice-receipt-detail">
<el-descriptions title="收票单信息" :column="3" border>
<el-descriptions-item label="收票单编号">{{ data.ticketBillCode }}</el-descriptions-item>
<el-descriptions-item label="供应商名称">{{ data.vendorName }}</el-descriptions-item>
<el-descriptions-item label="票类型">
<el-descriptions-item label="采购-收票单编号">{{ data.ticketBillCode }}</el-descriptions-item>
<el-descriptions-item label="制造商名称">{{ data.vendorName }}</el-descriptions-item>
<el-descriptions-item label="类型">
<dict-tag :options="dict.type.finance_invoice_type" :value="data.ticketType"/>
</el-descriptions-item>
<el-descriptions-item label="含税总价">{{ data.totalPriceWithTax }}</el-descriptions-item>
<el-descriptions-item label="未税总价">{{ data.totalPriceWithoutTax }}</el-descriptions-item>
<el-descriptions-item label="税额">{{ data.taxAmount }}</el-descriptions-item>
<el-descriptions-item label="含税总价(元)">{{ data.totalPriceWithTax }}</el-descriptions-item>
<el-descriptions-item label="未税总价(元)">{{ data.totalPriceWithoutTax }}</el-descriptions-item>
<el-descriptions-item label="税额(元)">{{ data.taxAmount }}</el-descriptions-item>
<el-descriptions-item label="预计收票时间">{{ data.ticketTime }}</el-descriptions-item>
<el-descriptions-item label="制造商开票时间">{{ data.vendorTicketTime }}</el-descriptions-item>
<el-descriptions-item label="备注" :span="3">{{ data.remark }}</el-descriptions-item>
<!-- <el-descriptions-item label="备注" :span="3">{{ data.remark }}</el-descriptions-item>-->
</el-descriptions>
<div class="section" style="margin-top: 20px;" v-show="data.detailList && data.detailList.length>0">

View File

@ -10,6 +10,17 @@
<el-form-item label="项目名称" prop="projectName">
<el-input v-model="queryParams.projectName" placeholder="请输入项目名称" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="提交日期">
<el-date-picker
v-model="dateRange"
style="width: 240px"
value-format="yyyy-MM-dd"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
></el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
@ -35,6 +46,11 @@
<!-- <el-table-column label="项目名称" align="center" prop="projectName" />-->
<el-table-column label="金额" align="center" prop="totalPriceWithTax" />
<!-- <el-table-column label="登记人" align="center" prop="createUserName" />-->
<el-table-column label="提交日期" align="center" prop="applyTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.applyTime) }}</span>
</template>
</el-table-column>
<el-table-column label="审批节点" align="center" prop="approveNode" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="200">
<template slot-scope="scope">
@ -126,6 +142,7 @@ export default {
processKey: 'fianance_ticket',
projectName: null
},
dateRange: [],
detailDialogVisible: false,
detailLoading: false,
form: {},
@ -151,7 +168,7 @@ export default {
methods: {
getList() {
this.loading = true;
listInvoiceReceiptApprove(this.queryParams).then(response => {
listInvoiceReceiptApprove(this.addDateRange(this.queryParams, this.dateRange, 'ApplyTime')).then(response => {
this.invoiceReceiptList = response.rows;
this.total = response.total;
this.loading = false;
@ -162,6 +179,7 @@ export default {
this.getList();
},
resetQuery() {
this.dateRange = [];
this.resetForm("queryForm");
this.handleQuery();
},

View File

@ -10,6 +10,17 @@
<el-form-item label="项目名称" prop="projectName">
<el-input v-model="queryParams.projectName" placeholder="请输入项目名称" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="提交日期">
<el-date-picker
v-model="dateRange"
style="width: 240px"
value-format="yyyy-MM-dd"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
></el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
@ -22,7 +33,11 @@
<el-table-column label="供应商" align="center" prop="vendorName" />
<el-table-column label="金额" align="center" prop="totalPriceWithTax" />
<el-table-column label="提交日期" align="center" prop="applyTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.applyTime) }}</span>
</template>
</el-table-column>
<el-table-column label="审批节点" align="center" prop="approveNode" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="200">
<template slot-scope="scope">
@ -96,9 +111,10 @@ export default {
pageSize: 10,
receiptNo: null,
vendorName: null,
processKey: 'fianance_ticket_red',
processKey: 'finance_ticket_refound',
projectName: null
},
dateRange: [],
detailDialogVisible: false,
detailLoading: false,
form: {},
@ -113,7 +129,7 @@ export default {
methods: {
getList() {
this.loading = true;
listInvoiceReceiptApproved(this.queryParams).then(response => {
listInvoiceReceiptApproved(this.addDateRange(this.queryParams, this.dateRange, 'ApplyTime')).then(response => {
this.invoiceReceiptList = response.rows;
this.total = response.total;
this.loading = false;
@ -124,6 +140,7 @@ export default {
this.getList();
},
resetQuery() {
this.dateRange = [];
this.resetForm("queryForm");
this.handleQuery();
},

View File

@ -1,16 +1,17 @@
<template>
<div class="invoice-red-detail">
<el-descriptions title="红冲发票信息" :column="3" border>
<el-descriptions-item label="收票单编号">{{ data.ticketBillCode }}</el-descriptions-item>
<el-descriptions-item label="供应商名称">{{ data.vendorName }}</el-descriptions-item>
<el-descriptions-item label="票类型">
<el-descriptions-item label="采购-收票单编号">{{ data.ticketBillCode }}</el-descriptions-item>
<el-descriptions-item label="制造商名称">{{ data.vendorName }}</el-descriptions-item>
<el-descriptions-item label="类型">
<dict-tag :options="dict.type.finance_invoice_type" :value="data.ticketType"/>
</el-descriptions-item>
<el-descriptions-item label="含税总价">{{ data.totalPriceWithTax }}</el-descriptions-item>
<el-descriptions-item label="未税总价">{{ data.totalPriceWithoutTax }}</el-descriptions-item>
<el-descriptions-item label="税额">{{ data.taxAmount }}</el-descriptions-item>
<el-descriptions-item label="含税总价(元)">{{ data.totalPriceWithTax }}</el-descriptions-item>
<el-descriptions-item label="未税总价(元)">{{ data.totalPriceWithoutTax }}</el-descriptions-item>
<el-descriptions-item label="税额(元)">{{ data.taxAmount }}</el-descriptions-item>
<el-descriptions-item label="收票时间">{{ data.ticketTime }}</el-descriptions-item>
<el-descriptions-item label="制造商开票时间">{{ data.vendorTicketTime }}</el-descriptions-item>
<el-descriptions-item label="备注" :span="3">{{ data.remark }}</el-descriptions-item>
<!-- <el-descriptions-item label="备注" :span="3">{{ data.remark }}</el-descriptions-item>-->
</el-descriptions>
<div class="section" style="margin-top: 20px;" v-show="data.detailList && data.detailList.length>0">
@ -25,7 +26,7 @@
</template>
</el-table-column>
<el-table-column prop="totalPriceWithTax" label="含税总价" align="center"></el-table-column>
<el-table-column prop="paymentAmount" label="本次收票金额" align="center"></el-table-column>
<el-table-column prop="paymentAmount" label="本次红冲金额" align="center"></el-table-column>
</el-table>
</div>

View File

@ -10,6 +10,17 @@
<el-form-item label="项目名称" prop="projectName">
<el-input v-model="queryParams.projectName" placeholder="请输入项目名称" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="提交日期">
<el-date-picker
v-model="dateRange"
style="width: 240px"
value-format="yyyy-MM-dd"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
></el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
@ -35,6 +46,11 @@
<!-- <el-table-column label="项目名称" align="center" prop="projectName" />-->
<el-table-column label="金额" align="center" prop="totalPriceWithTax" />
<!-- <el-table-column label="登记人" align="center" prop="createUserName" />-->
<el-table-column label="提交日期" align="center" prop="applyTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.applyTime) }}</span>
</template>
</el-table-column>
<el-table-column label="审批节点" align="center" prop="approveNode" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="200">
<template slot-scope="scope">
@ -123,9 +139,10 @@ export default {
pageSize: 10,
receiptNo: null,
vendorName: null,
processKey: 'fianance_ticket_red',
processKey: 'finance_ticket_refound',
projectName: null
},
dateRange: [],
detailDialogVisible: false,
detailLoading: false,
form: {},
@ -139,7 +156,7 @@ export default {
opinionRules: {
approveOpinion: [{ required: true, message: '审批意见不能为空', trigger: 'blur' }],
},
processKey: 'fianance_ticket_red',
processKey: 'finance_ticket_refound',
taskId: null,
currentInvoiceReceiptId: null,
pdfExporting: false
@ -151,7 +168,7 @@ export default {
methods: {
getList() {
this.loading = true;
listInvoiceReceiptApprove(this.queryParams).then(response => {
listInvoiceReceiptApprove(this.addDateRange(this.queryParams, this.dateRange, 'ApplyTime')).then(response => {
this.invoiceReceiptList = response.rows;
this.total = response.total;
this.loading = false;
@ -162,6 +179,7 @@ export default {
this.getList();
},
resetQuery() {
this.dateRange = [];
this.resetForm("queryForm");
this.handleQuery();
},

View File

@ -10,6 +10,17 @@
<el-form-item label="项目名称" prop="projectName">
<el-input v-model="queryParams.projectName" placeholder="请输入项目名称" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="提交日期">
<el-date-picker
v-model="dateRange"
style="width: 240px"
value-format="yyyy-MM-dd"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
></el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
@ -23,6 +34,11 @@
<!-- <el-table-column label="项目名称" align="center" prop="projectName" />-->
<el-table-column label="金额" align="center" prop="totalPriceWithTax" />
<!-- <el-table-column label="汇智负责人" align="center" prop="hzUserName" />-->
<el-table-column label="提交日期" align="center" prop="applyTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.applyTime) }}</span>
</template>
</el-table-column>
<el-table-column label="审批节点" align="center" prop="approveNode" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="200">
<template slot-scope="scope">
@ -99,6 +115,7 @@ export default {
projectName: null,
processKey: 'finance_payment',
},
dateRange: [],
detailDialogVisible: false,
detailLoading: false,
form: {},
@ -113,7 +130,7 @@ export default {
methods: {
getList() {
this.loading = true;
listPaymentApproved(this.queryParams).then(response => {
listPaymentApproved(this.addDateRange(this.queryParams, this.dateRange, 'ApplyTime')).then(response => {
this.paymentList = response.rows;
this.total = response.total;
this.loading = false;
@ -124,6 +141,7 @@ export default {
this.getList();
},
resetQuery() {
this.dateRange = [];
this.resetForm("queryForm");
this.handleQuery();
},

View File

@ -1,30 +1,35 @@
<template>
<div class="payment-detail">
<el-descriptions title="付款单信息" :column="3" border>
<el-descriptions-item label="采购付款单编号">{{ data.paymentBillCode }}</el-descriptions-item>
<el-descriptions-item label="采购-付款单编号">{{ data.paymentBillCode }}</el-descriptions-item>
<el-descriptions-item label="制造商名称">{{ data.vendorName }}</el-descriptions-item>
<el-descriptions-item label="付款单类型">
<dict-tag :options="dict.type.payment_bill_type" :value="data.paymentBillType"/>
</el-descriptions-item>
<el-descriptions-item label="含税总价">{{ data.totalPriceWithTax }}</el-descriptions-item>
<el-descriptions-item label="未税总价">{{ data.totalPriceWithoutTax }}</el-descriptions-item>
<el-descriptions-item label="税额">{{ data.taxAmount }}</el-descriptions-item>
<el-descriptions-item label="方式">
<el-descriptions-item label="含税总价(元)">{{ data.totalPriceWithTax }}</el-descriptions-item>
<el-descriptions-item label="未税总价(元)">{{ data.totalPriceWithoutTax }}</el-descriptions-item>
<el-descriptions-item label="税额(元)">{{ data.taxAmount }}</el-descriptions-item>
<el-descriptions-item label="付方式">
<dict-tag :options="dict.type.payment_method" :value="data.paymentMethod"/>
</el-descriptions-item>
<el-descriptions-item label="银行账号">{{ data.payBankNumber }}</el-descriptions-item>
<el-descriptions-item label="账户名称">{{ data.payName }}</el-descriptions-item>
<el-descriptions-item label="银行开户行">{{ data.payBankOpenAddress }}</el-descriptions-item>
<el-descriptions-item label="银行行号">{{ data.bankNumber }}</el-descriptions-item>
<el-descriptions-item label="备注" :span="3">{{ data.remark }}</el-descriptions-item>
<!-- <el-descriptions-item label="备注" :span="3">{{ data.remark }}</el-descriptions-item>-->
</el-descriptions>
<div class="section" style="margin-top: 20px;" v-show="data.payableDetails && data.payableDetails.length>0">
<div class="el-descriptions__title">应付单列表</div>
<el-table :data="data.payableDetails" border style="width: 100%; margin-top: 10px;">
<el-table-column type="index" label="序号" width="50" align="center"></el-table-column>
<el-table-column prop="payableBillCode" label="采购应付单编号" align="center"></el-table-column>
<el-table-column prop="payableBillCode" label="采购-应付单编号" align="center"></el-table-column>
<el-table-column prop="projectName" label="项目名称" align="center"></el-table-column>
<el-table-column prop="productType" label="产品类型" align="center">
<template slot-scope="scope">
<dict-tag :options="dict.type.product_type" :value="scope.row.productType"/>
</template>
</el-table-column>
<el-table-column prop="totalPriceWithTax" label="含税总价" align="center"></el-table-column>
<el-table-column prop="paymentAmount" label="本次付款金额" align="center"></el-table-column>
</el-table>
@ -68,7 +73,7 @@ export default {
default: () => ({})
}
},
dicts: ['payment_bill_type', 'payment_method'],
dicts: ['payment_bill_type', 'product_type','payment_method'],
data() {
return {
attachments: [],

View File

@ -10,6 +10,17 @@
<el-form-item label="项目名称" prop="projectName">
<el-input v-model="queryParams.projectName" placeholder="请输入项目名称" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="提交日期">
<el-date-picker
v-model="dateRange"
style="width: 240px"
value-format="yyyy-MM-dd"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
></el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
@ -35,6 +46,11 @@
<!-- <el-table-column label="项目名称" align="center" prop="projectName" />-->
<el-table-column label="金额" align="center" prop="totalPriceWithTax" />
<!-- <el-table-column label="汇智负责人" align="center" prop="hzUserName" />-->
<el-table-column label="提交日期" align="center" prop="applyTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.applyTime) }}</span>
</template>
</el-table-column>
<el-table-column label="审批节点" align="center" prop="approveNode" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="200">
<template slot-scope="scope">
@ -126,6 +142,7 @@ export default {
projectName: null,
processKey: 'finance_payment',
},
dateRange: [],
detailDialogVisible: false,
detailLoading: false,
form: {},
@ -151,7 +168,7 @@ export default {
methods: {
getList() {
this.loading = true;
listPaymentApprove(this.queryParams).then(response => {
listPaymentApprove(this.addDateRange(this.queryParams, this.dateRange, 'ApplyTime')).then(response => {
this.paymentList = response.rows;
this.total = response.total;
this.loading = false;
@ -162,6 +179,7 @@ export default {
this.getList();
},
resetQuery() {
this.dateRange = [];
this.resetForm("queryForm");
this.handleQuery();
},

View File

@ -10,6 +10,17 @@
<el-form-item label="项目名称" prop="projectName">
<el-input v-model="queryParams.projectName" placeholder="请输入项目名称" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="提交日期">
<el-date-picker
v-model="dateRange"
style="width: 240px"
value-format="yyyy-MM-dd"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
></el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
@ -23,6 +34,11 @@
<!-- <el-table-column label="项目名称" align="center" prop="projectName" />-->
<el-table-column label="金额" align="center" prop="totalPriceWithTax" />
<!-- <el-table-column label="汇智负责人" align="center" prop="hzUserName" />-->
<el-table-column label="提交日期" align="center" prop="applyTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.applyTime) }}</span>
</template>
</el-table-column>
<el-table-column label="审批节点" align="center" prop="approveNode" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="200">
<template slot-scope="scope">
@ -99,6 +115,7 @@ export default {
projectName: null,
processKey: 'finance_refund',
},
dateRange: [],
detailDialogVisible: false,
detailLoading: false,
form: {},
@ -113,7 +130,7 @@ export default {
methods: {
getList() {
this.loading = true;
listPaymentApproved(this.queryParams).then(response => {
listPaymentApproved(this.addDateRange(this.queryParams, this.dateRange, 'ApplyTime')).then(response => {
this.paymentList = response.rows;
this.total = response.total;
this.loading = false;
@ -124,6 +141,7 @@ export default {
this.getList();
},
resetQuery() {
this.dateRange = [];
this.resetForm("queryForm");
this.handleQuery();
},

View File

@ -6,25 +6,30 @@
<el-descriptions-item label="付款单类型">
<dict-tag :options="dict.type.payment_bill_type" :value="data.paymentBillType"/>
</el-descriptions-item>
<el-descriptions-item label="含税总价">{{ data.totalPriceWithTax }}</el-descriptions-item>
<el-descriptions-item label="未税总价">{{ data.totalPriceWithoutTax }}</el-descriptions-item>
<el-descriptions-item label="税额">{{ data.taxAmount }}</el-descriptions-item>
<el-descriptions-item label="方式">
<el-descriptions-item label="含税总价(元)">{{ data.totalPriceWithTax }}</el-descriptions-item>
<el-descriptions-item label="未税总价(元)">{{ data.totalPriceWithoutTax }}</el-descriptions-item>
<el-descriptions-item label="税额(元)">{{ data.taxAmount }}</el-descriptions-item>
<el-descriptions-item label="付方式">
<dict-tag :options="dict.type.payment_method" :value="data.paymentMethod"/>
</el-descriptions-item>
<el-descriptions-item label="银行账号">{{ data.payBankNumber }}</el-descriptions-item>
<el-descriptions-item label="账户名称">{{ data.payName }}</el-descriptions-item>
<el-descriptions-item label="银行开户行">{{ data.payBankOpenAddress }}</el-descriptions-item>
<el-descriptions-item label="银行行号">{{ data.bankNumber }}</el-descriptions-item>
<el-descriptions-item label="备注" :span="3">{{ data.remark }}</el-descriptions-item>
<!-- <el-descriptions-item label="备注" :span="3">{{ data.remark }}</el-descriptions-item>-->
</el-descriptions>
<div class="section" style="margin-top: 20px;" v-show="data.payableDetails && data.payableDetails.length>0">
<div class="el-descriptions__title">退款明细列表</div>
<div class="el-descriptions__title">应付单信息</div>
<el-table :data="data.payableDetails" border style="width: 100%; margin-top: 10px;">
<el-table-column type="index" label="序号" width="50" align="center"></el-table-column>
<el-table-column prop="payableBillCode" label="采购应付单编号" align="center"></el-table-column>
<el-table-column prop="projectName" label="项目名称" align="center"></el-table-column>
<el-table-column prop="productType" label="产品类型" align="center">
<template slot-scope="scope">
<dict-tag :options="dict.type.product_type" :value="scope.row.productType"/>
</template>
</el-table-column>
<!-- Note: Product Type is requested but not present in reference DetailDrawer.vue. Omitting for safety or need to ask. -->
<el-table-column prop="totalPriceWithTax" label="含税总价" align="center"></el-table-column>
<el-table-column prop="paymentAmount" label="本次付款金额" align="center"></el-table-column>

View File

@ -10,6 +10,17 @@
<el-form-item label="项目名称" prop="projectName">
<el-input v-model="queryParams.projectName" placeholder="请输入项目名称" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="提交日期">
<el-date-picker
v-model="dateRange"
style="width: 240px"
value-format="yyyy-MM-dd"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
></el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
@ -35,6 +46,11 @@
<!-- <el-table-column label="项目名称" align="center" prop="projectName" />-->
<el-table-column label="金额" align="center" prop="totalPriceWithTax" />
<!-- <el-table-column label="汇智负责人" align="center" prop="hzUserName" />-->
<el-table-column label="提交日期" align="center" prop="applyTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.applyTime) }}</span>
</template>
</el-table-column>
<el-table-column label="审批节点" align="center" prop="approveNode" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="200">
<template slot-scope="scope">
@ -126,6 +142,7 @@ export default {
projectName: null,
processKey: 'finance_refund',
},
dateRange: [],
detailDialogVisible: false,
detailLoading: false,
form: {},
@ -151,7 +168,7 @@ export default {
methods: {
getList() {
this.loading = true;
listPaymentApprove(this.queryParams).then(response => {
listPaymentApprove(this.addDateRange(this.queryParams, this.dateRange, 'ApplyTime')).then(response => {
this.paymentList = response.rows;
this.total = response.total;
this.loading = false;
@ -162,6 +179,7 @@ export default {
this.getList();
},
resetQuery() {
this.dateRange = [];
this.resetForm("queryForm");
this.handleQuery();
},

View File

@ -122,7 +122,7 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="payableList" @selection-change="handleSelectionChange">
<el-table v-loading="loading" :data="payableList" show-summary :summary-method="getSummaries" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="50" />
<!-- <el-table-column label="项目编号" align="center" prop="projectCode" width="120" />-->
<el-table-column label="项目名称" align="center" prop="projectName" width="260" />
@ -396,6 +396,35 @@ export default {
this.getList(); // Refresh the list
});
},
getSummaries(param) {
const { columns, data } = param;
const sums = [];
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '合计';
return;
}
const values = data.map(item => Number(item[column.property]));
if (column.property === 'planAmount' || column.property === 'totalPriceWithTax') {
if (!values.every(value => isNaN(value))) {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr);
if (!isNaN(value)) {
return prev + curr;
} else {
return prev;
}
}, 0);
sums[index] = sums[index].toFixed(2);
} else {
sums[index] = 'N/A';
}
} else {
sums[index] = '';
}
});
return sums;
},
getPaymentDateStyle(dateStr) {
if (!dateStr) return {};

View File

@ -138,7 +138,7 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="paymentList">
<el-table v-loading="loading" :data="paymentList" show-summary :summary-method="getSummaries">
<el-table-column label="采购-付款单编号" width="200" align="center" prop="paymentBillCode"/>
<el-table-column label="预计付款时间" align="center" prop="paymentTime" width="180">
<template slot-scope="scope">
@ -474,7 +474,36 @@ export default {
this.getList();
this.$modal.msgSuccess("撤销成功");
}).catch(() => {});
}
},
getSummaries(param) {
const { columns, data } = param;
const sums = [];
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '合计';
return;
}
const values = data.map(item => Number(item[column.property]));
if (column.property === 'totalPriceWithTax') {
if (!values.every(value => isNaN(value))) {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr);
if (!isNaN(value)) {
return prev + curr;
} else {
return prev;
}
}, 0);
sums[index] = sums[index].toFixed(2);
} else {
sums[index] = 'N/A';
}
} else {
sums[index] = '';
}
});
return sums;
}
}
};
</script>

View File

@ -57,7 +57,7 @@
</div>
<div class="detail-item">
<span class="item-label">发票含税金额</span>
<span class="item-value">{{ receiptData.ticketPriceWithTax }}</span>
<span class="item-value">{{ attachment.priceWithTax||receiptData.ticketPriceWithTax }}</span>
</div>
<div class="detail-item">
<span class="item-label">未税金额</span>
@ -65,15 +65,15 @@
</div>
<div class="detail-item">
<span class="item-label">发票未税金额</span>
<span class="item-value">{{ receiptData.ticketPriceWithoutTax }}</span>
<span class="item-value">{{ attachment.priceWithoutTax||receiptData.ticketPriceWithoutTax }}</span>
</div>
<div class="detail-item">
<span class="item-label">税额</span>
<span class="item-value">{{ receiptData.taxAmount }}</span>
<span class="item-value">{{ receiptData.taxAmount }}</span>
</div>
<div class="detail-item">
<span class="item-label">发票税额</span>
<span class="item-value">{{ receiptData.ticketAmount }}</span>
<span class="item-value">{{ attachment.taxAmount || receiptData.ticketAmount }}</span>
</div>
<div class="detail-item">
<span class="item-label">备注</span>
@ -114,7 +114,7 @@
<el-col :span="12">
<el-form :model="uploadForm" ref="uploadForm" :rules="rules" label-width="120px" size="medium" >
<el-form-item label="票据类型" prop="ticketType" required>
<el-select v-model="uploadForm.ticketType" placeholder="请输入发票含税总价">
<el-select v-model="uploadForm.ticketType" placeholder="请选择票据类型">
<el-option
v-for="item in dict.type.finance_invoice_type"
:key="item.value"
@ -140,19 +140,19 @@
</div>
</el-form-item>
<el-form-item label="含税总价">
<span>{{ receiptData.totalPriceWithTax }}</span>
<span>{{ this.uploadType !== 'red_rush' ? receiptData.totalPriceWithTax : -receiptData.totalPriceWithTax}}</span>
</el-form-item>
<el-form-item label="发票含税总价" prop="ticketPriceWithTax" required>
<el-input v-model="uploadForm.ticketPriceWithTax" placeholder="请输入发票含税总价" @input="handlePriceWithTaxChange"></el-input>
</el-form-item>
<el-form-item label="未税总价">
<span>{{ receiptData.totalPriceWithoutTax }}</span>
<span>{{ this.uploadType !== 'red_rush'? receiptData.totalPriceWithoutTax : -receiptData.totalPriceWithoutTax }}</span>
</el-form-item>
<el-form-item label="发票未税总价" prop="ticketPriceWithoutTax" required>
<el-input v-model="uploadForm.ticketPriceWithoutTax" placeholder="请输入发票未税总价" @input="handlePriceWithoutTaxChange"></el-input>
</el-form-item>
<el-form-item label="税额">
<span>{{ receiptData.taxAmount }}</span>
<span>{{ this.uploadType !== 'red_rush' ? receiptData.taxAmount : -receiptData.taxAmount }}</span>
</el-form-item>
<el-form-item label="发票税额" prop="ticketAmount" required>
<el-input v-model="uploadForm.ticketAmount" placeholder="请输入发票税额" @input="handleAmountChange"></el-input>
@ -193,7 +193,7 @@
</template>
<script>
import { getReceiptAttachments, uploadReceiptAttachment } from "@/api/finance/receipt";
import { getReceiptAttachments, uploadReceiptAttachment, applyRedRush } from "@/api/finance/receipt";
import request from '@/utils/request';
export default {
@ -214,6 +214,10 @@ export default {
autoUpload: {
type: Boolean,
default: false,
},
uploadType: {
type: String,
default: 'normal'
}
},
dicts:['finance_invoice_type'],
@ -235,7 +239,7 @@ export default {
ticketPriceWithTax: [
{ required: true, message: "请输入发票含税总价", trigger: "blur" },
{ validator: (rule, value, callback) => {
if (Number(value) !== Number(this.receiptData.totalPriceWithTax)) {
if (Number(value) !== Number(this.uploadType !== 'red_rush'? this.receiptData.totalPriceWithTax : -this.receiptData.totalPriceWithTax)) {
callback(new Error('发票含税总价必须等于含税总价'));
} else {
callback();
@ -245,7 +249,7 @@ export default {
ticketPriceWithoutTax: [
{ required: true, message: "请输入发票未税总价", trigger: "blur" },
{ validator: (rule, value, callback) => {
const total = Number(this.receiptData.totalPriceWithTax);
const total = Number(this.uploadType !== 'red_rush'? this.receiptData.totalPriceWithoutTax : -this.receiptData.totalPriceWithTax);
const val = Number(value);
if (total > 0 && val < 0) {
callback(new Error('发票未税总价不能小于0'));
@ -259,7 +263,7 @@ export default {
ticketAmount: [
{ required: true, message: "请输入发票税额", trigger: "blur" },
{ validator: (rule, value, callback) => {
const total = Number(this.receiptData.totalPriceWithTax);
const total = Number(this.uploadType !== 'red_rush'? this.receiptData.totalPriceWithTax : -this.receiptData.totalPriceWithTax);
const val = Number(value);
if (total > 0 && val < 0) {
callback(new Error('发票税额不能小于0'));
@ -306,7 +310,9 @@ export default {
watch: {
visible(val) {
if (val && this.receiptData) {
this.fetchAttachments();
if (this.uploadType !== 'red_rush') {
this.fetchAttachments();
}
if (this.autoUpload) {
setTimeout(() => {
this.openUploadDialog();
@ -377,10 +383,10 @@ export default {
// New Upload Dialog Methods
openUploadDialog() {
this.uploadForm = {
ticketPriceWithTax: this.receiptData.totalPriceWithTax,
ticketPriceWithoutTax: this.receiptData.totalPriceWithoutTax,
ticketAmount: this.receiptData.taxAmount,
ticketType: '',
ticketPriceWithTax: this.uploadType !== 'red_rush' ? this.receiptData.totalPriceWithTax : -this.receiptData.totalPriceWithTax,
ticketPriceWithoutTax: this.uploadType !== 'red_rush' ? this.receiptData.totalPriceWithoutTax : -this.receiptData.totalPriceWithoutTax,
ticketAmount: this.uploadType !== 'red_rush' ? this.receiptData.taxAmount : -this.receiptData.taxAmount,
ticketType: this.receiptData.ticketType,
remark: '',
file: null
};
@ -410,6 +416,9 @@ export default {
this.uploadDialogVisible = false;
this.uploadForm.file = null;
this.previewUrl = '';
if (this.uploadType === 'red_rush') {
this.dialogVisible = false;
}
},
handleFileChange(file) {
const isLt2M = file.size / 1024 / 1024 < 2;
@ -449,18 +458,29 @@ export default {
formData.append("ticketPriceWithTax", this.uploadForm.ticketPriceWithTax);
// formData.append("totalPriceWithoutTax", this.uploadForm.totalPriceWithoutTax);
formData.append("ticketPriceWithoutTax", this.uploadForm.ticketPriceWithoutTax);
formData.append("ticketAmount", this.uploadForm.ticketAmount);
// formData.append("taxAmount", this.uploadForm.taxAmount);
formData.append("ticketType", this.uploadForm.ticketType);
uploadReceiptAttachment(formData)
.then(response => {
this.$message.success("上传成功");
this.closeUploadDialog();
this.fetchAttachments();
})
.catch(error => {
this.$message.error("上传失败");
});
if (this.uploadType === 'red_rush') {
applyRedRush(formData).then(response => {
this.$message.success("申请红冲成功");
this.closeUploadDialog();
this.$emit('refresh');
}).catch(error => {
this.$message.error("申请红冲失败");
});
} else {
uploadReceiptAttachment(formData)
.then(response => {
this.$message.success("上传成功");
this.closeUploadDialog();
this.fetchAttachments();
})
.catch(error => {
this.$message.error("上传失败");
});
}
}
});

View File

@ -25,9 +25,9 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="制造商名称" prop="vendorCode">
<el-form-item label="制造商名称" prop="vendorName">
<el-input
v-model="queryParams.vendorCode"
v-model="queryParams.vendorName"
placeholder="请输入制造商名称"
clearable
@keyup.enter.native="handleQuery"
@ -42,12 +42,12 @@
/>
</el-form-item>
<el-form-item label="收票单类型" prop="receiptBillType">
<el-select v-model="queryParams.receiptBillType" placeholder="请选择收票单类型" clearable>
<el-option v-for="dict in dict.type.receipt_bill_type" :key="dict.value" :label="dict.label" :value="dict.value"></el-option>
<el-select v-model="queryParams.ticketBillType" placeholder="请选择收票单类型" clearable>
<el-option v-for="dict in dict.type.ticket_bill_type" :key="dict.value" :label="dict.label" :value="dict.value"></el-option>
</el-select>
</el-form-item>
<el-form-item label="收票状态" prop="receiptStatus">
<el-select v-model="queryParams.receiptStatus" placeholder="请选择收票状态" clearable>
<el-form-item label="收票状态" prop="ticketStatus">
<el-select v-model="queryParams.ticketStatus" placeholder="请选择收票状态" clearable>
<el-option
v-for="dict in dict.type.receipt_status"
:key="dict.value"
@ -127,7 +127,7 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="receiptList">
<el-table v-loading="loading" :data="receiptList" show-summary :summary-method="getSummaries">
<el-table-column label="采购-收票单编号" align="center" prop="ticketBillCode" />
<!-- <el-table-column label="预计收票时间" align="center" prop="ticketTime" width="180">-->
<!-- <template slot-scope="scope">-->
@ -230,7 +230,7 @@
<!-- 新增弹窗 -->
<add-form :visible.sync="addOpen" :dicts="dict.type" @submit="handleAddSubmit"></add-form>
<!-- 收票附件弹窗 -->
<receipt-dialog :visible.sync="receiptOpen" :receipt-data="currentRow" :dicts="dict.type" :auto-upload="autoUpload"></receipt-dialog>
<receipt-dialog :visible.sync="receiptOpen" :receipt-data="currentRow" :dicts="dict.type" :auto-upload="autoUpload" :upload-type="uploadType" @refresh="getList"></receipt-dialog>
</div>
</template>
@ -249,7 +249,7 @@ export default {
AddForm,
ReceiptDialog
},
dicts:['receipt_bill_type','approve_status','receipt_status'],
dicts:['ticket_bill_type','approve_status','receipt_status'],
data() {
return {
//
@ -269,9 +269,9 @@ export default {
ticketBillCode: null,
vendorCode: null,
payableBillCode: null,
receiptBillType: null,
ticketBillType: null,
approveStatus: null,
receiptStatus: null,
ticketStatus: null,
approveNode: null,
},
//
@ -286,13 +286,43 @@ export default {
//
receiptOpen: false,
currentRow: {},
autoUpload: false
autoUpload: false,
uploadType: 'normal'
};
},
created() {
this.getList();
},
methods: {
getSummaries(param) {
const { columns, data } = param;
const sums = [];
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '合计';
return;
}
const values = data.map(item => Number(item[column.property]));
if (['totalPriceWithTax', 'totalPriceWithoutTax', 'taxAmount'].includes(column.property)) {
if (!values.every(value => isNaN(value))) {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr);
if (!isNaN(value)) {
return prev + curr;
} else {
return prev;
}
}, 0);
sums[index] = sums[index].toFixed(2);
} else {
sums[index] = '0.00';
}
} else {
sums[index] = '';
}
});
return sums;
},
addDateRange,
getList() {
this.loading = true;
@ -348,16 +378,19 @@ export default {
this.currentRow = row;
this.receiptOpen = true;
this.autoUpload = false;
this.uploadType = 'normal';
},
handleApplyInvoice(row) {
this.currentRow = row;
this.receiptOpen = true;
this.autoUpload = true;
this.uploadType = 'invoice';
},
handleApplyRedRush(row) {
this.currentRow = row;
this.receiptOpen = true;
this.autoUpload = true;
this.uploadType = 'red_rush';
},
/** 退回按钮操作 */
handleReturn(row) {

View File

@ -32,7 +32,7 @@
v-model="payableDateRange"
style="width: 100%"
value-format="yyyy-MM-dd HH:mm:ss"
type="daterange"
type="datetimerange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
@ -68,7 +68,7 @@
v-model="paymentDateRange"
style="width: 100%"
value-format="yyyy-MM-dd HH:mm:ss"
type="daterange"
type="datetimerange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
@ -380,8 +380,8 @@ export default {
this.payableQueryParams.payableBillCode = this.queryParams.payableBillCode;
this.payableQueryParams.params = {};
if (null != this.payableDateRange && '' != this.payableDateRange) {
this.payableQueryParams.params["beginTime"] = this.payableDateRange[0];
this.payableQueryParams.params["endTime"] = this.payableDateRange[1];
this.payableQueryParams.createTimeStart = this.payableDateRange[0];
this.payableQueryParams.createTimeEnd = this.payableDateRange[1];
}
this.paymentQueryParams.vendorName = this.queryParams.vendorName;

View File

@ -49,8 +49,8 @@
<el-date-picker
v-model="dateRange"
style="width: 240px"
value-format="yyyy-MM-dd"
type="daterange"
value-format="yyyy-MM-dd HH:mm:ss"
type="datetimerange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
@ -103,12 +103,12 @@
icon="el-icon-view"
@click="handleDetail(scope.row)"
>查看详情</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
>反核销</el-button>
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-delete"-->
<!-- @click="handleDelete(scope.row)"-->
<!-- >反核销</el-button>-->
</template>
</el-table-column>
</el-table>

View File

@ -17,23 +17,21 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="采购收票单编号" prop="receiptBillCode">
<el-form-item label="采购收票单编号" prop="ticketBillCode">
<el-input
v-model="queryParams.receiptBillCode"
v-model="queryParams.ticketBillCode"
placeholder="请输入采购收票单编号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="制造商名称" prop="vendorName">
<el-select v-model="queryParams.vendorName" placeholder="请选择制造商名称" clearable filterable>
<el-option
v-for="item in vendorOptions"
:key="item.vendorName"
:label="item.vendorName"
:value="item.vendorName"
/>
</el-select>
<el-input
v-model="queryParams.vendorName"
placeholder="请输入制造商名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="核销类型" prop="writeOffType">
<el-select v-model="queryParams.writeOffType" placeholder="请选择核销类型" clearable>
@ -49,8 +47,8 @@
<el-date-picker
v-model="dateRange"
style="width: 240px"
value-format="yyyy-MM-dd"
type="daterange"
value-format="yyyy-MM-dd HH:mm:ss"
type="datetimerange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
@ -103,12 +101,12 @@
icon="el-icon-view"
@click="handleDetail(scope.row)"
>查看详情</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
>反核销</el-button>
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-delete"-->
<!-- @click="handleDelete(scope.row)"-->
<!-- >反核销</el-button>-->
</template>
</el-table-column>
</el-table>

View File

@ -170,7 +170,7 @@ private IOmsFinAttachmentService omsFinAttachmentService;
*/
@PostMapping("/applyRefund")
@ResponseBody
public AjaxResult applyRefund(@RequestParam("id")OmsTicketBill ticketBill, @RequestParam("file") MultipartFile file) {
public AjaxResult applyRefund(OmsTicketBill ticketBill, @RequestParam("file") MultipartFile file) {
try {
return omsTicketBillService.applyRefund(ticketBill,file);
} catch (Exception e) {

View File

@ -1,12 +1,15 @@
package com.ruoyi.sip.domain;
import lombok.AccessLevel;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import java.math.BigDecimal;
import java.util.List;
/**
@ -51,6 +54,19 @@ public class OmsFinAttachment extends BaseEntity
/** 删除标志0代表存在 2代表删除 */
private String delFlag;
private String createByName;
private BigDecimal priceWithTax;
private BigDecimal priceWithoutTax;
@Setter(AccessLevel.NONE)
@Getter(AccessLevel.NONE)
private BigDecimal taxAmount;
public BigDecimal getTaxAmount() {
if (null != priceWithTax && null != priceWithoutTax){
return priceWithTax.subtract(priceWithoutTax);
}else{
return null;
}
}
@Getter
public enum RelatedBillTypeEnum {

View File

@ -38,6 +38,7 @@ public class OmsPayableTicketWriteOff extends BaseEntity
/** 收票单编号 */
@Excel(name = "收票单编号")
private String ticketBillCode;
private String payableBillCode;
private List<String> ticketBillCodeList;
/** 供应商编码 */

View File

@ -38,6 +38,7 @@ public class OmsPayableWriteOff extends BaseEntity
/** 付款单编号 */
@Excel(name = "付款单编号")
private String paymentBillCode;
private String payableBillCode;
private List<String> paymentBillCodeList;
/** 供应商编码 */

View File

@ -13,6 +13,7 @@ import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.ShiroUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.file.FileUploadUtils;
import com.ruoyi.common.utils.spring.SpringUtils;
import com.ruoyi.sip.domain.*;
import com.ruoyi.sip.domain.dto.PaymentBillPayableDetailDTO;
import com.ruoyi.sip.dto.WriteOffTicketRequestDto;
@ -163,9 +164,9 @@ public class OmsTicketBillServiceImpl implements IOmsTicketBillService, TodoComm
if (omsTicketBill == null) {
return AjaxResult.error("收票单不存在");
}
if (omsTicketBill.getTotalPriceWithTax().compareTo(bill.getTicketPriceWithTax()) != 0){
return AjaxResult.error("票据金额不一致");
}
// if (omsTicketBill.getTotalPriceWithTax().compareTo(bill.getTicketPriceWithTax()) != 0){
// return AjaxResult.error("票据金额不一致");
// }
if (file.isEmpty())
{
@ -178,7 +179,8 @@ public class OmsTicketBillServiceImpl implements IOmsTicketBillService, TodoComm
SysUser loginUser = ShiroUtils.getSysUser();
attachment.setPriceWithoutTax(bill.getTicketPriceWithoutTax());
attachment.setPriceWithTax(bill.getTicketPriceWithTax());
attachment.setFileName(file.getOriginalFilename());
attachment.setFilePath(fileName);
attachment.setFileSize(file.getSize());
@ -212,7 +214,9 @@ public class OmsTicketBillServiceImpl implements IOmsTicketBillService, TodoComm
@Override
public AjaxResult applyRefund(OmsTicketBill ticketBill, MultipartFile file) {
// 1. 验证原始付款单
OmsTicketBill originalBill = selectOmsTicketBillById(ticketBill.getOriginalBillId());
Long originId = ticketBill.getId();
ticketBill.setId(null);
OmsTicketBill originalBill = selectOmsTicketBillById(originId);
if (originalBill == null) {
return AjaxResult.error("原始付款单不存在");
}
@ -233,7 +237,7 @@ public class OmsTicketBillServiceImpl implements IOmsTicketBillService, TodoComm
refundBill.setTicketTime(originalBill.getTicketTime());
refundBill.setVendorTicketTime(originalBill.getVendorTicketTime());
refundBill.setVendorCode(originalBill.getVendorCode());
refundBill.setOriginalBillId(originId);
refundBill.setTicketBillCode(generateTicketBillCode());
refundBill.setTicketType(originalBill.getTicketType());
// 设置新属性
@ -260,7 +264,7 @@ public class OmsTicketBillServiceImpl implements IOmsTicketBillService, TodoComm
//上传文件 再开启流程
try {
omsFinAttachmentService.uploadAttachment(file, refundBill.getId(), OmsFinAttachment.RelatedBillTypeEnum.INVOICE);
SpringUtils.getAopProxy(this).uploadReceipt(refundBill,file);
} catch (Exception e) {
throw new RuntimeException(e.getMessage());
}
@ -407,10 +411,10 @@ public class OmsTicketBillServiceImpl implements IOmsTicketBillService, TodoComm
//1:修改状态
OmsTicketBill updateBill = new OmsTicketBill();
updateBill.setApproveStatus(ApproveStatusEnum.WAIT_COMMIT.getCode());
updateBill.setTicketStatus(OmsTicketBill.TicketStatusEnum.WAIT_TICKET.getCode());
updateBill.setId(existBill.getId());
omsTicketBillMapper.revokeTicket(updateBill);
//2:删除对应的文件
omsFinAttachmentService.deleteOmsFinAttachment(Collections.singletonList(existBill.getId()), OmsFinAttachment.RelatedBillTypeEnum.INVOICE.getCode());
} else {
//红冲撤销
deleteOmsTicketBillById(id);
@ -420,6 +424,8 @@ public class OmsTicketBillServiceImpl implements IOmsTicketBillService, TodoComm
ticketBill.setRefundStatus(OmsTicketBill.RefundStatusEnum.WAIT_REFUNDED.getCode());
updateOmsTicketBill(ticketBill);
}
//2:删除对应的文件
omsFinAttachmentService.deleteOmsFinAttachment(Collections.singletonList(existBill.getId()), OmsFinAttachment.RelatedBillTypeEnum.INVOICE.getCode());
return null;

View File

@ -48,6 +48,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach>
</if>
<if test="vendorCode != null and vendorCode != ''"> and t1.vendor_code = #{vendorCode}</if>
<if test="payableBillCode != null and payableBillCode != ''"> and t1.id in (
select write_off_id from oms_payable_payment_detail t1 left join oms_payable_bill t2 on t1.payable_bill_id=t2.id where t2.payable_bill_code=#{payableBillCode}
) </if>
<if test="vendorName != null and vendorName != ''"> and t2.vendor_name = #{vendorName}</if>
<if test="(params.beginTime != null and params.beginTime != '') or (params.endTime != null and params.endTime!='')">
<choose>
<when test="(params.beginTime != null and params.beginTime != '') and (params.endTime != null and params.endTime!='')">
and t1.create_time between #{params.beginTime} and #{params.endTime}
</when>
<when test="(params.beginTime != null and params.beginTime != '')">
and t1.create_time <![CDATA[ >= ]]> #{params.beginTime}
</when>
<when test="(params.endTime != null and params.endTime!='')">
and t1.create_time <![CDATA[ <= ]]> #{params.endTime}
</when>
</choose>
</if>
</where>
</select>
<select id="selectMaxCodeByPrefix" resultType="java.lang.Integer">

View File

@ -18,11 +18,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
<result property="delFlag" column="del_flag" />
<result property="priceWithTax" column="price_with_tax" />
<result property="priceWithoutTax" column="price_without_tax" />
</resultMap>
<sql id="selectOmsFinAttachmentVo">
select t1.id, t1.related_bill_id, t1.related_bill_type, t1.file_name, t1.file_path, t1.file_size, t1.file_type,
t1.create_by, t1.create_time, t1.update_by, t1.update_time, t1.remark, t1.del_flag
t1.create_by, t1.create_time, t1.update_by, t1.update_time, t1.remark, t1.del_flag,
t1.price_with_tax, t1.price_without_tax
,t2.user_name as create_by_name
from oms_fin_attachment t1
left join sys_user t2 on t1.create_by=t2.user_id
@ -66,6 +69,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateTime != null">update_time,</if>
<if test="remark != null">remark,</if>
<if test="delFlag != null">del_flag,</if>
<if test="priceWithTax != null">price_with_tax,</if>
<if test="priceWithoutTax != null">price_without_tax,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="relatedBillId != null">#{relatedBillId},</if>
@ -80,6 +85,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateTime != null">#{updateTime},</if>
<if test="remark != null">#{remark},</if>
<if test="delFlag != null">#{delFlag},</if>
<if test="priceWithTax != null">#{priceWithTax},</if>
<if test="priceWithoutTax != null">#{priceWithoutTax},</if>
</trim>
</insert>
@ -98,6 +105,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="priceWithTax != null">price_with_tax = #{priceWithTax},</if>
<if test="priceWithoutTax != null">price_without_tax = #{priceWithoutTax},</if>
</trim>
where id = #{id}
</update>

View File

@ -146,14 +146,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createTimeStart != null or createTimeEnd != null">
<choose>
<when test="createTimeStart != null and createTimeEnd != null">
and t1.create_time between date_format(#{createTimeStart}, '%Y-%m-%d 00:00:00') and
date_format(#{createTimeEnd}, '%Y-%m-%d 23:59:59')
and t1.create_time between #{createTimeStart} and #{createTimeEnd}
</when>
<when test="createTimeStart != null">
and t1.create_time <![CDATA[ >= ]]> date_format(#{createTimeStart}, '%Y-%m-%d 00:00:00')
and t1.create_time <![CDATA[ >= ]]> #{createTimeStart}
</when>
<when test="createTimeEnd != null">
and t1.create_time <![CDATA[ <= ]]> date_format(#{createTimeEnd}, '%Y-%m-%d 23:59:59')
and t1.create_time <![CDATA[ <= ]]>#{createTimeEnd}
</when>
</choose>

View File

@ -142,7 +142,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</if>
<if test="paymentStatus != null and paymentStatus != ''">and pb.payment_status = #{paymentStatus}</if>
<if test="approveStatus != null and approveStatus != ''">and pb.approve_status = #{approveStatus}</if>
<if test="approveNode != null and approveNode != ''">and pb.approve_node = #{approveNode}</if>
<if test="approveTime != null ">and date_format(pb.approve_time,'%Y-%m-%d') =
date_format(#{approveTime},'%Y-%m-%d')
</if>
@ -174,6 +173,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</choose>
</if>
<if test="(params.beginTime != null and params.beginTime != '') or (params.endTime != null and params.endTime!='')">
<choose>
<when test="(params.beginTime != null and params.beginTime != '') and (params.endTime != null and params.endTime!='')">
and pb.create_time between #{params.beginTime} and #{params.endTime}
</when>
<when test="(params.beginTime != null and params.beginTime != '')">
and pb.create_time <![CDATA[ >= ]]> #{params.beginTime}
</when>
<when test="(params.endTime != null and params.endTime!='')">
and pb.create_time <![CDATA[ <= ]]> #{params.endTime}
</when>
</choose>
</if>
<if test="(params.beginActualPaymentTime != null and params.beginActualPaymentTime != '') or (params.endActualPaymentTime != null and params.endActualPaymentTime!='')">
<choose>
<when test="(params.beginActualPaymentTime != null and params.beginActualPaymentTime != '') and (params.endActualPaymentTime != null and params.endActualPaymentTime!='')">
@ -464,6 +477,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="entity.actualPaymentTime != null "> and date_format(pb.actual_payment_time,'%Y-%m-%d') = date_format(#{entity.actualPaymentTime},'%Y-%m-%d')</if>
<if test="entity.paymentMethod != null and entity.paymentMethod != ''"> and pb.payment_method = #{entity.paymentMethod}</if>
<if test="entity.payableBillCode != null and entity.payableBillCode != ''"> and apb.payable_bill_code like concat('%', #{entity.payableBillCode}, '%')</if>
<if test="entity.payableBillCode != null and entity.payableBillCode != ''"> and apb.payable_bill_code like concat('%', #{entity.payableBillCode}, '%')</if>
<if test="entity.params.beginApplyTime != null or entity.params.endApplyTime != null">
<choose>
<when test="entity.params.beginApplyTime != null and entity.params.endApplyTime != null">
and t3.apply_time between date_format(#{entity.params.beginApplyTime}, '%Y-%m-%d 00:00:00') and
date_format(#{entity.params.endApplyTime}, '%Y-%m-%d 23:59:59')
</when>
<when test="entity.params.beginApplyTime != null">
and t3.apply_time <![CDATA[ >= ]]> date_format(#{entity.params.beginApplyTime}, '%Y-%m-%d 00:00:00')
</when>
<when test="entity.params.endApplyTime != null">
and t3.apply_time <![CDATA[ <= ]]> date_format(#{entity.params.endApplyTime}, '%Y-%m-%d 23:59:59')
</when>
</choose>
</if>
and pb.del_flag = '0'
</where>
</select>

View File

@ -78,6 +78,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateTime != null">
and t1.update_time = #{updateTime}
</if>
<if test="payableBillCode != null and payableBillCode != ''"> and t1.id in (
select write_off_id from oms_payable_ticket_detail t1 left join oms_payable_bill t2 on t1.payable_bill_id=t2.id where t2.payable_bill_code=#{payableBillCode}
) </if>
<if test="vendorName != null and vendorName != ''"> and t2.vendor_name = #{vendorName}</if>
<if test="(params.beginTime != null and params.beginTime != '') or (params.endTime != null and params.endTime!='')">
<choose>
<when test="(params.beginTime != null and params.beginTime != '') and (params.endTime != null and params.endTime!='')">
and t1.create_time between #{params.beginTime} and #{params.endTime}
</when>
<when test="(params.beginTime != null and params.beginTime != '')">
and t1.create_time <![CDATA[ >= ]]> #{params.beginTime}
</when>
<when test="(params.endTime != null and params.endTime!='')">
and t1.create_time <![CDATA[ <= ]]> #{params.endTime}
</when>
</choose>
</if>
</where>
</select>

View File

@ -27,12 +27,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="approveNode" column="approve_node" />
<result property="approveTime" column="approve_time" />
<result property="refundStatus" column="refund_status" />
<result property="originalBillId" column="original_bill_id" />
</resultMap>
<sql id="selectOmsTicketBillVo">
select t1.id, t1.ticket_bill_code, t1.ticket_type, t1.ticket_bill_type, t1.vendor_ticket_time, t1.ticket_time, t1.vendor_code,
t1.total_price_with_tax, t1.total_price_without_tax, t1.ticket_price_with_tax, t1.ticket_price_without_tax, t1.tax_rate, t1.create_by, t1.create_time, t1.update_by,
t1.update_time, t1.remark, t1.del_flag, t1.actual_ticket_time, t1.ticket_status, t1.approve_status, t1.approve_node, t1.approve_time, t1.refund_status
t1.update_time, t1.remark, t1.del_flag, t1.actual_ticket_time, t1.ticket_status, t1.approve_status, t1.approve_node, t1.approve_time, t1.refund_status,t1.original_bill_id
,t2.vendor_name
from oms_ticket_bill t1
left join oms_vendor_info t2 on t1.vendor_code=t2.vendor_code
@ -42,7 +43,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="selectOmsTicketBillVo"/>
<where>
<if test="ticketBillCode != null and ticketBillCode != ''">
and ticket_bill_code = #{ticketBillCode}
and t1.ticket_bill_code = #{ticketBillCode}
</if>
<if test="projectCode != null and projectCode != ''">
and t1.ticket_bill_code in (
@ -63,63 +64,105 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
)
</if>
<if test="ticketBillCodeList != null and ticketBillCodeList.size>0">
and ticket_bill_code in <foreach item="item" collection="ticketBillCodeList" separator="," open="(" close=")" index="">
and t1.ticket_bill_code in <foreach item="item" collection="ticketBillCodeList" separator="," open="(" close=")" index="">
#{item}
</foreach>
</if>
<if test="ticketType != null and ticketType != ''">
and ticket_type = #{ticketType}
and t1.ticket_type = #{ticketType}
</if>
<if test="ticketBillType != null and ticketBillType != ''">
and ticket_bill_type = #{ticketBillType}
and t1.ticket_bill_type = #{ticketBillType}
</if>
<if test="vendorCode != null and vendorCode != ''">
and vendor_code = #{vendorCode}
and t1.vendor_code = #{vendorCode}
</if>
<if test="vendorName != null and vendorName != ''">
and t2.vendor_name = #{vendorName}
</if>
<if test="totalPriceWithTax != null">
and total_price_with_tax = #{totalPriceWithTax}
and t1.total_price_with_tax = #{totalPriceWithTax}
</if>
<if test="totalPriceWithoutTax != null">
and total_price_without_tax = #{totalPriceWithoutTax}
and t1.total_price_without_tax = #{totalPriceWithoutTax}
</if>
<if test="taxRate != null">
and tax_rate = #{taxRate}
and t1.tax_rate = #{taxRate}
</if>
<if test="createBy != null and createBy != ''">
and create_by = #{createBy}
and t1.create_by = #{createBy}
</if>
<if test="createTime != null">
and create_time = #{createTime}
and t1.create_time = #{createTime}
</if>
<if test="updateBy != null and updateBy != ''">
and update_by = #{updateBy}
and t1.update_by = #{updateBy}
</if>
<if test="updateTime != null">
and update_time = #{updateTime}
and t1.update_time = #{updateTime}
</if>
<if test="remark != null and remark != ''">
and remark like concat('%', #{remark}, '%')
and t1.remark like concat('%', #{remark}, '%')
</if>
<if test="delFlag != null and delFlag != ''">
and del_flag = #{delFlag}
and t1.del_flag = #{delFlag}
</if>
<if test="actualTicketTime != null">
and actual_ticket_time = #{actualTicketTime}
and t1.actual_ticket_time = #{actualTicketTime}
</if>
<if test="ticketStatus != null and ticketStatus != ''">
and ticket_status = #{ticketStatus}
and t1.ticket_status = #{ticketStatus}
</if>
<if test="approveStatus != null and approveStatus != ''">
and approve_status = #{approveStatus}
and t1.approve_status = #{approveStatus}
</if>
<if test="approveNode != null and approveNode != ''">
and approve_node = #{approveNode}
and t1.ticket_bill_code in
(
select business_key from bu_todo where approve_user_name like concat('%', #{approveNode}, '%') and process_key in (
'finance_ticket_refound','fianance_ticket')
)
</if>
<if test="payableBillCode != null and payableBillCode != ''">and t1.ticket_bill_code in (
select ticket_bill_code from oms_payable_ticket_detail t1 left join oms_payable_bill t2 on
t1.payable_bill_id=t2.id
where t2.payable_bill_code=#{payableBillCode}
)
</if>
<if test="(params.beginApproveTime != null and params.beginApproveTime != '') or (params.endApproveTime != null and params.endApproveTime!='')">
<choose>
<when test="(params.beginApproveTime != null and params.beginApproveTime != '') and (params.endApproveTime != null and params.endApproveTime!='')">
and t1.approve_time between #{params.beginApproveTime} and #{params.endApproveTime}
</when>
<when test="(params.beginApproveTime != null and params.beginApproveTime != '')">
and t1.approve_time <![CDATA[ >= ]]> #{params.beginApproveTime}
</when>
<when test="(params.endApproveTime != null and params.endApproveTime!='')">
and t1.approve_time <![CDATA[ <= ]]> #{params.endApproveTime}
</when>
</choose>
</if>
<if test="(params.beginVendorTicketTime != null and params.beginVendorTicketTime != '') or (params.endVendorTicketTime != null and params.endVendorTicketTime!='')">
<choose>
<when test="(params.beginVendorTicketTime != null and params.beginVendorTicketTime != '') and (params.endVendorTicketTime != null and params.endVendorTicketTime!='')">
and t1.vendor_ticket_time between #{params.beginVendorTicketTime} and #{params.endVendorTicketTime}
</when>
<when test="(params.beginVendorTicketTime != null and params.beginVendorTicketTime != '')">
and t1.vendor_ticket_time <![CDATA[ >= ]]> #{params.beginVendorTicketTime}
</when>
<when test="(params.endVendorTicketTime != null and params.endVendorTicketTime!='')">
and t1.vendor_ticket_time <![CDATA[ <= ]]> #{params.endVendorTicketTime}
</when>
</choose>
</if>
<if test="approveTime != null">
and approve_time = #{approveTime}
and t1.approve_time = #{approveTime}
</if>
<if test="refundStatus != null and refundStatus != ''">
and refund_status = #{refundStatus}
and t1.refund_status = #{refundStatus}
</if>
</where>
</select>
@ -195,6 +238,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="refundStatus != null and refundStatus != ''">
refund_status,
</if>
<if test="originalBillId != null and originalBillId != ''">
original_bill_id,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="ticketBillCode != null and ticketBillCode != ''">
@ -260,6 +306,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="refundStatus != null and refundStatus != ''">
#{refundStatus},
</if>
<if test="originalBillId != null and originalBillId != ''">
#{originalBillId},
</if>
</trim>
</insert>
@ -335,6 +384,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="refundStatus != null and refundStatus != ''">
refund_status = #{refundStatus},
</if>
<if test="originalBillId != null and originalBillId != ''">
original_bill_id = #{originalBillId},
</if>
</trim>
where id = #{id}
</update>
@ -408,6 +460,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="refundStatus != null and refundStatus != ''">
refund_status = #{refundStatus},
</if>
<if test="originalBillId != null and originalBillId != ''">
original_bill_id = #{originalBillId},
</if>
</trim>
where ticket_bill_code = #{ticketBillCode}
</update>
@ -425,6 +480,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<update id="revokeTicket">
update oms_ticket_bill
set approve_status =#{approveStatus},
ticket_status =#{ticketStatus},
ticket_price_with_tax=null,
ticket_price_without_tax=null,
total_price_with_tax=null
@ -519,6 +575,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="entity.refundStatus != null and entity.refundStatus != ''">
and t1.refund_status = #{entity.refundStatus}
</if>
<if test="entity.params.beginApplyTime != null or entity.params.endApplyTime != null">
<choose>
<when test="entity.params.beginApplyTime != null and entity.params.endApplyTime != null">
and t3.apply_time between date_format(#{entity.params.beginApplyTime}, '%Y-%m-%d 00:00:00') and
date_format(#{entity.params.endApplyTime}, '%Y-%m-%d 23:59:59')
</when>
<when test="entity.params.beginApplyTime != null">
and t3.apply_time <![CDATA[ >= ]]> date_format(#{entity.params.beginApplyTime}, '%Y-%m-%d 00:00:00')
</when>
<when test="entity.params.endApplyTime != null">
and t3.apply_time <![CDATA[ <= ]]> date_format(#{entity.params.endApplyTime}, '%Y-%m-%d 23:59:59')
</when>
</choose>
</if>
</where>
</select>
<select id="selectOmsTicketBillByCode" resultType="com.ruoyi.sip.domain.OmsTicketBill">