fix: value not reflect real amount

This commit is contained in:
Methapon2001 2025-01-23 14:08:28 +07:00
parent 6c299b8c1b
commit c1c814ade2

View file

@ -174,12 +174,11 @@ onMounted(async () => {
product.value = [];
summaryPrice.value = taskListGroup
.flatMap((v) => {
const list = v.list.filter(
(item) => item._status === TaskStatus.Complete,
);
if (viewType.value === 'docReceive' && list.length === 0) {
return [];
}
const list =
(viewType.value === 'docReceive'
? v.list.filter((item) => item._status === TaskStatus.Complete)
: v.list) || [];
return {
product: v.product,
pricePerUnit: v.product.serviceCharge,