【功能优化】修改满送活动描述

pull/554/head
痴货 2024-09-18 10:31:40 +08:00
parent fe33517ef0
commit 2b409327fb
1 changed files with 3 additions and 3 deletions

View File

@ -128,7 +128,6 @@ const getSpuDetails = async (
if (typeof products !== 'undefined') {
const product = products.find((item) => item.skuId === sku.id)
if (product) {
product.discountPercent = fenToYuan(product.discountPercent) as any
product.discountPrice = fenToYuan(product.discountPrice) as any
}
config = product || config
@ -179,6 +178,7 @@ defineExpose({ open }) // 提供 open 方法,用于打开弹窗
/** 提交表单 */
const emit = defineEmits(['success']) // success
const submitForm = async () => {
console.log(1111)
//
if (!formRef) return
const valid = await formRef.value.getElFormRef().validate()
@ -189,8 +189,8 @@ const submitForm = async () => {
//
const products = cloneDeep(spuAndSkuListRef.value.getSkuConfigs('productConfig'))
products.forEach((item: DiscountActivityApi.DiscountProductVO) => {
item.discountPercent = convertToInteger(item.discountPercent)
item.discountPrice = convertToInteger(yuanToFen(item.discountPrice))
item.discountPercent = Number(item.discountPercent)
item.discountPrice = yuanToFen(item.discountPrice)
})
const data = cloneDeep(formRef.value.formModel) as DiscountActivityApi.DiscountActivityVO
data.products = products