add2.php 68 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
  5. <meta charset="utf-8"/>
  6. <title>校本课程平台</title>
  7. <meta name="description" content=""/>
  8. <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"/>
  9. <!-- bootstrap & fontawesome -->
  10. <link rel="stylesheet" href="/css/bootstrap.min.css"/>
  11. <link rel="stylesheet" href="/css/font-awesome/4.2.0/css/font-awesome.min.css"/>
  12. <!-- page specific plugin styles -->
  13. <!-- text fonts -->
  14. <link rel="stylesheet" href="/css/fonts/fonts.googleapis.com.css"/>
  15. <!-- ace styles -->
  16. <link rel="stylesheet" href="/css/ace.min.css" class="ace-main-stylesheet" id="main-ace-style"/>
  17. <!--[if lte IE 9]>
  18. <link rel="stylesheet" href="assets/css/ace-part2.min.css" class="ace-main-stylesheet"/>
  19. <![endif]-->
  20. <link rel="stylesheet" href="/css/style.css"/>
  21. <!--[if lte IE 9]>
  22. <link rel="stylesheet" href="assets/css/ace-ie.min.css"/>
  23. <![endif]-->
  24. <!-- inline styles related to this page -->
  25. <!-- ace settings handler -->
  26. <script src="/js/ace-extra.min.js"></script>
  27. <script src="/js/jquery-2.2.2.min.js"></script>
  28. <!-- HTML5shiv and Respond.js for IE8 to support HTML5 elements and media queries -->
  29. <script src="/js/layer/layer.js"></script>
  30. <!--[if lte IE 8]>
  31. <script src="assets/js/html5shiv.min.js"></script>
  32. <script src="assets/js/respond.min.js"></script>
  33. <![endif]-->
  34. <script type="text/javascript">
  35. var ratehtml = '';
  36. jQuery(document).ready(function () {
  37. //学年
  38. var usedSchoolYear=[];
  39. var schoolYearId=[],
  40. schoolYearName=[];
  41. <?php
  42. if(isset($schoolYear)){
  43. foreach ($schoolYear as $value){
  44. echo "schoolYearId.push('".$value['schoolYearId']."');";
  45. echo "schoolYearName.push('".$value['schoolYearName']."');";
  46. }
  47. }
  48. ?>
  49. $('.addScale').click(function(){
  50. var usedSchoolYear=[];
  51. var html='<tr>';
  52. //读取已选择学年
  53. var select=$('#scale').find('.school_year');
  54. if(select.length>0){
  55. for(var i=0;i<select.length;i++){
  56. usedSchoolYear.push(select.eq(i).val());
  57. }
  58. }
  59. html+='<td>';
  60. html+='<select class="school_year" name="schoolScale[]">';
  61. for(var i=0;i<schoolYearId.length;i++){
  62. if($.inArray(schoolYearId[i],usedSchoolYear)!=-1){
  63. }else{
  64. html+='<option value="'+schoolYearId[i]+'">'+schoolYearName[i]+'</option>';
  65. }
  66. }
  67. html+='</select>';
  68. html+='</td>';
  69. html+='<td><input type="text" name="gradeOne[]" class="customInput grade_1" /></td>';
  70. html+='<td><input type="text" name="gradeTwo[]" class="customInput grade_2" /></td>';
  71. html+='<td><input type="text" name="gradeThree[]" class="customInput grade_3" /></td>';
  72. html+='<td><span class="remove_tr">移除</span></td>';
  73. html+='</tr>';
  74. $('#scale').append(html);
  75. });
  76. $('#addrate').click(function(){
  77. var usedSchoolYear=[];
  78. //读取已选择学年
  79. var select=$('#rate').find('.school_year');
  80. if(select.length>0){
  81. for(var i=0;i<select.length;i++){
  82. usedSchoolYear.push(select.eq(i).val());
  83. }
  84. }
  85. console.log(usedSchoolYear);
  86. html='';
  87. for(var i=0;i<schoolYearId.length;i++){
  88. if($.inArray(schoolYearId[i],usedSchoolYear)!=-1){
  89. }else{
  90. html+='<option value="'+schoolYearId[i]+'">'+schoolYearName[i]+'</option>';
  91. }
  92. }
  93. $("#hidrate").find('.school_year').html(html);
  94. $('#rate').append($("#hidrate").html())
  95. });
  96. jQuery(window.parent.document).find("#iframe").ready(function () {
  97. jQuery(window.parent.document).find(".menuLi, .menuTop").click(function () {
  98. var url = jQuery(this).attr("url");
  99. window.parent.location.href = "xxx" + url;
  100. });
  101. window.parent.document.url = window.location.href;
  102. var main = jQuery(window.parent.document).find("#iframe");
  103. var thisheight = jQuery("body").height() + 30;
  104. main.height(thisheight);
  105. });
  106. jQuery(window.parent.document).find("#iframe").load(function () {
  107. var main = jQuery(window.parent.document).find("#iframe");
  108. var thisheight = jQuery("body").height() + 30;
  109. main.height(thisheight);
  110. });
  111. });
  112. jQuery(document).ready(function () {
  113. $('.steps-choose').click(function(){
  114. $('.steps-choose').removeClass('show');
  115. $(this).addClass('show');
  116. });
  117. $('#my_wp').click(function () {
  118. var use_wp = $("input[name=use_wp]:checked").val();
  119. var data = {
  120. use_wp: use_wp
  121. };
  122. $.post("<?php echo Yii::app()->createUrl('school/setusewp')?>", data, function (flags) {
  123. var m = JSON.parse(flags);
  124. if (m.status) {
  125. var data1 = {
  126. wp8K: parseInt(m.wp)
  127. };
  128. evaluationClient.SetPaperMode(JSON.stringify(data1));
  129. layer.msg('保存成功', {
  130. icon: 1
  131. }, function () {
  132. layer.closeAll();
  133. location.reload();
  134. });
  135. } else {
  136. layer.msg('保存失败', {
  137. icon: 5
  138. }, function () {
  139. layer.closeAll();
  140. location.reload();
  141. });
  142. }
  143. });
  144. })
  145. $('#scale').on('click','.remove_tr',function(){
  146. $(this).closest('tr').remove();
  147. })
  148. });
  149. function check() {
  150. $("#profileyear").val($("#year").html())
  151. return true;
  152. }
  153. function checknum(str, obj) {
  154. obj.value = obj.value.replace(/[^\d.]/g, ""); //清除“数字”和“.”以外的字符
  155. obj.value = obj.value.replace(/^\./g, ""); //验证第一个字符是数字而不是.
  156. obj.value = obj.value.replace(/\.{2,}/g, "."); //只保留第一个. 清除多余的.
  157. obj.value = obj.value.replace(".", "$#$").replace(/\./g, "").replace("$#$", ".");
  158. }
  159. </script>
  160. <style type="text/css">
  161. .errorMessage {
  162. color: red;
  163. margin-left: 10px;
  164. }
  165. .breadcrumb > li {
  166. padding: 3px 5px;
  167. color: #fff;
  168. background: #6fb3e0;
  169. }
  170. .breadcrumb > li > a {
  171. color: #fff !important;
  172. }
  173. .li_backgrond_color {
  174. background-color: #2977ff !important;
  175. }
  176. .li_backgrond_color > a {
  177. color: #fff !important;
  178. }
  179. .breadcrumb > li + li:before {
  180. display: none;
  181. }
  182. .steps-choose table th {
  183. text-align: right;
  184. width: 200px;
  185. }
  186. .icon {
  187. display: inline-block;
  188. background: center/contain no-repeat;
  189. width: 25px;
  190. height: 25px;
  191. cursor: pointer;
  192. vertical-align: middle;
  193. }
  194. .icon-edit {
  195. background-image: url("/images/edit.png")
  196. }
  197. .confirmbox {
  198. background: #fff;
  199. border: 1px solid #cccccc;
  200. border-radius: 3px;
  201. padding: 40px 40px 30px;
  202. text-align: center;
  203. position: fixed;
  204. left: 50%;
  205. top: 50%;
  206. transform: translate(-50%, -50%);
  207. z-index: 99;
  208. }
  209. .confirmbox-mask {
  210. background: rgba(0, 0, 0, .7);
  211. left: 0;
  212. right: 0;
  213. top: 0;
  214. bottom: 0;
  215. z-index: 99;
  216. position: fixed;
  217. }
  218. button {
  219. border: none;
  220. background: #2977ff;
  221. width: 111px;
  222. height: 36px;
  223. border-radius: 3px;
  224. font-size: 14px;
  225. color: #fff;
  226. outline: none;
  227. cursor: pointer;
  228. }
  229. button.save {
  230. display: block;
  231. margin: 40px auto;
  232. }
  233. .confirmbox .confirmbox-btns {
  234. margin-top: 40px;
  235. }
  236. .icon-close{
  237. background-image: url("/images/close.png")
  238. }
  239. .class-modal {
  240. width: 700px;
  241. min-height: 400px;
  242. background: #fff;
  243. border-radius: 5px;
  244. position: absolute;
  245. top: 50%;
  246. left: 50%;
  247. transform: translate(-50%, -50%);
  248. padding: 20px;
  249. }
  250. .class-modal-head {
  251. font-size: 20px;
  252. font-weight: bold;
  253. text-align: center;
  254. }
  255. .class-modal-body {
  256. margin-top: 20px;
  257. max-height: 300px;
  258. overflow: auto;
  259. }
  260. .class-modal-body .classes {
  261. margin-bottom: 10px;
  262. }
  263. .class-modal-body .classes > div {
  264. display: inline-block;
  265. max-width: 640px;
  266. vertical-align: top;
  267. }
  268. .class-modal-body label {
  269. text-decoration: none;
  270. display: inline-block;
  271. margin: 0 5px 5px;
  272. width:140px;
  273. font-size: 14px;
  274. }
  275. .class-modal-body .classes a.active {
  276. color: #fc091b
  277. }
  278. .class-modal .class_btn{
  279. margin:10px 0;
  280. text-align: center;
  281. }
  282. .class-modal .class_btn button{
  283. margin:5px;
  284. }
  285. .class-modal .icon-close{
  286. position: absolute;
  287. right: 20px;
  288. top: 20px;
  289. }
  290. .c-red {
  291. color: #CC3300
  292. }
  293. .subject-name {
  294. display: inline-block;
  295. padding: 3px 8px;
  296. background: #ff9900;
  297. border-radius: 3px;
  298. color: #ffffff;
  299. font-size: 12px;
  300. }
  301. .steps-choose table th{
  302. text-align: left;
  303. width: auto;
  304. }
  305. .steps-choose table tr th:first-child{
  306. text-align: right;
  307. padding-right: 20px;
  308. width: 200px;
  309. }
  310. .thin_font{font-weight: normal;}
  311. .independentPd{width:800px;}
  312. .customInput{width:60px;}
  313. .hgc_tag{
  314. position: relative;
  315. display: inline-block;
  316. height: 25px;
  317. line-height:25px;
  318. padding: 0 10px;
  319. border: 1px solid #333;
  320. font-size: 14px;
  321. margin:6px 5px;
  322. }
  323. .hgc_tag .close{
  324. position: absolute;
  325. right: -5px;
  326. top: -5px;
  327. color: #fff;
  328. background: #2977ff;
  329. font-size: 12px;
  330. font-style: normal;
  331. width: 15px;
  332. height: 15px;
  333. text-align: center;
  334. line-height: 15px;
  335. border-radius: 50%;
  336. cursor: pointer;
  337. opacity: 1;
  338. }
  339. .steps-choose.show .table-hide{
  340. padding:10px 20px;
  341. }
  342. .class-modal-1 {
  343. width: 500px;
  344. min-height: 220px;
  345. background: #fff;
  346. border-radius: 5px;
  347. position: absolute;
  348. top: 50%;
  349. left: 50%;
  350. transform: translate(-50%, -50%);
  351. }
  352. .class-modal-head-1 {
  353. font-size: 14px;
  354. text-align: left;
  355. color:#fff;
  356. line-height:30px;
  357. background: #2977ff;
  358. padding-left:15px;
  359. }
  360. .class-modal-body-1{
  361. padding:15px;
  362. }
  363. .class-modal-body-1 h2,.class-modal-body-1 h3{
  364. font-size:14px;
  365. font-weight:normal;
  366. margin-top:10px;
  367. }
  368. .class-modal-body-1 h3 span{
  369. font-size:10px;
  370. color:#ccc;
  371. }
  372. .class-modal-body-1 label{
  373. display: inline-block;
  374. font-weight: normal;
  375. margin-right: 40px;
  376. height:30px;
  377. }
  378. .class-modal-1 .icon-close-1{
  379. position: absolute;
  380. right: 10px;
  381. top:5px;
  382. }
  383. .class-modal-1 .class_area{
  384. height:115px;
  385. border:1px solid #ccc;
  386. padding:5px;
  387. overflow-y: auto;
  388. margin-bottom:15px;
  389. }
  390. .class-modal-1 .checkAll{
  391. position:absolute;
  392. right:5px;
  393. top:115px;
  394. }
  395. .class-modal-1 .subsection{
  396. }
  397. .class-modal-1 .btn p{color:#000;}
  398. .class-modal-1 .btn_area{
  399. margin-top:20px;
  400. text-align: center;
  401. }
  402. .class-modal-1 .btn_area p{
  403. display: inline-block;
  404. }
  405. .class-modal-1 .btn_area button{
  406. width:80px;
  407. height:25px;
  408. margin-left:5px;
  409. }
  410. .class-modal-1 .btn_area .cancel{
  411. background: #fff;
  412. color:#000;
  413. border:1px solid #666;
  414. }
  415. .icon-close-1{
  416. background-image: url("/images/chose.png");
  417. background-size: 15px,15px;
  418. }
  419. .subject-area {
  420. font-size:16px;
  421. }
  422. input[name=stu-login-permission]{
  423. margin-left: 15px;
  424. }
  425. </style>
  426. </head>
  427. <body class="no-skin">
  428. <!-- 导航栏开始-->
  429. <?php include(Yii::app()->basePath.'/views/layouts/class_navigation.php');?>
  430. <!-- 导航栏结束-->
  431. <div class="shade"></div>
  432. <div class="main-container" id="main-container">
  433. <div class="main-content">
  434. <?php if ($schoocontact === null) { ?>
  435. <input type='hidden' name='actionsc' value='add'>
  436. <?php } else { ?>
  437. <input type='hidden' name='actionsc' value='edit'>
  438. <?php } ?>
  439. <?php if ($schoolentrancerate === null) { ?>
  440. <input type='hidden' name='actionse' value='add'>
  441. <?php } else { ?>
  442. <input type='hidden' name='actionse' value='edit'>
  443. <?php } ?>
  444. <?php if ($schoolprofile === null) { ?>
  445. <input type='hidden' name='actionsp' value='add'>
  446. <?php } else { ?>
  447. <input type='hidden' name='actionsp' value='edit'>
  448. <?php } ?>
  449. <div class="step-five steps-choose show">
  450. <h3 style="padding-left: 20px">设置8K纸张</h3>
  451. <table class="table-hide" style="margin-top: 15px;">
  452. <tbody>
  453. <tr style="line-height:40px">
  454. <th>8K纸张:&nbsp;</th>
  455. <td>
  456. <input class="ace" type="radio" <?php if ($schoolinfo->use_wp == 0) {
  457. echo ' checked="checked"';
  458. } ?> value="0" name="use_wp">8k类型(260*370)
  459. <input class="ace" type="radio" <?php if ($schoolinfo->use_wp == 1) {
  460. echo ' checked="checked"';
  461. } ?> value="1" name="use_wp">8k类型(270*390)
  462. </td>
  463. </tr>
  464. </tbody>
  465. </table>
  466. <div class="create-orders table-hide">
  467. <input type="button" id="my_wp" class="btn btn-success btn-sm" value="保存" style="width:100px">
  468. </div>
  469. </div>
  470. <div class="step-one steps-choose ">
  471. <h3 style="padding-left: 20px">基本信息</h3>
  472. <table class="table-hide" style="margin-top: 15px">
  473. <tbody>
  474. <tr style="line-height:40px">
  475. <th>学校名称:</th>
  476. <td><span><?php echo $schoolinfo['school_name'] ?></span></td>
  477. </tr>
  478. <tr style="line-height:40px">
  479. <th>学校地址:</th>
  480. <td>
  481. <span><?php echo isset($area[0]['region_name']) ? $area[0]['region_name'] : '' ?></span>-<span><?php echo isset($area[1]['region_name']) ? $area[1]['region_name'] : '' ?></span>-<span><?php echo isset($area[2]['region_name']) ? $area[2]['region_name'] : '' ?></span>-<span><?php echo $schoolinfo['address'] ?></span>
  482. </td>
  483. </tr>
  484. <tr style="line-height:40px">
  485. <th>邮编:</th>
  486. <td><span><?php echo $schoolinfo['postcode'] ?></span></td>
  487. </tr>
  488. <tr style="line-height:40px">
  489. <th>联系电话:</th>
  490. <td><span><?php echo $schoolinfo['phone'] ?></span></td>
  491. </tr>
  492. <tr style="line-height:40px">
  493. <th>类型:</th>
  494. <td><span><?php echo $schoolinfo['client'] == 1 ? "非客户学校" : "客户学校"; ?></span></td>
  495. </tr>
  496. <tr style="line-height:40px">
  497. <th>简介:</th>
  498. <td><span><?php echo $schoolinfo['intro'] ?></span></td>
  499. </tr>
  500. </tbody>
  501. </table>
  502. </div>
  503. <?php if(Yii::app()->params['section']==0):?>
  504. <div class="step-one steps-choose ">
  505. <h3 style="padding-left: 20px">学段设置</h3>
  506. <table class="table-hide" style="margin-top: 15px">
  507. <tbody>
  508. <tr style="line-height:40px">
  509. <th>学段:</th>
  510. <td>
  511. <select class="gradeGroup">
  512. <?php
  513. if($gradeGroup){
  514. foreach ($gradeGroup as $item){
  515. if($item['group_id']==$schoolinfo['grade_group_id']){
  516. echo '<option value="'.$item['group_id'].'" selected>'.$item['group_name'].'</option>';
  517. }else{
  518. echo '<option value="'.$item['group_id'].'">'.$item['group_name'].'</option>';
  519. }
  520. }
  521. }
  522. ?>
  523. </select>
  524. </td>
  525. <td> <span class="red">注:下拉框内可选择学段名称模式,系统默认按三年制1设置,
  526. 仅支持修改一次,请核对选择后再点击确认按钮</span>
  527. </td>
  528. </tr>
  529. <tr style="line-height:40px">
  530. <th valign="top">学制:</th>
  531. <td>
  532. <span class="showGradeConfig"></span>
  533. </td>
  534. <td></td>
  535. </tr>
  536. <tr style="line-height:40px">
  537. <th valign="top"></th>
  538. <td>
  539. <div class="create-orders table-hide">
  540. <?php
  541. if ((isset(Yii::app()->session['testFlag']) && (Yii::app()->session['testFlag'] == 1)) || (isset($schoolinfo['grade_group_changed']) && $schoolinfo['grade_group_changed']==0)):
  542. ?>
  543. <input type="button" id="saveGradeSection" class="btn btn-success btn-sm" value="确认" style="width:100px">
  544. <?php endif;?>
  545. </div>
  546. </td>
  547. <td></td>
  548. </tr>
  549. </tbody>
  550. </table>
  551. </div>
  552. <?php endif;?>
  553. <?php if(Yii::app()->params['section']==1):?>
  554. <div class="step-seven steps-choose ">
  555. <h3 style="padding-left: 20px">文理科设置</h3>
  556. <table class="table-hide" style="margin-top: 15px">
  557. <tbody>
  558. <?php
  559. if(isset($grade) && $grade){
  560. $checked=array(
  561. 0=>'',
  562. 1=>''
  563. );
  564. foreach ($grade as $key=> $value){
  565. if($value['arts_science']==1){
  566. $checked[0]="checked";
  567. $checked[1]="";
  568. }elseif($value['arts_science']==2){
  569. $checked[1]="checked";
  570. $checked[0]="";
  571. }
  572. $ids_1='';
  573. $names_1='';
  574. $ids_2='';
  575. $names_2='';
  576. if(isset($arts_science[$value['id']][1]['ids']) && isset($arts_science[$value['id']][1]['names'])){
  577. $ids_1=implode(',',$arts_science[$value['id']][1]['ids']);
  578. $names_1=implode(',',$arts_science[$value['id']][1]['names']);
  579. }
  580. if(isset($arts_science[$value['id']][2]['ids']) && isset($arts_science[$value['id']][2]['names'])){
  581. $ids_2=implode(',',$arts_science[$value['id']][2]['ids']);
  582. $names_2=implode(',',$arts_science[$value['id']][2]['names']);
  583. }
  584. echo '<tr style="line-height:40px">';
  585. echo '<th>'.$value['grade_name'].'</th>';
  586. echo '<th><input class="ace changeAS grade" type="radio" id="'.$value['id'].'" name="as_'.$key.'" '.$checked[0].' value="1">不分科 <input class="ace changeAS" '.$checked[1].' id="'.$value['id'].'" name="as_'.$key.'" type="radio" value="2">文理分科</th>';
  587. echo '</tr>';
  588. if($value['arts_science']==2){
  589. echo '<tr class="ClassList_'.$value['id'].'">';
  590. }else{
  591. echo '<tr class="ClassList_'.$value['id'].'" style="display: none">';
  592. }
  593. echo '<th>文科班:</th>';
  594. echo '<th><span class="thin_font list_'.$value['id'].'_1">'.$names_1.'</span><i id="'.$value['id'].'" type="1" name="'.$value['grade_name'].'年级 文科班选择" class="icon icon-edit add_class" style="font-style: normal;color:#15ae68 "></i></th>';
  595. echo '</tr>';
  596. if($value['arts_science']==2){
  597. echo '<tr class="ClassList_'.$value['id'].'">';
  598. }else{
  599. echo '<tr class="ClassList_'.$value['id'].'" style="display: none">';
  600. }
  601. echo '<th>理科班:</th>';
  602. echo '<th><span class="thin_font list_'.$value['id'].'_2">'.$names_2.'</span><i id="'.$value['id'].'" type="2" name="'.$value['grade_name'].'年级 理科班选择" class="icon icon-edit add_class" style="font-style: normal;color:#15ae68 "></i></th>';
  603. echo '<input type="hidden" name="grade_'.$value['id'].'_1" value="'.$ids_1.'"><input type="hidden" name="grade_'.$value['id'].'_2" value="'.$ids_2.'">';
  604. echo '</tr>';
  605. }
  606. }
  607. ?>
  608. </tbody>
  609. </table>
  610. <div class="create-orders table-hide">
  611. <input type="button" id="SaveArtsAndScience" class="btn btn-success btn-sm" value="保存" style="width:100px">
  612. </div>
  613. </div>
  614. <?php endif;?>
  615. <div class="step-eight steps-choose ">
  616. <h3 style="padding-left: 20px">自定义学科设置</h3>
  617. <div class="table-hide subject-icon">
  618. <?php
  619. if(isset($extendSubjectSchool) && $extendSubjectSchool){
  620. foreach ($extendSubjectSchool as $key=> $value){
  621. echo '<span class="hgc_tag">'.$value['subject_name'];
  622. if($value['used']==0){
  623. echo '<i subject_id="'.$value['subject_id'].'" class="close">X</i>';
  624. }
  625. echo '</span>';
  626. }
  627. }else{
  628. echo '暂未添加自定义科目';
  629. }
  630. ?>
  631. </div>
  632. <div class="create-orders table-hide">
  633. <input type="button" id="selectSubjects" class="btn btn-success btn-sm" value="添加学科" style="width:100px">
  634. </div>
  635. </div>
  636. <?php if (!isset(Yii::app()->session["crmUserInfo"])) {
  637. if ($grade) { ?>
  638. <div class="step-three steps-choose">
  639. <h3 style="padding-left: 20px">设置学校准考证号&nbsp;<i class="fa fa-plus"
  640. style="font-style: normal;color:#2977ff "></i></h3>
  641. <form action="<?php echo Yii::app()->createUrl('school/grade_insert') ?>" method="post" id="orderAdd"
  642. onsubmit="return gradecheck();">
  643. <ul class="table-hide">
  644. <?php foreach ($grade as $v) { ?>
  645. <li class="row marginNo table-hide-li pt20" style="width: 760px">
  646. <div class="textRight fl " style="width:160px;line-height: 80px;height: 80px"><span
  647. class="mt15"><?php echo $v->grade_name ?>:</span>&nbsp;
  648. </div>
  649. <div class="col-xs-9 paddingNo fl ">
  650. <div class="col-xs-9 fl lineHeight40">
  651. 准考证号位数:&nbsp;&nbsp;<input class="students-search" type="text" placeholder=""
  652. name="card_length<?php echo $v->id ?>"
  653. value='<?php echo $v->card_length ?>'
  654. style="width:50px;">&nbsp;位
  655. </div>
  656. <div class="col-xs-8 fl lineHeight40 text-left">
  657. <span style="float: left">是否开启准考证号:</span>&nbsp;&nbsp;<div
  658. class="col-sm-4 mt6 ">
  659. <span class="inline blue">
  660. <input type="radio" class="ace" name="card_status<?php echo $v->id ?>"
  661. value="1" <?php echo $v->card_status == 1 ? "checked" : '' ?>>
  662. <span> 是</span>
  663. </span>
  664. &nbsp;&nbsp;
  665. <span class="inline blue">
  666. <input type="radio" class="ace" name="card_status<?php echo $v->id ?>"
  667. value="0" <?php echo $v->card_status == 0 ? "checked" : '' ?>>
  668. <span> 否</span>
  669. </span>
  670. </div>
  671. </div>
  672. </div>
  673. </li>
  674. <?php } ?>
  675. </ul>
  676. <div class="create-orders table-hide" style="line-height: 24px;color: red">
  677. 1、修改学校准考证号位数时,同时修改学生的学校准考证号的位数,两者位数必须一致,否则无法使用。&nbsp;<br>2、如:学校准考证号设置为5位,学生的学校准考证号为“12345”<br>3、准考证号位数最好在14位内
  678. </div>
  679. <div class="create-orders table-hide">
  680. <input type="submit" name="grade_submit" id="grade_submit" class="btn btn-success btn-sm"
  681. value="保存" style="width:100px">
  682. </div>
  683. </div><?php }
  684. } ?>
  685. </form>
  686. </div>
  687. <div class="step-eight steps-choose ">
  688. <h3 style="padding-left: 20px">阅卷留痕</h3>
  689. <form action="<?php echo Yii::app()->createUrl('school/markingSet') ?>" method="post" id="markingset">
  690. <div class="table-hide subject-icon">
  691. <div class="create-orders table-hide" style="line-height: 24px;color: red">
  692. 若需要阅卷留痕请勾选下方复选框,勾选后需重新登录系统才可生效,生效后在教师端查看原卷时可看到分数痕迹。<br>
  693. </div>
  694. <span class="inline blue">
  695. <input type="checkbox" style="margin-left:20px" name="coordinate"
  696. value="1" <?php if(isset($schoolinfo['marking_coordinate']) && $schoolinfo['marking_coordinate']) echo 'checked'?>>
  697. <span> 阅卷留痕</span>
  698. </span>
  699. <div class="create-orders table-hide" style="line-height: 24px;color: red">
  700. 注:由于阅卷留痕需处理原卷图片,在上传原卷图片时将会增加耗时,请知悉!<br>
  701. </div>
  702. </div>
  703. <div class="create-orders table-hide">
  704. <input type="submit" id="" class="btn btn-success btn-sm" value="保存" style="width:100px">
  705. </div>
  706. </form>
  707. </div>
  708. <div class="step-two steps-choose">
  709. <h3 style="padding-left: 20px">联系人</h3>
  710. <form action="<?php echo Yii::app()->createUrl('school/contact_insert') ?>" method="post" id="orderAdd"
  711. onsubmit="return check_contact();">
  712. <table class="table-hide" style="margin-top: 15px;">
  713. <tbody>
  714. <tr style="line-height:40px">
  715. <th>校长:&nbsp;</th>
  716. <td>
  717. <input class="students-search" type="text" placeholder="" name="schoolMasterName"
  718. value='<?php echo $schoocontact['schoolMasterName'] ?>' style="width:240px">
  719. </td>
  720. <th>校长联系电话:&nbsp;</th>
  721. <td>
  722. <input class="students-search" type="text" placeholder="" name="schoolMasterMobile"
  723. value='<?php echo $schoocontact['schoolMasterMobile'] ?>' style="width:240px">
  724. </td>
  725. </tr>
  726. <tr style="line-height:40px">
  727. <th>分管项目副校长:&nbsp;</th>
  728. <td>
  729. <input class="students-search" type="text" placeholder="" name="schoolMaster2Name"
  730. value='<?php echo $schoocontact['schoolMaster2Name'] ?>' style="width:240px">
  731. </td>
  732. <th>分管项目副校长联系电话:&nbsp;</th>
  733. <td>
  734. <input class="students-search" type="text" placeholder="" name="schoolMaster2Mobile"
  735. value='<?php echo $schoocontact['schoolMaster2Mobile'] ?>' style="width:240px">
  736. </td>
  737. </tr>
  738. <?php if(Yii::app()->params['section']==1):?>
  739. <tr style="line-height:40px">
  740. <th>高一年级主任:&nbsp;</th>
  741. <td>
  742. <input class="students-search" type="text" placeholder="" name="grade1HeadName"
  743. value='<?php echo $schoocontact['grade1HeadName'] ?>' style="width:240px">
  744. </td>
  745. <th>高一年级主任电话:&nbsp;</th>
  746. <td>
  747. <input class="students-search" type="text" placeholder="" name="grade1HeadMobile"
  748. value='<?php echo $schoocontact['grade1HeadMobile'] ?>' style="width:240px">
  749. </td>
  750. </tr>
  751. <tr style="line-height:40px">
  752. <th>高二年级主任:&nbsp;</th>
  753. <td>
  754. <input class="students-search" type="text" placeholder="" name="grade2HeadName"
  755. value='<?php echo $schoocontact['grade2HeadName'] ?>' style="width:240px">
  756. </td>
  757. <th>高二年级主任电话:&nbsp;</th>
  758. <td>
  759. <input class="students-search" type="text" placeholder="" name="grade2HeadMobile"
  760. value='<?php echo $schoocontact['grade2HeadMobile'] ?>' style="width:240px">
  761. </td>
  762. </tr>
  763. <tr style="line-height:40px">
  764. <th>高三年级主任:&nbsp;</th>
  765. <td>
  766. <input class="students-search" type="text" placeholder="" name="grade3HeadName"
  767. value='<?php echo $schoocontact['grade3HeadName'] ?>' style="width:240px">
  768. </td>
  769. <th>高三年级主任电话:&nbsp;</th>
  770. <td>
  771. <input class="students-search" type="text" placeholder="" name="grade3HeadMobile"
  772. value='<?php echo $schoocontact['grade3HeadMobile'] ?>' style="width:240px">
  773. </td>
  774. </tr>
  775. <?php endif;?>
  776. </tbody>
  777. </table>
  778. <div class="create-orders table-hide">
  779. <input type="submit" name="my_submit" id="my_submit" class="btn btn-success btn-sm checkRepeat" value="保存"
  780. style="width:100px">
  781. </div>
  782. </form>
  783. </div>
  784. <div class="step-four steps-choose">
  785. <h3 style="padding-left: 20px">学校概况</h3>
  786. <form action="<?php echo Yii::app()->createUrl('school/profile_insert') ?>" method="post" id="orderAdd">
  787. <ul class="table-hide">
  788. <li class="row marginNo table-hide-li pt20 ">
  789. <div class="textRight lineHeight30 fl" style="width:160px"><span class="mt15">建校年份:</span>&nbsp;
  790. </div>
  791. <div class="fl col-xs-9 paddingNo">
  792. <div class='diy_select' style="width:238px;float: left;">
  793. <input type='hidden' class='diy_select_input' id="profileyear" name="profile[schoolBuildYear]"
  794. value="<?php echo $schoolprofile['schoolBuildYear'] ?>"/>
  795. <div class='diy_select_txt' style="width:205px;"
  796. id="year"><?php if ($schoolprofile['schoolBuildYear']) {
  797. echo $schoolprofile['schoolBuildYear'];
  798. } else {
  799. echo '选择年份';
  800. } ?></div>
  801. <div class='diy_select_btn'></div>
  802. <ul class='diy_select_list'>
  803. <?php for ($i = 1900; $i < (int)date("Y"); $i++) { ?>
  804. <li val="<?php echo $i; ?>" class=""><?php echo $i; ?></li>
  805. <?php } ?>
  806. </ul>
  807. </div>
  808. </li>
  809. <input type="hidden" name="profile[bookVersion]" value="<?php echo $schoolprofile['bookVersion'];?>">
  810. <li class="row marginNo table-hide-li pt20">
  811. <div class="textRight lineHeight30 fl" style="width:160px"><span class="mt15">文理科</span>&nbsp;
  812. </div>
  813. <div class="col-xs-9 paddingNo fl">
  814. <select name="profile[artsAndScience]">
  815. <option value="1" <?php if($schoolprofile['artsAndScience']==1) echo 'selected'?>>重文</option>
  816. <option value="2" <?php if($schoolprofile['artsAndScience']==2) echo 'selected'?>>重理</option>
  817. <option value="3" <?php if($schoolprofile['artsAndScience']==3) echo 'selected'?>>文理均衡</option>
  818. </select>
  819. </div>
  820. </li>
  821. <li class="row marginNo table-hide-li pt20">
  822. <div class="textRight lineHeight30 fl" style="width:160px"><span class="">学校性质:</span>&nbsp;</div>
  823. <div class="col-xs-9 paddingNo fl">
  824. <div class="col-sm-12 paddingNo mt6">
  825. <span class="inline blue mr15">
  826. <input class="ace"
  827. type="radio" <?php if ($schoolprofile['schoolNature'] == "0" || $schoolprofile['schoolNature'] == "") {
  828. echo ' checked="checked"';
  829. } ?> name="profile[schoolNature]" value="0">
  830. <span class="lbl middle">民办</span>
  831. </span>
  832. <span class="inline blue">
  833. <input class="ace"
  834. type="radio" <?php if ($schoolprofile['schoolNature'] == "1" ) {
  835. echo ' checked="checked"';
  836. } ?> name="profile[schoolNature]" value="1">
  837. <span class="lbl middle">公办</span>
  838. </span>
  839. </div>
  840. </div>
  841. </li>
  842. <li class="row marginNo table-hide-li pt20">
  843. <div class="textRight lineHeight30 fl" style="width:160px"><span class="mt15">学校类型:</span>&nbsp;
  844. </div>
  845. <div class="col-xs-9 paddingNo fl">
  846. <select name="profile[schoolType]">
  847. <option value="0" <?php if($schoolprofile['schoolType']==0) echo 'selected'?>>普通</option>
  848. <option value="1" <?php if($schoolprofile['schoolType']==1) echo 'selected'?>>省重点</option>
  849. <option value="2" <?php if($schoolprofile['schoolType']==2) echo 'selected'?>>市重点</option>
  850. <option value="3" <?php if($schoolprofile['schoolType']==3) echo 'selected'?>>县重点</option>
  851. </select>
  852. </div>
  853. </li>
  854. <li class="row marginNo table-hide-li pt20">
  855. <div class="textRight lineHeight30 fl" style="width:160px"><span class="">是否设少数民族:</span>&nbsp;
  856. </div>
  857. <div class="col-xs-9 paddingNo fl">
  858. <div class="col-sm-12 paddingNo mt6">
  859. <span class="inline blue mr15">
  860. <input class="ace"
  861. type="radio" <?php if ($schoolprofile['isMinority'] == "1") {
  862. echo ' checked="checked"';
  863. } ?> value="1"
  864. name="profile[isMinority]">
  865. <span class="lbl middle">是</span>
  866. </span>
  867. <span class="inline blue mr15">
  868. <input class="ace" type="radio" <?php if (!$schoolprofile['isMinority']) {
  869. echo ' checked="checked"';
  870. } ?> value="0" name="profile[isMinority]">
  871. <span class="lbl middle">否</span>
  872. </span>
  873. </div>
  874. </div>
  875. </li>
  876. <li class="row marginNo table-hide-li pt20">
  877. <div class="textRight lineHeight30 fl" style="width:160px"><span class="mt15">寄宿制形式:</span>&nbsp;
  878. </div>
  879. <div class="col-xs-9 paddingNo fl">
  880. <div class='diy_select' style="width:238px;float: left;">
  881. <input type='hidden' class='diy_select_input' id="type_id" name="profile[isStaying]"
  882. value="<?php echo $schoolprofile['isStaying'] ?>"/>
  883. <div class='diy_select_txt'
  884. style="width:205px;"><?php echo $schoolprofile['isStaying'] == 1 ? "寄宿制" : "非寄宿制" ?></div>
  885. <div class='diy_select_btn'></div>
  886. <ul class='diy_select_list'>
  887. <li val="0">非寄宿制</li>
  888. <li val="1">寄宿制</li>
  889. </ul>
  890. </div>
  891. </li>
  892. <li class="row marginNo table-hide-li pt20">
  893. <div class="textRight lineHeight30 fl" style="width:160px"><span class="mt15">升学率:</span>&nbsp;
  894. </div>
  895. <div class="col-xs-9 paddingNo fl">
  896. <div class="mt6"><a href="javascript:void(0);" id="addrate" >+添加</a></div>
  897. <div class="clearfix mt15 independentPd" id="rate">
  898. <?php
  899. if (!empty($schoolentrancerate)) {
  900. foreach ($schoolentrancerate as $k => $v) {
  901. ?>
  902. <div class="customK">
  903. <span class="inline blue mr15">
  904. <select class="school_year" name="schoolYear[]">
  905. <?php
  906. if(isset($schoolYear)){
  907. foreach ($schoolYear as $value){
  908. if(strcmp($v['schoolYearId'],$value['schoolYearId'])==0){
  909. echo '<option value="'.$value['schoolYearId'].'" selected>'.$value['schoolYearName'].'</option>';
  910. }else{
  911. echo '<option value="'.$value['schoolYearId'].'" >'.$value['schoolYearName'].'</option>';
  912. }
  913. }
  914. }
  915. ?>
  916. </select>
  917. </span>
  918. <span class="inline blue mr15">
  919. 一本
  920. <input class="customInput" name="level1Rate[]" type="text" value="<?php echo $v['level1Rate'] ?>" onkeyup="checknum(this.value,this)"> %
  921. </span>
  922. <span class="inline blue mr15">
  923. 二本
  924. <input class="customInput" name="level2Rate[]" type="text" value="<?php echo $v['level2Rate'] ?>" onkeyup="checknum(this.value,this)"> %
  925. </span>
  926. <span class="inline blue mr15">
  927. 三本
  928. <input class="customInput" name="level3Rate[]" type="text" value="<?php echo $v['level3Rate'] ?>" onkeyup="checknum(this.value,this)"> %
  929. </span>
  930. <a href="javascript:;">删除</a>
  931. </div>
  932. <?php }
  933. } ?>
  934. </div>
  935. </div>
  936. </li>
  937. <li class="row marginNo table-hide-li pt20">
  938. <div class="textRight lineHeight30 fl" style="width:160px"><span class="mt15">学校规模:</span>&nbsp;
  939. </div>
  940. <div class="col-xs-9 paddingNo fl">
  941. <div class="mt6"><a href="javascript:void(0);" class="addScale">+添加</a></div>
  942. <table id="scale" class="table table-striped table-bordered table-hover dataTable no-footer DTTT_selectable" >
  943. <tr>
  944. <th>学年</th>
  945. <th>高一规模</th>
  946. <th>高二规模</th>
  947. <th>高三规模</th>
  948. </tr>
  949. <?php
  950. if($scale){
  951. foreach ($scale as $val){
  952. ?>
  953. <tr>
  954. <td>
  955. <select class="school_year" name="schoolScale[]">
  956. <?php
  957. if(isset($schoolYear)){
  958. foreach ($schoolYear as $value){
  959. if(strcmp($val['schoolYearId'],$value['schoolYearId'])==0){
  960. echo '<option value="'.$value['schoolYearId'].'" selected>'.$value['schoolYearName'].'</option>';
  961. }else{
  962. echo '<option value="'.$value['schoolYearId'].'" >'.$value['schoolYearName'].'</option>';
  963. }
  964. }
  965. }
  966. ?>
  967. </select>
  968. </td>
  969. <td><input type="text" name="gradeOne[]" value="<?php echo $val['gradeOne']?>"></td>
  970. <td><input type="text" name="gradeTwo[]" value="<?php echo $val['gradeTwo']?>"></td>
  971. <td><input type="text" name="gradeThree[]" value="<?php echo $val['gradeThree']?>"></td>
  972. </tr>
  973. <?php
  974. }
  975. }
  976. ?>
  977. </table>
  978. </div>
  979. </li>
  980. </ul>
  981. <div class="create-orders table-hide">
  982. <input type="submit" name="my_submit" id="my_submit" class="btn btn-success btn-sm" value="保存"
  983. style="width:100px">
  984. </div>
  985. </form>
  986. <div id="hidrate" style="display:none">
  987. <div class="customK">
  988. <span class="inline blue mr15">
  989. <select class="school_year" name="schoolYear[]">
  990. <?php
  991. if(isset($schoolYear)){
  992. foreach ($schoolYear as $value){
  993. echo '<option value="'.$value['schoolYearId'].'" >'.$value['schoolYearName'].'</option>';
  994. }
  995. }
  996. ?>
  997. </select>
  998. </span>
  999. <span class="inline blue mr15">
  1000. 一本
  1001. <input class="customInput" name="level1Rate[]" type="text" value="" onkeyup="checknum(this.value,this)"> %
  1002. </span>
  1003. <span class="inline blue mr15">
  1004. 二本
  1005. <input class="customInput" name="level2Rate[]" type="text" value="" onkeyup="checknum(this.value,this)"> %
  1006. </span>
  1007. <span class="inline blue mr15">
  1008. 三本
  1009. <input class="customInput" name="level3Rate[]" type="text" value="" onkeyup="checknum(this.value,this)"> %
  1010. </span>
  1011. <a href="javascript:;">删除</a>
  1012. </div>
  1013. </div>
  1014. </div>
  1015. <div class="step-six steps-choose">
  1016. <h3 style="padding-left: 20px">安全与隐私</h3>
  1017. <table class="table-hide" style="margin-top: 15px;margin-left: 15px;">
  1018. <tbody>
  1019. <tr style="line-height: 40px;">
  1020. <th style="width: 280px;">校内试卷是否公开于“本省推荐试卷”:</th>
  1021. <td>
  1022. <select class="customSelect" style="width: 100px;" id="is_private" name="is_private">
  1023. <option value="0" <?php if (!$is_private) echo 'selected'?> >公开</option>
  1024. <option value="1" <?php if ($is_private) echo 'selected'?>>不公开</option>
  1025. </select>
  1026. </td>
  1027. </tr>
  1028. </tbody>
  1029. </table>
  1030. <div class="table-hide" style="margin-top: 20px;padding-left: 55px;">
  1031. <input type="button" name="submit_private" onclick="saveSchoolPrivate()" class="btn btn-success btn-sm" value="保存"
  1032. style="width:100px;">
  1033. </div>
  1034. </div>
  1035. <div class="step-nine steps-choose">
  1036. <h3 style="padding-left: 20px;">学生平板登录设备权限</h3>
  1037. <div class="table-hide">
  1038. <div>一个设备登录多个账号<input type="radio" name="stu-login-permission" value="0" <?php echo !$login_permission?"checked='checked'":'';?>></div>
  1039. <div style="color:red">注:常用,设备退出登录后可登录多个账号</div>
  1040. </br>
  1041. <div>一个设备只能登录一个账号<input type="radio" name="stu-login-permission" value="1" <?php echo $login_permission?"checked='checked'":''?>></div>
  1042. <div style="color:red">注:课堂平板学习防学生作弊,只能在一个设备上面登录一个账号。<br>修改登录设备:【学生管理】-【学生设置】-【学生端登录ID重置】</div>
  1043. </div>
  1044. </div>
  1045. </div>
  1046. <div class="ttd dn">
  1047. <div class="s-state clearfix posirela">
  1048. <div class="hint_size clearfix">
  1049. <span class="fl ml15">错误信息</span>
  1050. </div>
  1051. <div class="mistake_character">
  1052. <p class="ml15" id="err_msg"></p>
  1053. <div class="clearfix" style="width:180px;margin:0px auto;text-align:center">
  1054. <p class="mt20">
  1055. <button class="roger shut">确定</button>
  1056. </p>
  1057. </div>
  1058. </div>
  1059. </div>
  1060. </div>
  1061. <!-- /.main-content -->
  1062. <!-- /.main-container -->
  1063. <div class="confirmbox-mask" style="display: none" id="classModal">
  1064. <div class="class-modal">
  1065. </div>
  1066. </div>
  1067. <div class="confirmbox-mask" style="display: none" id="classModal-1">
  1068. <form name="table_set">
  1069. <div class="class-modal-1">
  1070. <i class="icon icon-close-1"></i><div class="class-modal-head-1">添加学科</div>
  1071. <div class="class-modal-body-1">
  1072. <div class="subject-area">
  1073. </div>
  1074. <p align="center" class="red notice">&nbsp;</p>
  1075. <div class="btn_area">
  1076. <button class="cancel icon-close-subject">取消</button>
  1077. <button class="select_subject">确定</button>
  1078. </div>
  1079. </div>
  1080. </div>
  1081. </form>
  1082. </div>
  1083. <!-- basic scripts -->
  1084. <!--[if !IE]> -->
  1085. <!--<script src="/js/jquery.2.1.1.min.js"></script>-->
  1086. <!-- <![endif]-->
  1087. <!--[if IE]>
  1088. <script src="assets/js/jquery.1.11.1.min.js"></script>
  1089. <![endif]-->
  1090. <!--[if !IE]> -->
  1091. <script type="text/javascript">
  1092. window.jQuery || document.write("<script src='/js/jquery.min.js'>" + "<" + "/script>");
  1093. </script>
  1094. <!-- <![endif]-->
  1095. <!--[if IE]>
  1096. <script type="text/javascript">
  1097. window.jQuery || document.write("<script src='assets/js/jquery1x.min.js'>" + "<" + "/script>");
  1098. </script>
  1099. <![endif]-->
  1100. <script type="text/javascript">
  1101. if ('ontouchstart' in document.documentElement) document.write("<script src='/js/jquery.mobile.custom.min.js'>" + "<" + "/script>");
  1102. </script>
  1103. <script src="/js/bootstrap.min.js"></script>
  1104. <!-- page specific plugin scripts -->
  1105. <!-- ace scripts -->
  1106. <script src="/js/ace-elements.min.js"></script>
  1107. <script src="/js/ace.min.js"></script>
  1108. <!-- 学校管理 js -->
  1109. <script src="/js/school.management.js"></script>
  1110. <script src="/js/xsgl.js"></script>
  1111. <!-- inline scripts related to this page -->
  1112. <script>
  1113. function check() {
  1114. var card_length = parseInt($("input[name=card_length]").val());
  1115. var regMobile = /[0-9]$/;
  1116. if (!regMobile.test(card_length)) {
  1117. layer.msg('非法数据!');
  1118. return false;
  1119. }
  1120. if (4 > card_length || card_length > 14) {
  1121. layer.msg('不在范围!只能取4--14位');
  1122. return false;
  1123. }
  1124. if (4 <= card_length && card_length <= 14) {
  1125. return true;
  1126. } else {
  1127. layer.msg('非法数据!');
  1128. return false;
  1129. }
  1130. }
  1131. function saveSchoolPrivate() {
  1132. var is_private = $('#is_private').val();
  1133. $.ajax({
  1134. type: 'post',
  1135. data: {'is_private': is_private},
  1136. url: "<?php echo Yii::app()->createUrl('school/saveSchoolPrivate') ;?>",
  1137. dataType: 'json',
  1138. success: function (res) {
  1139. if (res.status){
  1140. layer.alert("保存成功", {icon:1})
  1141. } else{
  1142. layer.msg("保存失败");
  1143. }
  1144. },
  1145. error: function () {
  1146. layer.msg("保存异常");
  1147. }
  1148. })
  1149. }
  1150. function gradecheck() {
  1151. var card_length1 = parseInt($("input[name=card_length1]").val());
  1152. var card_length2 = parseInt($("input[name=card_length2]").val());
  1153. var card_length3 = parseInt($("input[name=card_length3]").val());
  1154. var card_status1 = parseInt($("input[name=card_status1]:checked").val());
  1155. var card_status2 = parseInt($("input[name=card_status2]:checked").val());
  1156. var card_status3 = parseInt($("input[name=card_status3]:checked").val());
  1157. if (!card_check(card_length1, '高一', card_status1)) {
  1158. return false;
  1159. }
  1160. if (!card_check(card_length2, '高二', card_status2)) {
  1161. return false;
  1162. }
  1163. if (!card_check(card_length3, '高三', card_status3)) {
  1164. return false;
  1165. }
  1166. return true;
  1167. }
  1168. function check_contact() {
  1169. var president_tel = $("input[name=schoolMasterMobile]").val();
  1170. var regMobile = /[0-9]$/;
  1171. if (president_tel!='' && !regMobile.test(president_tel)) {
  1172. layer.msg('手机号只能为数字!');
  1173. return false;
  1174. }
  1175. <?php if(Yii::app()->params['section']==1){?>
  1176. var core_tel = $("input[name=schoolMaster2Mobile]").val();
  1177. var grade1HeadMobile = $("input[name=grade1HeadMobile]").val();
  1178. var grade2HeadMobile = $("input[name=grade2HeadMobile]").val();
  1179. var grade3HeadMobile = $("input[name=grade3HeadMobile]").val();
  1180. if ((core_tel!='' && !regMobile.test(core_tel)) || (grade1HeadMobile!='' && !regMobile.test(grade1HeadMobile)) || (grade2HeadMobile!='' && !regMobile.test(grade2HeadMobile)) || (grade3HeadMobile!='' && !regMobile.test(grade3HeadMobile))) {
  1181. layer.msg('手机号只能为数字111!');
  1182. return false;
  1183. }
  1184. <?php }?>
  1185. return true;
  1186. }
  1187. function card_check(card_length, msg, status) {
  1188. if (status == 1) {
  1189. var regMobile = /[0-9]$/;
  1190. if (!regMobile.test(card_length)) {
  1191. layer.msg(msg + ': ' + '非法数据!');
  1192. return false;
  1193. }
  1194. if (4 > card_length || card_length > 14) {
  1195. layer.msg(msg + ': ' + '不在范围!只能取4--14位');
  1196. return false;
  1197. }
  1198. if (4 <= card_length && card_length <= 14) {
  1199. return true;
  1200. } else {
  1201. layer.msg(msg + ': ' + '非法数据!');
  1202. return false;
  1203. }
  1204. } else {
  1205. return true;
  1206. }
  1207. }
  1208. function edit_login(setting_status){
  1209. $.ajax({
  1210. url:'<?php echo $this->createUrl('school/ajaxSettingLoginpermission')?>',
  1211. type:'POST',
  1212. dataType:'json',
  1213. data:{'setting_status':setting_status},
  1214. success:function(res){
  1215. if(res.status==1){
  1216. layer.msg('修改成功');
  1217. }else{
  1218. if(res.msg!=undefined){
  1219. layer.msg(res.msg);
  1220. }else{
  1221. layer.msg('修改失败');
  1222. }
  1223. }
  1224. },
  1225. error:function(){
  1226. layer.msg('系统错误');
  1227. }
  1228. });
  1229. }
  1230. $("body").delegate(".customK a", "click", function () {
  1231. if ($(this).closest(".independentPd").find(".customK").length > 1) {
  1232. $(this).closest(".customK").remove();
  1233. } else {
  1234. layer.msg('最后一条不允许删除!');
  1235. }
  1236. }).on('click','.icon-close',function(){
  1237. classModal.style.display = 'none';
  1238. }).on('click','.cancel',function () {
  1239. classModal.style.display = 'none';
  1240. }).on('click','.select_class',function () {
  1241. $input=$(this).closest('.class-modal').find('.class-modal-body input');
  1242. $grade_id=$('input[name=grade_id]').val();
  1243. $type=$('input[name=type]').val();
  1244. if($type==1){
  1245. var anotherClassId=$('input[name=grade_'+$grade_id+'_2]');
  1246. var anotherClassName=$('.list_'+$grade_id+'_2');
  1247. }else{
  1248. var anotherClassId=$('input[name=grade_'+$grade_id+'_1]');
  1249. var anotherClassName=$('.list_'+$grade_id+'_1');
  1250. }
  1251. //var anotherClassStr=anotherClassId.val();
  1252. // var anotherClassNameStr=anotherClassName.html();
  1253. anotherClassStr='';
  1254. anotherClassNameStr='';
  1255. var class_ids='',class_names='';
  1256. for(var i=0;i<$input.length;i++){
  1257. if($input.eq(i).is(":checked")){
  1258. if(class_ids==''){
  1259. class_ids=$input.eq(i).val();
  1260. }else{
  1261. class_ids=class_ids+','+$input.eq(i).val();
  1262. }
  1263. if(class_names==''){
  1264. class_names=$input.eq(i).attr('name');
  1265. }else{
  1266. class_names=class_names+','+$input.eq(i).attr('name');
  1267. }
  1268. }else{
  1269. if(anotherClassStr==''){
  1270. anotherClassStr=$input.eq(i).val();
  1271. }else{
  1272. anotherClassStr=anotherClassStr+','+$input.eq(i).val();
  1273. }
  1274. if(anotherClassNameStr==''){
  1275. anotherClassNameStr=$input.eq(i).attr('name');
  1276. }else{
  1277. anotherClassNameStr=anotherClassNameStr+','+$input.eq(i).attr('name');
  1278. }
  1279. }
  1280. }
  1281. $('.list_'+$grade_id+'_'+$type).html(class_names);
  1282. $('input[name=grade_'+$grade_id+'_'+$type+']').val(class_ids);
  1283. anotherClassId.val(anotherClassStr);
  1284. anotherClassName.html(anotherClassNameStr);
  1285. classModal.style.display = 'none';
  1286. }).on("click",'.select_subject',function(){
  1287. $(this).attr('disabled',true);
  1288. var subjects=[];
  1289. for(var i=0;i<$("input[name='extend_subject']").length;i++){
  1290. if($("input[name='extend_subject']").eq(i).is(":checked")){
  1291. subjects.push($("input[name='extend_subject']").eq(i).val());
  1292. }
  1293. }
  1294. console.log(subjects);
  1295. if(subjects.length>0){
  1296. $.ajax({
  1297. url:'<?php echo $this->createUrl('school/saveExtendSubjects')?>',
  1298. type:'POST',
  1299. dataType:'json',
  1300. data:{subjects:subjects},
  1301. success:function (res) {
  1302. if(res.status==1){
  1303. layer.msg('添加成功');
  1304. window.location.reload();
  1305. }
  1306. }
  1307. });
  1308. }else{
  1309. $('.notice').html('请选择科目');
  1310. $('.select_subject').attr('disabled',false);
  1311. return false;
  1312. }
  1313. })
  1314. $('.changeAS').click(function () {
  1315. value=$(this).val();
  1316. grade_id=$(this).attr('id');
  1317. if(value==1){
  1318. $('.ClassList_'+grade_id).hide();
  1319. }else if(value==2){
  1320. $('.ClassList_'+grade_id).show();
  1321. }
  1322. });
  1323. $('.add_class').click(function(){
  1324. grade_id=$(this).attr('id');
  1325. title=$(this).attr('name');
  1326. type=$(this).attr('type');
  1327. index=layer.msg('加载班级。。。。。。');
  1328. var selected_class_id=$('input[name=grade_'+grade_id+'_'+type+']').val();
  1329. $.ajax({
  1330. url:'<?php echo $this->createUrl('school/getclass')?>',
  1331. type:'POST',
  1332. dataType:'json',
  1333. data:{'grade_id':grade_id,'title':title,'type':type,'selected_class_id':selected_class_id},
  1334. success:function(res){
  1335. layer.close(index);
  1336. if(res.status==1){
  1337. $('.class-modal').html(res.html);
  1338. classModal.style.display = 'block';
  1339. }
  1340. }
  1341. });
  1342. });
  1343. $('#selectSubjects').click(function(){
  1344. index=layer.msg('加载学科。。。。。。');
  1345. $.ajax({
  1346. url:'<?php echo $this->createUrl('school/getExtendSubjects')?>',
  1347. type:'POST',
  1348. dataType:'json',
  1349. success:function(res){
  1350. layer.close(index);
  1351. if(res.status==1){
  1352. $('.subject-area').html(res.data);
  1353. $('#classModal-1').show();
  1354. $('.select_subject').attr('disabled',false);
  1355. }
  1356. }
  1357. });
  1358. });
  1359. $('#SaveArtsAndScience').click(function(){
  1360. var grade=$('.grade');
  1361. var class_data=new Array();
  1362. for(var i=0;i<3;i++){
  1363. selectType=$('input[name=as_'+i+']:checked').val();
  1364. grade_id=$('input[name=as_'+i+']:checked').attr('id');
  1365. if(selectType==1){
  1366. class_data[grade_id]='close';
  1367. }else{
  1368. class_data[grade_id]=[];
  1369. if($('input[name=grade_'+grade_id+'_1]').val()!=''){
  1370. class_data[grade_id][1]=$('input[name=grade_'+grade_id+'_1]').val().split(',');
  1371. }else{
  1372. class_data[grade_id][1]='';
  1373. }
  1374. if($('input[name=grade_'+grade_id+'_2]').val()!=''){
  1375. class_data[grade_id][2]=$('input[name=grade_'+grade_id+'_2]').val().split(',');
  1376. }else{
  1377. class_data[grade_id][2]='';
  1378. }
  1379. if(class_data[grade_id][1].length==0 && class_data[grade_id][2].length==0){
  1380. index=layer.msg('请选择班级');
  1381. return false;
  1382. }
  1383. console.log(class_data[grade_id]);
  1384. }
  1385. }
  1386. index=layer.msg('保存中,请稍候。。。。。。');
  1387. $.ajax({
  1388. url:'<?php echo $this->createUrl('school/saveartsandscience')?>',
  1389. type:'POST',
  1390. dataType:'json',
  1391. data:{'class_data':class_data},
  1392. success:function(res){
  1393. layer.close(index);
  1394. if(res.status==1){
  1395. for(var i in class_data){
  1396. if(class_data[i]=='close'){
  1397. $('input[name=grade_'+i+'_1]').val('');
  1398. $('input[name=grade_'+i+'_2]').val('');
  1399. $('.list_'+i+'_1').html('');
  1400. $('.list_'+i+'_2').html('');
  1401. }
  1402. }
  1403. layer.msg('保存成功');
  1404. }else{
  1405. layer.msg('保存失败');
  1406. }
  1407. }
  1408. });
  1409. });
  1410. //删除自定义学科
  1411. $('.close').click(function(){
  1412. var subjectId=$(this).attr('subject_id');
  1413. obj=$(this).closest('.hgc_tag');
  1414. $.ajax({
  1415. url:'<?php echo $this->createUrl('school/delExtendSubject')?>',
  1416. type:'POST',
  1417. dataType:'json',
  1418. data:{'subjectId':subjectId},
  1419. success:function(res){
  1420. if(res.status==1){
  1421. obj.remove();
  1422. layer.msg('删除成功');
  1423. }else{
  1424. if(res.msg!=undefined){
  1425. layer.msg(res.msg);
  1426. }else{
  1427. layer.msg('删除失败');
  1428. }
  1429. }
  1430. }
  1431. });
  1432. });
  1433. $('.icon-close-1,.icon-close-subject').click(function(){
  1434. $('#classModal-1').hide();
  1435. return false;
  1436. });
  1437. $('.checkRepeat').click(function(){
  1438. $(this).attr('disabled',true);
  1439. $(this).closest('form').submit();
  1440. });
  1441. $('input[name="stu-login-permission"]').change(function(){
  1442. var setting_status = $(this).val();
  1443. if(setting_status != 1){
  1444. layer.confirm("确定切换吗?切换会清空所有已经绑定的信息", {
  1445. time: 0,
  1446. btn: ['确定', '取消'],
  1447. yes: function(index){
  1448. layer.close(index);
  1449. edit_login(setting_status);
  1450. },
  1451. cancel:function(){
  1452. $('input[name="stu-login-permission"]').prop("checked",false);
  1453. $('input[name="stu-login-permission"][value="1"]').prop("checked",true);
  1454. }
  1455. });
  1456. }else{
  1457. edit_login(setting_status);
  1458. }
  1459. });
  1460. var gradeConfig=[];
  1461. <?php
  1462. if($gradeConfig){
  1463. foreach ($gradeConfig as $group => $val){
  1464. echo 'gradeConfig['.$group.']=[];';
  1465. foreach ($val as $gradeId =>$name){
  1466. echo 'gradeConfig['.$group.']['.$gradeId.']="'.$name.'";';
  1467. }
  1468. }
  1469. }
  1470. ?>
  1471. $('.gradeGroup').change(function(){
  1472. showGradeConfig($(this).val());
  1473. });
  1474. var nowGroupId='<?php echo $schoolinfo['grade_group_id']?>';
  1475. showGradeConfig(nowGroupId);
  1476. function showGradeConfig(group){
  1477. html='';
  1478. console.log(group);
  1479. if(gradeConfig[group]!=undefined){
  1480. $.each(gradeConfig[group],function(k,v){
  1481. if(v!=undefined){
  1482. html+=(v+'<br>');
  1483. }
  1484. })
  1485. $('.showGradeConfig').html(html);
  1486. }
  1487. }
  1488. $('#saveGradeSection').click(function(){
  1489. console.log($('.gradeGroup').val());
  1490. var groupId=$('.gradeGroup').val();
  1491. var groupName=$('.gradeGroup').find("option:selected").text();
  1492. console.log(groupName);
  1493. if(groupId){
  1494. indexmsg=layer.confirm('确定学段按“'+groupName+'”模式进行设置吗?设置后不可再修改', {
  1495. btn: ['确定', '取消'] //按钮
  1496. }, function () {
  1497. layer.close(indexmsg);
  1498. layer.msg('更新中请稍候。。。。。。',{time:0});
  1499. $.ajax({
  1500. url:'<?php echo $this->createUrl('school/saveSection')?>',
  1501. type:'POST',
  1502. dataType:'json',
  1503. data:{gradeGroup:groupId},
  1504. success:function(res){
  1505. if(res.status==1){
  1506. layer.msg('设置成功');
  1507. }else{
  1508. if(res.msg!=undefined){
  1509. layer.msg(res.msg);
  1510. }else{
  1511. layer.msg('设置失败');
  1512. }
  1513. }
  1514. }
  1515. });
  1516. })
  1517. }
  1518. });
  1519. </script>
  1520. </body>
  1521. </html>