fix:应付单列表(发起付款、发起收票)添加备注信息
parent
268c56e7ce
commit
d1910e2497
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<el-dialog title="合并发起付款单" :visible.sync="dialogVisible" width="80%" :close-on-click-modal="false" @close="handleClose" append-to-body>
|
<el-dialog :title="title" :visible.sync="dialogVisible" width="80%" :close-on-click-modal="false" @close="handleClose" append-to-body>
|
||||||
<div class="dialog-body">
|
<div class="dialog-body">
|
||||||
<el-form ref="form" :model="form" :inline="true" label-width="120px">
|
<el-form ref="form" :model="form" :inline="true" label-width="120px">
|
||||||
<el-row>
|
<el-row>
|
||||||
|
|
@ -31,6 +31,11 @@
|
||||||
<!-- </el-form-item>-->
|
<!-- </el-form-item>-->
|
||||||
<!-- </el-col>-->
|
<!-- </el-col>-->
|
||||||
</el-row>
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-form-item label="特别说明">
|
||||||
|
<el-input v-model="form.remark"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<el-divider content-position="left">采购应付单表</el-divider>
|
<el-divider content-position="left">采购应付单表</el-divider>
|
||||||
|
|
@ -134,6 +139,10 @@ export default {
|
||||||
payableOrders: {
|
payableOrders: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default: () => []
|
default: () => []
|
||||||
|
},
|
||||||
|
title: {
|
||||||
|
type: String,
|
||||||
|
default: '合并生成付款单'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
|
@ -145,6 +154,7 @@ export default {
|
||||||
paymentBillType: 'FROM_PAYABLE', // Default to a type, or make it dynamic
|
paymentBillType: 'FROM_PAYABLE', // Default to a type, or make it dynamic
|
||||||
vendorName: '',
|
vendorName: '',
|
||||||
estimatedPaymentTime: null,
|
estimatedPaymentTime: null,
|
||||||
|
remark: null
|
||||||
},
|
},
|
||||||
payableOrdersWithPlans: [], // Each order will now have its own paymentPlans array
|
payableOrdersWithPlans: [], // Each order will now have its own paymentPlans array
|
||||||
isPaymentPlanSelectorOpen: false,
|
isPaymentPlanSelectorOpen: false,
|
||||||
|
|
@ -196,9 +206,11 @@ export default {
|
||||||
const allSameVendor = this.payableOrders.every(order => order.vendorName === firstVendorName);
|
const allSameVendor = this.payableOrders.every(order => order.vendorName === firstVendorName);
|
||||||
this.form.vendorName = allSameVendor ? firstVendorName : '多个制造商';
|
this.form.vendorName = allSameVendor ? firstVendorName : '多个制造商';
|
||||||
this.form.estimatedPaymentTime = this.payableOrders[0].estimatedPaymentTime || null; // Use first order's estimated time as default
|
this.form.estimatedPaymentTime = this.payableOrders[0].estimatedPaymentTime || null; // Use first order's estimated time as default
|
||||||
|
this.form.remark = null;
|
||||||
} else {
|
} else {
|
||||||
this.form.vendorName = '';
|
this.form.vendorName = '';
|
||||||
this.form.estimatedPaymentTime = null;
|
this.form.estimatedPaymentTime = null;
|
||||||
|
this.form.remark = null;
|
||||||
}
|
}
|
||||||
this.form.paymentBillType = 'FROM_PAYABLE'; // Default
|
this.form.paymentBillType = 'FROM_PAYABLE'; // Default
|
||||||
|
|
||||||
|
|
@ -286,6 +298,7 @@ export default {
|
||||||
const mergedPaymentData = {
|
const mergedPaymentData = {
|
||||||
paymentBillType: this.form.paymentBillType,
|
paymentBillType: this.form.paymentBillType,
|
||||||
estimatedPaymentTime: this.form.estimatedPaymentTime,
|
estimatedPaymentTime: this.form.estimatedPaymentTime,
|
||||||
|
remark: this.form.remark,
|
||||||
// Collect all payable orders with their updated payment plans
|
// Collect all payable orders with their updated payment plans
|
||||||
payableOrders: this.payableOrdersWithPlans.map(order => ({
|
payableOrders: this.payableOrdersWithPlans.map(order => ({
|
||||||
id: order.id,
|
id: order.id,
|
||||||
|
|
@ -314,6 +327,7 @@ export default {
|
||||||
paymentBillType: 'FROM_PAYABLE',
|
paymentBillType: 'FROM_PAYABLE',
|
||||||
vendorName: '',
|
vendorName: '',
|
||||||
estimatedPaymentTime: null,
|
estimatedPaymentTime: null,
|
||||||
|
remark: null
|
||||||
};
|
};
|
||||||
this.payableOrdersWithPlans = [];
|
this.payableOrdersWithPlans = [];
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<el-dialog title="合并发起收票单" :close-on-click-modal="false" :visible.sync="dialogVisible" width="80%" @close="handleClose" append-to-body>
|
<el-dialog :title="title" :close-on-click-modal="false" :visible.sync="dialogVisible" width="80%" @close="handleClose" append-to-body>
|
||||||
<div class="dialog-body">
|
<div class="dialog-body">
|
||||||
<el-form ref="form" :model="form" :inline="true" label-width="120px">
|
<el-form ref="form" :model="form" :inline="true" label-width="120px">
|
||||||
<el-row>
|
<el-row>
|
||||||
|
|
@ -41,6 +41,11 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-form-item label="备注">
|
||||||
|
<el-input v-model="form.remark"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<el-divider content-position="left">采购应付单表</el-divider>
|
<el-divider content-position="left">采购应付单表</el-divider>
|
||||||
|
|
@ -137,6 +142,10 @@ export default {
|
||||||
payableOrders: {
|
payableOrders: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default: () => []
|
default: () => []
|
||||||
|
},
|
||||||
|
title: {
|
||||||
|
type: String,
|
||||||
|
default: '合并生成收票单'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
|
@ -149,6 +158,7 @@ export default {
|
||||||
vendorName: '',
|
vendorName: '',
|
||||||
ticketTime: null,
|
ticketTime: null,
|
||||||
vendorTicketTime: null,
|
vendorTicketTime: null,
|
||||||
|
remark: null
|
||||||
},
|
},
|
||||||
payableOrdersWithPlans: [], // Each order will now have its own ticketPlans array
|
payableOrdersWithPlans: [], // Each order will now have its own ticketPlans array
|
||||||
isTicketPlanSelectorOpen: false,
|
isTicketPlanSelectorOpen: false,
|
||||||
|
|
@ -201,10 +211,12 @@ export default {
|
||||||
this.form.vendorName = allSameVendor ? firstVendorName : '多个制造商';
|
this.form.vendorName = allSameVendor ? firstVendorName : '多个制造商';
|
||||||
this.form.ticketTime = null; // Reset time
|
this.form.ticketTime = null; // Reset time
|
||||||
this.form.vendorTicketTime = null;
|
this.form.vendorTicketTime = null;
|
||||||
|
this.form.remark = null;
|
||||||
} else {
|
} else {
|
||||||
this.form.vendorName = '';
|
this.form.vendorName = '';
|
||||||
this.form.ticketTime = null;
|
this.form.ticketTime = null;
|
||||||
this.form.vendorTicketTime = null;
|
this.form.vendorTicketTime = null;
|
||||||
|
this.form.remark = null;
|
||||||
}
|
}
|
||||||
this.form.ticketBillType = 'FROM_PAYABLE'; // Default
|
this.form.ticketBillType = 'FROM_PAYABLE'; // Default
|
||||||
|
|
||||||
|
|
@ -298,6 +310,7 @@ export default {
|
||||||
ticketBillType: this.form.ticketBillType,
|
ticketBillType: this.form.ticketBillType,
|
||||||
ticketTime: this.form.ticketTime,
|
ticketTime: this.form.ticketTime,
|
||||||
vendorTicketTime: this.form.vendorTicketTime,
|
vendorTicketTime: this.form.vendorTicketTime,
|
||||||
|
remark: this.form.remark,
|
||||||
// Collect all payable orders with their updated ticket plans
|
// Collect all payable orders with their updated ticket plans
|
||||||
payableOrders: this.payableOrdersWithPlans.map(order => ({
|
payableOrders: this.payableOrdersWithPlans.map(order => ({
|
||||||
id: order.id,
|
id: order.id,
|
||||||
|
|
@ -327,6 +340,7 @@ export default {
|
||||||
vendorName: '',
|
vendorName: '',
|
||||||
ticketTime: null,
|
ticketTime: null,
|
||||||
vendorTicketTime: null,
|
vendorTicketTime: null,
|
||||||
|
remark: null
|
||||||
};
|
};
|
||||||
this.payableOrdersWithPlans = [];
|
this.payableOrdersWithPlans = [];
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -219,10 +219,17 @@
|
||||||
<edit-form :visible.sync="open" :data="selectedRow" @close="getList" />
|
<edit-form :visible.sync="open" :data="selectedRow" @close="getList" />
|
||||||
|
|
||||||
<!-- 合并付款单弹窗 -->
|
<!-- 合并付款单弹窗 -->
|
||||||
<merge-payment-dialog :visible.sync="isMergePaymentDialogOpen" :payable-orders="selectedPayableRows" @confirm="confirmMergePayment" />
|
<merge-payment-dialog :visible.sync="isMergePaymentDialogOpen" :payable-orders="selectedPayableRows" :title="mergePaymentDialogTitle" @confirm="confirmMergePayment" />
|
||||||
|
|
||||||
|
<!-- 付款单弹窗 -->
|
||||||
|
<payment-dialog :visible.sync="isPaymentDialogOpen" :payable-orders="selectedPayableRow" :title="mergePaymentDialogTitle" @confirm="confirmMergePayment" />
|
||||||
|
|
||||||
<!-- 合并收票单弹窗 -->
|
<!-- 合并收票单弹窗 -->
|
||||||
<merge-receipt-dialog :visible.sync="isMergeReceiptDialogOpen" :payable-orders="selectedPayableRows" @confirm="confirmMergeReceipt" />
|
<merge-receipt-dialog :visible.sync="isMergeReceiptDialogOpen" :payable-orders="selectedPayableRows" :title="mergeReceiptDialogTitle" @confirm="confirmMergeReceipt" />
|
||||||
|
|
||||||
|
<!-- 收票单弹窗 -->
|
||||||
|
<receipt-dialog :visible.sync="isReceiptDialogOpen" :payable-orders="selectedPayableRow" :title="mergeReceiptDialogTitle" @confirm="confirmMergeReceipt" />
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -231,10 +238,12 @@ import { listPayable, mergeAndInitiatePayment, mergeAndInitiateReceipt } from "@
|
||||||
import EditForm from './components/EditForm.vue';
|
import EditForm from './components/EditForm.vue';
|
||||||
import MergePaymentDialog from './components/MergePaymentDialog.vue';
|
import MergePaymentDialog from './components/MergePaymentDialog.vue';
|
||||||
import MergeReceiptDialog from './components/MergeReceiptDialog.vue';
|
import MergeReceiptDialog from './components/MergeReceiptDialog.vue';
|
||||||
|
import PaymentDialog from './components/MergePaymentDialog.vue';
|
||||||
|
import ReceiptDialog from './components/MergeReceiptDialog.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Payable",
|
name: "Payable",
|
||||||
components: { EditForm, MergePaymentDialog, MergeReceiptDialog },
|
components: { EditForm, MergePaymentDialog, MergeReceiptDialog, PaymentDialog, ReceiptDialog},
|
||||||
dicts: ['product_type', 'payment_status', 'invoice_status'],
|
dicts: ['product_type', 'payment_status', 'invoice_status'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
@ -276,10 +285,19 @@ export default {
|
||||||
},
|
},
|
||||||
// 选中行数据
|
// 选中行数据
|
||||||
selectedPayableRows: [],
|
selectedPayableRows: [],
|
||||||
|
// 选中行数据(单行)
|
||||||
|
selectedPayableRow: [],
|
||||||
// 是否显示合并付款弹窗
|
// 是否显示合并付款弹窗
|
||||||
isMergePaymentDialogOpen: false,
|
isMergePaymentDialogOpen: false,
|
||||||
// 是否显示合并收票弹窗
|
// 是否显示合并收票弹窗
|
||||||
isMergeReceiptDialogOpen: false
|
isMergeReceiptDialogOpen: false,
|
||||||
|
// 是否显示付款弹窗
|
||||||
|
isPaymentDialogOpen: false,
|
||||||
|
// 是否显示收票弹窗
|
||||||
|
isReceiptDialogOpen: false,
|
||||||
|
// 付款单弹窗标题
|
||||||
|
mergePaymentDialogTitle: null,
|
||||||
|
mergeReceiptDialogTitle: null
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
|
@ -337,15 +355,18 @@ export default {
|
||||||
this.selectedPayableRows = selection;
|
this.selectedPayableRows = selection;
|
||||||
},
|
},
|
||||||
handleGeneratedPayment(row) {
|
handleGeneratedPayment(row) {
|
||||||
this.selectedPayableRows=[row]
|
this.selectedPayableRow=[row]
|
||||||
this.handleMergeAndInitiatePayment()
|
this.mergePaymentDialogTitle = '发起付款单'
|
||||||
|
this.isPaymentDialogOpen = true;
|
||||||
},
|
},
|
||||||
handleGeneratedTicket(row) {
|
handleGeneratedTicket(row) {
|
||||||
this.selectedPayableRows=[row]
|
this.selectedPayableRow=[row]
|
||||||
this.handleMergeAndInitiateReceipt()
|
this.mergeReceiptDialogTitle = '发起收票单'
|
||||||
|
this.isReceiptDialogOpen = true;
|
||||||
},
|
},
|
||||||
/** 合并并发起付款单按钮操作 */
|
/** 合并并发起付款单按钮操作 */
|
||||||
handleMergeAndInitiatePayment() {
|
handleMergeAndInitiatePayment() {
|
||||||
|
console.log(this.selectedPayableRows)
|
||||||
if (this.selectedPayableRows.length === 0) {
|
if (this.selectedPayableRows.length === 0) {
|
||||||
this.$modal.msgWarning("请选择至少一条应付单进行合并操作");
|
this.$modal.msgWarning("请选择至少一条应付单进行合并操作");
|
||||||
return;
|
return;
|
||||||
|
|
@ -360,7 +381,8 @@ export default {
|
||||||
this.$modal.msgWarning("温馨提示:您勾选的应付单中有不同供应商,合并发起付款单需为同一供应商,请重新勾选");
|
this.$modal.msgWarning("温馨提示:您勾选的应付单中有不同供应商,合并发起付款单需为同一供应商,请重新勾选");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
// 设置弹窗标题
|
||||||
|
this.mergePaymentDialogTitle = '合并发起付款单';
|
||||||
this.isMergePaymentDialogOpen = true;
|
this.isMergePaymentDialogOpen = true;
|
||||||
},
|
},
|
||||||
/** 确认合并付款单操作 */
|
/** 确认合并付款单操作 */
|
||||||
|
|
@ -387,7 +409,8 @@ export default {
|
||||||
this.$modal.msgWarning("温馨提示:您勾选的应付单中有不同供应商,合并发起收票单需为同一供应商,请重新勾选");
|
this.$modal.msgWarning("温馨提示:您勾选的应付单中有不同供应商,合并发起收票单需为同一供应商,请重新勾选");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
// 设置弹窗标题
|
||||||
|
this.mergeReceiptDialogTitle = '合并发起收票单';
|
||||||
this.isMergeReceiptDialogOpen = true;
|
this.isMergeReceiptDialogOpen = true;
|
||||||
},
|
},
|
||||||
/** 确认合并收票单操作 */
|
/** 确认合并收票单操作 */
|
||||||
|
|
|
||||||
|
|
@ -90,7 +90,7 @@
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<div class="detail-item">其它特别说明: {{ detail.remark }}</div>
|
<div class="detail-item">特别说明: {{ detail.remark }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<div class="detail-item">
|
<div class="detail-item">
|
||||||
|
|
|
||||||
|
|
@ -8,10 +8,11 @@ import java.util.List;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class MergedPaymentDataDto {
|
public class MergedPaymentDataDto {
|
||||||
|
|
||||||
private String paymentBillType;
|
private String paymentBillType;
|
||||||
private Date estimatedPaymentTime;
|
private Date estimatedPaymentTime;
|
||||||
private List<PayableOrderDto> payableOrders;
|
private List<PayableOrderDto> payableOrders;
|
||||||
private BigDecimal totalMergePaymentAmount;
|
private BigDecimal totalMergePaymentAmount;
|
||||||
|
private String remark;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,9 +8,12 @@ import java.util.List;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class MergedReceiptDataDto {
|
public class MergedReceiptDataDto {
|
||||||
|
|
||||||
private String ticketBillType;
|
private String ticketBillType;
|
||||||
private Date ticketTime;
|
private Date ticketTime;
|
||||||
private Date vendorTicketTime;
|
private Date vendorTicketTime;
|
||||||
private List<PayableOrderReceiptDto> payableOrders;
|
private List<PayableOrderReceiptDto> payableOrders;
|
||||||
private BigDecimal totalMergeTicketAmount;
|
private BigDecimal totalMergeTicketAmount;
|
||||||
|
private String remark;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@ import com.ruoyi.sip.mapper.OmsPayableBillMapper;
|
||||||
import com.ruoyi.sip.mapper.OmsPayablePaymentPlanMapper;
|
import com.ruoyi.sip.mapper.OmsPayablePaymentPlanMapper;
|
||||||
import com.ruoyi.sip.mapper.OmsPayableTicketPlanMapper;
|
import com.ruoyi.sip.mapper.OmsPayableTicketPlanMapper;
|
||||||
import com.ruoyi.sip.service.*;
|
import com.ruoyi.sip.service.*;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
@ -242,6 +243,9 @@ public class OmsPayableBillServiceImpl implements IOmsPayableBillService {
|
||||||
paymentBill.setTaxAmount(dto.getTotalMergePaymentAmount().subtract(totalWithoutTax));
|
paymentBill.setTaxAmount(dto.getTotalMergePaymentAmount().subtract(totalWithoutTax));
|
||||||
|
|
||||||
paymentBill.setPaymentBillType(OmsPaymentBill.PaymentBillTypeEnum.FROM_PAYABLE.getCode());
|
paymentBill.setPaymentBillType(OmsPaymentBill.PaymentBillTypeEnum.FROM_PAYABLE.getCode());
|
||||||
|
if (StringUtils.isNotEmpty(dto.getRemark())) {
|
||||||
|
paymentBill.setRemark(dto.getRemark());
|
||||||
|
}
|
||||||
omsPaymentBillService.insertOmsPaymentBill(paymentBill);
|
omsPaymentBillService.insertOmsPaymentBill(paymentBill);
|
||||||
|
|
||||||
// 3. 创建付款明细 - 防止重复付款
|
// 3. 创建付款明细 - 防止重复付款
|
||||||
|
|
@ -354,6 +358,9 @@ public class OmsPayableBillServiceImpl implements IOmsPayableBillService {
|
||||||
|
|
||||||
ticketBill.setTicketBillType(OmsTicketBill.TicketBillTypeEnum.FROM_PAYABLE.getCode());
|
ticketBill.setTicketBillType(OmsTicketBill.TicketBillTypeEnum.FROM_PAYABLE.getCode());
|
||||||
ticketBill.setTicketStatus(OmsTicketBill.TicketStatusEnum.WAIT_TICKET.getCode());
|
ticketBill.setTicketStatus(OmsTicketBill.TicketStatusEnum.WAIT_TICKET.getCode());
|
||||||
|
if (StringUtils.isNotEmpty(dto.getRemark())) {
|
||||||
|
ticketBill.setRemark(dto.getRemark());
|
||||||
|
}
|
||||||
omsTicketBillService.insertOmsTicketBill(ticketBill);
|
omsTicketBillService.insertOmsTicketBill(ticketBill);
|
||||||
|
|
||||||
// 3. 创建收票明细 - 防止重复收票
|
// 3. 创建收票明细 - 防止重复收票
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue