Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
a003b59e
authored
Jul 26, 2023
by
YunaiV
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
review 秒杀、拼团活动的 CRUD
parent
d7f0554f
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
1 deletions
+6
-1
src/api/mall/promotion/combination/combinationactivity.ts
+2
-0
src/views/mall/promotion/combination/activity/index.vue
+2
-1
src/views/mall/promotion/components/SpuAndSkuList.vue
+2
-0
No files found.
src/api/mall/promotion/combination/combinationactivity.ts
View file @
a003b59e
import
request
from
'@/config/axios'
import
request
from
'@/config/axios'
import
{
Sku
,
Spu
}
from
'@/api/mall/product/spu'
import
{
Sku
,
Spu
}
from
'@/api/mall/product/spu'
// TODO @puhui999: combinationActivity.ts
export
interface
CombinationActivityVO
{
export
interface
CombinationActivityVO
{
id
?:
number
id
?:
number
name
?:
string
name
?:
string
...
...
src/views/mall/promotion/combination/activity/index.vue
View file @
a003b59e
...
@@ -98,9 +98,10 @@ const handleDelete = (id: number) => {
...
@@ -98,9 +98,10 @@ const handleDelete = (id: number) => {
tableMethods
.
delList
(
id
,
false
)
tableMethods
.
delList
(
id
,
false
)
}
}
// TODO @puhui999:要不还是使用原生的 element plus 做。感觉 crud schema 复杂界面,做起来麻烦
/** 初始化 **/
/** 初始化 **/
onMounted
(()
=>
{
onMounted
(()
=>
{
/*
/*
*
TODO
TODO
后面准备封装成一个函数来操作 tableColumns 重新排列:比如说需求是表单上商品选择是在后面的而列表展示的时候需要调到位置。
后面准备封装成一个函数来操作 tableColumns 重新排列:比如说需求是表单上商品选择是在后面的而列表展示的时候需要调到位置。
封装效果支持批量操作,给出 field 和需要插入的位置,例:[{field:'spuId',index: 1}] 效果为把 field 为 spuId 的 column 移动到第一个位置
封装效果支持批量操作,给出 field 和需要插入的位置,例:[{field:'spuId',index: 1}] 效果为把 field 为 spuId 的 column 移动到第一个位置
...
...
src/views/mall/promotion/components/SpuAndSkuList.vue
View file @
a003b59e
...
@@ -50,8 +50,10 @@ const spuData = ref<Spu[]>([]) // spu 详情数据列表
...
@@ -50,8 +50,10 @@ const spuData = ref<Spu[]>([]) // spu 详情数据列表
const
skuListRef
=
ref
()
// 商品属性列表Ref
const
skuListRef
=
ref
()
// 商品属性列表Ref
const
spuPropertyList
=
ref
<
SpuProperty
<
T
>
[]
>
([])
// spuId 对应的 sku 的属性列表
const
spuPropertyList
=
ref
<
SpuProperty
<
T
>
[]
>
([])
// spuId 对应的 sku 的属性列表
const
expandRowKeys
=
ref
<
number
[]
>
()
// 控制展开行需要设置 row-key 属性才能使用,该属性为展开行的 keys 数组。
const
expandRowKeys
=
ref
<
number
[]
>
()
// 控制展开行需要设置 row-key 属性才能使用,该属性为展开行的 keys 数组。
/**
/**
* 获取所有 sku 活动配置
* 获取所有 sku 活动配置
*
* @param extendedAttribute 在 sku 上扩展的属性,例:秒杀活动 sku 扩展属性 productConfig 请参考 seckillActivity.ts
* @param extendedAttribute 在 sku 上扩展的属性,例:秒杀活动 sku 扩展属性 productConfig 请参考 seckillActivity.ts
*/
*/
const
getSkuConfigs
=
(
extendedAttribute
:
string
)
=>
{
const
getSkuConfigs
=
(
extendedAttribute
:
string
)
=>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment