studentList.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363
  1. <html xmlns:th="http://www.thymeleaf.org">
  2. <head>
  3. <title>私塾家</title>
  4. <script th:include="sys/common/metaCSS" th:remove="tag"></script>
  5. <script th:include="sys/common/metaJS" th:remove="tag"></script>
  6. <script src="sys/js/My97DatePicker/WdatePicker.js" th:src="@{/static/sys/js/My97DatePicker/WdatePicker.js}"></script>
  7. </head>
  8. <style>
  9. .tablelink{margin-right:10px;}
  10. .stylecss{
  11. color: red;
  12. }
  13. .select_width{
  14. width: 220px;
  15. }
  16. .date_width{
  17. width: 150px;
  18. }
  19. .select1{
  20. width:100%;
  21. height: 32px;
  22. line-height: 32px;
  23. border-top: solid 1px #a7b5bc;
  24. border-left: solid 1px #a7b5bc;
  25. border-right: solid 1px #ced9df;
  26. border-bottom: solid 1px #ced9df;
  27. opacity:1;
  28. margin-bottom: 10px;
  29. }
  30. </style>
  31. <body>
  32. <div class="place">
  33. <span>位置:</span>
  34. <ul class="placeul">
  35. <li><a th:href="@{/sys/imlibuser/school/list}">导入老师/学生</a></li>
  36. <li><a href="#">学生列表</a></li>
  37. </ul>
  38. </div>
  39. <div class="rightinfo">
  40. <form id="seachform" th:action="${sysUrl+'/sys/imlibuser/student/list/'+tbLibJoin.id}" method="post">
  41. <input type="hidden" name="reportType" id="reportType" />
  42. <ul class="seachform">
  43. <li>
  44. <input style="width: 250px;" name="name" placeholder="输入学生名称" type="text" class="scinput" th:value="${search.get('name')}"/>
  45. </li>
  46. <li>
  47. <input type="button" class="scbtn" value="查询" />
  48. </li>
  49. <li style="line-height: 35px;">
  50. <span style="font-size: 15px;color: red" th:text="${tbLibJoin.leagueName} "></span>
  51. </li>
  52. <li style="line-height: 35px;">
  53. <a th:href="${sysUrl+'/sys/imlibuser/school/list'}">返回上一级</a>
  54. </li>
  55. </ul>
  56. </form>
  57. <ul class="seachform">
  58. <li>
  59. <input type="button" onclick="javascript:studentAdd();" style="width: 100px;height: 30px" class="scbtn" value="+ 添加学生" />
  60. </li>
  61. <li>
  62. <input type="button" id="exbutton" style="width: 100px;height: 30px;background: #ccc no-repeat center;" class="scbtn" value="导出学生" />
  63. </li>
  64. <li>
  65. <!-- <input type="button" onclick="javascript:studentServiceEdit();" style="width: 100px;height: 30px;background: red" class="scbtn" value="E 批量设置" /> -->
  66. </li>
  67. </ul>
  68. <table class="tablelist">
  69. <thead>
  70. <tr>
  71. <th style="width: 5%">学生姓名</th>
  72. <th style="width: 5%">学校</th>
  73. <th style="width: 5%">年级</th>
  74. <th style="width: 5%">家长姓名</th>
  75. <th style="width: 5%">家长角色</th>
  76. <th style="width: 5%">家长电话</th>
  77. <th style="width: 5%">小塾号</th>
  78. <!-- <th style="width: 6%">(现)服务开始时间</th> -->
  79. <!-- <th style="width: 6%">(现)服务结束时间</th> -->
  80. <!-- <th style="width: 6%">(现)批改方式</th> -->
  81. <th style="width: 10%">操作</th>
  82. <th style="width: 3%">操作记录</th>
  83. </tr>
  84. </thead>
  85. <tbody>
  86. <tr th:each="item:${list}" >
  87. <td th:text="${item.child_name}"></td>
  88. <td th:text="${item.school}"></td>
  89. <td th:text="${item.grade}"></td>
  90. <td th:text="${item.parent_name}"></td>
  91. <td th:text="${item.parent_role}"></td>
  92. <td th:text="${item.phone}"></td>
  93. <td th:text="${item.derver}"></td>
  94. <!-- <td th:text="${item.libVipService.startTime}"></td> -->
  95. <!-- <td th:text="${item.libVipService.endTime}"></td> -->
  96. <!-- <td th:text="${item.libVipService.startTime ==null ? '无服务' : (item.libVipService.species eq 'S999' ? '内部用户' :(item.libVipService.correctType==1 ? '平台批改' : item.libVipService.correctType==2 ? '机构自批改' : item.libVipService.correctType==3 ? '家长自批改' : '平台批改'))}"></td> -->
  97. <td>
  98. <!-- <a th:href="${'javascript:studentServiceAdd('''+item.id+''')'}" class="tablelink">添加服务</a> -->
  99. <a th:if="${item.derver==null || item.derver==''}" th:href="${'javascript:studentBind('''+item.id+''')'}" class="tablelink">添加小塾</a>
  100. <a th:if="${item.derver!=null && item.derver!=''}" th:href="${'javascript:studentDerverDel('''+item.id+''')'}" style="color:red" class="tablelink">解绑小塾</a>
  101. <a th:href="${'javascript:studentDel('''+item.id+''')'}" class="tablelink">移除学生</a>
  102. </td>
  103. <td>
  104. <a class="tablelink" th:href="${'javascript:studentRecord('''+item.id+''')'}" >查看</a>
  105. </td>
  106. </tr>
  107. </tbody>
  108. </table>
  109. <!-- 分页 -->
  110. <div class="pagin">
  111. <div class="message">共<i class="blue">[[${page.rowCnt}]]</i>条记录,当前显示第&nbsp;<i class="blue">[[${page.pageNo }]]&nbsp;</i>页</div>
  112. <div th:utext='${listNavigatHtml}' th:remove="tag" ></div>
  113. </div>
  114. </div>
  115. <div class="formbody" id="studentServiceEdit" style="display: none">
  116. <ul class="forminfo">
  117. <li>
  118. <label>批改类型:<b>*</b></label>
  119. <div class="vocation" style="margin-right: 5px; width: 320px">
  120. <select name="correctType" id="correctType" class="select1" >
  121. <option value="1" >平台</option>
  122. <option value="2" >机构</option>
  123. <option value="3" >家长</option>
  124. </select>
  125. </div>
  126. </li>
  127. <li>
  128. <label>服务日期:<b>*</b></label>
  129. <div class="vocation" style="margin-right: 5px; width: 345px">
  130. <input type="text" id="startTime" name="startTime" placeholder="开始日期" autocomplete="off"
  131. onclick=" WdatePicker({ dateFmt: 'yyyy-MM-dd HH:mm:ss', isShowToday: false, isShowClear: false });" class="scinput date_width " >
  132. &nbsp;-&nbsp;
  133. <input type="text" id="endTime" name="endTime" placeholder="结束日期" autocomplete="off"
  134. onclick=" WdatePicker({ dateFmt: 'yyyy-MM-dd HH:mm:ss', isShowToday: false, isShowClear: false });" class="scinput date_width " >
  135. </div>
  136. </li>
  137. <li></li>
  138. <li></li>
  139. <li></li>
  140. <li>
  141. <label>&nbsp;</label>
  142. <button type="submit" onclick="studentServiceEditSave(1);" class="btn" style="width: 100px">立即生效</button>
  143. <button type="submit" onclick="studentServiceEditSave(2);" class="btn" style="width: 100px">延迟生效...</button>
  144. <button type="button" onclick="closeWin();" class="btn" style="background: #ccc;">取消设置</button>
  145. </li>
  146. </ul>
  147. </div>
  148. </body>
  149. <script type="text/javascript">
  150. $("#exbutton").on('click',function(){
  151. document.getElementById("seachform").action = "[[${sysUrl}]]/sys/imlibuser/student/exlist/[[${tbLibJoin.id}]]";
  152. $("#seachform").submit();
  153. document.getElementById("seachform").action = "[[${sysUrl}]]/sys/imlibuser/student/list/[[${tbLibJoin.id}]]";
  154. });
  155. </script>
  156. <script type="text/javascript">
  157. $("#basecheckbox").bind("click",function(){
  158. if($("#basecheckbox").is(':checked')){
  159. $("[name='checkbox']").prop("checked",true);
  160. }
  161. if(!$("#basecheckbox").is(':checked')){
  162. $("[name='checkbox']").removeAttr("checked");
  163. }
  164. });
  165. function closeWin(){
  166. parent.layer.closeAll();
  167. layer.closeAll();
  168. }
  169. function studentServiceAdd(vipId){
  170. layer.open({
  171. type: 2,
  172. title: '添加学生服务',
  173. closeBtn: 1, //不显示关闭按钮
  174. shift: 0.8,
  175. offset: '100px',
  176. area: ['50%', '60%'],
  177. content: '[[${sysUrl}]]/sys/imlibuser/student/service/add/[[${tbLibJoin.id}]]/'+vipId
  178. });
  179. }
  180. function studentAdd(){
  181. layer.open({
  182. type: 2,
  183. title: '添加学生',
  184. closeBtn: 1, //不显示关闭按钮
  185. shift: 0.8,
  186. offset: '100px',
  187. area: ['50%', '60%'],
  188. content: '[[${sysUrl}]]/sys/imlibuser/student/add/[[${tbLibJoin.id}]]'
  189. });
  190. }
  191. function studentRecord(vipId){
  192. layer.open({
  193. type: 2,
  194. title: '操作记录',
  195. closeBtn: 1, //不显示关闭按钮
  196. shift: 0.8,
  197. offset: '100px',
  198. area: ['90%', '50%'],
  199. content: '[[${sysUrl}]]/sys/imlibuser/student/record/[[${tbLibJoin.id}]]/'+vipId
  200. });
  201. }
  202. function studentServiceEdit(){
  203. var vipIds=[];
  204. $(".checkbox[type=checkbox]").each(function(){
  205. if($(this).is(':checked')){
  206. vipIds.push($(this).val());
  207. }
  208. });
  209. if(vipIds.length<=0){
  210. parent.layer.msg("请选择设置学生",{icon:2});
  211. return;
  212. }
  213. layer.open({
  214. type: 1,
  215. title: '学生设置',
  216. closeBtn: 1, //不显示关闭按钮
  217. shift: 0.8,
  218. offset: '100px',
  219. area: ['40%', '50%'],
  220. content: $("#studentServiceEdit")
  221. });
  222. }
  223. function studentServiceEditSave(takeType){
  224. var vipIds=[];
  225. $(".checkbox[type=checkbox]").each(function(){
  226. if($(this).is(':checked')){
  227. vipIds.push($(this).val());
  228. }
  229. });
  230. if(vipIds.length<=0){
  231. parent.layer.msg("请选择设置学生",{icon:2});
  232. return;
  233. }
  234. var title="您确定保存数据为:<span style='color:red'>[延迟生效]</span>?";
  235. if(takeType==1){
  236. title="您确定保存数据为:<span style='color:red'>[立即生效]</span> ?";
  237. }else if(takeType==2){
  238. title="您确定保存数据为:<span style='color:red'>[延迟生效]</span>?";
  239. }
  240. parent.layer.confirm(title, {
  241. icon: 4, btn: ['确定','关闭'],offset: '100px' //按钮
  242. }, function(){
  243. var url="[[${sysUrl}]]/sys/imlibuser/student/data/service/save";
  244. var params ={
  245. vipIds:vipIds.join(';'),
  246. correctType:$("#correctType").val(),
  247. startTime:$("#startTime").val(),
  248. endTime:$("#endTime").val(),
  249. takeType:takeType
  250. };
  251. $.post(url,params,function(data){
  252. if(data.meta.success){
  253. parent.layer.msg("移除成功",{icon:1});
  254. location.reload();
  255. }else{
  256. parent.layer.msg(data.meta.message,{icon:11});
  257. }
  258. });
  259. });
  260. }
  261. function studentBind(vipId){
  262. layer.open({
  263. type: 2,
  264. title: '绑定小塾',
  265. closeBtn: 1, //不显示关闭按钮
  266. shift: 0.8,
  267. offset: '100px',
  268. area: ['50%', '50%'],
  269. content: '[[${sysUrl}]]/sys/imlibuser/student/bind/'+vipId
  270. });
  271. }
  272. function studentDel(vipId){
  273. parent.layer.confirm("您确定要删除学生关联?<br/>删除后会同步解绑该馆",
  274. {
  275. icon: 4,
  276. btn: ['确定','关闭'],
  277. offset: '150px' //按钮
  278. }, function(){
  279. var url="[[${sysUrl}]]/sys/imlibuser/student/data/del/"+vipId;
  280. var params ={};
  281. $.post(url,params,function(data){
  282. if(data.meta.success){
  283. parent.layer.msg("删除成功",{icon:1});
  284. location.reload();
  285. }else{
  286. parent.layer.msg(data.meta.message,{icon:11});
  287. }
  288. });
  289. });
  290. }
  291. function studentDerverDel(vipId){
  292. parent.layer.confirm("您确定要解绑学生小塾?", {
  293. icon: 4, btn: ['确定','关闭'],offset: '100px' //按钮
  294. }, function(){
  295. var url="[[${sysUrl}]]/sys/imlibuser/student/data/del/derver/"+vipId;
  296. var params ={};
  297. $.post(url,params,function(data){
  298. if(data.meta.success){
  299. parent.layer.msg("删除成功",{icon:1});
  300. location.reload();
  301. }else{
  302. parent.layer.msg(data.meta.message,{icon:11});
  303. }
  304. });
  305. });
  306. }
  307. </script>
  308. </html>