From 72f1a5992462c90fd67b3ff62135df58b07978a5 Mon Sep 17 00:00:00 2001 From: weiwei Date: Wed, 17 Sep 2025 18:32:27 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8D=E9=87=91=E9=A2=9D?= =?UTF-8?q?=E8=BD=AC=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/supermarket/shopSpu/form.vue | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/views/supermarket/shopSpu/form.vue b/src/views/supermarket/shopSpu/form.vue index c1acb6f..c111228 100644 --- a/src/views/supermarket/shopSpu/form.vue +++ b/src/views/supermarket/shopSpu/form.vue @@ -183,7 +183,7 @@ import { getObj, addObj, putObj } from "/@/api/supermarket/shopSpu" import { rule } from "/@/utils/validate" import { tree as fetchCategoryTree } from "/@/api/supermarket/shopCategory" import { select as fetchMerchantSelect } from "/@/api/wallet/mch-manage" -import { displayPrice } from "/@/utils/formatMoney" +import { displayPrice, storePrice } from "/@/utils/formatMoney" const emit = defineEmits(["refresh"]) @@ -300,6 +300,14 @@ const onSubmit = async () => { ...form, categoryId: Array.isArray(form.categoryId) ? form.categoryId.slice(-1)[0] : form.categoryId, merchantIds, + skuList: + form.skuList?.map((sku) => { + return { + ...sku, + promotionPrice: storePrice(sku.promotionPrice), + retailPrice: storePrice(sku.retailPrice), + } + }) || [], } form.id ? await putObj(submitForm) : await addObj(submitForm) useMessage().success(form.id ? "修改成功" : "添加成功")