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
967bc7b2
Commit
967bc7b2
authored
Jul 09, 2019
by
chenyishuai@singsingenglish.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ss
parent
902b219c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
133 additions
and
19 deletions
+133
-19
index.vue
src/components/class/index.vue
+25
-0
index.vue
src/components/config/index.vue
+94
-17
api.js
src/service/api.js
+12
-0
index.js
src/service/index.js
+2
-2
No files found.
src/components/class/index.vue
View file @
967bc7b2
...
@@ -26,6 +26,9 @@
...
@@ -26,6 +26,9 @@
<el-button
type=
"primary"
@
click=
"getClassList"
>
<el-button
type=
"primary"
@
click=
"getClassList"
>
搜索
搜索
</el-button>
</el-button>
<el-button
type=
"success"
@
click=
"sendMsg"
>
发送活动通知
</el-button>
</el-form-item>
</el-form-item>
<el-form-item
style=
"float: right"
>
<el-form-item
style=
"float: right"
>
<el-button
@
click=
"onAdd"
type=
"success"
v-if=
"!$store.state.readonly"
>
+添加班级
</el-button>
<el-button
@
click=
"onAdd"
type=
"success"
v-if=
"!$store.state.readonly"
>
+添加班级
</el-button>
...
@@ -254,6 +257,28 @@
...
@@ -254,6 +257,28 @@
this
.
initPage
();
this
.
initPage
();
},
},
methods
:{
methods
:{
sendMsg
(){
if
(
this
.
title
&&
this
.
title
.
title
){
this
.
$confirm
(
"你将发送给"
+
this
.
title
.
title
+
"用户"
,
"提示"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
}).
then
(()
=>
{
// console.log(this.selectedGoods)
postActiveNoticeApi
(
this
.
periods
.
id
).
then
(
res
=>
{
this
.
noticeDialog
=
false
;
this
.
$message
({
type
:
"success"
,
message
:
"发送成功"
+
res
.
num
+
'个'
});
})
})
}
else
{
this
.
$message
({
message
:
"请选择期数"
});
}
},
changeRow
(
data
,
b
){
changeRow
(
data
,
b
){
if
(
b
.
indexOf
(
data
)
>-
1
){
if
(
b
.
indexOf
(
data
)
>-
1
){
getClassStatisticsApi
(
data
.
periods_id
,
data
.
id
).
then
(
res
=>
{
getClassStatisticsApi
(
data
.
periods_id
,
data
.
id
).
then
(
res
=>
{
...
...
src/components/config/index.vue
View file @
967bc7b2
...
@@ -191,7 +191,7 @@
...
@@ -191,7 +191,7 @@
</el-table>
</el-table>
</div>
</div>
</el-collapse-item>
</el-collapse-item>
<el-collapse-item
title=
"全勤活动星星期数"
name=
"10"
>
<el-collapse-item
title=
"全勤活动星星期数
(赠绘本)
"
name=
"10"
>
<div>
<div>
<el-button
@
click=
"periodDialogFn(1)"
>
<el-button
@
click=
"periodDialogFn(1)"
>
添加期数
添加期数
...
@@ -228,9 +228,46 @@
...
@@ -228,9 +228,46 @@
</el-table>
</el-table>
</div>
</div>
</el-collapse-item>
</el-collapse-item>
<el-collapse-item
title=
"全勤活动星星期数(返奖学金)"
name=
"11"
>
<div>
<el-button
@
click=
"periodDialogFn(2)"
>
添加期数
</el-button>
<el-table
:data=
"starV2List"
style=
"width: 100%"
>
<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
label=
"操作"
min-width=
"150"
v-if=
"!$store.state.readonly"
>
<
template
slot-scope=
"scope"
>
<el-button
@
click=
"delStarV2ListFn(scope.row)"
type=
"warning"
plain
size=
"mini"
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
</div>
</el-collapse-item>
</el-collapse>
</el-collapse>
</div>
</div>
<div
class=
"item"
>
<
!-- <
div class="item">
<div style="margin-top:30px;">
<div style="margin-top:30px;">
系统功能
系统功能
</div>
</div>
...
@@ -241,13 +278,11 @@
...
@@ -241,13 +278,11 @@
</el-button>
</el-button>
</div>
</div>
<div style="margin-top:20px;"></div>
<div style="margin-top:20px;"></div>
</div> -->
</div>
</div>
</div>
<el-dialog
<el-dialog
title=
"发生活动通知(限活动期数发送)"
title=
"发生活动通知(限活动期数发送)"
:visible
.
sync=
"noticeDialog"
:visible
.
sync=
"noticeDialog"
>
>
<el-cascader
<el-cascader
:options=
"periodList"
:options=
"periodList"
:props=
"{value:'id',label:'name'}"
:props=
"{value:'id',label:'name'}"
...
@@ -262,8 +297,7 @@
...
@@ -262,8 +297,7 @@
</el-dialog>
</el-dialog>
<el-dialog
<el-dialog
title=
"添加期数"
title=
"添加期数"
:visible
.
sync=
"periodDialog"
:visible
.
sync=
"periodDialog"
>
>
<el-cascader
<el-cascader
:options=
"periodList"
:options=
"periodList"
:props=
"{value:'id',label:'name'}"
:props=
"{value:'id',label:'name'}"
...
@@ -293,7 +327,10 @@ import {
...
@@ -293,7 +327,10 @@ import {
getStarActivityPeriodApi
,
getStarActivityPeriodApi
,
getYunjiActivityPeriodApi
,
getYunjiActivityPeriodApi
,
delYunjiActivityPeriodApi
,
delYunjiActivityPeriodApi
,
delStarActivityPeriodApi
delStarActivityPeriodApi
,
delStarActivityV2PeriodApi
,
addStarActivityV2PeriodApi
,
getStarActivityV2PeriodApi
}
from
"../../service/api"
;
}
from
"../../service/api"
;
import
{
GOODSTYPE
,
CLASSSOURCE
}
from
'../../util/wordbook'
;
import
{
GOODSTYPE
,
CLASSSOURCE
}
from
'../../util/wordbook'
;
export
default
{
export
default
{
...
@@ -301,6 +338,7 @@ export default {
...
@@ -301,6 +338,7 @@ export default {
props
:
[
"entranceObj"
],
props
:
[
"entranceObj"
],
data
()
{
data
()
{
return
{
return
{
starListV2
:[],
noticeDialog
:
false
,
noticeDialog
:
false
,
periodDialog
:
false
,
periodDialog
:
false
,
activeName
:
"1"
,
activeName
:
"1"
,
...
@@ -343,7 +381,8 @@ export default {
...
@@ -343,7 +381,8 @@ export default {
periodsId
:
''
,
periodsId
:
''
,
periodsType
:
''
,
periodsType
:
''
,
yunjiList
:[],
yunjiList
:[],
starList
:[]
starList
:[],
starV2List
:[]
};
};
},
},
mounted
()
{
mounted
()
{
...
@@ -354,29 +393,52 @@ export default {
...
@@ -354,29 +393,52 @@ export default {
methods
:
{
methods
:
{
delYunjiListFn
(
row
){
delYunjiListFn
(
row
){
console
.
log
(
row
)
console
.
log
(
row
)
this
.
$confirm
(
'确认
关闭
?'
)
this
.
$confirm
(
'确认
删除
?'
)
.
then
(
_
=>
{
.
then
(
_
=>
{
delYunjiActivityPeriodApi
(
row
.
id
).
then
(
res
=>
{
delYunjiActivityPeriodApi
(
row
.
id
).
then
(
res
=>
{
getYunjiActivityPeriodApi
().
then
(
res
=>
{
getYunjiActivityPeriodApi
().
then
(
res
=>
{
this
.
yunjiList
=
res
this
.
yunjiList
=
res
this
.
$message
({
type
:
"success"
,
message
:
"删除成功"
});
})
})
})
})
})
}).
catch
(
_
=>
{});
.
catch
(
_
=>
{});
},
},
delStarListFn
(
row
){
delStarListFn
(
row
){
console
.
log
(
row
)
console
.
log
(
row
)
this
.
$confirm
(
'确认
关闭
?'
)
this
.
$confirm
(
'确认
删除
?'
)
.
then
(
_
=>
{
.
then
(
_
=>
{
delStarActivityPeriodApi
(
row
.
id
).
then
(
res
=>
{
delStarActivityPeriodApi
(
row
.
id
).
then
(
res
=>
{
getStarActivityPeriodApi
().
then
(
res
=>
{
getStarActivityPeriodApi
().
then
(
res
=>
{
this
.
starList
=
res
this
.
starList
=
res
this
.
$message
({
type
:
"success"
,
message
:
"删除成功"
});
})
})
}).
catch
(
_
=>
{});
},
delStarV2ListFn
(
row
){
console
.
log
(
row
)
this
.
$confirm
(
'确认删除?'
)
.
then
(
_
=>
{
delStarActivityV2PeriodApi
(
row
.
id
).
then
(
res
=>
{
getStarActivityV2PeriodApi
().
then
(
res
=>
{
this
.
starV2List
=
res
this
.
$message
({
type
:
"success"
,
message
:
"删除成功"
});
})
})
})
})
})
})
.
catch
(
_
=>
{});
.
catch
(
_
=>
{});
},
},
addPeriod
(){
addPeriod
(){
console
.
log
(
this
.
periods
)
if
(
this
.
periodsType
==
0
){
if
(
this
.
periodsType
==
0
){
addyunjiPeriodApi
(
this
.
secGoods
[
1
]).
then
(
res
=>
{
addyunjiPeriodApi
(
this
.
secGoods
[
1
]).
then
(
res
=>
{
this
.
$message
({
this
.
$message
({
...
@@ -388,7 +450,7 @@ export default {
...
@@ -388,7 +450,7 @@ export default {
this
.
yunjiList
=
res
this
.
yunjiList
=
res
})
})
})
})
}
else
{
}
else
if
(
this
.
periodsType
==
1
)
{
addStarActivityPeriodApi
(
this
.
secGoods
[
1
]).
then
(
res
=>
{
addStarActivityPeriodApi
(
this
.
secGoods
[
1
]).
then
(
res
=>
{
this
.
$message
({
this
.
$message
({
type
:
"success"
,
type
:
"success"
,
...
@@ -399,7 +461,18 @@ export default {
...
@@ -399,7 +461,18 @@ export default {
this
.
starList
=
res
this
.
starList
=
res
// console.log(this.yunjiList)
// console.log(this.yunjiList)
})
})
})
}
else
{
addStarActivityV2PeriodApi
(
this
.
secGoods
[
1
]).
then
(
res
=>
{
this
.
$message
({
type
:
"success"
,
message
:
"数据插入成功"
});
this
.
periodDialog
=
false
;
getStarActivityV2PeriodApi
().
then
(
res
=>
{
this
.
starV2List
=
res
// console.log(this.yunjiList)
})
})
})
}
}
},
},
...
@@ -410,7 +483,7 @@ export default {
...
@@ -410,7 +483,7 @@ export default {
})
})
},
},
onSend
(){
onSend
(){
console
.
log
(
this
.
secGoods
)
//
console.log(this.secGoods)
postActiveNoticeApi
(
this
.
secGoods
[
1
]).
then
(
res
=>
{
postActiveNoticeApi
(
this
.
secGoods
[
1
]).
then
(
res
=>
{
this
.
noticeDialog
=
false
;
this
.
noticeDialog
=
false
;
this
.
$message
({
this
.
$message
({
...
@@ -558,6 +631,10 @@ export default {
...
@@ -558,6 +631,10 @@ export default {
getStarActivityPeriodApi
().
then
(
res
=>
{
getStarActivityPeriodApi
().
then
(
res
=>
{
this
.
starList
=
res
this
.
starList
=
res
})
})
}
else
if
(
val
===
'11'
){
getStarActivityV2PeriodApi
().
then
(
res
=>
{
this
.
starV2List
=
res
})
}
}
},
},
first
()
{
first
()
{
...
...
src/service/api.js
View file @
967bc7b2
...
@@ -1146,6 +1146,18 @@ export const getStarActivityPeriodApi = function () {
...
@@ -1146,6 +1146,18 @@ export const getStarActivityPeriodApi = function () {
export
const
getYunjiActivityPeriodApi
=
function
()
{
export
const
getYunjiActivityPeriodApi
=
function
()
{
return
Vue
.
prototype
.
$fetch
(
`api/admin/sys/yunji/periods`
)
return
Vue
.
prototype
.
$fetch
(
`api/admin/sys/yunji/periods`
)
};
};
//云集活动期数列表
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
delStarActivityV2PeriodApi
=
function
(
periods_id
)
{
return
Vue
.
prototype
.
$del
(
`/api/admin/star/bonus/periods/
${
periods_id
}
`
)
};
//待发货列表
//待发货列表
export
const
getDeliverListApi
=
function
(
json
)
{
export
const
getDeliverListApi
=
function
(
json
)
{
return
Vue
.
prototype
.
$fetch
(
`api/admin/order/deliver/list`
,
json
)
return
Vue
.
prototype
.
$fetch
(
`api/admin/order/deliver/list`
,
json
)
...
...
src/service/index.js
View file @
967bc7b2
...
@@ -31,7 +31,7 @@ axios.interceptors.request.use(
...
@@ -31,7 +31,7 @@ axios.interceptors.request.use(
if
(
config
.
method
===
'get'
&&
config
.
url
!==
'/api/admin/login'
){
if
(
config
.
method
===
'get'
&&
config
.
url
!==
'/api/admin/login'
){
config
.
params
=
config
.
params
||
{};
config
.
params
=
config
.
params
||
{};
let
json
=
JSON
.
parse
(
JSON
.
stringify
(
config
.
params
));
let
json
=
JSON
.
parse
(
JSON
.
stringify
(
config
.
params
));
console
.
log
(
json
)
//
console.log(json)
for
(
let
k
in
json
)
for
(
let
k
in
json
)
{
{
// let reg = /^[0-9]+$/u;
// let reg = /^[0-9]+$/u;
...
@@ -55,7 +55,7 @@ axios.interceptors.request.use(
...
@@ -55,7 +55,7 @@ axios.interceptors.request.use(
if
(
process
.
env
.
NODE_ENV
===
'development'
){
if
(
process
.
env
.
NODE_ENV
===
'development'
){
config
.
params
.
special_token
=
"changchangenglish"
;
config
.
params
.
special_token
=
"changchangenglish"
;
}
}
console
.
log
(
JSON
.
stringify
(
json
))
//
console.log(JSON.stringify(json))
config
.
params
.
param_token
=
md5
(
JSON
.
stringify
(
json
));
config
.
params
.
param_token
=
md5
(
JSON
.
stringify
(
json
));
}
else
if
(
config
.
url
!==
'/api/admin/login'
){
}
else
if
(
config
.
url
!==
'/api/admin/login'
){
config
.
data
=
config
.
data
||
{};
config
.
data
=
config
.
data
||
{};
...
...
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