fix: data not append if key not exists

This commit is contained in:
Methapon2001 2024-12-25 15:20:51 +07:00
parent c9da7ed59f
commit 61501dba8d

View file

@ -262,14 +262,12 @@ const responsiblePersonList = computed(() => {
curr.productService.service?.workflow?.step.forEach((v) => {
const key = v.order.toString();
if (!acc[key]) {
acc[key] = [];
} else {
v.responsiblePerson.forEach((lhs) => {
if (acc[v.order].find((rhs) => rhs.id === lhs.userId)) return;
acc[v.order].push(lhs.user);
});
}
if (!acc[key]) acc[key] = [];
v.responsiblePerson.forEach((lhs) => {
if (acc[v.order].find((rhs) => rhs.id === lhs.userId)) return;
acc[v.order].push(lhs.user);
});
});
return acc;
@ -612,6 +610,7 @@ function isInstallmentPaySuccess(installmentNo: number) {
<ProductExpansion
:cancel="data.requestDataStatus === RequestDataStatus.Canceled"
:readonly="data.requestDataStatus === RequestDataStatus.Canceled"
:order-able="value._formExpansion"
:installment-info="getInstallmentInfo()"
:pay-success="
isInstallmentPaySuccess(value.productService.installmentNo)