Merge remote-tracking branch 'yudao/master' into dev-to-dev

This commit is contained in:
puhui999
2023-08-02 21:14:06 +08:00
53 changed files with 479 additions and 395 deletions

View File

@@ -134,11 +134,7 @@ const open = async (type: string, id?: number) => {
const data = (await CombinationActivityApi.getCombinationActivity(
id
)) as CombinationActivityApi.CombinationActivityVO
await getSpuDetails(
data.spuId!,
data.products?.map((sku) => sku.skuId),
data.products
)
await getSpuDetails(data.spuId!, data.products?.map((sku) => sku.skuId), data.products)
formRef.value.setValues(data)
} finally {
formLoading.value = false

View File

@@ -98,9 +98,10 @@ const handleDelete = (id: number) => {
tableMethods.delList(id, false)
}
// TODO @puhui999要不还是使用原生的 element plus 做。感觉 crud schema 复杂界面,做起来麻烦
/** 初始化 **/
onMounted(() => {
/*
/**
TODO
后面准备封装成一个函数来操作 tableColumns 重新排列:比如说需求是表单上商品选择是在后面的而列表展示的时候需要调到位置。
封装效果支持批量操作,给出 field 和需要插入的位置,例:[{field:'spuId',index: 1}] 效果为把 field 为 spuId 的 column 移动到第一个位置

View File

@@ -50,8 +50,10 @@ const spuData = ref<Spu[]>([]) // spu 详情数据列表
const skuListRef = ref() // 商品属性列表Ref
const spuPropertyList = ref<SpuProperty<T>[]>([]) // spuId 对应的 sku 的属性列表
const expandRowKeys = ref<number[]>() // 控制展开行需要设置 row-key 属性才能使用,该属性为展开行的 keys 数组。
/**
* 获取所有 sku 活动配置
*
* @param extendedAttribute 在 sku 上扩展的属性,例:秒杀活动 sku 扩展属性 productConfig 请参考 seckillActivity.ts
*/
const getSkuConfigs = (extendedAttribute: string) => {

View File

@@ -144,11 +144,7 @@ const open = async (type: string, id?: number) => {
const data = (await SeckillActivityApi.getSeckillActivity(
id
)) as SeckillActivityApi.SeckillActivityVO
await getSpuDetails(
data.spuId!,
data.products?.map((sku) => sku.skuId),
data.products
)
await getSpuDetails(data.spuId!, data.products?.map((sku) => sku.skuId), data.products)
formRef.value.setValues(data)
} finally {
formLoading.value = false