This commit is contained in:
Viet An
2026-05-07 15:01:09 +07:00
parent 56cfcd09bf
commit ad2d1fbfb6
31 changed files with 356 additions and 367 deletions

View File

@@ -853,8 +853,8 @@ export default {
originalCalculatedAmount: originalAmount,
discountAmount: earlyDetail.discountAmount,
netAmount: earlyDetail.netAmount,
actualDueDate: this.calculationStartDate.format("DD/MM/YYYY"),
dueDate: plan.days > 0 ? this.calculationStartDate.add(plan.days, "day").format("DD/MM/YYYY") : null,
actualDueDate: this.calculationStartDate.format("L"),
dueDate: plan.days > 0 ? this.calculationStartDate.add(plan.days, "day").format("L") : null,
displayValue: plan.type === 1 ? `${plan.value}%` : this.$numtoString(plan.value),
};
} else {
@@ -865,7 +865,7 @@ export default {
discountAmount: 0,
netAmount: originalAmount,
actualDueDate: null,
dueDate: plan.days > 0 ? this.calculationStartDate.add(plan.days, "day").format("DD/MM/YYYY") : null,
dueDate: plan.days > 0 ? this.calculationStartDate.add(plan.days, "day").format("L") : null,
displayValue: plan.type === 1 ? `${plan.value}%` : this.$numtoString(plan.value),
};
}
@@ -891,7 +891,7 @@ export default {
const daysDiff = plan.days || 0;
if (daysDiff > 0) {
const dueDateObj = this.calculationStartDate.add(daysDiff, "day");
dueDate = dueDateObj.format("DD/MM/YYYY");
dueDate = dueDateObj.format("L");
}
return {
@@ -927,7 +927,7 @@ export default {
isEarlyPaymentMerged: true,
calculatedAmount: this.totalEarlyPayment - (this.selectedPolicy.deposit || 0),
days: 0,
dueDate: this.calculationStartDate.format("DD/MM/YYYY"),
dueDate: this.calculationStartDate.format("L"),
payment_note: "Thanh toán sớm gộp",
displayValue: "-",
isFirstPlan: true,
@@ -942,7 +942,7 @@ export default {
const daysDiff = plan.days || 0;
if (daysDiff > 0) {
const dueDateObj = this.calculationStartDate.add(daysDiff, "day");
dueDate = dueDateObj.format("DD/MM/YYYY");
dueDate = dueDateObj.format("L");
}
displayPlans.push({
@@ -963,9 +963,7 @@ export default {
calculatedPlans() {
if (this.isPrecalculated && this.paymentPlans && this.paymentPlans.length > 0) {
return this.paymentPlans.map((plan, index) => {
const dueDate = plan.due_days
? this.calculationStartDate.add(plan.due_days, "day").format("DD/MM/YYYY")
: null;
const dueDate = plan.due_days ? this.calculationStartDate.add(plan.due_days, "day").format("L") : null;
return {
...plan,
displayCycle: plan.cycle || index + 1,
@@ -1039,7 +1037,7 @@ export default {
return this.enableEarlyPayment;
},
formatDate(date) {
return dayjs(date).format("DD/MM/YYYY");
return dayjs(date).format("L");
},
handleEarlyPaymentToggle() {