fix:修复金额转换
This commit is contained in:
1 parent
6ae3b1e35b
commit
72f1a59924
1 file changed
+9
-1
@@ -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 ? "修改成功" : "添加成功")
|
||||
|
||||
Reference in new issue
Block a user