【代码样式优惠】优惠限时折扣代码

pull/551/head
痴货 2024-08-27 12:00:56 +08:00
parent 15327ef6a7
commit 6375cd98df
2 changed files with 9 additions and 15 deletions

View File

@ -8,10 +8,6 @@
:schema="allSchemas.formSchema"
>
<!-- 先选择 -->
<!-- TODO @zhangshuai商品允许选择多个 -->
<!-- TODO @zhangshuai选择后的 SKU需要后面加个删除按钮 -->
<!-- TODO @zhangshuai展示的金额貌似不对大了 100 需要看下 -->
<!-- TODO @zhangshuai优惠类型是每个 SKU 可以自定义已设置哈因为每个商品 SKU 的折扣和减少价格可能不同具体交互可以注册一个 youzan.com 看看它的交互方式是如果设置了优惠金额则算减价如果再次设置了折扣百分比就算打折这样形成一个互斥的优惠类型 -->
<template #spuId>
<el-button @click="spuSelectRef.open()"></el-button>
<SpuAndSkuList

View File

@ -142,8 +142,6 @@ import { dateFormatter } from '@/utils/formatTime'
import * as DiscountActivity from '@/api/mall/promotion/discount/discountActivity'
import DiscountActivityForm from './DiscountActivityForm.vue'
import { formatDate } from '@/utils/formatTime'
import { fenToYuanFormat } from '@/utils/formatter'
import { fenToYuan } from '@/utils'
defineOptions({ name: 'DiscountActivity' })
@ -161,7 +159,7 @@ const queryParams = reactive({
status: null
})
const queryFormRef = ref() //
const exportLoading = ref(false) //
//const exportLoading = ref(false) //
/** 查询列表 */
const getList = async () => {
@ -219,18 +217,18 @@ const handleDelete = async (id: number) => {
} catch {}
}
const configList = ref([]) //
//const configList = ref([]) //
// const formatConfigNames = (configId) => {
// const config = configList.value.find((item) => item.id === configId)
// return config != null ? `${config.name}[${config.startTime} ~ ${config.endTime}]` : ''
// }
const formatSeckillPrice = (products) => {
//const formatSeckillPrice = (products) => {
// const seckillPrice = Math.min(...products.map((item) => item.seckillPrice))
console.log(products)
const seckillPrice = 200
return `${fenToYuan(seckillPrice)}`
}
// console.log(products)
// const seckillPrice = 200
// return `${fenToYuan(seckillPrice)}`
//}
/** 初始化 **/
onMounted(async () => {