Ver Fonte

fix(web-admin): bind branded site actual qty to chip sum on load

Co-authored-by: Cursor <cursoragent@cursor.com>
zlwu há 3 meses atrás
pai
commit
0667e8d77b

+ 5 - 8
web-admin/src/views/public/pl/_shared/PublicIoOrderPage.vue

@@ -345,18 +345,15 @@
       feedbackImages.value = [...(data.siteFeedbackImages || [])]
       editableItems.value = (data.items || []).map((it) => {
         const brandQtyRows = mapBrandQtyRows(it)
-        const actualFromBrand =
-          it.brandMode && brandQtyRows.length ? Number(brandQtySum(brandQtyRows).toFixed(3)) : null
         return {
           ...it,
           brandOptions: it.brandOptions || [],
           brandQtyRows,
-          actualQtyText:
-            actualFromBrand != null
-              ? String(actualFromBrand)
-              : it.actualQty != null
-                ? String(it.actualQty)
-                : ''
+          actualQtyText: it.brandMode
+            ? String(Number(brandQtySum(brandQtyRows).toFixed(3)))
+            : it.actualQty != null
+              ? String(it.actualQty)
+              : ''
         }
       })
       selectedStatus.value = (