feat(finance): 优化财务模块界面显示和业务逻辑

- 添加paymentRedLog路由用于付款退款审批日志
- 统一各审批页面底部编号显示格式,移除冗余标签文字
- 为金额列添加红色样式高亮显示
- 优化审批状态标签颜色显示,根据状态值动态设置标签类型
- 修复收票单详情页面跳转路径错误
- 在各财务单据详情页添加标题标识
- 优化发票详情页金额显示颜色
- 修复发票单据数据更新时时间字段处理逻辑
- 优化供应商信息回填逻辑,避免覆盖已有数据
- 完善退款流程中的单据状态检查
- 修复收票单红冲功能中的业务逻辑错误
- 更新付款单详情页显示字段
- 添加技术方案会审分隔区域
- 修复附件获取类型参数错误
dev_1.0.0
chenhao 2026-01-08 15:51:33 +08:00
parent d1e23c58ef
commit 0dfdeee19d
33 changed files with 137 additions and 57 deletions

View File

@ -99,6 +99,11 @@ export const constantRoutes = [
component: () => import('@/views/approve/finance/payment/approved/index'),
hidden: true
},
{
path: 'paymentRedLog',
component: () => import('@/views/approve/finance/paymentRefund/approved/index'),
hidden: true
},
{
path: 'invoiceRedLog',
component: () => import('@/views/approve/finance/invoiceRed/approved/index'),

View File

@ -63,7 +63,7 @@
<ApproveLayout ref="approveLayout" title="收票单详情">
<invoice-receipt-detail :data="form"></invoice-receipt-detail>
<template #footer>
<span>收票编号: {{ form.invoiceBillCode }}</span>
<span> {{ form.ticketBillCode }}</span>
</template>
</ApproveLayout>
</div>

View File

@ -1,5 +1,6 @@
<template>
<div class="invoice-receipt-detail">
<div style="text-align: center;font-weight:bold;font-size: 25px;">收票申请单</div>
<el-descriptions title="收票单信息" :column="3" border>
<el-descriptions-item label="采购-收票单编号">{{ data.ticketBillCode }}</el-descriptions-item>
<el-descriptions-item label="制造商名称">{{ data.vendorName }}</el-descriptions-item>

View File

@ -77,7 +77,7 @@
<ApproveLayout ref="approveLayout" title="收票单详情">
<invoice-receipt-detail :data="form"></invoice-receipt-detail>
<template #footer>
<span>收票编号: {{ form.invoiceBillCode }}</span>
<span>{{ form.ticketBillCode }}</span>
</template>
</ApproveLayout>
</div>

View File

@ -64,7 +64,7 @@
<ApproveLayout ref="approveLayout" title="红冲发票详情">
<invoice-red-detail :data="form"></invoice-red-detail>
<template #footer>
<span>收票编号: {{ form.receiptBillCode }}</span>
<span> {{ form.ticketBillCode }}</span>
</template>
</ApproveLayout>
</div>

View File

@ -1,14 +1,15 @@
<template>
<div class="invoice-red-detail">
<div style="text-align: center;font-weight:bold;font-size: 25px;">红冲收票申请单</div>
<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="票据类型">
<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="含税总价(元)"><span style="color: red">{{ data.totalPriceWithTax }} </span></el-descriptions-item>
<el-descriptions-item label="未税总价(元)"><span style="color: red">{{ data.totalPriceWithTax }}</span></el-descriptions-item>
<el-descriptions-item label="税额(元)"><span style="color: red">{{ data.taxAmount }} </span></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>-->

View File

@ -44,7 +44,11 @@
<el-table-column label="收票编号" align="center" prop="ticketBillCode" />
<el-table-column label="供应商" align="center" prop="vendorName" />
<!-- <el-table-column label="项目名称" align="center" prop="projectName" />-->
<el-table-column label="金额" align="center" prop="totalPriceWithTax" />
<el-table-column label="金额" align="center" prop="totalPriceWithTax" >
<template slot-scope="scope">
<span style="color: red">{{ scope.row.totalPriceWithTax }}</span>
</template>
</el-table-column>
<!-- <el-table-column label="登记人" align="center" prop="createUserName" />-->
<el-table-column label="提交日期" align="center" prop="applyTime" width="180">
<template slot-scope="scope">
@ -77,7 +81,7 @@
<ApproveLayout ref="approveLayout" title="红冲发票详情">
<invoice-red-detail :data="form"></invoice-red-detail>
<template #footer>
<span>收票编号: {{ form.ticketBillCode }}</span>
<span> {{ form.ticketBillCode }}</span>
</template>
</ApproveLayout>
</div>

View File

@ -77,7 +77,7 @@
<el-card>
<h4>{{ log.approveOpinion }}</h4>
<p><b>操作人:</b> {{ log.approveUserName }} </p>
<p><b>审批状态:</b> <el-tag size="small">{{ getStatusText(log.approveStatus) }}</el-tag></p>
<p><b>审批状态:</b><el-tag :type="log.approveStatus == '3' ? 'success' : log.approveStatus == '2' ? 'danger' : 'info'">{{ getStatusText(log.approveStatus) }}</el-tag></p>
</el-card>
</el-timeline-item>
</el-timeline>

View File

@ -4,8 +4,11 @@
<el-descriptions title="付款单信息" :column="3" border>
<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 label="付款条件">
{{data.payType==='0'?'入库付款':'出库付款'}}
</el-descriptions-item>
<el-descriptions-item label="付款周期">
{{data.payConfigDay}}
</el-descriptions-item>
<el-descriptions-item label="含税总价(元)">{{ data.totalPriceWithTax }}</el-descriptions-item>
<el-descriptions-item label="未税总价(元)">{{ data.totalPriceWithoutTax }}</el-descriptions-item>

View File

@ -89,7 +89,10 @@
<el-card>
<h4>{{ log.approveOpinion }}</h4>
<p><b>操作人:</b> {{ log.approveUserName }} </p>
<p><b>审批状态:</b> <el-tag size="small">{{ getStatusText(log.approveStatus) }}</el-tag></p>
<p><b>审批状态:</b>
<el-tag :type="log.approveStatus == '3' ? 'success' : log.approveStatus == '2' ? 'danger' : 'info'">{{ getStatusText(log.approveStatus) }}</el-tag></p>
</el-card>
</el-timeline-item>
</el-timeline>

View File

@ -32,7 +32,11 @@
<el-table-column label="付款编号" align="center" prop="paymentBillCode" />
<el-table-column label="制造商" align="center" prop="vendorName" />
<!-- <el-table-column label="项目名称" align="center" prop="projectName" />-->
<el-table-column label="金额" align="center" prop="totalPriceWithTax" />
<el-table-column label="金额" align="center" prop="totalPriceWithTax" >
<template slot-scope="scope">
<span style="color: red">{{ scope.row.totalPriceWithTax }}</span>
</template>
</el-table-column>
<!-- <el-table-column label="汇智负责人" align="center" prop="hzUserName" />-->
<el-table-column label="提交日期" align="center" prop="applyTime" width="180">
<template slot-scope="scope">

View File

@ -1,14 +1,18 @@
<template>
<div class="payment-refund-detail">
<el-descriptions title="付款退款单信息" :column="3" border>
<div style="text-align: center;font-weight:bold;font-size: 25px;">退款申请单</div>
<el-descriptions title="付款单信息" :column="3" border>
<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 label="付款条件">
{{data.payType==='0'?'入库付款':'出库付款'}}
</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.payConfigDay}}
</el-descriptions-item>
<el-descriptions-item label="含税总价(元)"><span style="color: red">{{ data.totalPriceWithTax }}</span></el-descriptions-item>
<el-descriptions-item label="未税总价(元)"><span style="color: red">{{ data.totalPriceWithoutTax }}</span></el-descriptions-item>
<el-descriptions-item label="税额(元)"><span style="color: red">{{ data.taxAmount }}</span></el-descriptions-item>
<el-descriptions-item label="支付方式">
<dict-tag :options="dict.type.payment_method" :value="data.paymentMethod"/>
</el-descriptions-item>
@ -48,7 +52,7 @@ export default {
default: () => ({})
}
},
dicts: ['payment_bill_type', 'payment_method']
dicts: ['payment_bill_type', 'payment_method','product_type']
};
</script>

