Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
A
admin-base
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
new-sing
admin-base
Commits
53f66456
Commit
53f66456
authored
Sep 19, 2019
by
chenjundi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
系统配置-全勤活动(返奖学金)
parent
321343c5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
4 deletions
+38
-4
index.vue
src/components/config/index.vue
+36
-2
api.js
src/service/api.js
+2
-2
No files found.
src/components/config/index.vue
View file @
53f66456
...
...
@@ -213,6 +213,7 @@
<el-table-column
prop=
"id"
label=
"id"
width=
"100"
></el-table-column>
<el-table-column
prop=
"goods_name"
label=
"商品名称"
></el-table-column>
<el-table-column
prop=
"title"
label=
"标题"
></el-table-column>
<el-table-column
prop=
"over_at"
label=
"活动结束时间"
></el-table-column>
<el-table-column
label=
"操作"
width=
"120px"
v-if=
"!$store.state.readonly"
>
<
template
slot-scope=
"scope"
>
<el-button
...
...
@@ -305,7 +306,7 @@
</el-dialog>
<el-dialog
title=
"添加期数"
:visible
.
sync=
"periodDialog"
>
<el-form>
<el-form-item
label=
"选择期数"
>
<el-form-item
label=
"选择期数"
required
>
<el-cascader
:popper-class=
"'refresh-cascader-multi width-480'"
style=
"width: 480px"
...
...
@@ -313,6 +314,15 @@
:props=
"{value:'id',label:'name'}"
@
active-item-change=
"handleItemChange"
v-model=
"secGoods"
></el-cascader>
<el-form-item
label=
"活动结束时间"
v-if=
"periodsType == 2"
class=
"overTime"
required
>
<el-date-picker
style=
"width: 140px;"
type=
"date"
v-model=
"overTime"
value-format=
"yyyy-MM-dd"
placeholder=
"选择日期"
>
</el-date-picker>
</el-form-item>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
...
...
@@ -452,6 +462,7 @@ export default {
secGoods
:[],
periodsId
:
''
,
periodsType
:
''
,
overTime
:
null
,
yunjiList
:[],
starList
:[],
starV2List
:[],
...
...
@@ -625,7 +636,25 @@ export default {
})
})
}
else
{
addStarActivityV2PeriodApi
(
this
.
secGoods
[
1
]).
then
(
res
=>
{
let
json
=
{
periods_id
:
this
.
secGoods
[
1
],
over_at
:
this
.
overTime
};
if
(
!
json
.
periods_id
)
{
this
.
$message
({
type
:
"error"
,
message
:
"请选择期数"
});
return
}
if
(
!
json
.
over_at
)
{
this
.
$message
({
type
:
"error"
,
message
:
"请选择活动结束时间"
});
return
}
addStarActivityV2PeriodApi
(
json
).
then
(
res
=>
{
this
.
$message
({
type
:
"success"
,
message
:
"数据插入成功"
...
...
@@ -656,6 +685,7 @@ export default {
},
periodDialogFn
(
str
){
console
.
log
(
str
)
this
.
overTime
=
null
;
this
.
periodsType
=
str
this
.
periodDialog
=
true
let
json
=
{
...
...
@@ -1081,5 +1111,9 @@ export default {
margin-left: 0;
}
}
.overTime {
margin-top: 20px;
}
</
style
>
src/service/api.js
View file @
53f66456
...
...
@@ -1295,8 +1295,8 @@ export const getStarActivityV2PeriodApi = function () {
return
Vue
.
prototype
.
$fetch
(
`api/admin/star/bonus/periods`
)
};
//添加星星活动期数
export
const
addStarActivityV2PeriodApi
=
function
(
periods_id
)
{
return
Vue
.
prototype
.
$post
(
`/api/admin/star/bonus/periods
/
${
periods_id
}
`
)
export
const
addStarActivityV2PeriodApi
=
function
(
json
)
{
return
Vue
.
prototype
.
$post
(
`/api/admin/star/bonus/periods
`
,
json
)
};
//删除星星活动期数
export
const
delStarActivityV2PeriodApi
=
function
(
periods_id
)
{
...
...
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