正在显示
16 个修改的文件
包含
1031 行增加
和
79 行删除
1 | +<admintpl file="header" /> | ||
2 | +</head> | ||
3 | +<body> | ||
4 | +<div class="wrap js-check-wrap"> | ||
5 | + <ul class="nav nav-tabs"> | ||
6 | + <li class="active"><a href="javascript:;">体验培训报名列表</a></li> | ||
7 | + </ul> | ||
8 | + <form class="well form-search" method="post" action="{:U('TrainApply/index')}"> | ||
9 | + 时间: | ||
10 | + <input type="text" name="start_time" class="js-datetime" value="{$formget.start_time|default=''}" style="width: 120px;" autocomplete="off">- | ||
11 | + <input type="text" class="js-datetime" name="end_time" value="{$formget.end_time|default=''}" style="width: 120px;" autocomplete="off"> | ||
12 | + 关键字: | ||
13 | + <input type="text" name="keyword" style="width: 200px;" value="{$keyword|default=''}" placeholder="请输入关键字..."> | ||
14 | + <input type="submit" class="btn btn-primary" value="搜索" /> | ||
15 | + <a class="btn btn-danger" href="{:U('TrainApply/index')}">清空</a> | ||
16 | + </form> | ||
17 | + <form class="js-ajax-form" action="" method="post"> | ||
18 | + <div class="table-actions"> | ||
19 | + <button class="btn btn-danger btn-small js-ajax-submit" type="submit" data-action="{:U('TrainApply/delete')}" data-subcheck="true" data-msg="您确定删除吗?">{:L('DELETE')}</button> | ||
20 | + </div> | ||
21 | + <table class="table table-hover table-bordered table-list"> | ||
22 | + <thead> | ||
23 | + <tr> | ||
24 | + <th width="15"><label><input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x"></label></th> | ||
25 | + <th width="50">ID</th> | ||
26 | + <th>用户id</th> | ||
27 | + <th width="50">报名人姓名</th> | ||
28 | + <th>所在省市</th> | ||
29 | + <th>出生年份</th> | ||
30 | + <th>性别</th> | ||
31 | + <th>手机号码</th> | ||
32 | + <th>邮箱</th> | ||
33 | + <th width="100">提交时间</th> | ||
34 | + <th width="70">操作</th> | ||
35 | + </tr> | ||
36 | + </thead> | ||
37 | + <foreach name="list" item="vo"> | ||
38 | + <tr> | ||
39 | + <td><input type="checkbox" class="js-check" data-yid="js-check-y" data-xid="js-check-x" name="ids[]" value="{$vo.id}" title="ID:{$vo.id}"></td> | ||
40 | + <td><b>{$vo.id}</b></td> | ||
41 | + <td>{$vo.user_id}</td> | ||
42 | + <td>{$vo.name}</td> | ||
43 | + <td>{$vo.province}{$vo.city}</td> | ||
44 | + <td>{$vo.birth}</td> | ||
45 | + <td><eq name="vo.sex" value="1">男</eq><eq name="vo.sex" value="2">女</eq></td> | ||
46 | + <td>{$vo.mobile}</td> | ||
47 | + <td>{$vo.email}</td> | ||
48 | + <td>{:date('Y-m-d H:i',$vo['ctime'])}</td> | ||
49 | + <td> | ||
50 | + <a href="{:U('TrainApply/view',array('id'=>$vo['id']))}">查看</a> | | ||
51 | + <a href="{:U('TrainApply/delete',array('id'=>$vo['id']))}" class="js-ajax-delete">删除</a> | ||
52 | + </td> | ||
53 | + </tr> | ||
54 | + </foreach> | ||
55 | + <tfoot> | ||
56 | + <tr> | ||
57 | + <th width="15"><label><input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x"></label></th> | ||
58 | + <th width="50">ID</th> | ||
59 | + <th>用户id</th> | ||
60 | + <th width="50">报名人姓名</th> | ||
61 | + <th>所在省市</th> | ||
62 | + <th>出生年份</th> | ||
63 | + <th>性别</th> | ||
64 | + <th>手机号码</th> | ||
65 | + <th>邮箱</th> | ||
66 | + <th width="50">提交时间</th> | ||
67 | + <th width="70">操作</th> | ||
68 | + </tr> | ||
69 | + </tfoot> | ||
70 | + </table> | ||
71 | + <div class="table-actions"> | ||
72 | + <button class="btn btn-danger btn-small js-ajax-submit" type="submit" data-action="{:U('TrainApply/delete')}" data-subcheck="true" data-msg="你确定删除吗?">{:L('DELETE')}</button> | ||
73 | + </div> | ||
74 | + <div class="pagination">{$page}</div> | ||
75 | + </form> | ||
76 | +</div> | ||
77 | +<script src="__PUBLIC__/js/common.js"></script> | ||
78 | +</body> | ||
79 | +</html> |
1 | +<admintpl file="header" /> | ||
2 | +</head> | ||
3 | +<body> | ||
4 | +<div class="wrap js-check-wrap"> | ||
5 | + <ul class="nav nav-tabs"> | ||
6 | + <li><a href="{:U('TrainApply/index')}">体验培训报名列表</a></li> | ||
7 | + <li class="active"><a href="">体验培训报名详情</a></li> | ||
8 | + </ul> | ||
9 | + <form action="" method="post" class="form-horizontal js-ajax-forms"> | ||
10 | + <div class="row-fluid"> | ||
11 | + <div class="span9"> | ||
12 | + <table class="table table-bordered"> | ||
13 | + <tr> | ||
14 | + <th width="80">用户ID</th> | ||
15 | + <td>{$user_id}</td> | ||
16 | + </tr> | ||
17 | + <tr> | ||
18 | + <th>姓名</th> | ||
19 | + <td>{$name}</td> | ||
20 | + </tr> | ||
21 | + <tr> | ||
22 | + <th>所在省市</th> | ||
23 | + <td>{$province}{$city}</td> | ||
24 | + </tr> | ||
25 | + <tr> | ||
26 | + <th>出生年份</th> | ||
27 | + <td>{$birth}</td> | ||
28 | + </tr> | ||
29 | + <tr> | ||
30 | + <th>性别</th> | ||
31 | + <td> | ||
32 | + <eq name="sex" value="1">男</eq> | ||
33 | + <eq name="sex" value="2">女</eq> | ||
34 | + </td> | ||
35 | + </tr> | ||
36 | + <tr> | ||
37 | + <th>手机号码</th> | ||
38 | + <td>{$mobile}</td> | ||
39 | + </tr> | ||
40 | + <tr> | ||
41 | + <th>邮箱</th> | ||
42 | + <td>{$email}</td> | ||
43 | + </tr> | ||
44 | + <tr> | ||
45 | + <th>个人感兴趣的培训课程(文化之旅目的地)简要描述</th> | ||
46 | + <td>{$lesson}</td> | ||
47 | + </tr> | ||
48 | + <tr> | ||
49 | + <th>个人感兴趣的体验方式(文化项目)简要描述</th> | ||
50 | + <td>{$experience}</td> | ||
51 | + </tr> | ||
52 | + <tr> | ||
53 | + <th>个人感兴趣的旅行方式简要描述(文化之旅)</th> | ||
54 | + <td>{$travel}</td> | ||
55 | + </tr> | ||
56 | + <tr> | ||
57 | + <th>提交时间</th> | ||
58 | + <td>{:date('Y-m-d H:i',$ctime)}</td> | ||
59 | + </tr> | ||
60 | + </table> | ||
61 | + </div> | ||
62 | + </div> | ||
63 | + <div class="form-actions"> | ||
64 | + <a class="btn" href="{:U('TrainApply/index')}">返回</a> | ||
65 | + </div> | ||
66 | + </form> | ||
67 | +</div> | ||
68 | +<script src="__PUBLIC__/js/common.js"></script> | ||
69 | +</body> | ||
70 | +</html> |
1 | +<admintpl file="header" /> | ||
2 | +</head> | ||
3 | +<body> | ||
4 | +<div class="wrap js-check-wrap"> | ||
5 | + <ul class="nav nav-tabs"> | ||
6 | + <li class="active"><a href="javascript:;">任务投稿提交列表</a></li> | ||
7 | + </ul> | ||
8 | + <form class="well form-search" method="post" action="{:U('WillMissionApply/index')}"> | ||
9 | + 时间: | ||
10 | + <input type="text" name="start_time" class="js-datetime" value="{$formget.start_time|default=''}" style="width: 120px;" autocomplete="off">- | ||
11 | + <input type="text" class="js-datetime" name="end_time" value="{$formget.end_time|default=''}" style="width: 120px;" autocomplete="off"> | ||
12 | + 关键字: | ||
13 | + <input type="text" name="keyword" style="width: 200px;" value="{$keyword|default=''}" placeholder="请输入关键字..."> | ||
14 | + <input type="submit" class="btn btn-primary" value="搜索" /> | ||
15 | + <a class="btn btn-danger" href="{:U('WillMissionApply/index')}">清空</a> | ||
16 | + </form> | ||
17 | + <form class="js-ajax-form" action="" method="post"> | ||
18 | + <div class="table-actions"> | ||
19 | + <button class="btn btn-danger btn-small js-ajax-submit" type="submit" data-action="{:U('WillMissionApply/delete')}" data-subcheck="true" data-msg="您确定删除吗?">{:L('DELETE')}</button> | ||
20 | + </div> | ||
21 | + <table class="table table-hover table-bordered table-list"> | ||
22 | + <thead> | ||
23 | + <tr> | ||
24 | + <th width="15"><label><input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x"></label></th> | ||
25 | + <th width="50">ID</th> | ||
26 | + <th>用户id</th> | ||
27 | + <th width="50">投稿人姓名</th> | ||
28 | + <th>所在省市</th> | ||
29 | + <th>出生年份</th> | ||
30 | + <th>性别</th> | ||
31 | + <th>高校</th> | ||
32 | + <th>专业</th> | ||
33 | + <th>手机号码</th> | ||
34 | + <th>年级</th> | ||
35 | + <th>邮箱</th> | ||
36 | + <th width="100">提交时间</th> | ||
37 | + <th width="70">操作</th> | ||
38 | + </tr> | ||
39 | + </thead> | ||
40 | + <foreach name="list" item="vo"> | ||
41 | + <tr> | ||
42 | + <td><input type="checkbox" class="js-check" data-yid="js-check-y" data-xid="js-check-x" name="ids[]" value="{$vo.id}" title="ID:{$vo.id}"></td> | ||
43 | + <td><b>{$vo.id}</b></td> | ||
44 | + <td>{$vo.user_id}</td> | ||
45 | + <td>{$vo.name}</td> | ||
46 | + <td>{$vo.province}{$vo.city}</td> | ||
47 | + <td>{$vo.birth}</td> | ||
48 | + <td><eq name="vo.sex" value="1">男</eq><eq name="vo.sex" value="2">女</eq></td> | ||
49 | + <td>{$vo.school}</td> | ||
50 | + <td>{$vo.major}</td> | ||
51 | + <td>{$vo.mobile}</td> | ||
52 | + <td>{$vo.classes}</td> | ||
53 | + <td>{$vo.email}</td> | ||
54 | + <td>{:date('Y-m-d H:i',$vo['ctime'])}</td> | ||
55 | + <td> | ||
56 | + <a href="{:U('WillMissionApply/view',array('id'=>$vo['id']))}">查看</a> | | ||
57 | + <a href="{:U('WillMissionApply/delete',array('id'=>$vo['id']))}" class="js-ajax-delete">删除</a> | ||
58 | + </td> | ||
59 | + </tr> | ||
60 | + </foreach> | ||
61 | + <tfoot> | ||
62 | + <tr> | ||
63 | + <th width="15"><label><input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x"></label></th> | ||
64 | + <th width="50">ID</th> | ||
65 | + <th>用户id</th> | ||
66 | + <th width="50">投稿人姓名</th> | ||
67 | + <th>所在省市</th> | ||
68 | + <th>出生年份</th> | ||
69 | + <th>性别</th> | ||
70 | + <th>高校</th> | ||
71 | + <th>专业</th> | ||
72 | + <th>手机号码</th> | ||
73 | + <th>年级</th> | ||
74 | + <th>邮箱</th> | ||
75 | + <th width="50">提交时间</th> | ||
76 | + <th width="70">操作</th> | ||
77 | + </tr> | ||
78 | + </tfoot> | ||
79 | + </table> | ||
80 | + <div class="table-actions"> | ||
81 | + <button class="btn btn-danger btn-small js-ajax-submit" type="submit" data-action="{:U('WillMissionApply/delete')}" data-subcheck="true" data-msg="你确定删除吗?">{:L('DELETE')}</button> | ||
82 | + </div> | ||
83 | + <div class="pagination">{$page}</div> | ||
84 | + </form> | ||
85 | +</div> | ||
86 | +<script src="__PUBLIC__/js/common.js"></script> | ||
87 | +</body> | ||
88 | +</html> |
1 | +<admintpl file="header" /> | ||
2 | +</head> | ||
3 | +<body> | ||
4 | +<div class="wrap js-check-wrap"> | ||
5 | + <ul class="nav nav-tabs"> | ||
6 | + <li><a href="{:U('WillMissionApply/index')}">任务投稿提交列表</a></li> | ||
7 | + <li class="active"><a href="">任务投稿提交详情</a></li> | ||
8 | + </ul> | ||
9 | + <form action="" method="post" class="form-horizontal js-ajax-forms"> | ||
10 | + <div class="row-fluid"> | ||
11 | + <div class="span9"> | ||
12 | + <table class="table table-bordered"> | ||
13 | + <tr> | ||
14 | + <th width="80">用户ID</th> | ||
15 | + <td>{$user_id}</td> | ||
16 | + </tr> | ||
17 | + <tr> | ||
18 | + <th>姓名</th> | ||
19 | + <td>{$name}</td> | ||
20 | + </tr> | ||
21 | + <tr> | ||
22 | + <th>所在省市</th> | ||
23 | + <td>{$province}{$city}</td> | ||
24 | + </tr> | ||
25 | + <tr> | ||
26 | + <th>出生年份</th> | ||
27 | + <td>{$birth}</td> | ||
28 | + </tr> | ||
29 | + <tr> | ||
30 | + <th>性别</th> | ||
31 | + <td> | ||
32 | + <eq name="sex" value="1">男</eq> | ||
33 | + <eq name="sex" value="2">女</eq> | ||
34 | + </td> | ||
35 | + </tr> | ||
36 | + <tr> | ||
37 | + <th>高校</th> | ||
38 | + <td>{$school}</td> | ||
39 | + </tr> | ||
40 | + <tr> | ||
41 | + <th>专业</th> | ||
42 | + <td>{$major}</td> | ||
43 | + </tr> | ||
44 | + <tr> | ||
45 | + <th>手机号码</th> | ||
46 | + <td>{$mobile}</td> | ||
47 | + </tr> | ||
48 | + <tr> | ||
49 | + <th>年级</th> | ||
50 | + <td>{$classes}</td> | ||
51 | + </tr> | ||
52 | + <tr> | ||
53 | + <th>邮箱</th> | ||
54 | + <td>{$email}</td> | ||
55 | + </tr> | ||
56 | + <tr> | ||
57 | + <th>相关专业经验(绘画、设计、广告、文创、营销等)简要描述</th> | ||
58 | + <td>{$experience}</td> | ||
59 | + </tr> | ||
60 | + <tr> | ||
61 | + <th>相关创作或获奖作品简要描述</th> | ||
62 | + <td>{$product}</td> | ||
63 | + </tr> | ||
64 | + <tr> | ||
65 | + <th>作品描述</th> | ||
66 | + <td>{$product_description}</td> | ||
67 | + </tr> | ||
68 | + <tr> | ||
69 | + <th>提交时间</th> | ||
70 | + <td>{:date('Y-m-d H:i',$ctime)}</td> | ||
71 | + </tr> | ||
72 | + </table> | ||
73 | + </div> | ||
74 | + </div> | ||
75 | + <div class="form-actions"> | ||
76 | + <a class="btn" href="{:U('WillMissionApply/index')}">返回</a> | ||
77 | + </div> | ||
78 | + </form> | ||
79 | +</div> | ||
80 | +<script src="__PUBLIC__/js/common.js"></script> | ||
81 | +</body> | ||
82 | +</html> |
@@ -3,20 +3,20 @@ | @@ -3,20 +3,20 @@ | ||
3 | <body> | 3 | <body> |
4 | <div class="wrap js-check-wrap"> | 4 | <div class="wrap js-check-wrap"> |
5 | <ul class="nav nav-tabs"> | 5 | <ul class="nav nav-tabs"> |
6 | - <li class="active"><a href="javascript:;">双创项目提交列表</a></li> | 6 | + <li class="active"><a href="javascript:;">入会申请提交列表</a></li> |
7 | </ul> | 7 | </ul> |
8 | - <form class="well form-search" method="post" action="{:U('WillProduceApply/index')}"> | 8 | + <form class="well form-search" method="post" action="{:U('WillUserApply/index')}"> |
9 | 时间: | 9 | 时间: |
10 | <input type="text" name="start_time" class="js-datetime" value="{$formget.start_time|default=''}" style="width: 120px;" autocomplete="off">- | 10 | <input type="text" name="start_time" class="js-datetime" value="{$formget.start_time|default=''}" style="width: 120px;" autocomplete="off">- |
11 | <input type="text" class="js-datetime" name="end_time" value="{$formget.end_time|default=''}" style="width: 120px;" autocomplete="off"> | 11 | <input type="text" class="js-datetime" name="end_time" value="{$formget.end_time|default=''}" style="width: 120px;" autocomplete="off"> |
12 | 关键字: | 12 | 关键字: |
13 | <input type="text" name="keyword" style="width: 200px;" value="{$keyword|default=''}" placeholder="请输入关键字..."> | 13 | <input type="text" name="keyword" style="width: 200px;" value="{$keyword|default=''}" placeholder="请输入关键字..."> |
14 | <input type="submit" class="btn btn-primary" value="搜索" /> | 14 | <input type="submit" class="btn btn-primary" value="搜索" /> |
15 | - <a class="btn btn-danger" href="{:U('WillProduceApply/index')}">清空</a> | 15 | + <a class="btn btn-danger" href="{:U('WillUserApply/index')}">清空</a> |
16 | </form> | 16 | </form> |
17 | <form class="js-ajax-form" action="" method="post"> | 17 | <form class="js-ajax-form" action="" method="post"> |
18 | <div class="table-actions"> | 18 | <div class="table-actions"> |
19 | - <button class="btn btn-danger btn-small js-ajax-submit" type="submit" data-action="{:U('WillProduceApply/delete')}" data-subcheck="true" data-msg="您确定删除吗?">{:L('DELETE')}</button> | 19 | + <button class="btn btn-danger btn-small js-ajax-submit" type="submit" data-action="{:U('WillUserApply/delete')}" data-subcheck="true" data-msg="您确定删除吗?">{:L('DELETE')}</button> |
20 | </div> | 20 | </div> |
21 | <table class="table table-hover table-bordered table-list"> | 21 | <table class="table table-hover table-bordered table-list"> |
22 | <thead> | 22 | <thead> |
@@ -24,7 +24,7 @@ | @@ -24,7 +24,7 @@ | ||
24 | <th width="15"><label><input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x"></label></th> | 24 | <th width="15"><label><input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x"></label></th> |
25 | <th width="50">ID</th> | 25 | <th width="50">ID</th> |
26 | <th>用户id</th> | 26 | <th>用户id</th> |
27 | - <th width="50">投稿人姓名</th> | 27 | + <th width="50">申请人姓名</th> |
28 | <th>所在省市</th> | 28 | <th>所在省市</th> |
29 | <th>年龄</th> | 29 | <th>年龄</th> |
30 | <th>性别</th> | 30 | <th>性别</th> |
@@ -58,9 +58,8 @@ | @@ -58,9 +58,8 @@ | ||
58 | <eq name="vo.status" value="3">审核不通过</eq><eq name="vo.status" value="4">重新提交审核</eq> | 58 | <eq name="vo.status" value="3">审核不通过</eq><eq name="vo.status" value="4">重新提交审核</eq> |
59 | </td> | 59 | </td> |
60 | <td> | 60 | <td> |
61 | - <a href="{:U('WillProduceApply/view',array('id'=>$vo['id']))}">查看</a> | | ||
62 | - <eq name="vo.is_issue" value="0"><a href="{:U('WillProduceApply/send',array('id'=>$vo['id']))}">发布</a> |</eq> | ||
63 | - <a href="{:U('WillProduceApply/delete',array('id'=>$vo['id']))}" class="js-ajax-delete">删除</a> | 61 | + <a href="{:U('WillUserApply/view',array('id'=>$vo['id']))}">查看</a> | |
62 | + <a href="{:U('WillUserApply/delete',array('id'=>$vo['id']))}" class="js-ajax-delete">删除</a> | ||
64 | </td> | 63 | </td> |
65 | </tr> | 64 | </tr> |
66 | </foreach> | 65 | </foreach> |
@@ -69,7 +68,7 @@ | @@ -69,7 +68,7 @@ | ||
69 | <th width="15"><label><input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x"></label></th> | 68 | <th width="15"><label><input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x"></label></th> |
70 | <th width="50">ID</th> | 69 | <th width="50">ID</th> |
71 | <th>用户id</th> | 70 | <th>用户id</th> |
72 | - <th width="50">投稿人姓名</th> | 71 | + <th width="50">申请人姓名</th> |
73 | <th>所在省市</th> | 72 | <th>所在省市</th> |
74 | <th>年龄</th> | 73 | <th>年龄</th> |
75 | <th>性别</th> | 74 | <th>性别</th> |
@@ -85,7 +84,7 @@ | @@ -85,7 +84,7 @@ | ||
85 | </tfoot> | 84 | </tfoot> |
86 | </table> | 85 | </table> |
87 | <div class="table-actions"> | 86 | <div class="table-actions"> |
88 | - <button class="btn btn-danger btn-small js-ajax-submit" type="submit" data-action="{:U('WillProduceApply/delete')}" data-subcheck="true" data-msg="你确定删除吗?">{:L('DELETE')}</button> | 87 | + <button class="btn btn-danger btn-small js-ajax-submit" type="submit" data-action="{:U('WillUserApply/delete')}" data-subcheck="true" data-msg="你确定删除吗?">{:L('DELETE')}</button> |
89 | </div> | 88 | </div> |
90 | <div class="pagination">{$page}</div> | 89 | <div class="pagination">{$page}</div> |
91 | </form> | 90 | </form> |
@@ -3,8 +3,8 @@ | @@ -3,8 +3,8 @@ | ||
3 | <body> | 3 | <body> |
4 | <div class="wrap js-check-wrap"> | 4 | <div class="wrap js-check-wrap"> |
5 | <ul class="nav nav-tabs"> | 5 | <ul class="nav nav-tabs"> |
6 | - <li><a href="{:U('WillProduceApply/index')}">双创项目提交列表</a></li> | ||
7 | - <li class="active"><a href="">双创项目提交详情</a></li> | 6 | + <li><a href="{:U('WillUserApply/index')}">入会申请提交列表</a></li> |
7 | + <li class="active"><a href="">入会申请提交详情</a></li> | ||
8 | </ul> | 8 | </ul> |
9 | <form action="" method="post" class="form-horizontal js-ajax-forms"> | 9 | <form action="" method="post" class="form-horizontal js-ajax-forms"> |
10 | <div class="row-fluid"> | 10 | <div class="row-fluid"> |
@@ -13,6 +13,7 @@ | @@ -13,6 +13,7 @@ | ||
13 | <tr> | 13 | <tr> |
14 | <th width="80">用户ID</th> | 14 | <th width="80">用户ID</th> |
15 | <td>{$user_id}</td> | 15 | <td>{$user_id}</td> |
16 | + <input type="hidden" name="id" value="{$id}"/> | ||
16 | </tr> | 17 | </tr> |
17 | <tr> | 18 | <tr> |
18 | <th>姓名</th> | 19 | <th>姓名</th> |
@@ -54,16 +55,12 @@ | @@ -54,16 +55,12 @@ | ||
54 | <td>{$email}</td> | 55 | <td>{$email}</td> |
55 | </tr> | 56 | </tr> |
56 | <tr> | 57 | <tr> |
57 | - <th>团队成员或个人相关经验</th> | 58 | + <th>相关专业经验</th> |
58 | <td>{$experience}</td> | 59 | <td>{$experience}</td> |
59 | </tr> | 60 | </tr> |
60 | <tr> | 61 | <tr> |
61 | - <th>团队成员或个人描述</th> | ||
62 | - <td>{$product}</td> | ||
63 | - </tr> | ||
64 | - <tr> | ||
65 | - <th>双创项目创意概述</th> | ||
66 | - <td>{$product_description}</td> | 62 | + <th>个人创意特长与兴趣领域描述</th> |
63 | + <td>{$skill}</td> | ||
67 | </tr> | 64 | </tr> |
68 | <tr> | 65 | <tr> |
69 | <th>提交时间</th> | 66 | <th>提交时间</th> |
@@ -71,6 +68,25 @@ | @@ -71,6 +68,25 @@ | ||
71 | </tr> | 68 | </tr> |
72 | </table> | 69 | </table> |
73 | </div> | 70 | </div> |
71 | + <div class="span3"> | ||
72 | + <table class="table table-bordered"> | ||
73 | + <tr> | ||
74 | + <th>状态</th> | ||
75 | + </tr> | ||
76 | + <tr> | ||
77 | + <td> | ||
78 | + <php> | ||
79 | + $status_yes=$status==2?"checked":""; | ||
80 | + $status_no=$status==1?"checked":""; | ||
81 | + $status_un=$status==3?"checked":""; | ||
82 | + </php> | ||
83 | + <label class="radio"><input type="radio" name="status" value="2" {$status_yes}>通过</label> | ||
84 | + <label class="radio"><input type="radio" name="status" value="1" {$status_no}>待审核</label> | ||
85 | + <label class="radio"><input type="radio" name="status" value="3" {$status_un}>驳回</label> | ||
86 | + </td> | ||
87 | + </tr> | ||
88 | + </table> | ||
89 | + </div> | ||
74 | </div> | 90 | </div> |
75 | <div class="form-actions"> | 91 | <div class="form-actions"> |
76 | <a class="btn" href="{:U('WillProduceApply/index')}">返回</a> | 92 | <a class="btn" href="{:U('WillProduceApply/index')}">返回</a> |
1 | +<?php | ||
2 | +/** | ||
3 | + * Created by PhpStorm. | ||
4 | + * User: 29925 | ||
5 | + * Date: 2018/4/27 | ||
6 | + * Time: 21:16 | ||
7 | + */ | ||
8 | + | ||
9 | +namespace Admin\Controller; | ||
10 | + | ||
11 | +use Common\Controller\AdminbaseController; | ||
12 | + | ||
13 | +class TrainApplyController extends AdminbaseController { | ||
14 | + | ||
15 | + protected $train_apply_model; | ||
16 | + protected $train_model; | ||
17 | + | ||
18 | + function _initialize() { | ||
19 | + parent::_initialize(); // TODO: Change the autogenerated stub | ||
20 | + $this->train_apply_model = D('Common/TrainApply'); | ||
21 | + $this->train_model = D('Common/Train'); | ||
22 | + } | ||
23 | + | ||
24 | + // 体验培训报名列表 | ||
25 | + public function index() { | ||
26 | + $this->assign('list', $this->train_apply_model->getList(I('get.p'), I('post.keyword'), strtotime(I('post.start_time')), strtotime(I('post.end_time')))); | ||
27 | + $count = $this->train_apply_model->getCount(I('post.keyword'), strtotime(I('post.start_time')), strtotime(I('post.end_time'))); | ||
28 | + $page = $this->page($count, C('MAX_PAGE_NUM')); | ||
29 | + $this->assign('page', $page->show('Admin')); | ||
30 | + $this->assign('formget', I('post.')); | ||
31 | + $this->assign('keyword', I('post.keyword')); | ||
32 | + $this->display(); | ||
33 | + } | ||
34 | + | ||
35 | + // 查看 | ||
36 | + public function view(){ | ||
37 | + $id = I("get.id",0,'intval'); | ||
38 | + $info = $this->train_apply_model->where(array('id'=>$id, 'is_del'=>0))->find(); | ||
39 | + $info['images'] = explode(',', $info['images']); | ||
40 | + $this->assign($info); | ||
41 | + $this->display(); | ||
42 | + } | ||
43 | + | ||
44 | + // 发布 | ||
45 | + public function send(){ | ||
46 | + $id = I("get.id",0,'intval'); | ||
47 | + $info = $this->train_apply_model->where(array('id'=>$id, 'is_del'=>0))->find(); | ||
48 | + $info['images'] = explode(',', $info['images'])[0]; | ||
49 | + $this->assign($info); | ||
50 | + $this->display(); | ||
51 | + } | ||
52 | + | ||
53 | + // 删除 | ||
54 | + public function delete(){ | ||
55 | + if(I('get.id')){ | ||
56 | + $id = I("get.id",0,'intval'); | ||
57 | + if ($this->train_apply_model->where(array('id'=>$id))->save(array('is_del'=>1,'dtime'=>time())) !==false) { | ||
58 | + $this->success("删除成功!"); | ||
59 | + } else { | ||
60 | + $this->error("删除失败!"); | ||
61 | + } | ||
62 | + } | ||
63 | + | ||
64 | + if(I('post.ids')){ | ||
65 | + $ids = I('post.ids/a'); | ||
66 | + | ||
67 | + if (!$this->train_apply_model->where(array('id'=>array('in',$ids)))->save(array('is_del'=>1,'dtime'=>time()))) { | ||
68 | + $this->error("删除失败!"); | ||
69 | + } | ||
70 | + $this->success("删除成功!"); | ||
71 | + } | ||
72 | + } | ||
73 | + | ||
74 | +} |
1 | +<?php | ||
2 | +/** | ||
3 | + * Created by PhpStorm. | ||
4 | + * User: 29925 | ||
5 | + * Date: 2018/4/27 | ||
6 | + * Time: 20:41 | ||
7 | + */ | ||
8 | + | ||
9 | +namespace Admin\Controller; | ||
10 | + | ||
11 | +use Common\Controller\AdminbaseController; | ||
12 | + | ||
13 | +class WillMissionApplyController extends AdminbaseController { | ||
14 | + | ||
15 | + protected $will_mission_apply_model; | ||
16 | + protected $will_mission_model; | ||
17 | + | ||
18 | + function _initialize() { | ||
19 | + parent::_initialize(); // TODO: Change the autogenerated stub | ||
20 | + $this->will_mission_apply_model = D('Common/WillMissionApply'); | ||
21 | + $this->will_mission_model = D('Common/WillMission'); | ||
22 | + } | ||
23 | + | ||
24 | + // 任务投稿提交列表 | ||
25 | + public function index() { | ||
26 | + $mid = I('get.id',0,'intval'); | ||
27 | + $this->assign('list', $this->will_mission_apply_model->getList(1, I('get.p'), I('post.keyword'), strtotime(I('post.start_time')), strtotime(I('post.end_time')))); | ||
28 | + $count = $this->will_mission_apply_model->getCount(1, I('post.keyword'), strtotime(I('post.start_time')), strtotime(I('post.end_time'))); | ||
29 | + $page = $this->page($count, C('MAX_PAGE_NUM')); | ||
30 | + $this->assign('page', $page->show('Admin')); | ||
31 | + $this->assign('formget', I('post.')); | ||
32 | + $this->assign('keyword', I('post.keyword')); | ||
33 | + $this->display(); | ||
34 | + } | ||
35 | + | ||
36 | + // 查看 | ||
37 | + public function view(){ | ||
38 | + $id = I("get.id",0,'intval'); | ||
39 | + $info = $this->will_mission_apply_model->where(array('id'=>$id, 'is_del'=>0))->find(); | ||
40 | + $info['images'] = explode(',', $info['images']); | ||
41 | + $this->assign($info); | ||
42 | + $this->display(); | ||
43 | + } | ||
44 | + | ||
45 | + // 发布 | ||
46 | + public function send(){ | ||
47 | + $id = I("get.id",0,'intval'); | ||
48 | + $info = $this->will_mission_apply_model->where(array('id'=>$id, 'is_del'=>0))->find(); | ||
49 | + $info['images'] = explode(',', $info['images'])[0]; | ||
50 | + $this->assign($info); | ||
51 | + $this->display(); | ||
52 | + } | ||
53 | + | ||
54 | + // 删除 | ||
55 | + public function delete(){ | ||
56 | + if(I('get.id')){ | ||
57 | + $id = I("get.id",0,'intval'); | ||
58 | + if ($this->will_mission_apply_model->where(array('id'=>$id))->save(array('is_del'=>1,'dtime'=>time())) !==false) { | ||
59 | + $this->success("删除成功!"); | ||
60 | + } else { | ||
61 | + $this->error("删除失败!"); | ||
62 | + } | ||
63 | + } | ||
64 | + | ||
65 | + if(I('post.ids')){ | ||
66 | + $ids = I('post.ids/a'); | ||
67 | + | ||
68 | + if (!$this->will_mission_apply_model->where(array('id'=>array('in',$ids)))->save(array('is_del'=>1,'dtime'=>time()))) { | ||
69 | + $this->error("删除失败!"); | ||
70 | + } | ||
71 | + $this->success("删除成功!"); | ||
72 | + } | ||
73 | + } | ||
74 | + | ||
75 | +} |
@@ -12,11 +12,13 @@ use Common\Controller\AdminbaseController; | @@ -12,11 +12,13 @@ use Common\Controller\AdminbaseController; | ||
12 | 12 | ||
13 | class WillUserApplyController extends AdminbaseController { | 13 | class WillUserApplyController extends AdminbaseController { |
14 | 14 | ||
15 | + protected $user_model; | ||
15 | protected $will_user_apply_model; | 16 | protected $will_user_apply_model; |
16 | 17 | ||
17 | function _initialize() { | 18 | function _initialize() { |
18 | parent::_initialize(); // TODO: Change the autogenerated stub | 19 | parent::_initialize(); // TODO: Change the autogenerated stub |
19 | $this->will_user_apply_model = D('Common/WillUserApply'); | 20 | $this->will_user_apply_model = D('Common/WillUserApply'); |
21 | + $this->user_model = D('Common/User'); | ||
20 | } | 22 | } |
21 | 23 | ||
22 | // 鹿鸣社申请列表 | 24 | // 鹿鸣社申请列表 |
@@ -39,6 +41,25 @@ class WillUserApplyController extends AdminbaseController { | @@ -39,6 +41,25 @@ class WillUserApplyController extends AdminbaseController { | ||
39 | $this->display(); | 41 | $this->display(); |
40 | } | 42 | } |
41 | 43 | ||
44 | + //用户认证编辑 | ||
45 | + public function edit_post(){ | ||
46 | + if(IS_POST) { | ||
47 | + $post = I('post.'); | ||
48 | + $id = I('post.id'); | ||
49 | + $user_id = $this->will_user_apply_model->where(array('id'=>$id))->getField('user_id'); | ||
50 | + if($this->will_user_apply_model->save($post)) { | ||
51 | + if(I('post.status') == 2) { | ||
52 | + $this->user_model->where(array('id'=>$user_id))->save(array('status'=>2,'join_time'=>time())); | ||
53 | + } else { | ||
54 | + $this->user_model->where(array('id'=>$user_id))->save(array('status'=>1)); | ||
55 | + } | ||
56 | + $this->success('保存成功'); | ||
57 | + } else { | ||
58 | + $this->error('保存失败'); | ||
59 | + } | ||
60 | + } | ||
61 | + } | ||
62 | + | ||
42 | // 删除 | 63 | // 删除 |
43 | public function delete(){ | 64 | public function delete(){ |
44 | if(I('get.id')){ | 65 | if(I('get.id')){ |
@@ -20,9 +20,10 @@ class TrainApplyModel extends CommonModel { | @@ -20,9 +20,10 @@ class TrainApplyModel extends CommonModel { | ||
20 | array('name', 'require', '报名人不能为空', 1, 'regex', CommonModel::MODEL_BOTH), | 20 | array('name', 'require', '报名人不能为空', 1, 'regex', CommonModel::MODEL_BOTH), |
21 | array('province', 'require', '所在省不能为空', 1, 'regex', CommonModel::MODEL_BOTH), | 21 | array('province', 'require', '所在省不能为空', 1, 'regex', CommonModel::MODEL_BOTH), |
22 | array('city', 'require', '城市不能为空', 1, 'regex', CommonModel::MODEL_BOTH), | 22 | array('city', 'require', '城市不能为空', 1, 'regex', CommonModel::MODEL_BOTH), |
23 | - array('age', 'number', '年龄格式错误', 1, 'regex', CommonModel::MODEL_BOTH), | ||
24 | - array('sex', array(0,1,2), '性别格式错误', 1, 'regex', CommonModel::MODEL_BOTH), | 23 | + array('birth', 'require', '出生年月不能为空', 1, 'regex', CommonModel::MODEL_BOTH), |
24 | + array('sex', array(0,1,2), '性别格式错误', 1, 'in', CommonModel::MODEL_BOTH), | ||
25 | array('mobile', 'require', '手机号码不能为空', 1, 'regex', CommonModel::MODEL_BOTH), | 25 | array('mobile', 'require', '手机号码不能为空', 1, 'regex', CommonModel::MODEL_BOTH), |
26 | + array('mobile', 'mobile', '手机号码格式错误', 1, 'regex', CommonModel::MODEL_BOTH), | ||
26 | array('email', 'require', '邮箱不能为空', 1, 'regex', CommonModel::MODEL_BOTH), | 27 | array('email', 'require', '邮箱不能为空', 1, 'regex', CommonModel::MODEL_BOTH), |
27 | array('email', 'email', '邮箱格式错误', 1, 'regex', CommonModel::MODEL_BOTH), | 28 | array('email', 'email', '邮箱格式错误', 1, 'regex', CommonModel::MODEL_BOTH), |
28 | array('lesson', 'require', '培训课程描述不能为空', 1, 'regex', CommonModel::MODEL_BOTH), | 29 | array('lesson', 'require', '培训课程描述不能为空', 1, 'regex', CommonModel::MODEL_BOTH), |
@@ -31,11 +32,15 @@ class TrainApplyModel extends CommonModel { | @@ -31,11 +32,15 @@ class TrainApplyModel extends CommonModel { | ||
31 | ); | 32 | ); |
32 | 33 | ||
33 | // 获取体验培训报名列表 | 34 | // 获取体验培训报名列表 |
34 | - public function getList($keyword = null) { | 35 | + public function getList($page_num, $keyword = null, $start_time = null, $end_time = null) { |
36 | + $perPage = 25; | ||
35 | $where['is_del'] = 0; | 37 | $where['is_del'] = 0; |
36 | if($keyword) { | 38 | if($keyword) { |
37 | $where['name'] = array('like', '%'.$keyword.'%'); | 39 | $where['name'] = array('like', '%'.$keyword.'%'); |
38 | } | 40 | } |
41 | + if($start_time && $end_time) { | ||
42 | + $where['ctime'] = array('between', array($start_time,$end_time)); | ||
43 | + } | ||
39 | return $this->where($where)->select(); | 44 | return $this->where($where)->select(); |
40 | } | 45 | } |
41 | 46 | ||
@@ -45,4 +50,21 @@ class TrainApplyModel extends CommonModel { | @@ -45,4 +50,21 @@ class TrainApplyModel extends CommonModel { | ||
45 | $where['id'] = $id; | 50 | $where['id'] = $id; |
46 | return $this->where($where)->find(); | 51 | return $this->where($where)->find(); |
47 | } | 52 | } |
53 | + | ||
54 | + /** | ||
55 | + * 获取数据总数 | ||
56 | + * @author Liuzhen | ||
57 | + */ | ||
58 | + public function getCount($keyword = null, $start_time = null, $end_time = null) { | ||
59 | + $where['is_del'] = 0; | ||
60 | + if($keyword) { | ||
61 | + $where['name'] = array('like', '%'.$keyword.'%'); | ||
62 | + } | ||
63 | + if($start_time && $end_time) { | ||
64 | + $where['ctime'] = array('between', array($start_time,$end_time)); | ||
65 | + } | ||
66 | + $count = $this->where($where) | ||
67 | + ->count(); | ||
68 | + return $count; | ||
69 | + } | ||
48 | } | 70 | } |
@@ -17,27 +17,39 @@ class WillMissionApplyModel extends CommonModel { | @@ -17,27 +17,39 @@ class WillMissionApplyModel extends CommonModel { | ||
17 | //array(验证字段,验证规则,错误提示,验证条件,附加规则,验证时间) | 17 | //array(验证字段,验证规则,错误提示,验证条件,附加规则,验证时间) |
18 | array('user_id', 'number', '用户ID不能为空', 1, 'regex', CommonModel::MODEL_BOTH), | 18 | array('user_id', 'number', '用户ID不能为空', 1, 'regex', CommonModel::MODEL_BOTH), |
19 | array('mid', 'number', '任务ID不能为空', 1, 'regex', CommonModel::MODEL_BOTH), | 19 | array('mid', 'number', '任务ID不能为空', 1, 'regex', CommonModel::MODEL_BOTH), |
20 | - array('name', 'require', '姓名不能为空', 1, 'regex', CommonModel::MODEL_BOTH), | 20 | + array('name', 'require', '投稿人姓名不能为空', 1, 'regex', CommonModel::MODEL_BOTH), |
21 | array('province', 'require', '所在省不能为空', 1, 'regex', CommonModel::MODEL_BOTH), | 21 | array('province', 'require', '所在省不能为空', 1, 'regex', CommonModel::MODEL_BOTH), |
22 | array('city', 'require', '城市不能为空', 1, 'regex', CommonModel::MODEL_BOTH), | 22 | array('city', 'require', '城市不能为空', 1, 'regex', CommonModel::MODEL_BOTH), |
23 | - array('age', 'number', '年龄格式错误', 1, 'regex', CommonModel::MODEL_BOTH), | ||
24 | - array('sex', array(0,1,2), '性别格式错误', 1, 'regex', CommonModel::MODEL_BOTH), | ||
25 | - array('school', 'require', '高校不能为空', 1, 'regex', CommonModel::MODEL_BOTH), | 23 | + array('birth', 'require', '出生年份不能为空', 1, 'regex', CommonModel::MODEL_BOTH), |
24 | + array('school', 'require', '所在公司或高校不能为空', 1, 'regex', CommonModel::MODEL_BOTH), | ||
25 | + array('sex', array(0,1,2), '性别格式错误', 1, 'in', CommonModel::MODEL_BOTH), | ||
26 | array('major', 'require', '专业不能为空', 1, 'regex', CommonModel::MODEL_BOTH), | 26 | array('major', 'require', '专业不能为空', 1, 'regex', CommonModel::MODEL_BOTH), |
27 | array('mobile', 'require', '手机号码不能为空', 1, 'regex', CommonModel::MODEL_BOTH), | 27 | array('mobile', 'require', '手机号码不能为空', 1, 'regex', CommonModel::MODEL_BOTH), |
28 | + array('mobile', 'mobile', '手机号码格式错误', 1, 'regex', CommonModel::MODEL_BOTH), | ||
29 | + array('classes', 'require', '年级不能为空', 1, 'regex', CommonModel::MODEL_BOTH), | ||
28 | array('email', 'require', '邮箱不能为空', 1, 'regex', CommonModel::MODEL_BOTH), | 30 | array('email', 'require', '邮箱不能为空', 1, 'regex', CommonModel::MODEL_BOTH), |
29 | array('email', 'email', '邮箱格式错误', 1, 'regex', CommonModel::MODEL_BOTH), | 31 | array('email', 'email', '邮箱格式错误', 1, 'regex', CommonModel::MODEL_BOTH), |
30 | - array('classes', 'require', '年级不能为空', 1, 'regex', CommonModel::MODEL_BOTH), | ||
31 | array('experience', 'require', '相关经验不能为空', 1, 'regex', CommonModel::MODEL_BOTH), | 32 | array('experience', 'require', '相关经验不能为空', 1, 'regex', CommonModel::MODEL_BOTH), |
32 | array('product', 'require', '创作描述不能为空', 1, 'regex', CommonModel::MODEL_BOTH), | 33 | array('product', 'require', '创作描述不能为空', 1, 'regex', CommonModel::MODEL_BOTH), |
33 | array('product_description', 'require', '作品描述不能为空', 1, 'regex', CommonModel::MODEL_BOTH), | 34 | array('product_description', 'require', '作品描述不能为空', 1, 'regex', CommonModel::MODEL_BOTH), |
35 | + array('att', 'require', '详细附件不能为空', 1, 'regex', CommonModel::MODEL_BOTH), | ||
36 | + array('images', 'require', '作品图片不能为空', 1, 'regex', CommonModel::MODEL_BOTH), | ||
34 | ); | 37 | ); |
35 | 38 | ||
36 | // 获取任务投稿列表 | 39 | // 获取任务投稿列表 |
37 | - public function getList($mid) { | 40 | + public function getList($mid, $page_num, $keyword = null, $start_time = null, $end_time = null) { |
41 | + $perPage = 25; | ||
38 | $where['is_del'] = 0; | 42 | $where['is_del'] = 0; |
39 | $where['mid'] = $mid; | 43 | $where['mid'] = $mid; |
40 | - return $this->where($where)->select(); | 44 | + if($keyword) { |
45 | + $where['name'] = array('like', '%'.$keyword.'%'); | ||
46 | + } | ||
47 | + if($start_time && $end_time) { | ||
48 | + $where['ctime'] = array('between', array($start_time,$end_time)); | ||
49 | + } | ||
50 | + return $this->where($where) | ||
51 | + ->page($page_num, $perPage) | ||
52 | + ->select(); | ||
41 | } | 53 | } |
42 | 54 | ||
43 | // 获取任务投稿详情 | 55 | // 获取任务投稿详情 |
@@ -46,4 +58,22 @@ class WillMissionApplyModel extends CommonModel { | @@ -46,4 +58,22 @@ class WillMissionApplyModel extends CommonModel { | ||
46 | $where['id'] = $id; | 58 | $where['id'] = $id; |
47 | return $this->where($where)->find(); | 59 | return $this->where($where)->find(); |
48 | } | 60 | } |
61 | + | ||
62 | + /** | ||
63 | + * 获取数据总数 | ||
64 | + * @author Liuzhen | ||
65 | + */ | ||
66 | + public function getCount($mid, $keyword = null, $start_time = null, $end_time = null) { | ||
67 | + $where['mid'] = $mid; | ||
68 | + if($keyword) { | ||
69 | + $where['name'] = array('like', '%'.$keyword.'%'); | ||
70 | + } | ||
71 | + if($start_time && $end_time) { | ||
72 | + $where['ctime'] = array('between', array($start_time,$end_time)); | ||
73 | + } | ||
74 | + $where['is_del'] = 0; | ||
75 | + $count = $this->where($where) | ||
76 | + ->count(); | ||
77 | + return $count; | ||
78 | + } | ||
49 | } | 79 | } |
@@ -13,10 +13,12 @@ use Common\Controller\HomebaseController; | @@ -13,10 +13,12 @@ use Common\Controller\HomebaseController; | ||
13 | class TrainController extends HomebaseController { | 13 | class TrainController extends HomebaseController { |
14 | 14 | ||
15 | protected $train_model; | 15 | protected $train_model; |
16 | + protected $train_apply_model; | ||
16 | 17 | ||
17 | function _initialize() { | 18 | function _initialize() { |
18 | parent::_initialize(); | 19 | parent::_initialize(); |
19 | $this->train_model = D("Common/Train"); | 20 | $this->train_model = D("Common/Train"); |
21 | + $this->train_apply_model = D("Common/TrainApply"); | ||
20 | } | 22 | } |
21 | 23 | ||
22 | // 工作坊列表 | 24 | // 工作坊列表 |
@@ -79,4 +81,31 @@ class TrainController extends HomebaseController { | @@ -79,4 +81,31 @@ class TrainController extends HomebaseController { | ||
79 | $this->assign("formget",array_merge($_GET,$_POST)); | 81 | $this->assign("formget",array_merge($_GET,$_POST)); |
80 | $this->assign("posts",$posts); | 82 | $this->assign("posts",$posts); |
81 | } | 83 | } |
84 | + | ||
85 | + /** | ||
86 | + * 体验培训提交 | ||
87 | + * @param post 提交的申请数据 | ||
88 | + * @param user_id 用户ID | ||
89 | + */ | ||
90 | + public function submit() { | ||
91 | + if(IS_AJAX) { | ||
92 | + $post =I('post.'); | ||
93 | + $user_id = $post['user_id'] = 1; | ||
94 | +// $user_id = $post['user_id'] = sp_get_current_userid(); | ||
95 | +// if(!$user_id) { | ||
96 | +// $this->ajaxReturn(array('status'=>false,'msg'=>'用户未登录')); | ||
97 | +// } | ||
98 | + $post['ctime'] = $post['utime'] = time(); | ||
99 | + if(!$this->train_apply_model->create($post)) { | ||
100 | + $this->ajaxReturn(array('status'=>false,'msg'=>$this->train_apply_model->getError(),'data'=>$post)); | ||
101 | + } | ||
102 | + $train_id = $this->train_apply_model->add($post); | ||
103 | + if(!$train_id) { | ||
104 | + $this->ajaxReturn(array('status'=>false,'msg'=>'提交失败')); | ||
105 | + } | ||
106 | + $this->ajaxReturn(array('status'=>true,'msg'=>'提交成功','data'=>$train_id)); | ||
107 | + } else { | ||
108 | + $this->error('非法操作'); | ||
109 | + } | ||
110 | + } | ||
82 | } | 111 | } |
@@ -14,6 +14,7 @@ class WillController extends HomebaseController { | @@ -14,6 +14,7 @@ class WillController extends HomebaseController { | ||
14 | 14 | ||
15 | protected $posts_model; | 15 | protected $posts_model; |
16 | protected $will_mission_model; | 16 | protected $will_mission_model; |
17 | + protected $will_mission_apply_model; | ||
17 | protected $will_events_model; | 18 | protected $will_events_model; |
18 | protected $will_events_apply_model; | 19 | protected $will_events_apply_model; |
19 | protected $will_produce_model; | 20 | protected $will_produce_model; |
@@ -23,6 +24,7 @@ class WillController extends HomebaseController { | @@ -23,6 +24,7 @@ class WillController extends HomebaseController { | ||
23 | parent::_initialize(); | 24 | parent::_initialize(); |
24 | $this->posts_model = D("Portal/Posts"); | 25 | $this->posts_model = D("Portal/Posts"); |
25 | $this->will_mission_model = D("Common/WillMission"); | 26 | $this->will_mission_model = D("Common/WillMission"); |
27 | + $this->will_mission_apply_model = D("Common/WillMissionApply"); | ||
26 | $this->will_events_model = D("Common/WillEvents"); | 28 | $this->will_events_model = D("Common/WillEvents"); |
27 | $this->will_events_apply_model = D("Common/WillEventsApply"); | 29 | $this->will_events_apply_model = D("Common/WillEventsApply"); |
28 | $this->will_produce_model = D("Common/WillProduce"); | 30 | $this->will_produce_model = D("Common/WillProduce"); |
@@ -174,7 +176,7 @@ class WillController extends HomebaseController { | @@ -174,7 +176,7 @@ class WillController extends HomebaseController { | ||
174 | if(!$will_id) { | 176 | if(!$will_id) { |
175 | $this->ajaxReturn(array('status'=>false,'msg'=>'提交失败')); | 177 | $this->ajaxReturn(array('status'=>false,'msg'=>'提交失败')); |
176 | } | 178 | } |
177 | - $this->ajaxReturn(array('status'=>true,'msg'=>'提交成功','data'=>$will_id)); | 179 | + $this->ajaxReturn(array('status'=>true,'msg'=>'提交成功')); |
178 | } else { | 180 | } else { |
179 | $this->error('非法操作'); | 181 | $this->error('非法操作'); |
180 | } | 182 | } |
@@ -206,7 +208,38 @@ class WillController extends HomebaseController { | @@ -206,7 +208,38 @@ class WillController extends HomebaseController { | ||
206 | if(!$will_id) { | 208 | if(!$will_id) { |
207 | $this->ajaxReturn(array('status'=>false,'msg'=>'提交失败')); | 209 | $this->ajaxReturn(array('status'=>false,'msg'=>'提交失败')); |
208 | } | 210 | } |
209 | - $this->ajaxReturn(array('status'=>true,'msg'=>'提交成功','data'=>$will_id)); | 211 | + $this->ajaxReturn(array('status'=>true,'msg'=>'提交成功')); |
212 | + } else { | ||
213 | + $this->error('非法操作'); | ||
214 | + } | ||
215 | + } | ||
216 | + | ||
217 | + /** | ||
218 | + * 任务投稿提交 | ||
219 | + * @param post 提交的申请数据 | ||
220 | + * @param user_id 用户ID | ||
221 | + */ | ||
222 | + public function submit_mission() { | ||
223 | + if(IS_AJAX) { | ||
224 | + $post =I('post.'); | ||
225 | + $user_id = $post['user_id'] = 1; | ||
226 | +// $user_id = $post['user_id'] = sp_get_current_userid(); | ||
227 | +// if(!$user_id) { | ||
228 | +// $this->ajaxReturn(array('status'=>false,'msg'=>'用户未登录')); | ||
229 | +// } | ||
230 | + $post['images'] = implode(',',I('post.images')); | ||
231 | + $post['ctime'] = $post['utime'] = time(); | ||
232 | + if(!$this->will_mission_apply_model->create($post)) { | ||
233 | + $this->ajaxReturn(array('status'=>false,'msg'=>$this->will_mission_apply_model->getError(),'data'=>$post)); | ||
234 | + } | ||
235 | + if(count(I('post.images'))<3 || count(I('post.images'))>5) { | ||
236 | + $this->ajaxReturn(array('status'=>false,'msg'=>'图片数量不符')); | ||
237 | + } | ||
238 | + $will_id = $this->will_mission_apply_model->add($post); | ||
239 | + if(!$will_id) { | ||
240 | + $this->ajaxReturn(array('status'=>false,'msg'=>'提交失败')); | ||
241 | + } | ||
242 | + $this->ajaxReturn(array('status'=>true,'msg'=>'提交成功')); | ||
210 | } else { | 243 | } else { |
211 | $this->error('非法操作'); | 244 | $this->error('非法操作'); |
212 | } | 245 | } |
themes/simplebootx/Portal/Train/apply.html
0 → 100644
1 | +<div id="myModal" class="modal fade" aria-hidden="true"> | ||
2 | + <div class="modal-dialog"> | ||
3 | + <div class="modal-content"> | ||
4 | + <div class="modal-header"> | ||
5 | + <h4>文化之旅报名表</h4> | ||
6 | + </div> | ||
7 | + <div class="modal-body"> | ||
8 | + <form action="" method="post" id="train"> | ||
9 | + <input type="hidden" name="tid" value=""/> | ||
10 | + <div class="row"> | ||
11 | + <div class="row-title"> | ||
12 | + <h5>个人信息</h5> | ||
13 | + </div> | ||
14 | + <div class="row-con cf"> | ||
15 | + <div class="ipt-container lf"> | ||
16 | + <input type="text" name="name" placeholder="培训人姓名"> | ||
17 | + </div> | ||
18 | + <div class="slt-list lf" id="city"> | ||
19 | + <div class="slt-container lf"> | ||
20 | + <select name="province" class="mm-select prov"> | ||
21 | + <option value="天津">省</option> | ||
22 | + </select> | ||
23 | + </div> | ||
24 | + <div class="slt-container lf"> | ||
25 | + <select name="city" class="mm-select city"><option value="天津">市</option></select> | ||
26 | + </div> | ||
27 | + </div> | ||
28 | + <div class="ipt-container lf"> | ||
29 | + <input id="d11" type="text" placeholder="出生年月" name="birth" onClick="WdatePicker({skin:'twoer'})"/> | ||
30 | + </div> | ||
31 | + <div class="ipt-container lf"> | ||
32 | + <input type="text" name="mobile" placeholder="手机号"> | ||
33 | + </div> | ||
34 | + <div class="radio-container lf"> | ||
35 | + <label>性别:</label> | ||
36 | + <input type="radio" name="sex" value="1" checked>男 | ||
37 | + <input type="radio" name="sex" value="2">女 | ||
38 | + </div> | ||
39 | + <div class="ipt-container lf"> | ||
40 | + <input type="text" name="email" placeholder="邮箱"> | ||
41 | + </div> | ||
42 | + </div> | ||
43 | + </div> | ||
44 | + <div class="row"> | ||
45 | + <div class="row-title"> | ||
46 | + <h5>个人兴趣</h5> | ||
47 | + </div> | ||
48 | + <div class="row-con"> | ||
49 | + <div class="textarea-container"> | ||
50 | + <textarea name="lesson" maxlength="500" placeholder="个人感兴趣的文化之旅目的地简要描述"></textarea> | ||
51 | + </div> | ||
52 | + <div class="textarea-container"> | ||
53 | + <textarea name="experience" maxlength="500" placeholder="个人感兴趣的文化项目简要描述"></textarea> | ||
54 | + </div> | ||
55 | + <div class="textarea-container"> | ||
56 | + <textarea name="travel" maxlength="500" placeholder="个人感兴趣的旅行方式简要描述"></textarea> | ||
57 | + </div> | ||
58 | + </div> | ||
59 | + </div> | ||
60 | + <div class="row"> | ||
61 | + <div class="sub-container"> | ||
62 | + <input type="button" name="submit" value="确认提交"> | ||
63 | + </div> | ||
64 | + </div> | ||
65 | + </form> | ||
66 | + </div> | ||
67 | + </div> | ||
68 | + </div> | ||
69 | +</div> |
@@ -3,10 +3,11 @@ | @@ -3,10 +3,11 @@ | ||
3 | <head> | 3 | <head> |
4 | <meta charset="utf-8"> | 4 | <meta charset="utf-8"> |
5 | <meta http-equiv="X-UA-Compatible" content="IE=edge"> | 5 | <meta http-equiv="X-UA-Compatible" content="IE=edge"> |
6 | - <title>8体验培训</title> | 6 | + <title>体验培训</title> |
7 | <link href="__TMPL__Public/assets/css/reset.css" rel="stylesheet" type="text/css" /> | 7 | <link href="__TMPL__Public/assets/css/reset.css" rel="stylesheet" type="text/css" /> |
8 | <link href="__TMPL__Public/assets/css/common.css" rel="stylesheet" type="text/css" /> | 8 | <link href="__TMPL__Public/assets/css/common.css" rel="stylesheet" type="text/css" /> |
9 | <link href="__TMPL__Public/assets/css/style.css" rel="stylesheet" type="text/css" /> | 9 | <link href="__TMPL__Public/assets/css/style.css" rel="stylesheet" type="text/css" /> |
10 | + <link href="__TMPL__Public/assets/css/modal.css" rel="stylesheet" type="text/css" /> | ||
10 | </head> | 11 | </head> |
11 | <body> | 12 | <body> |
12 | <tc_include file="Public:header"/> | 13 | <tc_include file="Public:header"/> |
@@ -28,7 +29,7 @@ | @@ -28,7 +29,7 @@ | ||
28 | <div class="main"> | 29 | <div class="main"> |
29 | <ul class="peixun-list"> | 30 | <ul class="peixun-list"> |
30 | <volist name="posts" id="vo"> | 31 | <volist name="posts" id="vo"> |
31 | - <li> | 32 | + <li data-id="{$vo.id}"> |
32 | <div class="peixun-box"> | 33 | <div class="peixun-box"> |
33 | <a href="###" class="peixun-pic scale"><img src="{:sp_get_asset_upload_path($vo['thumb'])}"/></a> | 34 | <a href="###" class="peixun-pic scale"><img src="{:sp_get_asset_upload_path($vo['thumb'])}"/></a> |
34 | <div class="px-intro"> | 35 | <div class="px-intro"> |
@@ -37,7 +38,7 @@ | @@ -37,7 +38,7 @@ | ||
37 | <span>还剩 <i class="px-num">3</i> 个名额</span> | 38 | <span>还剩 <i class="px-num">3</i> 个名额</span> |
38 | <span>活动收费:<i class="px-price">{$vo.price}</i>元</span> | 39 | <span>活动收费:<i class="px-price">{$vo.price}</i>元</span> |
39 | </div> | 40 | </div> |
40 | - <a href="" class="btn-singup"><span>立即报名</span></a> | 41 | + <a href="#myModal" data-toggle="modal" class="btn-singup"><span>立即报名</span></a> |
41 | </div> | 42 | </div> |
42 | <div class="px-footer"> | 43 | <div class="px-footer"> |
43 | <a href="{:U('detail',array('id'=>$vo['id']))}"><san>查看详情 ></san></a> | 44 | <a href="{:U('detail',array('id'=>$vo['id']))}"><san>查看详情 ></san></a> |
@@ -49,8 +50,61 @@ | @@ -49,8 +50,61 @@ | ||
49 | </div> | 50 | </div> |
50 | </div> | 51 | </div> |
51 | <tc_include file="Public:footer"/> | 52 | <tc_include file="Public:footer"/> |
53 | +<tc_include file="Portal/Train:apply"/> | ||
52 | <!-- js --> | 54 | <!-- js --> |
53 | <script src="__TMPL__Public/assets/js/jquery.min.js"></script> | 55 | <script src="__TMPL__Public/assets/js/jquery.min.js"></script> |
54 | <script src="__TMPL__Public/assets/js/common.js"></script> | 56 | <script src="__TMPL__Public/assets/js/common.js"></script> |
57 | +<script src="__TMPL__Public/assets/js/modal.js"></script> | ||
58 | +<script type="text/javascript" src="__TMPL__Public/assets/js/My97DatePicker/WdatePicker.js"></script> | ||
59 | +<script type="text/javascript" src="__TMPL__Public/assets/js/jquery.cityselect1.js"></script> | ||
60 | +<script> | ||
61 | + // $('#myModal').modal({ | ||
62 | + | ||
63 | + // }) | ||
64 | + $('#myModal').on('shown.bs.modal', function (event) { | ||
65 | + var button = $(event.relatedTarget); | ||
66 | + var tid = button.parents('li').data('id'); | ||
67 | + $('input[name=tid]').val(tid); | ||
68 | + document.documentElement.style.overflow='hidden'; | ||
69 | + }) | ||
70 | + $('#myModal').on('hidden.bs.modal', function () { | ||
71 | + $('input[name=tid]').val(''); | ||
72 | + document.documentElement.style.overflow='auto'; | ||
73 | + }) | ||
74 | +</script> | ||
75 | +<script> | ||
76 | + $('input[name=submit]').click(function(){ | ||
77 | + var btn = $(this); | ||
78 | + var text = btn.val(); | ||
79 | + var form = $('#train').serialize(); | ||
80 | + console.log(form); | ||
81 | + $.ajax({ | ||
82 | + url:"{:U('Train/submit')}", | ||
83 | + type:"POST", | ||
84 | + data:form, | ||
85 | + dateType:"json", | ||
86 | + beforeSend: function () { | ||
87 | + // Handle the beforeSend event | ||
88 | + btn.val('提交中...').attr('disabled', true); | ||
89 | + }, | ||
90 | + success:function (data) { | ||
91 | + console.log(data); | ||
92 | + if(data.status) { | ||
93 | + alert(data.msg); | ||
94 | + location.reload(); | ||
95 | + } else { | ||
96 | + alert(data.msg); | ||
97 | + } | ||
98 | + }, | ||
99 | + error: function (data, status, e) { //提交失败自动执行的处理函数 | ||
100 | + alert(e); | ||
101 | + }, | ||
102 | + complete: function () { | ||
103 | + // Handle the complete event | ||
104 | + btn.val(text).attr('disabled', false); | ||
105 | + } | ||
106 | + }) | ||
107 | + }) | ||
108 | +</script> | ||
55 | </body> | 109 | </body> |
56 | </html> | 110 | </html> |
@@ -3,11 +3,30 @@ | @@ -3,11 +3,30 @@ | ||
3 | <head> | 3 | <head> |
4 | <meta charset="utf-8"> | 4 | <meta charset="utf-8"> |
5 | <meta http-equiv="X-UA-Compatible" content="IE=edge"> | 5 | <meta http-equiv="X-UA-Compatible" content="IE=edge"> |
6 | - <title>9鹿鸣社_3任务发布</title> | 6 | + <title>鹿鸣社_任务发布</title> |
7 | <link href="__TMPL__Public/assets/css/reset.css" rel="stylesheet" type="text/css" /> | 7 | <link href="__TMPL__Public/assets/css/reset.css" rel="stylesheet" type="text/css" /> |
8 | <link href="__TMPL__Public/assets/css/common.css" rel="stylesheet" type="text/css" /> | 8 | <link href="__TMPL__Public/assets/css/common.css" rel="stylesheet" type="text/css" /> |
9 | <link href="__TMPL__Public/assets/css/style.css" rel="stylesheet" type="text/css" /> | 9 | <link href="__TMPL__Public/assets/css/style.css" rel="stylesheet" type="text/css" /> |
10 | <link href="__TMPL__Public/assets/css/modal.css" rel="stylesheet" type="text/css" /> | 10 | <link href="__TMPL__Public/assets/css/modal.css" rel="stylesheet" type="text/css" /> |
11 | + <style> | ||
12 | + .img_box{ | ||
13 | + width:100%; | ||
14 | + position: absolute; | ||
15 | + top: 0; | ||
16 | + left: 0; | ||
17 | + z-index:1; | ||
18 | + background-color: #FFF; | ||
19 | + overflow: hidden; | ||
20 | + max-height: 100%; | ||
21 | + | ||
22 | + } | ||
23 | + .img_box img{ | ||
24 | + width: auto; | ||
25 | + } | ||
26 | + .upload{ | ||
27 | + z-index: 2; | ||
28 | + } | ||
29 | + </style> | ||
11 | </head> | 30 | </head> |
12 | <body> | 31 | <body> |
13 | <tc_include file="Public:header"/> | 32 | <tc_include file="Public:header"/> |
@@ -31,7 +50,7 @@ | @@ -31,7 +50,7 @@ | ||
31 | <div class="main"> | 50 | <div class="main"> |
32 | <ul class="task-list"> | 51 | <ul class="task-list"> |
33 | <volist name="list" id="vo"> | 52 | <volist name="list" id="vo"> |
34 | - <li class="pull-left"> | 53 | + <li class="pull-left" data-id="{$vo.id}"> |
35 | <div class="task-listbox"> | 54 | <div class="task-listbox"> |
36 | <div class="task-header"> | 55 | <div class="task-header"> |
37 | <div class="task-title"><a href="{:U('Will/mission_detail', array('id'=>$vo['id']))}">{$vo.name}</a></div> | 56 | <div class="task-title"><a href="{:U('Will/mission_detail', array('id'=>$vo['id']))}">{$vo.name}</a></div> |
@@ -42,58 +61,153 @@ | @@ -42,58 +61,153 @@ | ||
42 | <a href="{:U('Will/mission_detail', array('id'=>$vo['id']))}" class="scale"><img src="{:sp_get_asset_upload_path($vo['thumb'])}"/></a> | 61 | <a href="{:U('Will/mission_detail', array('id'=>$vo['id']))}" class="scale"><img src="{:sp_get_asset_upload_path($vo['thumb'])}"/></a> |
43 | </div> | 62 | </div> |
44 | <div class="task-footer"> | 63 | <div class="task-footer"> |
45 | - <a href="" class="btn-contribute"><span>投稿</span></a> | 64 | + <a href="#myModal1" data-toggle="modal" class="btn-contribute"><span>投稿</span></a> |
46 | <a href="{:U('Will/mission_detail', array('id'=>$vo['id']))}" class="t-link t-abs-link">活动详情></a> | 65 | <a href="{:U('Will/mission_detail', array('id'=>$vo['id']))}" class="t-link t-abs-link">活动详情></a> |
47 | </div> | 66 | </div> |
48 | </div> | 67 | </div> |
49 | </li> | 68 | </li> |
50 | </volist> | 69 | </volist> |
51 | - <li class="pull-right"> | ||
52 | - <div class="task-listbox"> | ||
53 | - <div class="task-header"> | ||
54 | - <div class="task-title"><a href="">青年文创征集活动</a></div> | ||
55 | - <div class="task-desc">投稿截止:2018-1-23</div> | ||
56 | - <div class="task-status t-ed"><span>投稿中</span></div> | ||
57 | - </div> | ||
58 | - <div class="task-pic"> | ||
59 | - <a href="" class="scale"><img src="__TMPL__Public/assets/images/demo/task.jpg"/></a> | ||
60 | - </div> | ||
61 | - <div class="task-footer"> | ||
62 | - <a href="" class="t-link">活动详情></a> | ||
63 | - </div> | ||
64 | - </div> | ||
65 | - </li> | ||
66 | - <li class="pull-left"> | ||
67 | - <div class="task-listbox"> | ||
68 | - <div class="task-header"> | ||
69 | - <div class="task-title"><a href="">青年文创征集活动</a></div> | ||
70 | - <div class="task-desc">投稿截止:2018-1-23</div> | ||
71 | - <div class="task-status t-over"><span>获奖公示</span></div> | ||
72 | - </div> | ||
73 | - <div class="task-pic"> | ||
74 | - <a href="" class="scale"><img src="__TMPL__Public/assets/images/demo/task.jpg"/></a> | ||
75 | - </div> | ||
76 | - <div class="task-footer"> | ||
77 | - <a href="" class="t-link">活动详情></a> | 70 | + </ul> |
71 | + </div> | ||
72 | +</div> | ||
73 | + | ||
74 | +<div id="myModal1" class="modal fade" aria-hidden="true"> | ||
75 | + <div class="modal-dialog"> | ||
76 | + <div class="modal-content"> | ||
77 | + <div class="modal-header"> | ||
78 | + <h4>任务发布投稿表</h4> | ||
79 | + </div> | ||
80 | + <div class="modal-body"> | ||
81 | + <form action="" method="post" id="mission"> | ||
82 | + <input type="hidden" name="mid" value=""/> | ||
83 | + <div class="row"> | ||
84 | + <div class="row-title"> | ||
85 | + <h5>投稿人姓名</h5> | ||
86 | + </div> | ||
87 | + <div class="row-con cf"> | ||
88 | + <div class="ipt-container lf"> | ||
89 | + <input type="text" name="name" placeholder="投稿人姓名"> | ||
90 | + </div> | ||
91 | + <div class="slt-list lf" id="city"> | ||
92 | + <div class="slt-container lf"> | ||
93 | + <select name="province" class="mm-select prov"> | ||
94 | + <option value="天津">省</option> | ||
95 | + </select> | ||
96 | + </div> | ||
97 | + <div class="slt-container lf"> | ||
98 | + <select name="city" class="mm-select city"><option value="天津">市</option></select> | ||
99 | + </div> | ||
100 | + </div> | ||
101 | + <div class="ipt-container lf"> | ||
102 | + <input id="d11" type="text" name="birth" placeholder="出生年月" onClick="WdatePicker({skin:'twoer'})"/> | ||
103 | + </div> | ||
104 | + <div class="ipt-container lf"> | ||
105 | + <input type="text" name="school" placeholder="所在公司或高校"> | ||
106 | + </div> | ||
107 | + <div class="radio-container lf"> | ||
108 | + <label>性别:</label> | ||
109 | + <input type="radio" name="sex" value="1" checked>男 | ||
110 | + <input type="radio" name="sex" value="2">女 | ||
111 | + </div> | ||
112 | + <div class="ipt-container lf"> | ||
113 | + <input type="text" name="major" placeholder="专业"> | ||
114 | + </div> | ||
115 | + <div class="ipt-container lf"> | ||
116 | + <input type="text" name="mobile" placeholder="手机号"> | ||
117 | + </div> | ||
118 | + <div class="slt-container lf"> | ||
119 | + <select name="classes" id="slt_0"> | ||
120 | + <option selected>一年级</option> | ||
121 | + <option>二年级</option> | ||
122 | + <option>三年级</option> | ||
123 | + </select> | ||
124 | + </div> | ||
125 | + <div class="ipt-container lf"> | ||
126 | + <input type="text" name="email" placeholder="邮箱"> | ||
127 | + </div> | ||
128 | + </div> | ||
78 | </div> | 129 | </div> |
79 | - </div> | ||
80 | - </li> | ||
81 | - <li class="pull-right"> | ||
82 | - <div class="task-listbox"> | ||
83 | - <div class="task-header"> | ||
84 | - <div class="task-title"><a href="">青年文创征集活动</a></div> | ||
85 | - <div class="task-desc">投稿截止:2018-1-23</div> | ||
86 | - <div class="task-status t-over"><span>获奖公示</span></div> | 130 | + <div class="row"> |
131 | + <div class="row-title"> | ||
132 | + <h5>专业经验</h5> | ||
133 | + </div> | ||
134 | + <div class="row-con"> | ||
135 | + <div class="textarea-container"> | ||
136 | + <textarea name="experience" placeholder="相关专业经验(绘画、设计、广告、文创、营销等)简要描述"></textarea> | ||
137 | + </div> | ||
138 | + <div class="textarea-container"> | ||
139 | + <textarea name="product" placeholder="相关创作或获奖作品简要描述"></textarea> | ||
140 | + </div> | ||
141 | + </div> | ||
87 | </div> | 142 | </div> |
88 | - <div class="task-pic"> | ||
89 | - <a href="" class="scale"><img src="__TMPL__Public/assets/images/demo/task.jpg"/></a> | 143 | + <div class="row"> |
144 | + <div class="row-title"> | ||
145 | + <h5>作品描述</h5> | ||
146 | + </div> | ||
147 | + <div class="row-con"> | ||
148 | + <div class="file-container"> | ||
149 | + 上传详细附件 | ||
150 | + <input type="file" name="att" id="att"> | ||
151 | + </div> | ||
152 | + <div class="file-container" style="display:none;border:none;" id="att_file"></div> | ||
153 | + <div class="textarea-container"> | ||
154 | + <textarea id="txt" name="product_description" placeholder="投稿作品创意概述"></textarea> | ||
155 | + <p> | ||
156 | + <span id="txt_num">0</span>/500字 | ||
157 | + </p> | ||
158 | + </div> | ||
159 | + <div class="pic-container"> | ||
160 | + <div class="pic-title"> | ||
161 | + <p>投稿作品图片,3~5张,jpg、png或jif格式。</p> | ||
162 | + </div> | ||
163 | + <div class="btn-list cf"> | ||
164 | + <div class="btn-item lf"> | ||
165 | + <div class="img_box"> | ||
166 | + </div> | ||
167 | + <i class="icon"></i> | ||
168 | + <p>上传投稿作品图片</p> | ||
169 | + <input type="file" name="images[]" class="upload" id="id_photos"> | ||
170 | + </div> | ||
171 | + <div class="btn-item lf"> | ||
172 | + <div class="img_box"> | ||
173 | + </div> | ||
174 | + <i class="icon"></i> | ||
175 | + <p>上传投稿作品图片</p> | ||
176 | + <input type="file" name="images[]" class="upload" id="id_photos1"> | ||
177 | + </div> | ||
178 | + <div class="btn-item lf"> | ||
179 | + <div class="img_box"> | ||
180 | + </div> | ||
181 | + <i class="icon"></i> | ||
182 | + <p>上传投稿作品图片</p> | ||
183 | + <input type="file" name="images[]" class="upload" id="id_photos2"> | ||
184 | + </div> | ||
185 | + <div class="btn-item lf"> | ||
186 | + <div class="img_box"> | ||
187 | + </div> | ||
188 | + <i class="icon"></i> | ||
189 | + <p>上传投稿作品图片</p> | ||
190 | + <input type="file" name="images[]" class="upload" id="id_photos3"> | ||
191 | + </div> | ||
192 | + <div class="btn-item lf"> | ||
193 | + <div class="img_box"> | ||
194 | + </div> | ||
195 | + <i class="icon"></i> | ||
196 | + <p>上传投稿作品图片</p> | ||
197 | + <input type="file" name="images[]" class="upload" id="id_photos4"> | ||
198 | + </div> | ||
199 | + </div> | ||
200 | + </div> | ||
201 | + </div> | ||
90 | </div> | 202 | </div> |
91 | - <div class="task-footer"> | ||
92 | - <a href="" class="t-link">活动详情></a> | 203 | + <div class="row"> |
204 | + <div class="sub-container"> | ||
205 | + <input type="button" name="submit" value="确认提交"> | ||
206 | + </div> | ||
93 | </div> | 207 | </div> |
94 | - </div> | ||
95 | - </li> | ||
96 | - </ul> | 208 | + </form> |
209 | + </div> | ||
210 | + </div> | ||
97 | </div> | 211 | </div> |
98 | </div> | 212 | </div> |
99 | <tc_include file="Portal/Will:apply"/> | 213 | <tc_include file="Portal/Will:apply"/> |
@@ -102,6 +216,9 @@ | @@ -102,6 +216,9 @@ | ||
102 | <script src="__TMPL__Public/assets/js/jquery.min.js"></script> | 216 | <script src="__TMPL__Public/assets/js/jquery.min.js"></script> |
103 | <script src="__TMPL__Public/assets/js/common.js"></script> | 217 | <script src="__TMPL__Public/assets/js/common.js"></script> |
104 | <script src="__TMPL__Public/assets/js/modal.js"></script> | 218 | <script src="__TMPL__Public/assets/js/modal.js"></script> |
219 | +<script type="text/javascript" src="__TMPL__Public/assets/js/My97DatePicker/WdatePicker.js"></script> | ||
220 | +<script type="text/javascript" src="js/jquery.cityselect1.js"></script> | ||
221 | +<script type="text/javascript" src="__PUBLIC__/js/ajaxfileupload.js"></script> | ||
105 | <script> | 222 | <script> |
106 | // $('#myModal').modal({ | 223 | // $('#myModal').modal({ |
107 | 224 | ||
@@ -112,10 +229,104 @@ | @@ -112,10 +229,104 @@ | ||
112 | $('#myModal').on('hidden.bs.modal', function () { | 229 | $('#myModal').on('hidden.bs.modal', function () { |
113 | document.documentElement.style.overflow='auto'; | 230 | document.documentElement.style.overflow='auto'; |
114 | }) | 231 | }) |
232 | + $('#myModal1').on('shown.bs.modal', function (event) { | ||
233 | + var button = $(event.relatedTarget); | ||
234 | + var mid = button.parents('.pull-left').data('id') | ||
235 | + $('input[name=mid]').val(mid); | ||
236 | + document.documentElement.style.overflow='hidden'; | ||
237 | + }) | ||
238 | + $('#myModal1').on('hidden.bs.modal', function () { | ||
239 | + $('input[name=mid]').val(''); | ||
240 | + document.documentElement.style.overflow='auto'; | ||
241 | + }) | ||
115 | </script> | 242 | </script> |
116 | <!--城市--> | 243 | <!--城市--> |
117 | <script type="text/javascript"> | 244 | <script type="text/javascript"> |
118 | $("#city").citySelect({nodata:"none",required:false}); | 245 | $("#city").citySelect({nodata:"none",required:false}); |
119 | </script> | 246 | </script> |
247 | +<script> | ||
248 | + // 附件上传 | ||
249 | + $('#att').on('change',function(){ | ||
250 | + var fileId = $(this).attr('id'); | ||
251 | + $.ajaxFileUpload({ | ||
252 | + url: "{:U('personalUploadAtt')}", //处理图片的脚本路径 | ||
253 | + type: 'post', //提交的方式 | ||
254 | + secureuri: false, //是否启用安全提交 | ||
255 | + fileElementId: fileId, //file控件ID | ||
256 | + dataType: 'json', //服务器返回的数据类型 | ||
257 | + success: function (data) { //提交成功后自动执行的处理函数 | ||
258 | + if(data.status) { | ||
259 | + $('#att_file').show(); | ||
260 | + $('#att_file').append('<a target="_blank" href="'+data.file+'">我上传的附件</a><input type="hidden" name="att" value="'+data.data+'"/>'); | ||
261 | + } else { | ||
262 | + alert(data.msg); | ||
263 | + } | ||
264 | + }, | ||
265 | + error: function (data, status, e) { //提交失败自动执行的处理函数 | ||
266 | + alert(e); | ||
267 | + } | ||
268 | + }) | ||
269 | + }); | ||
270 | + // 图片上传 | ||
271 | + $('.upload').on('change',function(){ | ||
272 | + var imgHidden = $(this).parent(); | ||
273 | + var imgWarp = $(this).parent().find('.img_box'); | ||
274 | + var fileId = $(this).attr('id'); | ||
275 | + $.ajaxFileUpload({ | ||
276 | + url: "{:U('personalUpload')}", //处理图片的脚本路径 | ||
277 | + type: 'post', //提交的方式 | ||
278 | + secureuri: false, //是否启用安全提交 | ||
279 | + fileElementId: fileId, //file控件ID | ||
280 | + dataType: 'json', //服务器返回的数据类型 | ||
281 | + success: function (data) { //提交成功后自动执行的处理函数 | ||
282 | + if(data.status) { | ||
283 | + imgWarp.append('<img src="'+ data.file +'" height="100%" />'); | ||
284 | + imgHidden.append('<input type="hidden" name="images[]" value="'+data.data+'"/>'); | ||
285 | + } else { | ||
286 | + alert(data.msg); | ||
287 | + } | ||
288 | + }, | ||
289 | + error: function (data, status, e) { //提交失败自动执行的处理函数 | ||
290 | + alert(e); | ||
291 | + } | ||
292 | + }) | ||
293 | + }); | ||
294 | +</script> | ||
295 | +<script> | ||
296 | + $('input[name=submit]').click(function(){ | ||
297 | + var btn = $(this); | ||
298 | + var text = btn.val(); | ||
299 | + var form = $('#mission').serialize(); | ||
300 | + $.ajax({ | ||
301 | + url:"{:U('Will/submit_mission')}", | ||
302 | + type:"POST", | ||
303 | + data:form, | ||
304 | + dateType:"json", | ||
305 | + beforeSend: function () { | ||
306 | + // Handle the beforeSend event | ||
307 | + btn.val('提交中...').attr('disabled', true); | ||
308 | + }, | ||
309 | + success:function (data) { | ||
310 | + if(data.status) { | ||
311 | + alert(data.msg); | ||
312 | + location.reload(); | ||
313 | + } else { | ||
314 | + alert(data.msg); | ||
315 | + } | ||
316 | + }, | ||
317 | + error: function (data, status, e) { //提交失败自动执行的处理函数 | ||
318 | + alert(e); | ||
319 | + }, | ||
320 | + complete: function () { | ||
321 | + // Handle the complete event | ||
322 | + btn.val(text).attr('disabled', false); | ||
323 | + } | ||
324 | + }) | ||
325 | + }) | ||
326 | + $('#txt').keyup(function() { | ||
327 | + var len=$(this).val().length; | ||
328 | + $('#txt_num').html(len); | ||
329 | + }); | ||
330 | +</script> | ||
120 | </body> | 331 | </body> |
121 | </html> | 332 | </html> |
-
请 注册 或 登录 后发表评论