View File

@ -44,7 +44,11 @@
<el-table-column label="付款编号" align="center" prop="paymentBillCode" />
<el-table-column label="制造商" align="center" prop="vendorName" />
<!-- <el-table-column label="项目名称" align="center" prop="projectName" />-->
<el-table-column label="金额" align="center" prop="totalPriceWithTax" />
<el-table-column label="金额" align="center" prop="totalPriceWithTax" >
<template slot-scope="scope">
<span style="color: red">{{ scope.row.totalPriceWithTax }}</span>
</template>
</el-table-column>
<!-- <el-table-column label="汇智负责人" align="center" prop="hzUserName" />-->
<el-table-column label="提交日期" align="center" prop="applyTime" width="180">
<template slot-scope="scope">
@ -184,7 +188,7 @@ export default {
this.handleQuery();
},
toApproved() {
this.$router.push( '/approve/paymentLog' )
this.$router.push( '/approve/paymentRedLog' )
},
handleApprove(row) {
this.resetDetailForm();

View File

@ -65,7 +65,7 @@
<ApproveLayout ref="approveLayout" title="收款单详情">
<receipt-detail :data="form"></receipt-detail>
<template #footer>
<span>收款编号: {{ form.receiptBillCode }}</span>
<span>{{ form.receiptBillCode }}</span>
</template>
</ApproveLayout>
</div>

View File

@ -1,5 +1,6 @@
<template>
<div class="receipt-detail">
<div style="text-align: center;font-weight:bold;font-size: 25px;">收款申请单</div>
<el-descriptions title="收款单信息" :column="3" border>
<el-descriptions-item label="销售-收款单编号">{{ data.receiptBillCode }}</el-descriptions-item>
<el-descriptions-item :span="2" label="进货商名称">{{ data.partnerName }}</el-descriptions-item>

View File

@ -65,7 +65,7 @@
<ApproveLayout ref="approveLayout" title="收款单详情">
<receipt-detail :data="form"></receipt-detail>
<template #footer>
<span>收款编号: {{ form.receiptBillCode }}</span>
<span> {{ form.receiptBillCode }}</span>
</template>
</ApproveLayout>
</div>

View File

@ -1,14 +1,15 @@
<template>
<div class="receipt-detail">
<div style="text-align: center;font-weight:bold;font-size: 25px;">退款申请单</div>
<el-descriptions title="收款单信息" :column="3" border>
<el-descriptions-item label="销售-收款单编号">{{ data.receiptBillCode }}</el-descriptions-item>
<el-descriptions-item :span="2" label="进货商名称">{{ data.partnerName }}</el-descriptions-item>
<!-- <el-descriptions-item label="收款单类型">-->
<!-- <dict-tag :options="dict.type.receipt_bill_type" :value="data.receiptBillType"/>-->
<!-- </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="含税总价(元)"><span style="color: red">{{ data.totalPriceWithTax }}</span></el-descriptions-item>
<el-descriptions-item label="未税总价(元)"><span style="color: red">{{ data.totalPriceWithoutTax }}</span></el-descriptions-item>
<el-descriptions-item label="税额(元)"><span style="color: red">{{ data.taxAmount }}</span></el-descriptions-item>
<el-descriptions-item label="支付方式">
<dict-tag :options="dict.type.payment_method" :value="data.receiptMethod"/>
</el-descriptions-item>

View File

@ -44,7 +44,11 @@
<el-table-column label="收款编号" align="center" prop="receiptBillCode" />
<el-table-column label="进货商" align="center" prop="partnerName" />
<!-- <el-table-column label="项目名称" align="center" prop="projectName" />-->
<el-table-column label="金额" align="center" prop="totalPriceWithTax" />
<el-table-column label="金额" align="center" prop="totalPriceWithTax" >
<template slot-scope="scope">
<span style="color: red">{{ scope.row.totalPriceWithTax }}</span>
</template>
</el-table-column>
<!-- <el-table-column label="汇智负责人" align="center" prop="hzUserName" />-->
<el-table-column label="提交日期" align="center" prop="applyTime" width="180">
<template slot-scope="scope">

View File

@ -63,7 +63,7 @@
<ApproveLayout ref="approveLayout" title="开票单详情">
<receivable-invoice-detail :data="form"></receivable-invoice-detail>
<template #footer>
<span>开票编号: {{ form.invoiceBillCode }}</span>
<span>{{ form.invoiceBillCode }}</span>
</template>
</ApproveLayout>
</div>

View File

@ -1,5 +1,6 @@
<template>
<div class="invoice-detail">
<div style="text-align: center;font-weight:bold;font-size: 25px;">开票申请单</div>
<el-descriptions title="开票单信息" :column="3" border>
<el-descriptions-item label="销售-开票单编号">{{ data.invoiceBillCode }}</el-descriptions-item>
<el-descriptions-item :span="2" label="进货商">{{ data.partnerName }}</el-descriptions-item>

View File

@ -67,7 +67,7 @@
<ApproveLayout ref="approveLayout" title="开票单详情">
<receivable-invoice-detail :data="form"></receivable-invoice-detail>
<template #footer>
<span>开票编号: {{ form.invoiceBillCode }}</span>
<span>{{ form.invoiceBillCode }}</span>
</template>
</ApproveLayout>
</div>

View File

@ -1,5 +1,6 @@
<template>
<div class="invoice-detail">
<div style="text-align: center;font-weight:bold;font-size: 25px;">红冲开票申请单</div>
<el-descriptions title="开票单信息" :column="3" border>
<el-descriptions-item label="销售-开票单编号">{{ data.invoiceBillCode }}</el-descriptions-item>
<el-descriptions-item :span="2" label="进货商">{{ data.partnerName }}</el-descriptions-item>

View File

@ -325,7 +325,7 @@ export default {
fetchAttachments() {
if (!this.receiptData.id) return;
this.loading = true;
getReceiptAttachments(this.receiptData.id, { type: 'receipt' })
getReceiptAttachments(this.receiptData.id, { type: 'ticket' })
.then(response => {
const data = response.data || [];
data.sort((a, b) => new Date(b.createTime) - new Date(a.createTime));

View File

@ -140,9 +140,21 @@
</template>
</el-table-column>
<el-table-column label="制造商名称" align="center" prop="vendorName" />
<el-table-column label="含税总价(元)" align="center" prop="totalPriceWithTax" />
<el-table-column label="未税总价(元)" align="center" prop="totalPriceWithoutTax" />
<el-table-column label="税额(元)" align="center" prop="taxAmount" />
<el-table-column label="含税总价(元)" align="center" prop="totalPriceWithTax" >
<template slot-scope="scope">
<span :style="scope.row.totalPriceWithTax<0?{color:'red'}:{}">{{ scope.row.totalPriceWithTax }}</span>
</template>
</el-table-column>
<el-table-column label="未税总价(元)" align="center" prop="totalPriceWithoutTax" >
<template slot-scope="scope">
<span :style="scope.row.totalPriceWithoutTax<0?{color:'red'}:{}">{{ scope.row.totalPriceWithoutTax }}</span>
</template>
</el-table-column>
<el-table-column label="税额(元)" align="center" prop="taxAmount" >
<template slot-scope="scope">
<span :style="scope.row.taxAmount<0?{color:'red'}:{}">{{ scope.row.taxAmount }}</span>
</template>
</el-table-column>
<!-- <el-table-column label="收票单类型" align="center" prop="ticketBillType" >-->
<!-- <template slot-scope="scope">-->
<!-- <dict-tag :options="dict.type.ticket_bill_type" :value="scope.row.ticketBillType"/>-->

View File

@ -137,7 +137,7 @@
size="mini"
type="text"
icon="el-icon-edit"
v-show="scope.row.unreceivedAmount!==0"
v-show="scope.row.uninvoicedAmount!==0"
@click="handleGeneratedInvoice(scope.row)"
v-hasPermi="['finance:invoice:generate']"
>生成收票单</el-button>

View File

@ -173,7 +173,7 @@
size="mini"
type="text"
icon="el-icon-money"
v-show="scope.row.receiptBillType==='FROM_RECEIVABLE' && scope.row.receiptStatus==='1' && scope.row.approveStatus==='0'"
v-show=" scope.row.receiptStatus==='1' && scope.row.approveStatus==='0'"
@click="handleApplyPayment(scope.row)"
>申请收款</el-button>
<el-button

View File

@ -185,6 +185,12 @@
</el-form-item>
</el-col>
</el-row>
<el-divider content-position="left" style="margin-top: 40px">
<h3 style="font-weight: bold">技术方案会审</h3>
</el-divider>
<el-form-item label="项目简述" prop="projectDesc">
<el-input v-model="form.projectDesc" type="textarea" readonly />
</el-form-item>

View File

@ -201,6 +201,9 @@
</el-form-item>
</el-col>
</el-row>
<el-divider content-position="left" style="margin-top: 40px">
<h3 style="font-weight: bold">技术方案会审</h3>
</el-divider>
<el-form-item label="项目简述" prop="projectDesc">
<el-input v-model="form.projectDesc" type="textarea" placeholder="请输入项目简述" maxlength="500" :disabled="isFormDisabled" />
</el-form-item>

View File

@ -639,9 +639,10 @@ public class OmsInvoiceBillServiceImpl implements IOmsInvoiceBillService, TodoCo
List<String> row = new ArrayList<>();
row.add(String.valueOf(integer.getAndIncrement()));
row.add(item.getBuyerName());
row.add(item.getBuyerCreditCode());
row.add(item.getBuyerAddress());
row.add("开户行:"+item.getBuyerBank()+"\n"+"账号:"+item.getBuyerBankAccount());
row.add(Optional.ofNullable(item.getBuyerCreditCode()).orElse(""));
row.add(Optional.ofNullable(item.getBuyerAddress()).orElse(""));
row.add("开户行:"+Optional.ofNullable(item.getBuyerBank()).orElse("")+"\n"+"账号:"
+Optional.ofNullable(item.getBuyerBankAccount()).orElse(""));
row.add("");
row.add(item.getProductName());
row.add(item.getProductModel());

View File

@ -70,6 +70,7 @@ public class OmsPayablePaymentDetailServiceImpl implements IOmsPayablePaymentDet
OmsPayablePaymentDetail temp = new OmsPayablePaymentDetail();
BeanUtil.copyProperties(payablePaymentDetail,temp);
temp.setId(null);
temp.setWriteOffId(null);
temp.setPayableDetailType(OmsPayablePaymentDetail.PayableDetailTypeEnum.REFUND.getCode());
temp.setPaymentBillCode(payableBillCode);
temp.setCreateBy(ShiroUtils.getUserId().toString());

View File

@ -104,12 +104,24 @@ public class OmsPaymentBillServiceImpl implements IOmsPaymentBillService , TodoC
{
VendorInfo vendorInfo = vendorInfoService.selectVendorInfoByVendorCode(omsPaymentBill.getVendorCode());
omsPaymentBill.setCreateBy(ShiroUtils.getUserId().toString());
if (StrUtil.isEmpty(omsPaymentBill.getPayName())) {
omsPaymentBill.setPayName(vendorInfo.getPayName());
}
if (StrUtil.isEmpty(omsPaymentBill.getPayBankNumber())) {
omsPaymentBill.setPayBankNumber(vendorInfo.getPayBankNumber());
}
if (StrUtil.isEmpty(omsPaymentBill.getPayBankOpenAddress())) {
omsPaymentBill.setPayBankOpenAddress(vendorInfo.getPayBankOpenAddress());
}
if (StrUtil.isEmpty(omsPaymentBill.getBankNumber())) {
omsPaymentBill.setBankNumber(vendorInfo.getBankNumber());
}
if (StrUtil.isEmpty(omsPaymentBill.getPaymentStatus())) {
omsPaymentBill.setPaymentStatus(OmsPaymentBill.PaymentStatusEnum.WAIT_PAYMENT.getCode());
}
if (StrUtil.isEmpty(omsPaymentBill.getApproveStatus())) {
omsPaymentBill.setApproveStatus(ApproveStatusEnum.WAIT_COMMIT.getCode());
}
omsPaymentBill.setPaymentBillCode(generatePaymentBillCode());
omsPaymentBill.setCreateTime(DateUtils.getNowDate());
if (omsPaymentBill.getPaymentTime() == null) {
@ -406,9 +418,9 @@ public class OmsPaymentBillServiceImpl implements IOmsPaymentBillService , TodoC
originalBill.setRefundStatus(OmsPaymentBill.RefundStatusEnum.REFUNDED.getCode());
updateOmsPaymentBill(originalBill);
//4 创建付款明细
detailService.applyRefund(originalBill.getPayableBillCode(),refundBill.getPayableBillCode());
detailService.applyRefund(originalBill.getPaymentBillCode(),refundBill.getPaymentBillCode());
//5. 开始退款审批流程
todoService.startProcessDeleteBefore(originalBill.getPaymentBillCode(), originalBill.getPaymentBillCode(),
todoService.startProcessDeleteBefore(refundBill.getPaymentBillCode(), refundBill.getPaymentBillCode(),
new HashMap<String, Object>() {{
put("applyUserName", ShiroUtils.getSysUser().getUserName());
put("applyUser", ShiroUtils.getUserId());
@ -476,6 +488,9 @@ public class OmsPaymentBillServiceImpl implements IOmsPaymentBillService , TodoC
return AjaxResult.error("付款单不存在,请刷新后重试");
}
if (OmsPaymentBill.PaymentBillTypeEnum.REFUND.getCode().equals(existBill.getPaymentBillType())){
if (OmsPaymentBill.PaymentStatusEnum.REFUNDED.getCode().equals(existBill.getPaymentStatus())){
return AjaxResult.error("该退款单已退款成功,无法撤销");
}
// 撤销退款单
deleteOmsPaymentBillById(existBill.getId());
detailService.deleteByPaymentCode(existBill.getPaymentBillCode());
@ -484,6 +499,9 @@ public class OmsPaymentBillServiceImpl implements IOmsPaymentBillService , TodoC
omsPaymentBill.setRefundStatus(OmsPaymentBill.RefundStatusEnum.WAIT_REFUNDED.getCode());
updateOmsPaymentBill(omsPaymentBill);
}else{
if (OmsPaymentBill.PaymentStatusEnum.PAYMENT.getCode().equals(existBill.getPaymentStatus())){
return AjaxResult.error("该退款单已付款成功,无法撤销");
}
// 撤销付款单
paymentBill.setApproveStatus(ApproveStatusEnum.WAIT_COMMIT.getCode());
omsPaymentBillMapper.revoke(paymentBill);

View File

@ -218,13 +218,13 @@ public class OmsTicketBillServiceImpl implements IOmsTicketBillService, TodoComm
ticketBill.setId(null);
OmsTicketBill originalBill = selectOmsTicketBillById(originId);
if (originalBill == null) {
return AjaxResult.error("原始付款单不存在");
return AjaxResult.error("原始收票单不存在");
}
if (!OmsTicketBill.TicketStatusEnum.TICKET.getCode().equals(originalBill.getTicketStatus())) {
return AjaxResult.error("只有已收票的订单才能申请红冲");
return AjaxResult.error("只有已收票的数据才能申请红冲");
}
if (OmsTicketBill.RefundStatusEnum.REFUNDED.getCode().equals(originalBill.getRefundStatus())) {
return AjaxResult.error("该付款单已申请过红冲,请勿重复操作");
return AjaxResult.error("该收票单已申请过红冲,请勿重复操作");
}
// 2. 创建新的退款单
@ -242,7 +242,7 @@ public class OmsTicketBillServiceImpl implements IOmsTicketBillService, TodoComm
refundBill.setTicketType(originalBill.getTicketType());
// 设置新属性
refundBill.setTicketBillType(OmsTicketBill.TicketBillTypeEnum.RED_RUSH.getCode());
refundBill.setTicketStatus(OmsTicketBill.TicketStatusEnum.TICKET.getCode());
refundBill.setTicketStatus(OmsTicketBill.TicketStatusEnum.WAIT_RED_RUSH.getCode());
refundBill.setRefundStatus(OmsTicketBill.RefundStatusEnum.REFUNDED.getCode());
refundBill.setApproveStatus(ApproveStatusEnum.WAIT_APPROVE.getCode());
refundBill.setTicketPriceWithoutTax(ticketBill.getTicketPriceWithoutTax());

View File

@ -462,9 +462,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateBy != null and updateBy != ''">
update_by = #{updateBy},
</if>
<if test="updateTime != null">
update_time = #{updateTime},
</if>
<if test="remark != null and remark != ''">
remark = #{remark},
</if>
@ -520,6 +518,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="invoiceApplyUser != null and invoiceApplyUser != ''">
invoice_apply_user = #{invoiceApplyUser},
</if>
update_time = now()
</trim>
where id = #{id}
</update>
@ -545,6 +545,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="refundStatus != null and refundStatus != ''">
refund_status = #{refundStatus},
</if>
update_time = now()
</trim>
where invoice_bill_code = #{invoiceBillCode}
</update>
@ -561,14 +562,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
approve_status=#{approveStatus},
invoice_type=#{invoiceType},
remark=#{remark},
update_time=#{updateTime}
update_time=now()
where invoice_bill_code = #{invoiceBillCode}
</update>
<update id="clearApprove">
update oms_invoice_bill
set approve_status=#{approveStatus},
approve_time=null
approve_time=null,
update_time=now()
where id = #{id}
</update>
<update id="updateReturnWriteOffBatch">
@ -643,7 +645,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="selectMaxCodeByPrefix" resultType="java.lang.Integer">
select COALESCE(MAX(CAST(SUBSTRING(invoice_bill_code, #{codePrefix.length() + 1}) AS UNSIGNED)), 0)
select ifnull(max(SUBSTR(invoice_bill_code FROM LENGTH(#{codePrefix}) + 1 FOR 4)), 0)
from oms_invoice_bill
where invoice_bill_code LIKE CONCAT(#{codePrefix}, '%')
</select>