【代码样式优惠】优惠限时折扣代码
parent
15327ef6a7
commit
6375cd98df
|
|
@ -8,10 +8,6 @@
|
||||||
:schema="allSchemas.formSchema"
|
:schema="allSchemas.formSchema"
|
||||||
>
|
>
|
||||||
<!-- 先选择 -->
|
<!-- 先选择 -->
|
||||||
<!-- TODO @zhangshuai:商品允许选择多个 -->
|
|
||||||
<!-- TODO @zhangshuai:选择后的 SKU,需要后面加个【删除】按钮 -->
|
|
||||||
<!-- TODO @zhangshuai:展示的金额,貌似不对,大了 100 倍,需要看下 -->
|
|
||||||
<!-- TODO @zhangshuai:“优惠类型”,是每个 SKU 可以自定义已设置哈。因为每个商品 SKU 的折扣和减少价格,可能不同。具体交互,可以注册一个 youzan.com 看看;它的交互方式是,如果设置了“优惠金额”,则算“减价”;如果再次设置了“折扣百分比”,就算“打折”;这样形成一个互斥的优惠类型 -->
|
|
||||||
<template #spuId>
|
<template #spuId>
|
||||||
<el-button @click="spuSelectRef.open()">选择商品</el-button>
|
<el-button @click="spuSelectRef.open()">选择商品</el-button>
|
||||||
<SpuAndSkuList
|
<SpuAndSkuList
|
||||||
|
|
|
||||||
|
|
@ -142,8 +142,6 @@ import { dateFormatter } from '@/utils/formatTime'
|
||||||
import * as DiscountActivity from '@/api/mall/promotion/discount/discountActivity'
|
import * as DiscountActivity from '@/api/mall/promotion/discount/discountActivity'
|
||||||
import DiscountActivityForm from './DiscountActivityForm.vue'
|
import DiscountActivityForm from './DiscountActivityForm.vue'
|
||||||
import { formatDate } from '@/utils/formatTime'
|
import { formatDate } from '@/utils/formatTime'
|
||||||
import { fenToYuanFormat } from '@/utils/formatter'
|
|
||||||
import { fenToYuan } from '@/utils'
|
|
||||||
|
|
||||||
defineOptions({ name: 'DiscountActivity' })
|
defineOptions({ name: 'DiscountActivity' })
|
||||||
|
|
||||||
|
|
@ -161,7 +159,7 @@ const queryParams = reactive({
|
||||||
status: null
|
status: null
|
||||||
})
|
})
|
||||||
const queryFormRef = ref() // 搜索的表单
|
const queryFormRef = ref() // 搜索的表单
|
||||||
const exportLoading = ref(false) // 导出的加载中
|
//const exportLoading = ref(false) // 导出的加载中
|
||||||
|
|
||||||
/** 查询列表 */
|
/** 查询列表 */
|
||||||
const getList = async () => {
|
const getList = async () => {
|
||||||
|
|
@ -219,18 +217,18 @@ const handleDelete = async (id: number) => {
|
||||||
} catch {}
|
} catch {}
|
||||||
}
|
}
|
||||||
|
|
||||||
const configList = ref([]) // 时段配置精简列表
|
//const configList = ref([]) // 时段配置精简列表
|
||||||
// const formatConfigNames = (configId) => {
|
// const formatConfigNames = (configId) => {
|
||||||
// const config = configList.value.find((item) => item.id === configId)
|
// const config = configList.value.find((item) => item.id === configId)
|
||||||
// return config != null ? `${config.name}[${config.startTime} ~ ${config.endTime}]` : ''
|
// return config != null ? `${config.name}[${config.startTime} ~ ${config.endTime}]` : ''
|
||||||
// }
|
// }
|
||||||
|
|
||||||
const formatSeckillPrice = (products) => {
|
//const formatSeckillPrice = (products) => {
|
||||||
// const seckillPrice = Math.min(...products.map((item) => item.seckillPrice))
|
// const seckillPrice = Math.min(...products.map((item) => item.seckillPrice))
|
||||||
console.log(products)
|
// console.log(products)
|
||||||
const seckillPrice = 200
|
// const seckillPrice = 200
|
||||||
return `¥${fenToYuan(seckillPrice)}`
|
// return `¥${fenToYuan(seckillPrice)}`
|
||||||
}
|
//}
|
||||||
|
|
||||||
/** 初始化 **/
|
/** 初始化 **/
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue