add2.php 69 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691
  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. <!--
  450. <div class="step-five steps-choose show">
  451. <h3 style="padding-left: 20px">设置8K纸张</h3>
  452. <table class="table-hide" style="margin-top: 15px;">
  453. <tbody>
  454. <tr style="line-height:40px">
  455. <th>8K纸张:&nbsp;</th>
  456. <td>
  457. <input class="ace" type="radio" <?php if ($schoolinfo->use_wp == 0) {
  458. echo ' checked="checked"';
  459. } ?> value="0" name="use_wp">8k类型(260*370)
  460. <input class="ace" type="radio" <?php if ($schoolinfo->use_wp == 1) {
  461. echo ' checked="checked"';
  462. } ?> value="1" name="use_wp">8k类型(270*390)
  463. </td>
  464. </tr>
  465. </tbody>
  466. </table>
  467. <div class="create-orders table-hide">
  468. <input type="button" id="my_wp" class="btn btn-success btn-sm" value="保存" style="width:100px">
  469. </div>
  470. </div>
  471. -->
  472. <div class="step-one steps-choose ">
  473. <h3 style="padding-left: 20px">基本信息</h3>
  474. <table class="table-hide" style="margin-top: 15px">
  475. <tbody>
  476. <tr style="line-height:40px">
  477. <th>学校名称:</th>
  478. <td><span><?php echo $schoolinfo['school_name'] ?></span></td>
  479. </tr>
  480. <tr style="line-height:40px">
  481. <th>学校地址:</th>
  482. <td>
  483. <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>
  484. </td>
  485. </tr>
  486. <tr style="line-height:40px">
  487. <th>邮编:</th>
  488. <td><span><?php echo $schoolinfo['postcode'] ?></span></td>
  489. </tr>
  490. <tr style="line-height:40px">
  491. <th>联系电话:</th>
  492. <td><span><?php echo $schoolinfo['phone'] ?></span></td>
  493. </tr>
  494. <tr style="line-height:40px">
  495. <th>类型:</th>
  496. <td><span><?php echo $schoolinfo['client'] == 1 ? "非客户学校" : "客户学校"; ?></span></td>
  497. </tr>
  498. <tr style="line-height:40px">
  499. <th>简介:</th>
  500. <td><span><?php echo $schoolinfo['intro'] ?></span></td>
  501. </tr>
  502. </tbody>
  503. </table>
  504. </div>
  505. <?php if(Yii::app()->params['section']==0):?>
  506. <div class="step-one steps-choose ">
  507. <h3 style="padding-left: 20px">学段设置</h3>
  508. <table class="table-hide" style="margin-top: 15px">
  509. <tbody>
  510. <tr style="line-height:40px">
  511. <th>学段:</th>
  512. <td>
  513. <select class="gradeGroup">
  514. <?php
  515. if($gradeGroup){
  516. foreach ($gradeGroup as $item){
  517. if($item['group_id']==$schoolinfo['grade_group_id']){
  518. echo '<option value="'.$item['group_id'].'" selected>'.$item['group_name'].'</option>';
  519. }else{
  520. echo '<option value="'.$item['group_id'].'">'.$item['group_name'].'</option>';
  521. }
  522. }
  523. }
  524. ?>
  525. </select>
  526. </td>
  527. <td> <span class="red">注:下拉框内可选择学段名称模式,系统默认按三年制1设置,
  528. 仅支持修改一次,请核对选择后再点击确认按钮</span>
  529. </td>
  530. </tr>
  531. <tr style="line-height:40px">
  532. <th valign="top">学制:</th>
  533. <td>
  534. <span class="showGradeConfig"></span>
  535. </td>
  536. <td></td>
  537. </tr>
  538. <tr style="line-height:40px">
  539. <th valign="top"></th>
  540. <td>
  541. <div class="create-orders table-hide">
  542. <?php
  543. if ((isset(Yii::app()->session['testFlag']) && (Yii::app()->session['testFlag'] == 1)) || (isset($schoolinfo['grade_group_changed']) && $schoolinfo['grade_group_changed']==0)):
  544. ?>
  545. <input type="button" id="saveGradeSection" class="btn btn-success btn-sm" value="确认" style="width:100px">
  546. <?php endif;?>
  547. </div>
  548. </td>
  549. <td></td>
  550. </tr>
  551. </tbody>
  552. </table>
  553. </div>
  554. <?php endif;?>
  555. <?php if(Yii::app()->params['section']==1):?>
  556. <div class="step-seven steps-choose ">
  557. <h3 style="padding-left: 20px">文理科设置</h3>
  558. <table class="table-hide" style="margin-top: 15px">
  559. <tbody>
  560. <?php
  561. if(isset($grade) && $grade){
  562. $checked=array(
  563. 0=>'',
  564. 1=>''
  565. );
  566. foreach ($grade as $key=> $value){
  567. if($value['arts_science']==1){
  568. $checked[0]="checked";
  569. $checked[1]="";
  570. }elseif($value['arts_science']==2){
  571. $checked[1]="checked";
  572. $checked[0]="";
  573. }
  574. $ids_1='';
  575. $names_1='';
  576. $ids_2='';
  577. $names_2='';
  578. if(isset($arts_science[$value['id']][1]['ids']) && isset($arts_science[$value['id']][1]['names'])){
  579. $ids_1=implode(',',$arts_science[$value['id']][1]['ids']);
  580. $names_1=implode(',',$arts_science[$value['id']][1]['names']);
  581. }
  582. if(isset($arts_science[$value['id']][2]['ids']) && isset($arts_science[$value['id']][2]['names'])){
  583. $ids_2=implode(',',$arts_science[$value['id']][2]['ids']);
  584. $names_2=implode(',',$arts_science[$value['id']][2]['names']);
  585. }
  586. echo '<tr style="line-height:40px">';
  587. echo '<th>'.$value['grade_name'].'</th>';
  588. 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>';
  589. echo '</tr>';
  590. if($value['arts_science']==2){
  591. echo '<tr class="ClassList_'.$value['id'].'">';
  592. }else{
  593. echo '<tr class="ClassList_'.$value['id'].'" style="display: none">';
  594. }
  595. echo '<th>文科班:</th>';
  596. 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>';
  597. echo '</tr>';
  598. if($value['arts_science']==2){
  599. echo '<tr class="ClassList_'.$value['id'].'">';
  600. }else{
  601. echo '<tr class="ClassList_'.$value['id'].'" style="display: none">';
  602. }
  603. echo '<th>理科班:</th>';
  604. 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>';
  605. echo '<input type="hidden" name="grade_'.$value['id'].'_1" value="'.$ids_1.'"><input type="hidden" name="grade_'.$value['id'].'_2" value="'.$ids_2.'">';
  606. echo '</tr>';
  607. }
  608. }
  609. ?>
  610. </tbody>
  611. </table>
  612. <div class="create-orders table-hide">
  613. <input type="button" id="SaveArtsAndScience" class="btn btn-success btn-sm" value="保存" style="width:100px">
  614. </div>
  615. </div>
  616. <?php endif;?>
  617. <div class="step-eight steps-choose ">
  618. <h3 style="padding-left: 20px">自定义学科设置</h3>
  619. <div class="table-hide subject-icon">
  620. <?php
  621. if(isset($extendSubjectSchool) && $extendSubjectSchool){
  622. foreach ($extendSubjectSchool as $key=> $value){
  623. echo '<span class="hgc_tag">'.$value['subject_name'];
  624. if($value['used']==0){
  625. echo '<i subject_id="'.$value['subject_id'].'" class="close">X</i>';
  626. }
  627. echo '</span>';
  628. }
  629. }else{
  630. echo '暂未添加自定义科目';
  631. }
  632. ?>
  633. </div>
  634. <div class="create-orders table-hide">
  635. <input type="button" id="selectSubjects" class="btn btn-success btn-sm" value="添加学科" style="width:100px">
  636. </div>
  637. </div>
  638. <?php if (!isset(Yii::app()->session["crmUserInfo"])) {
  639. if ($grade) { ?>
  640. <div class="step-three steps-choose">
  641. <h3 style="padding-left: 20px">设置学校准考证号&nbsp;<i class="fa fa-plus"
  642. style="font-style: normal;color:#2977ff "></i></h3>
  643. <form action="<?php echo Yii::app()->createUrl('school/grade_insert') ?>" method="post" id="orderAdd"
  644. onsubmit="return gradecheck();">
  645. <ul class="table-hide">
  646. <?php foreach ($grade as $v) { ?>
  647. <li class="row marginNo table-hide-li pt20" style="width: 760px">
  648. <div class="textRight fl " style="width:160px;line-height: 80px;height: 80px"><span
  649. class="mt15"><?php echo $v->grade_name ?>:</span>&nbsp;
  650. </div>
  651. <div class="col-xs-9 paddingNo fl ">
  652. <div class="col-xs-9 fl lineHeight40">
  653. 准考证号位数:&nbsp;&nbsp;<input class="students-search" type="text" placeholder=""
  654. name="card_length<?php echo $v->id ?>"
  655. value='<?php echo $v->card_length ?>'
  656. style="width:50px;">&nbsp;位
  657. </div>
  658. <div class="col-xs-8 fl lineHeight40 text-left">
  659. <span style="float: left">是否开启准考证号:</span>&nbsp;&nbsp;<div
  660. class="col-sm-4 mt6 ">
  661. <span class="inline blue">
  662. <input type="radio" class="ace" name="card_status<?php echo $v->id ?>"
  663. value="1" <?php echo $v->card_status == 1 ? "checked" : '' ?>>
  664. <span> 是</span>
  665. </span>
  666. &nbsp;&nbsp;
  667. <span class="inline blue">
  668. <input type="radio" class="ace" name="card_status<?php echo $v->id ?>"
  669. value="0" <?php echo $v->card_status == 0 ? "checked" : '' ?>>
  670. <span> 否</span>
  671. </span>
  672. </div>
  673. </div>
  674. </div>
  675. </li>
  676. <?php } ?>
  677. </ul>
  678. <div class="create-orders table-hide" style="line-height: 24px;color: red">
  679. 1、修改学校准考证号位数时,同时修改学生的学校准考证号的位数,两者位数必须一致,否则无法使用。&nbsp;<br>2、如:学校准考证号设置为5位,学生的学校准考证号为“12345”<br>3、准考证号位数最好在14位内
  680. </div>
  681. <div class="create-orders table-hide">
  682. <input type="submit" name="grade_submit" id="grade_submit" class="btn btn-success btn-sm"
  683. value="保存" style="width:100px">
  684. </div>
  685. </div><?php }
  686. } ?>
  687. </form>
  688. </div>
  689. <div class="step-eight steps-choose ">
  690. <h3 style="padding-left: 20px">阅卷留痕</h3>
  691. <form action="<?php echo Yii::app()->createUrl('school/markingSet') ?>" method="post" id="markingset">
  692. <div class="table-hide subject-icon">
  693. <div class="create-orders table-hide" style="line-height: 24px;color: red">
  694. 若需要阅卷留痕请勾选下方复选框,勾选后需重新登录系统才可生效,生效后在教师端查看原卷时可看到分数痕迹。<br>
  695. </div>
  696. <span class="inline blue">
  697. <input type="checkbox" style="margin-left:20px" name="coordinate"
  698. value="1" <?php if(isset($schoolinfo['marking_coordinate']) && $schoolinfo['marking_coordinate']) echo 'checked'?>>
  699. <span> 阅卷留痕</span>
  700. </span>
  701. <div class="create-orders table-hide" style="line-height: 24px;color: red">
  702. 注:由于阅卷留痕需处理原卷图片,在上传原卷图片时将会增加耗时,请知悉!<br>
  703. </div>
  704. </div>
  705. <div class="create-orders table-hide">
  706. <input type="submit" id="" class="btn btn-success btn-sm" value="保存" style="width:100px">
  707. </div>
  708. </form>
  709. </div>
  710. <div class="step-two steps-choose">
  711. <h3 style="padding-left: 20px">联系人</h3>
  712. <form action="<?php echo Yii::app()->createUrl('school/contact_insert') ?>" method="post" id="orderAdd"
  713. onsubmit="return check_contact();">
  714. <table class="table-hide" style="margin-top: 15px;">
  715. <tbody>
  716. <tr style="line-height:40px">
  717. <th>校长:&nbsp;</th>
  718. <td>
  719. <input class="students-search" type="text" placeholder="" name="schoolMasterName"
  720. value='<?php echo $schoocontact['schoolMasterName'] ?>' style="width:240px">
  721. </td>
  722. <th>校长联系电话:&nbsp;</th>
  723. <td>
  724. <input class="students-search" type="text" placeholder="" name="schoolMasterMobile"
  725. value='<?php echo $schoocontact['schoolMasterMobile'] ?>' style="width:240px">
  726. </td>
  727. </tr>
  728. <tr style="line-height:40px">
  729. <th>分管项目副校长:&nbsp;</th>
  730. <td>
  731. <input class="students-search" type="text" placeholder="" name="schoolMaster2Name"
  732. value='<?php echo $schoocontact['schoolMaster2Name'] ?>' style="width:240px">
  733. </td>
  734. <th>分管项目副校长联系电话:&nbsp;</th>
  735. <td>
  736. <input class="students-search" type="text" placeholder="" name="schoolMaster2Mobile"
  737. value='<?php echo $schoocontact['schoolMaster2Mobile'] ?>' style="width:240px">
  738. </td>
  739. </tr>
  740. <?php if(Yii::app()->params['section']==1):?>
  741. <tr style="line-height:40px">
  742. <th>高一年级主任:&nbsp;</th>
  743. <td>
  744. <input class="students-search" type="text" placeholder="" name="grade1HeadName"
  745. value='<?php echo $schoocontact['grade1HeadName'] ?>' style="width:240px">
  746. </td>
  747. <th>高一年级主任电话:&nbsp;</th>
  748. <td>
  749. <input class="students-search" type="text" placeholder="" name="grade1HeadMobile"
  750. value='<?php echo $schoocontact['grade1HeadMobile'] ?>' style="width:240px">
  751. </td>
  752. </tr>
  753. <tr style="line-height:40px">
  754. <th>高二年级主任:&nbsp;</th>
  755. <td>
  756. <input class="students-search" type="text" placeholder="" name="grade2HeadName"
  757. value='<?php echo $schoocontact['grade2HeadName'] ?>' style="width:240px">
  758. </td>
  759. <th>高二年级主任电话:&nbsp;</th>
  760. <td>
  761. <input class="students-search" type="text" placeholder="" name="grade2HeadMobile"
  762. value='<?php echo $schoocontact['grade2HeadMobile'] ?>' style="width:240px">
  763. </td>
  764. </tr>
  765. <tr style="line-height:40px">
  766. <th>高三年级主任:&nbsp;</th>
  767. <td>
  768. <input class="students-search" type="text" placeholder="" name="grade3HeadName"
  769. value='<?php echo $schoocontact['grade3HeadName'] ?>' style="width:240px">
  770. </td>
  771. <th>高三年级主任电话:&nbsp;</th>
  772. <td>
  773. <input class="students-search" type="text" placeholder="" name="grade3HeadMobile"
  774. value='<?php echo $schoocontact['grade3HeadMobile'] ?>' style="width:240px">
  775. </td>
  776. </tr>
  777. <?php endif;?>
  778. </tbody>
  779. </table>
  780. <div class="create-orders table-hide">
  781. <input type="submit" name="my_submit" id="my_submit" class="btn btn-success btn-sm checkRepeat" value="保存"
  782. style="width:100px">
  783. </div>
  784. </form>
  785. </div>
  786. <div class="step-four steps-choose">
  787. <h3 style="padding-left: 20px">学校概况</h3>
  788. <form action="<?php echo Yii::app()->createUrl('school/profile_insert') ?>" method="post" id="orderAdd">
  789. <ul class="table-hide">
  790. <li class="row marginNo table-hide-li pt20 ">
  791. <div class="textRight lineHeight30 fl" style="width:160px"><span class="mt15">建校年份:</span>&nbsp;
  792. </div>
  793. <div class="fl col-xs-9 paddingNo">
  794. <div class='diy_select' style="width:238px;float: left;">
  795. <input type='hidden' class='diy_select_input' id="profileyear" name="profile[schoolBuildYear]"
  796. value="<?php echo $schoolprofile['schoolBuildYear'] ?>"/>
  797. <div class='diy_select_txt' style="width:205px;"
  798. id="year"><?php if ($schoolprofile['schoolBuildYear']) {
  799. echo $schoolprofile['schoolBuildYear'];
  800. } else {
  801. echo '选择年份';
  802. } ?></div>
  803. <div class='diy_select_btn'></div>
  804. <ul class='diy_select_list'>
  805. <?php for ($i = 1900; $i < (int)date("Y"); $i++) { ?>
  806. <li val="<?php echo $i; ?>" class=""><?php echo $i; ?></li>
  807. <?php } ?>
  808. </ul>
  809. </div>
  810. </li>
  811. <input type="hidden" name="profile[bookVersion]" value="<?php echo $schoolprofile['bookVersion'];?>">
  812. <li class="row marginNo table-hide-li pt20">
  813. <div class="textRight lineHeight30 fl" style="width:160px"><span class="mt15">文理科</span>&nbsp;
  814. </div>
  815. <div class="col-xs-9 paddingNo fl">
  816. <select name="profile[artsAndScience]">
  817. <option value="1" <?php if($schoolprofile['artsAndScience']==1) echo 'selected'?>>重文</option>
  818. <option value="2" <?php if($schoolprofile['artsAndScience']==2) echo 'selected'?>>重理</option>
  819. <option value="3" <?php if($schoolprofile['artsAndScience']==3) echo 'selected'?>>文理均衡</option>
  820. </select>
  821. </div>
  822. </li>
  823. <li class="row marginNo table-hide-li pt20">
  824. <div class="textRight lineHeight30 fl" style="width:160px"><span class="">学校性质:</span>&nbsp;</div>
  825. <div class="col-xs-9 paddingNo fl">
  826. <div class="col-sm-12 paddingNo mt6">
  827. <span class="inline blue mr15">
  828. <input class="ace"
  829. type="radio" <?php if ($schoolprofile['schoolNature'] == "0" || $schoolprofile['schoolNature'] == "") {
  830. echo ' checked="checked"';
  831. } ?> name="profile[schoolNature]" value="0">
  832. <span class="lbl middle">民办</span>
  833. </span>
  834. <span class="inline blue">
  835. <input class="ace"
  836. type="radio" <?php if ($schoolprofile['schoolNature'] == "1" ) {
  837. echo ' checked="checked"';
  838. } ?> name="profile[schoolNature]" value="1">
  839. <span class="lbl middle">公办</span>
  840. </span>
  841. </div>
  842. </div>
  843. </li>
  844. <li class="row marginNo table-hide-li pt20">
  845. <div class="textRight lineHeight30 fl" style="width:160px"><span class="mt15">学校类型:</span>&nbsp;
  846. </div>
  847. <div class="col-xs-9 paddingNo fl">
  848. <select name="profile[schoolType]">
  849. <option value="0" <?php if($schoolprofile['schoolType']==0) echo 'selected'?>>普通</option>
  850. <option value="1" <?php if($schoolprofile['schoolType']==1) echo 'selected'?>>省重点</option>
  851. <option value="2" <?php if($schoolprofile['schoolType']==2) echo 'selected'?>>市重点</option>
  852. <option value="3" <?php if($schoolprofile['schoolType']==3) echo 'selected'?>>县重点</option>
  853. </select>
  854. </div>
  855. </li>
  856. <li class="row marginNo table-hide-li pt20">
  857. <div class="textRight lineHeight30 fl" style="width:160px"><span class="">是否设少数民族:</span>&nbsp;
  858. </div>
  859. <div class="col-xs-9 paddingNo fl">
  860. <div class="col-sm-12 paddingNo mt6">
  861. <span class="inline blue mr15">
  862. <input class="ace"
  863. type="radio" <?php if ($schoolprofile['isMinority'] == "1") {
  864. echo ' checked="checked"';
  865. } ?> value="1"
  866. name="profile[isMinority]">
  867. <span class="lbl middle">是</span>
  868. </span>
  869. <span class="inline blue mr15">
  870. <input class="ace" type="radio" <?php if (!$schoolprofile['isMinority']) {
  871. echo ' checked="checked"';
  872. } ?> value="0" name="profile[isMinority]">
  873. <span class="lbl middle">否</span>
  874. </span>
  875. </div>
  876. </div>
  877. </li>
  878. <li class="row marginNo table-hide-li pt20">
  879. <div class="textRight lineHeight30 fl" style="width:160px"><span class="mt15">寄宿制形式:</span>&nbsp;
  880. </div>
  881. <div class="col-xs-9 paddingNo fl">
  882. <div class='diy_select' style="width:238px;float: left;">
  883. <input type='hidden' class='diy_select_input' id="type_id" name="profile[isStaying]"
  884. value="<?php echo $schoolprofile['isStaying'] ?>"/>
  885. <div class='diy_select_txt'
  886. style="width:205px;"><?php echo $schoolprofile['isStaying'] == 1 ? "寄宿制" : "非寄宿制" ?></div>
  887. <div class='diy_select_btn'></div>
  888. <ul class='diy_select_list'>
  889. <li val="0">非寄宿制</li>
  890. <li val="1">寄宿制</li>
  891. </ul>
  892. </div>
  893. </li>
  894. <li class="row marginNo table-hide-li pt20">
  895. <div class="textRight lineHeight30 fl" style="width:160px"><span class="mt15">升学率:</span>&nbsp;
  896. </div>
  897. <div class="col-xs-9 paddingNo fl">
  898. <div class="mt6"><a href="javascript:void(0);" id="addrate" >+添加</a></div>
  899. <div class="clearfix mt15 independentPd" id="rate">
  900. <?php
  901. if (!empty($schoolentrancerate)) {
  902. foreach ($schoolentrancerate as $k => $v) {
  903. ?>
  904. <div class="customK">
  905. <span class="inline blue mr15">
  906. <select class="school_year" name="schoolYear[]">
  907. <?php
  908. if(isset($schoolYear)){
  909. foreach ($schoolYear as $value){
  910. if(strcmp($v['schoolYearId'],$value['schoolYearId'])==0){
  911. echo '<option value="'.$value['schoolYearId'].'" selected>'.$value['schoolYearName'].'</option>';
  912. }else{
  913. echo '<option value="'.$value['schoolYearId'].'" >'.$value['schoolYearName'].'</option>';
  914. }
  915. }
  916. }
  917. ?>
  918. </select>
  919. </span>
  920. <span class="inline blue mr15">
  921. 一本
  922. <input class="customInput" name="level1Rate[]" type="text" value="<?php echo $v['level1Rate'] ?>" onkeyup="checknum(this.value,this)"> %
  923. </span>
  924. <span class="inline blue mr15">
  925. 二本
  926. <input class="customInput" name="level2Rate[]" type="text" value="<?php echo $v['level2Rate'] ?>" onkeyup="checknum(this.value,this)"> %
  927. </span>
  928. <span class="inline blue mr15">
  929. 三本
  930. <input class="customInput" name="level3Rate[]" type="text" value="<?php echo $v['level3Rate'] ?>" onkeyup="checknum(this.value,this)"> %
  931. </span>
  932. <a href="javascript:;">删除</a>
  933. </div>
  934. <?php }
  935. } ?>
  936. </div>
  937. </div>
  938. </li>
  939. <li class="row marginNo table-hide-li pt20">
  940. <div class="textRight lineHeight30 fl" style="width:160px"><span class="mt15">学校规模:</span>&nbsp;
  941. </div>
  942. <div class="col-xs-9 paddingNo fl">
  943. <div class="mt6"><a href="javascript:void(0);" class="addScale">+添加</a></div>
  944. <table id="scale" class="table table-striped table-bordered table-hover dataTable no-footer DTTT_selectable" >
  945. <tr>
  946. <th>学年</th>
  947. <th>高一规模</th>
  948. <th>高二规模</th>
  949. <th>高三规模</th>
  950. </tr>
  951. <?php
  952. if($scale){
  953. foreach ($scale as $val){
  954. ?>
  955. <tr>
  956. <td>
  957. <select class="school_year" name="schoolScale[]">
  958. <?php
  959. if(isset($schoolYear)){
  960. foreach ($schoolYear as $value){
  961. if(strcmp($val['schoolYearId'],$value['schoolYearId'])==0){
  962. echo '<option value="'.$value['schoolYearId'].'" selected>'.$value['schoolYearName'].'</option>';
  963. }else{
  964. echo '<option value="'.$value['schoolYearId'].'" >'.$value['schoolYearName'].'</option>';
  965. }
  966. }
  967. }
  968. ?>
  969. </select>
  970. </td>
  971. <td><input type="text" name="gradeOne[]" value="<?php echo $val['gradeOne']?>"></td>
  972. <td><input type="text" name="gradeTwo[]" value="<?php echo $val['gradeTwo']?>"></td>
  973. <td><input type="text" name="gradeThree[]" value="<?php echo $val['gradeThree']?>"></td>
  974. </tr>
  975. <?php
  976. }
  977. }
  978. ?>
  979. </table>
  980. </div>
  981. </li>
  982. </ul>
  983. <div class="create-orders table-hide">
  984. <input type="submit" name="my_submit" id="my_submit" class="btn btn-success btn-sm" value="保存"
  985. style="width:100px">
  986. </div>
  987. </form>
  988. <div id="hidrate" style="display:none">
  989. <div class="customK">
  990. <span class="inline blue mr15">
  991. <select class="school_year" name="schoolYear[]">
  992. <?php
  993. if(isset($schoolYear)){
  994. foreach ($schoolYear as $value){
  995. echo '<option value="'.$value['schoolYearId'].'" >'.$value['schoolYearName'].'</option>';
  996. }
  997. }
  998. ?>
  999. </select>
  1000. </span>
  1001. <span class="inline blue mr15">
  1002. 一本
  1003. <input class="customInput" name="level1Rate[]" type="text" value="" onkeyup="checknum(this.value,this)"> %
  1004. </span>
  1005. <span class="inline blue mr15">
  1006. 二本
  1007. <input class="customInput" name="level2Rate[]" type="text" value="" onkeyup="checknum(this.value,this)"> %
  1008. </span>
  1009. <span class="inline blue mr15">
  1010. 三本
  1011. <input class="customInput" name="level3Rate[]" type="text" value="" onkeyup="checknum(this.value,this)"> %
  1012. </span>
  1013. <a href="javascript:;">删除</a>
  1014. </div>
  1015. </div>
  1016. </div>
  1017. <!--
  1018. <div class="step-six steps-choose">
  1019. <h3 style="padding-left: 20px">安全与隐私</h3>
  1020. <table class="table-hide" style="margin-top: 15px;margin-left: 15px;">
  1021. <tbody>
  1022. <tr style="line-height: 40px;">
  1023. <th style="width: 280px;">校内试卷是否公开于“本省推荐试卷”:</th>
  1024. <td>
  1025. <select class="customSelect" style="width: 100px;" id="is_private" name="is_private">
  1026. <option value="0" <?php if (!$is_private) echo 'selected'?> >公开</option>
  1027. <option value="1" <?php if ($is_private) echo 'selected'?>>不公开</option>
  1028. </select>
  1029. </td>
  1030. </tr>
  1031. </tbody>
  1032. </table>
  1033. <div class="table-hide" style="margin-top: 20px;padding-left: 55px;">
  1034. <input type="button" name="submit_private" onclick="saveSchoolPrivate()" class="btn btn-success btn-sm" value="保存"
  1035. style="width:100px;">
  1036. </div>
  1037. </div>
  1038. <div class="step-nine steps-choose">
  1039. <h3 style="padding-left: 20px;">学生平板登录设备权限</h3>
  1040. <div class="table-hide">
  1041. <div>一个设备登录多个账号<input type="radio" name="stu-login-permission" value="0" <?php echo !$login_permission?"checked='checked'":'';?>></div>
  1042. <div style="color:red">注:常用,设备退出登录后可登录多个账号</div>
  1043. </br>
  1044. <div>一个设备只能登录一个账号<input type="radio" name="stu-login-permission" value="1" <?php echo $login_permission?"checked='checked'":''?>></div>
  1045. <div style="color:red">注:课堂平板学习防学生作弊,只能在一个设备上面登录一个账号。<br>修改登录设备:【学生管理】-【学生设置】-【学生端登录ID重置】</div>
  1046. </div>
  1047. </div>
  1048. -->
  1049. </div>
  1050. <div class="ttd dn">
  1051. <div class="s-state clearfix posirela">
  1052. <div class="hint_size clearfix">
  1053. <span class="fl ml15">错误信息</span>
  1054. </div>
  1055. <div class="mistake_character">
  1056. <p class="ml15" id="err_msg"></p>
  1057. <div class="clearfix" style="width:180px;margin:0px auto;text-align:center">
  1058. <p class="mt20">
  1059. <button class="roger shut">确定</button>
  1060. </p>
  1061. </div>
  1062. </div>
  1063. </div>
  1064. </div>
  1065. <!-- /.main-content -->
  1066. <!-- /.main-container -->
  1067. <div class="confirmbox-mask" style="display: none" id="classModal">
  1068. <div class="class-modal">
  1069. </div>
  1070. </div>
  1071. <div class="confirmbox-mask" style="display: none" id="classModal-1">
  1072. <form name="table_set">
  1073. <div class="class-modal-1">
  1074. <i class="icon icon-close-1"></i><div class="class-modal-head-1">添加学科</div>
  1075. <div class="class-modal-body-1">
  1076. <div class="subject-area">
  1077. </div>
  1078. <p align="center" class="red notice">&nbsp;</p>
  1079. <div class="btn_area">
  1080. <button class="cancel icon-close-subject">取消</button>
  1081. <button class="select_subject">确定</button>
  1082. </div>
  1083. </div>
  1084. </div>
  1085. </form>
  1086. </div>
  1087. <!-- basic scripts -->
  1088. <!--[if !IE]> -->
  1089. <!--<script src="/js/jquery.2.1.1.min.js"></script>-->
  1090. <!-- <![endif]-->
  1091. <!--[if IE]>
  1092. <script src="assets/js/jquery.1.11.1.min.js"></script>
  1093. <![endif]-->
  1094. <!--[if !IE]> -->
  1095. <script type="text/javascript">
  1096. window.jQuery || document.write("<script src='/js/jquery.min.js'>" + "<" + "/script>");
  1097. </script>
  1098. <!-- <![endif]-->
  1099. <!--[if IE]>
  1100. <script type="text/javascript">
  1101. window.jQuery || document.write("<script src='assets/js/jquery1x.min.js'>" + "<" + "/script>");
  1102. </script>
  1103. <![endif]-->
  1104. <script type="text/javascript">
  1105. if ('ontouchstart' in document.documentElement) document.write("<script src='/js/jquery.mobile.custom.min.js'>" + "<" + "/script>");
  1106. </script>
  1107. <script src="/js/bootstrap.min.js"></script>
  1108. <!-- page specific plugin scripts -->
  1109. <!-- ace scripts -->
  1110. <script src="/js/ace-elements.min.js"></script>
  1111. <script src="/js/ace.min.js"></script>
  1112. <!-- 学校管理 js -->
  1113. <script src="/js/school.management.js"></script>
  1114. <script src="/js/xsgl.js"></script>
  1115. <!-- inline scripts related to this page -->
  1116. <script>
  1117. function check() {
  1118. var card_length = parseInt($("input[name=card_length]").val());
  1119. var regMobile = /[0-9]$/;
  1120. if (!regMobile.test(card_length)) {
  1121. layer.msg('非法数据!');
  1122. return false;
  1123. }
  1124. if (4 > card_length || card_length > 14) {
  1125. layer.msg('不在范围!只能取4--14位');
  1126. return false;
  1127. }
  1128. if (4 <= card_length && card_length <= 14) {
  1129. return true;
  1130. } else {
  1131. layer.msg('非法数据!');
  1132. return false;
  1133. }
  1134. }
  1135. function saveSchoolPrivate() {
  1136. var is_private = $('#is_private').val();
  1137. $.ajax({
  1138. type: 'post',
  1139. data: {'is_private': is_private},
  1140. url: "<?php echo Yii::app()->createUrl('school/saveSchoolPrivate') ;?>",
  1141. dataType: 'json',
  1142. success: function (res) {
  1143. if (res.status){
  1144. layer.alert("保存成功", {icon:1})
  1145. } else{
  1146. layer.msg("保存失败");
  1147. }
  1148. },
  1149. error: function () {
  1150. layer.msg("保存异常");
  1151. }
  1152. })
  1153. }
  1154. function gradecheck() {
  1155. var card_length1 = parseInt($("input[name=card_length1]").val());
  1156. var card_length2 = parseInt($("input[name=card_length2]").val());
  1157. var card_length3 = parseInt($("input[name=card_length3]").val());
  1158. var card_status1 = parseInt($("input[name=card_status1]:checked").val());
  1159. var card_status2 = parseInt($("input[name=card_status2]:checked").val());
  1160. var card_status3 = parseInt($("input[name=card_status3]:checked").val());
  1161. if (!card_check(card_length1, '高一', card_status1)) {
  1162. return false;
  1163. }
  1164. if (!card_check(card_length2, '高二', card_status2)) {
  1165. return false;
  1166. }
  1167. if (!card_check(card_length3, '高三', card_status3)) {
  1168. return false;
  1169. }
  1170. return true;
  1171. }
  1172. function check_contact() {
  1173. var president_tel = $("input[name=schoolMasterMobile]").val();
  1174. var regMobile = /[0-9]$/;
  1175. if (president_tel!='' && !regMobile.test(president_tel)) {
  1176. layer.msg('手机号只能为数字!');
  1177. return false;
  1178. }
  1179. <?php if(Yii::app()->params['section']==1){?>
  1180. var core_tel = $("input[name=schoolMaster2Mobile]").val();
  1181. var grade1HeadMobile = $("input[name=grade1HeadMobile]").val();
  1182. var grade2HeadMobile = $("input[name=grade2HeadMobile]").val();
  1183. var grade3HeadMobile = $("input[name=grade3HeadMobile]").val();
  1184. if ((core_tel!='' && !regMobile.test(core_tel)) || (grade1HeadMobile!='' && !regMobile.test(grade1HeadMobile)) || (grade2HeadMobile!='' && !regMobile.test(grade2HeadMobile)) || (grade3HeadMobile!='' && !regMobile.test(grade3HeadMobile))) {
  1185. layer.msg('手机号只能为数字111!');
  1186. return false;
  1187. }
  1188. <?php }?>
  1189. return true;
  1190. }
  1191. function card_check(card_length, msg, status) {
  1192. if (status == 1) {
  1193. var regMobile = /[0-9]$/;
  1194. if (!regMobile.test(card_length)) {
  1195. layer.msg(msg + ': ' + '非法数据!');
  1196. return false;
  1197. }
  1198. if (4 > card_length || card_length > 14) {
  1199. layer.msg(msg + ': ' + '不在范围!只能取4--14位');
  1200. return false;
  1201. }
  1202. if (4 <= card_length && card_length <= 14) {
  1203. return true;
  1204. } else {
  1205. layer.msg(msg + ': ' + '非法数据!');
  1206. return false;
  1207. }
  1208. } else {
  1209. return true;
  1210. }
  1211. }
  1212. function edit_login(setting_status){
  1213. $.ajax({
  1214. url:'<?php echo $this->createUrl('school/ajaxSettingLoginpermission')?>',
  1215. type:'POST',
  1216. dataType:'json',
  1217. data:{'setting_status':setting_status},
  1218. success:function(res){
  1219. if(res.status==1){
  1220. layer.msg('修改成功');
  1221. }else{
  1222. if(res.msg!=undefined){
  1223. layer.msg(res.msg);
  1224. }else{
  1225. layer.msg('修改失败');
  1226. }
  1227. }
  1228. },
  1229. error:function(){
  1230. layer.msg('系统错误');
  1231. }
  1232. });
  1233. }
  1234. $("body").delegate(".customK a", "click", function () {
  1235. if ($(this).closest(".independentPd").find(".customK").length > 1) {
  1236. $(this).closest(".customK").remove();
  1237. } else {
  1238. layer.msg('最后一条不允许删除!');
  1239. }
  1240. }).on('click','.icon-close',function(){
  1241. classModal.style.display = 'none';
  1242. }).on('click','.cancel',function () {
  1243. classModal.style.display = 'none';
  1244. }).on('click','.select_class',function () {
  1245. $input=$(this).closest('.class-modal').find('.class-modal-body input');
  1246. $grade_id=$('input[name=grade_id]').val();
  1247. $type=$('input[name=type]').val();
  1248. if($type==1){
  1249. var anotherClassId=$('input[name=grade_'+$grade_id+'_2]');
  1250. var anotherClassName=$('.list_'+$grade_id+'_2');
  1251. }else{
  1252. var anotherClassId=$('input[name=grade_'+$grade_id+'_1]');
  1253. var anotherClassName=$('.list_'+$grade_id+'_1');
  1254. }
  1255. //var anotherClassStr=anotherClassId.val();
  1256. // var anotherClassNameStr=anotherClassName.html();
  1257. anotherClassStr='';
  1258. anotherClassNameStr='';
  1259. var class_ids='',class_names='';
  1260. for(var i=0;i<$input.length;i++){
  1261. if($input.eq(i).is(":checked")){
  1262. if(class_ids==''){
  1263. class_ids=$input.eq(i).val();
  1264. }else{
  1265. class_ids=class_ids+','+$input.eq(i).val();
  1266. }
  1267. if(class_names==''){
  1268. class_names=$input.eq(i).attr('name');
  1269. }else{
  1270. class_names=class_names+','+$input.eq(i).attr('name');
  1271. }
  1272. }else{
  1273. if(anotherClassStr==''){
  1274. anotherClassStr=$input.eq(i).val();
  1275. }else{
  1276. anotherClassStr=anotherClassStr+','+$input.eq(i).val();
  1277. }
  1278. if(anotherClassNameStr==''){
  1279. anotherClassNameStr=$input.eq(i).attr('name');
  1280. }else{
  1281. anotherClassNameStr=anotherClassNameStr+','+$input.eq(i).attr('name');
  1282. }
  1283. }
  1284. }
  1285. $('.list_'+$grade_id+'_'+$type).html(class_names);
  1286. $('input[name=grade_'+$grade_id+'_'+$type+']').val(class_ids);
  1287. anotherClassId.val(anotherClassStr);
  1288. anotherClassName.html(anotherClassNameStr);
  1289. classModal.style.display = 'none';
  1290. }).on("click",'.select_subject',function(){
  1291. $(this).attr('disabled',true);
  1292. var subjects=[];
  1293. for(var i=0;i<$("input[name='extend_subject']").length;i++){
  1294. if($("input[name='extend_subject']").eq(i).is(":checked")){
  1295. subjects.push($("input[name='extend_subject']").eq(i).val());
  1296. }
  1297. }
  1298. console.log(subjects);
  1299. if(subjects.length>0){
  1300. $.ajax({
  1301. url:'<?php echo $this->createUrl('school/saveExtendSubjects')?>',
  1302. type:'POST',
  1303. dataType:'json',
  1304. data:{subjects:subjects},
  1305. success:function (res) {
  1306. if(res.status==1){
  1307. layer.msg('添加成功');
  1308. window.location.reload();
  1309. }
  1310. }
  1311. });
  1312. }else{
  1313. $('.notice').html('请选择科目');
  1314. $('.select_subject').attr('disabled',false);
  1315. return false;
  1316. }
  1317. })
  1318. $('.changeAS').click(function () {
  1319. value=$(this).val();
  1320. grade_id=$(this).attr('id');
  1321. if(value==1){
  1322. $('.ClassList_'+grade_id).hide();
  1323. }else if(value==2){
  1324. $('.ClassList_'+grade_id).show();
  1325. }
  1326. });
  1327. $('.add_class').click(function(){
  1328. grade_id=$(this).attr('id');
  1329. title=$(this).attr('name');
  1330. type=$(this).attr('type');
  1331. index=layer.msg('加载班级。。。。。。');
  1332. var selected_class_id=$('input[name=grade_'+grade_id+'_'+type+']').val();
  1333. $.ajax({
  1334. url:'<?php echo $this->createUrl('school/getclass')?>',
  1335. type:'POST',
  1336. dataType:'json',
  1337. data:{'grade_id':grade_id,'title':title,'type':type,'selected_class_id':selected_class_id},
  1338. success:function(res){
  1339. layer.close(index);
  1340. if(res.status==1){
  1341. $('.class-modal').html(res.html);
  1342. classModal.style.display = 'block';
  1343. }
  1344. }
  1345. });
  1346. });
  1347. $('#selectSubjects').click(function(){
  1348. index=layer.msg('加载学科。。。。。。');
  1349. $.ajax({
  1350. url:'<?php echo $this->createUrl('school/getExtendSubjects')?>',
  1351. type:'POST',
  1352. dataType:'json',
  1353. success:function(res){
  1354. layer.close(index);
  1355. if(res.status==1){
  1356. $('.subject-area').html(res.data);
  1357. $('#classModal-1').show();
  1358. $('.select_subject').attr('disabled',false);
  1359. }
  1360. }
  1361. });
  1362. });
  1363. $('#SaveArtsAndScience').click(function(){
  1364. var grade=$('.grade');
  1365. var class_data=new Array();
  1366. for(var i=0;i<3;i++){
  1367. selectType=$('input[name=as_'+i+']:checked').val();
  1368. grade_id=$('input[name=as_'+i+']:checked').attr('id');
  1369. if(selectType==1){
  1370. class_data[grade_id]='close';
  1371. }else{
  1372. class_data[grade_id]=[];
  1373. if($('input[name=grade_'+grade_id+'_1]').val()!=''){
  1374. class_data[grade_id][1]=$('input[name=grade_'+grade_id+'_1]').val().split(',');
  1375. }else{
  1376. class_data[grade_id][1]='';
  1377. }
  1378. if($('input[name=grade_'+grade_id+'_2]').val()!=''){
  1379. class_data[grade_id][2]=$('input[name=grade_'+grade_id+'_2]').val().split(',');
  1380. }else{
  1381. class_data[grade_id][2]='';
  1382. }
  1383. if(class_data[grade_id][1].length==0 && class_data[grade_id][2].length==0){
  1384. index=layer.msg('请选择班级');
  1385. return false;
  1386. }
  1387. console.log(class_data[grade_id]);
  1388. }
  1389. }
  1390. index=layer.msg('保存中,请稍候。。。。。。');
  1391. $.ajax({
  1392. url:'<?php echo $this->createUrl('school/saveartsandscience')?>',
  1393. type:'POST',
  1394. dataType:'json',
  1395. data:{'class_data':class_data},
  1396. success:function(res){
  1397. layer.close(index);
  1398. if(res.status==1){
  1399. for(var i in class_data){
  1400. if(class_data[i]=='close'){
  1401. $('input[name=grade_'+i+'_1]').val('');
  1402. $('input[name=grade_'+i+'_2]').val('');
  1403. $('.list_'+i+'_1').html('');
  1404. $('.list_'+i+'_2').html('');
  1405. }
  1406. }
  1407. layer.msg('保存成功');
  1408. }else{
  1409. layer.msg('保存失败');
  1410. }
  1411. }
  1412. });
  1413. });
  1414. //删除自定义学科
  1415. $('.close').click(function(){
  1416. var subjectId=$(this).attr('subject_id');
  1417. obj=$(this).closest('.hgc_tag');
  1418. $.ajax({
  1419. url:'<?php echo $this->createUrl('school/delExtendSubject')?>',
  1420. type:'POST',
  1421. dataType:'json',
  1422. data:{'subjectId':subjectId},
  1423. success:function(res){
  1424. if(res.status==1){
  1425. obj.remove();
  1426. layer.msg('删除成功');
  1427. }else{
  1428. if(res.msg!=undefined){
  1429. layer.msg(res.msg);
  1430. }else{
  1431. layer.msg('删除失败');
  1432. }
  1433. }
  1434. }
  1435. });
  1436. });
  1437. $('.icon-close-1,.icon-close-subject').click(function(){
  1438. $('#classModal-1').hide();
  1439. return false;
  1440. });
  1441. $('.checkRepeat').click(function(){
  1442. $(this).attr('disabled',true);
  1443. $(this).closest('form').submit();
  1444. });
  1445. $('input[name="stu-login-permission"]').change(function(){
  1446. var setting_status = $(this).val();
  1447. if(setting_status != 1){
  1448. layer.confirm("确定切换吗?切换会清空所有已经绑定的信息", {
  1449. time: 0,
  1450. btn: ['确定', '取消'],
  1451. yes: function(index){
  1452. layer.close(index);
  1453. edit_login(setting_status);
  1454. },
  1455. cancel:function(){
  1456. $('input[name="stu-login-permission"]').prop("checked",false);
  1457. $('input[name="stu-login-permission"][value="1"]').prop("checked",true);
  1458. }
  1459. });
  1460. }else{
  1461. edit_login(setting_status);
  1462. }
  1463. });
  1464. var gradeConfig=[];
  1465. <?php
  1466. if($gradeConfig){
  1467. foreach ($gradeConfig as $group => $val){
  1468. echo 'gradeConfig['.$group.']=[];';
  1469. foreach ($val as $gradeId =>$name){
  1470. echo 'gradeConfig['.$group.']['.$gradeId.']="'.$name.'";';
  1471. }
  1472. }
  1473. }
  1474. ?>
  1475. $('.gradeGroup').change(function(){
  1476. showGradeConfig($(this).val());
  1477. });
  1478. var nowGroupId='<?php echo $schoolinfo['grade_group_id']?>';
  1479. showGradeConfig(nowGroupId);
  1480. function showGradeConfig(group){
  1481. html='';
  1482. console.log(group);
  1483. if(gradeConfig[group]!=undefined){
  1484. $.each(gradeConfig[group],function(k,v){
  1485. if(v!=undefined){
  1486. html+=(v+'<br>');
  1487. }
  1488. })
  1489. $('.showGradeConfig').html(html);
  1490. }
  1491. }
  1492. $('#saveGradeSection').click(function(){
  1493. console.log($('.gradeGroup').val());
  1494. var groupId=$('.gradeGroup').val();
  1495. var groupName=$('.gradeGroup').find("option:selected").text();
  1496. console.log(groupName);
  1497. if(groupId){
  1498. indexmsg=layer.confirm('确定学段按“'+groupName+'”模式进行设置吗?设置后不可再修改', {
  1499. btn: ['确定', '取消'] //按钮
  1500. }, function () {
  1501. layer.close(indexmsg);
  1502. layer.msg('更新中请稍候。。。。。。',{time:0});
  1503. $.ajax({
  1504. url:'<?php echo $this->createUrl('school/saveSection')?>',
  1505. type:'POST',
  1506. dataType:'json',
  1507. data:{gradeGroup:groupId},
  1508. success:function(res){
  1509. if(res.status==1){
  1510. layer.msg('设置成功');
  1511. }else{
  1512. if(res.msg!=undefined){
  1513. layer.msg(res.msg);
  1514. }else{
  1515. layer.msg('设置失败');
  1516. }
  1517. }
  1518. }
  1519. });
  1520. })
  1521. }
  1522. });
  1523. </script>
  1524. </body>
  1525. </html>