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
c327f791
authored
Aug 02, 2023
by
puhui999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: combinationActivity 调整
parent
39df9be9
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
38 additions
and
19 deletions
+38
-19
src/api/mall/promotion/combination/combinationActivity.ts
+0
-2
src/views/mall/promotion/combination/CombinationActivityForm.vue
+3
-2
src/views/mall/promotion/combination/combinationActivity.data.ts
+34
-14
src/views/mall/promotion/combination/index.vue
+1
-1
No files found.
src/api/mall/promotion/combination/combination
a
ctivity.ts
→
src/api/mall/promotion/combination/combination
A
ctivity.ts
View file @
c327f791
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/
CombinationActivityForm.vue
→
src/views/mall/promotion/combination/CombinationActivityForm.vue
View file @
c327f791
...
@@ -6,6 +6,7 @@
...
@@ -6,6 +6,7 @@
:is-col=
"true"
:is-col=
"true"
:rules=
"rules"
:rules=
"rules"
:schema=
"allSchemas.formSchema"
:schema=
"allSchemas.formSchema"
class=
"mt-10px"
>
>
<template
#
spuId
>
<template
#
spuId
>
<el-button
@
click=
"spuSelectRef.open()"
>
选择商品
</el-button>
<el-button
@
click=
"spuSelectRef.open()"
>
选择商品
</el-button>
...
@@ -37,8 +38,8 @@
...
@@ -37,8 +38,8 @@
<SpuSelect
ref=
"spuSelectRef"
:isSelectSku=
"true"
@
confirm=
"selectSpu"
/>
<SpuSelect
ref=
"spuSelectRef"
:isSelectSku=
"true"
@
confirm=
"selectSpu"
/>
</template>
</template>
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
import
*
as
CombinationActivityApi
from
'@/api/mall/promotion/combination/combination
a
ctivity'
import
*
as
CombinationActivityApi
from
'@/api/mall/promotion/combination/combination
A
ctivity'
import
{
CombinationProductVO
}
from
'@/api/mall/promotion/combination/combination
a
ctivity'
import
{
CombinationProductVO
}
from
'@/api/mall/promotion/combination/combination
A
ctivity'
import
{
allSchemas
,
rules
}
from
'./combinationActivity.data'
import
{
allSchemas
,
rules
}
from
'./combinationActivity.data'
import
{
SpuAndSkuList
,
SpuProperty
,
SpuSelect
}
from
'@/views/mall/promotion/components'
import
{
SpuAndSkuList
,
SpuProperty
,
SpuSelect
}
from
'@/views/mall/promotion/components'
import
{
getPropertyList
,
RuleConfig
}
from
'@/views/mall/product/spu/components'
import
{
getPropertyList
,
RuleConfig
}
from
'@/views/mall/product/spu/components'
...
...
src/views/mall/promotion/combination/
activity/
combinationActivity.data.ts
→
src/views/mall/promotion/combination/combinationActivity.data.ts
View file @
c327f791
import
type
{
CrudSchema
}
from
'@/hooks/web/useCrudSchemas'
import
type
{
CrudSchema
}
from
'@/hooks/web/useCrudSchemas'
import
{
dateFormatter
,
getNowDateTime
}
from
'@/utils/formatTime'
import
{
dateFormatter
2
}
from
'@/utils/formatTime'
// 表单校验
// 表单校验
export
const
rules
=
reactive
({
export
const
rules
=
reactive
({
...
@@ -26,29 +26,49 @@ const crudSchemas = reactive<CrudSchema[]>([
...
@@ -26,29 +26,49 @@ const crudSchemas = reactive<CrudSchema[]>([
}
}
},
},
{
{
label
:
'活动时间'
,
label
:
'活动开始时间'
,
field
:
'activityTime'
,
field
:
'startTime'
,
formatter
:
dateFormatter
,
formatter
:
dateFormatter2
,
isSearch
:
true
,
search
:
{
search
:
{
show
:
true
,
component
:
'DatePicker'
,
component
:
'DatePicker'
,
componentProps
:
{
componentProps
:
{
valueFormat
:
'x'
,
valueFormat
:
'YYYY-MM-DD'
,
type
:
'datetimerange'
,
type
:
'daterange'
rangeSeparator
:
'至'
}
}
},
},
form
:
{
form
:
{
component
:
'DatePicker'
,
component
:
'DatePicker'
,
componentProps
:
{
componentProps
:
{
valueFormat
:
'x
'
,
type
:
'date
'
,
type
:
'datetimerange'
,
valueFormat
:
'x'
rangeSeparator
:
'至'
}
},
},
value
:
[
getNowDateTime
().
valueOf
(),
getNowDateTime
().
valueOf
()],
table
:
{
colProps
:
{
width
:
120
span
:
24
}
}
},
{
label
:
'活动结束时间'
,
field
:
'endTime'
,
formatter
:
dateFormatter2
,
isSearch
:
true
,
search
:
{
component
:
'DatePicker'
,
componentProps
:
{
valueFormat
:
'YYYY-MM-DD'
,
type
:
'daterange'
}
},
form
:
{
component
:
'DatePicker'
,
componentProps
:
{
type
:
'date'
,
valueFormat
:
'x'
}
},
table
:
{
width
:
120
}
}
},
},
{
{
...
...
src/views/mall/promotion/combination/
activity/
index.vue
→
src/views/mall/promotion/combination/index.vue
View file @
c327f791
...
@@ -63,7 +63,7 @@
...
@@ -63,7 +63,7 @@
</template>
</template>
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
import
{
allSchemas
}
from
'./combinationActivity.data'
import
{
allSchemas
}
from
'./combinationActivity.data'
import
*
as
CombinationActivityApi
from
'@/api/mall/promotion/combination/combination
a
ctivity'
import
*
as
CombinationActivityApi
from
'@/api/mall/promotion/combination/combination
A
ctivity'
import
CombinationActivityForm
from
'./CombinationActivityForm.vue'
import
CombinationActivityForm
from
'./CombinationActivityForm.vue'
import
{
cloneDeep
}
from
'lodash-es'
import
{
cloneDeep
}
from
'lodash-es'
import
{
createImageViewer
}
from
'@/components/ImageViewer'
import
{
createImageViewer
}
from
'@/components/ImageViewer'
...
...
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