12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
- <meta charset="utf-8"/>
- <title>校本课程平台</title>
- <meta name="description" content=""/>
- <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"/>
- <!-- bootstrap & fontawesome -->
- <link rel="stylesheet" href="/css/bootstrap.min.css"/>
- <link rel="stylesheet" href="/css/font-awesome/4.2.0/css/font-awesome.min.css"/>
- <!-- page specific plugin styles -->
- <!-- text fonts -->
- <link rel="stylesheet" href="/css/fonts/fonts.googleapis.com.css"/>
- <!-- ace styles -->
- <link rel="stylesheet" href="/css/ace.min.css" class="ace-main-stylesheet" id="main-ace-style"/>
- <!--[if lte IE 9]>
- <link rel="stylesheet" href="assets/css/ace-part2.min.css" class="ace-main-stylesheet"/>
- <![endif]-->
- <link rel="stylesheet" href="/css/style.css"/>
- <!--[if lte IE 9]>
- <link rel="stylesheet" href="assets/css/ace-ie.min.css"/>
- <![endif]-->
- <!-- inline styles related to this page -->
- <!-- ace settings handler -->
- <script src="/js/ace-extra.min.js"></script>
- <script src="/js/jquery-2.2.2.min.js"></script>
- <!-- HTML5shiv and Respond.js for IE8 to support HTML5 elements and media queries -->
- <script src="/js/layer/layer.js"></script>
- <!--[if lte IE 8]>
- <script src="assets/js/html5shiv.min.js"></script>
- <script src="assets/js/respond.min.js"></script>
- <![endif]-->
- <script type="text/javascript">
- var ratehtml = '';
- jQuery(document).ready(function () {
- //学年
- var usedSchoolYear=[];
- var schoolYearId=[],
- schoolYearName=[];
- <?php
- if(isset($schoolYear)){
- foreach ($schoolYear as $value){
- echo "schoolYearId.push('".$value['schoolYearId']."');";
- echo "schoolYearName.push('".$value['schoolYearName']."');";
- }
- }
- ?>
- $('.addScale').click(function(){
- var usedSchoolYear=[];
- var html='<tr>';
- //读取已选择学年
- var select=$('#scale').find('.school_year');
- if(select.length>0){
- for(var i=0;i<select.length;i++){
- usedSchoolYear.push(select.eq(i).val());
- }
- }
- html+='<td>';
- html+='<select class="school_year" name="schoolScale[]">';
- for(var i=0;i<schoolYearId.length;i++){
- if($.inArray(schoolYearId[i],usedSchoolYear)!=-1){
- }else{
- html+='<option value="'+schoolYearId[i]+'">'+schoolYearName[i]+'</option>';
- }
- }
- html+='</select>';
- html+='</td>';
- html+='<td><input type="text" name="gradeOne[]" class="customInput grade_1" /></td>';
- html+='<td><input type="text" name="gradeTwo[]" class="customInput grade_2" /></td>';
- html+='<td><input type="text" name="gradeThree[]" class="customInput grade_3" /></td>';
- html+='<td><span class="remove_tr">移除</span></td>';
- html+='</tr>';
- $('#scale').append(html);
- });
- $('#addrate').click(function(){
- var usedSchoolYear=[];
- //读取已选择学年
- var select=$('#rate').find('.school_year');
- if(select.length>0){
- for(var i=0;i<select.length;i++){
- usedSchoolYear.push(select.eq(i).val());
- }
- }
- console.log(usedSchoolYear);
- html='';
- for(var i=0;i<schoolYearId.length;i++){
- if($.inArray(schoolYearId[i],usedSchoolYear)!=-1){
- }else{
- html+='<option value="'+schoolYearId[i]+'">'+schoolYearName[i]+'</option>';
- }
- }
- $("#hidrate").find('.school_year').html(html);
- $('#rate').append($("#hidrate").html())
- });
- jQuery(window.parent.document).find("#iframe").ready(function () {
- jQuery(window.parent.document).find(".menuLi, .menuTop").click(function () {
- var url = jQuery(this).attr("url");
- window.parent.location.href = "xxx" + url;
- });
- window.parent.document.url = window.location.href;
- var main = jQuery(window.parent.document).find("#iframe");
- var thisheight = jQuery("body").height() + 30;
- main.height(thisheight);
- });
- jQuery(window.parent.document).find("#iframe").load(function () {
- var main = jQuery(window.parent.document).find("#iframe");
- var thisheight = jQuery("body").height() + 30;
- main.height(thisheight);
- });
- });
- jQuery(document).ready(function () {
- $('.steps-choose').click(function(){
- $('.steps-choose').removeClass('show');
- $(this).addClass('show');
- });
- $('#my_wp').click(function () {
- var use_wp = $("input[name=use_wp]:checked").val();
- var data = {
- use_wp: use_wp
- };
- $.post("<?php echo Yii::app()->createUrl('school/setusewp')?>", data, function (flags) {
- var m = JSON.parse(flags);
- if (m.status) {
- var data1 = {
- wp8K: parseInt(m.wp)
- };
- evaluationClient.SetPaperMode(JSON.stringify(data1));
- layer.msg('保存成功', {
- icon: 1
- }, function () {
- layer.closeAll();
- location.reload();
- });
- } else {
- layer.msg('保存失败', {
- icon: 5
- }, function () {
- layer.closeAll();
- location.reload();
- });
- }
- });
- })
- $('#scale').on('click','.remove_tr',function(){
- $(this).closest('tr').remove();
- })
- });
- function check() {
- $("#profileyear").val($("#year").html())
- return true;
- }
- function checknum(str, obj) {
- obj.value = obj.value.replace(/[^\d.]/g, ""); //清除“数字”和“.”以外的字符
- obj.value = obj.value.replace(/^\./g, ""); //验证第一个字符是数字而不是.
- obj.value = obj.value.replace(/\.{2,}/g, "."); //只保留第一个. 清除多余的.
- obj.value = obj.value.replace(".", "$#$").replace(/\./g, "").replace("$#$", ".");
- }
- </script>
- <style type="text/css">
- .errorMessage {
- color: red;
- margin-left: 10px;
- }
- .breadcrumb > li {
- padding: 3px 5px;
- color: #fff;
- background: #6fb3e0;
- }
- .breadcrumb > li > a {
- color: #fff !important;
- }
- .li_backgrond_color {
- background-color: #2977ff !important;
- }
- .li_backgrond_color > a {
- color: #fff !important;
- }
- .breadcrumb > li + li:before {
- display: none;
- }
- .steps-choose table th {
- text-align: right;
- width: 200px;
- }
- .icon {
- display: inline-block;
- background: center/contain no-repeat;
- width: 25px;
- height: 25px;
- cursor: pointer;
- vertical-align: middle;
- }
- .icon-edit {
- background-image: url("/images/edit.png")
- }
- .confirmbox {
- background: #fff;
- border: 1px solid #cccccc;
- border-radius: 3px;
- padding: 40px 40px 30px;
- text-align: center;
- position: fixed;
- left: 50%;
- top: 50%;
- transform: translate(-50%, -50%);
- z-index: 99;
- }
- .confirmbox-mask {
- background: rgba(0, 0, 0, .7);
- left: 0;
- right: 0;
- top: 0;
- bottom: 0;
- z-index: 99;
- position: fixed;
- }
- button {
- border: none;
- background: #2977ff;
- width: 111px;
- height: 36px;
- border-radius: 3px;
- font-size: 14px;
- color: #fff;
- outline: none;
- cursor: pointer;
- }
- button.save {
- display: block;
- margin: 40px auto;
- }
- .confirmbox .confirmbox-btns {
- margin-top: 40px;
- }
- .icon-close{
- background-image: url("/images/close.png")
- }
- .class-modal {
- width: 700px;
- min-height: 400px;
- background: #fff;
- border-radius: 5px;
- position: absolute;
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%);
- padding: 20px;
- }
- .class-modal-head {
- font-size: 20px;
- font-weight: bold;
- text-align: center;
- }
- .class-modal-body {
- margin-top: 20px;
- max-height: 300px;
- overflow: auto;
- }
- .class-modal-body .classes {
- margin-bottom: 10px;
- }
- .class-modal-body .classes > div {
- display: inline-block;
- max-width: 640px;
- vertical-align: top;
- }
- .class-modal-body label {
- text-decoration: none;
- display: inline-block;
- margin: 0 5px 5px;
- width:140px;
- font-size: 14px;
- }
- .class-modal-body .classes a.active {
- color: #fc091b
- }
- .class-modal .class_btn{
- margin:10px 0;
- text-align: center;
- }
- .class-modal .class_btn button{
- margin:5px;
- }
- .class-modal .icon-close{
- position: absolute;
- right: 20px;
- top: 20px;
- }
- .c-red {
- color: #CC3300
- }
- .subject-name {
- display: inline-block;
- padding: 3px 8px;
- background: #ff9900;
- border-radius: 3px;
- color: #ffffff;
- font-size: 12px;
- }
- .steps-choose table th{
- text-align: left;
- width: auto;
- }
- .steps-choose table tr th:first-child{
- text-align: right;
- padding-right: 20px;
- width: 200px;
- }
- .thin_font{font-weight: normal;}
- .independentPd{width:800px;}
- .customInput{width:60px;}
- .hgc_tag{
- position: relative;
- display: inline-block;
- height: 25px;
- line-height:25px;
- padding: 0 10px;
- border: 1px solid #333;
- font-size: 14px;
- margin:6px 5px;
- }
- .hgc_tag .close{
- position: absolute;
- right: -5px;
- top: -5px;
- color: #fff;
- background: #2977ff;
- font-size: 12px;
- font-style: normal;
- width: 15px;
- height: 15px;
- text-align: center;
- line-height: 15px;
- border-radius: 50%;
- cursor: pointer;
- opacity: 1;
- }
- .steps-choose.show .table-hide{
- padding:10px 20px;
- }
- .class-modal-1 {
- width: 500px;
- min-height: 220px;
- background: #fff;
- border-radius: 5px;
- position: absolute;
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%);
- }
- .class-modal-head-1 {
- font-size: 14px;
- text-align: left;
- color:#fff;
- line-height:30px;
- background: #2977ff;
- padding-left:15px;
- }
- .class-modal-body-1{
- padding:15px;
- }
- .class-modal-body-1 h2,.class-modal-body-1 h3{
- font-size:14px;
- font-weight:normal;
- margin-top:10px;
- }
- .class-modal-body-1 h3 span{
- font-size:10px;
- color:#ccc;
- }
- .class-modal-body-1 label{
- display: inline-block;
- font-weight: normal;
- margin-right: 40px;
- height:30px;
- }
- .class-modal-1 .icon-close-1{
- position: absolute;
- right: 10px;
- top:5px;
- }
- .class-modal-1 .class_area{
- height:115px;
- border:1px solid #ccc;
- padding:5px;
- overflow-y: auto;
- margin-bottom:15px;
- }
- .class-modal-1 .checkAll{
- position:absolute;
- right:5px;
- top:115px;
- }
- .class-modal-1 .subsection{
- }
- .class-modal-1 .btn p{color:#000;}
- .class-modal-1 .btn_area{
- margin-top:20px;
- text-align: center;
- }
- .class-modal-1 .btn_area p{
- display: inline-block;
- }
- .class-modal-1 .btn_area button{
- width:80px;
- height:25px;
- margin-left:5px;
- }
- .class-modal-1 .btn_area .cancel{
- background: #fff;
- color:#000;
- border:1px solid #666;
- }
- .icon-close-1{
- background-image: url("/images/chose.png");
- background-size: 15px,15px;
- }
- .subject-area {
- font-size:16px;
- }
- input[name=stu-login-permission]{
- margin-left: 15px;
- }
- </style>
- </head>
- <body class="no-skin">
- <!-- 导航栏开始-->
- <?php include(Yii::app()->basePath.'/views/layouts/class_navigation.php');?>
- <!-- 导航栏结束-->
- <div class="shade"></div>
- <div class="main-container" id="main-container">
- <div class="main-content">
- <?php if ($schoocontact === null) { ?>
- <input type='hidden' name='actionsc' value='add'>
- <?php } else { ?>
- <input type='hidden' name='actionsc' value='edit'>
- <?php } ?>
- <?php if ($schoolentrancerate === null) { ?>
- <input type='hidden' name='actionse' value='add'>
- <?php } else { ?>
- <input type='hidden' name='actionse' value='edit'>
- <?php } ?>
- <?php if ($schoolprofile === null) { ?>
- <input type='hidden' name='actionsp' value='add'>
- <?php } else { ?>
- <input type='hidden' name='actionsp' value='edit'>
- <?php } ?>
- <!--
- <div class="step-five steps-choose show">
- <h3 style="padding-left: 20px">设置8K纸张</h3>
- <table class="table-hide" style="margin-top: 15px;">
- <tbody>
- <tr style="line-height:40px">
- <th>8K纸张: </th>
- <td>
- <input class="ace" type="radio" <?php if ($schoolinfo->use_wp == 0) {
- echo ' checked="checked"';
- } ?> value="0" name="use_wp">8k类型(260*370)
- <input class="ace" type="radio" <?php if ($schoolinfo->use_wp == 1) {
- echo ' checked="checked"';
- } ?> value="1" name="use_wp">8k类型(270*390)
- </td>
- </tr>
- </tbody>
- </table>
- <div class="create-orders table-hide">
- <input type="button" id="my_wp" class="btn btn-success btn-sm" value="保存" style="width:100px">
- </div>
- </div>
- -->
- <div class="step-one steps-choose ">
- <h3 style="padding-left: 20px">基本信息</h3>
- <table class="table-hide" style="margin-top: 15px">
- <tbody>
- <tr style="line-height:40px">
- <th>学校名称:</th>
- <td><span><?php echo $schoolinfo['school_name'] ?></span></td>
- </tr>
- <tr style="line-height:40px">
- <th>学校地址:</th>
- <td>
- <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>
- </td>
- </tr>
- <tr style="line-height:40px">
- <th>邮编:</th>
- <td><span><?php echo $schoolinfo['postcode'] ?></span></td>
- </tr>
- <tr style="line-height:40px">
- <th>联系电话:</th>
- <td><span><?php echo $schoolinfo['phone'] ?></span></td>
- </tr>
- <tr style="line-height:40px">
- <th>类型:</th>
- <td><span><?php echo $schoolinfo['client'] == 1 ? "非客户学校" : "客户学校"; ?></span></td>
- </tr>
- <tr style="line-height:40px">
- <th>简介:</th>
- <td><span><?php echo $schoolinfo['intro'] ?></span></td>
- </tr>
- </tbody>
- </table>
- </div>
- <?php if(Yii::app()->params['section']==0):?>
- <div class="step-one steps-choose ">
- <h3 style="padding-left: 20px">学段设置</h3>
- <table class="table-hide" style="margin-top: 15px">
- <tbody>
- <tr style="line-height:40px">
- <th>学段:</th>
- <td>
- <select class="gradeGroup">
- <?php
- if($gradeGroup){
- foreach ($gradeGroup as $item){
- if($item['group_id']==$schoolinfo['grade_group_id']){
- echo '<option value="'.$item['group_id'].'" selected>'.$item['group_name'].'</option>';
- }else{
- echo '<option value="'.$item['group_id'].'">'.$item['group_name'].'</option>';
- }
- }
- }
- ?>
- </select>
- </td>
- <td> <span class="red">注:下拉框内可选择学段名称模式,系统默认按三年制1设置,
- 仅支持修改一次,请核对选择后再点击确认按钮</span>
- </td>
- </tr>
- <tr style="line-height:40px">
- <th valign="top">学制:</th>
- <td>
- <span class="showGradeConfig"></span>
- </td>
- <td></td>
- </tr>
- <tr style="line-height:40px">
- <th valign="top"></th>
- <td>
- <div class="create-orders table-hide">
- <?php
- if ((isset(Yii::app()->session['testFlag']) && (Yii::app()->session['testFlag'] == 1)) || (isset($schoolinfo['grade_group_changed']) && $schoolinfo['grade_group_changed']==0)):
- ?>
- <input type="button" id="saveGradeSection" class="btn btn-success btn-sm" value="确认" style="width:100px">
- <?php endif;?>
- </div>
- </td>
- <td></td>
- </tr>
- </tbody>
- </table>
- </div>
- <?php endif;?>
- <?php if(Yii::app()->params['section']==1):?>
- <div class="step-seven steps-choose ">
- <h3 style="padding-left: 20px">文理科设置</h3>
- <table class="table-hide" style="margin-top: 15px">
- <tbody>
- <?php
- if(isset($grade) && $grade){
- $checked=array(
- 0=>'',
- 1=>''
- );
- foreach ($grade as $key=> $value){
- if($value['arts_science']==1){
- $checked[0]="checked";
- $checked[1]="";
- }elseif($value['arts_science']==2){
- $checked[1]="checked";
- $checked[0]="";
- }
- $ids_1='';
- $names_1='';
- $ids_2='';
- $names_2='';
- if(isset($arts_science[$value['id']][1]['ids']) && isset($arts_science[$value['id']][1]['names'])){
- $ids_1=implode(',',$arts_science[$value['id']][1]['ids']);
- $names_1=implode(',',$arts_science[$value['id']][1]['names']);
- }
- if(isset($arts_science[$value['id']][2]['ids']) && isset($arts_science[$value['id']][2]['names'])){
- $ids_2=implode(',',$arts_science[$value['id']][2]['ids']);
- $names_2=implode(',',$arts_science[$value['id']][2]['names']);
- }
- echo '<tr style="line-height:40px">';
- echo '<th>'.$value['grade_name'].'</th>';
- 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>';
- echo '</tr>';
- if($value['arts_science']==2){
- echo '<tr class="ClassList_'.$value['id'].'">';
- }else{
- echo '<tr class="ClassList_'.$value['id'].'" style="display: none">';
- }
- echo '<th>文科班:</th>';
- 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>';
- echo '</tr>';
- if($value['arts_science']==2){
- echo '<tr class="ClassList_'.$value['id'].'">';
- }else{
- echo '<tr class="ClassList_'.$value['id'].'" style="display: none">';
- }
- echo '<th>理科班:</th>';
- 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>';
- echo '<input type="hidden" name="grade_'.$value['id'].'_1" value="'.$ids_1.'"><input type="hidden" name="grade_'.$value['id'].'_2" value="'.$ids_2.'">';
- echo '</tr>';
- }
- }
- ?>
- </tbody>
- </table>
- <div class="create-orders table-hide">
- <input type="button" id="SaveArtsAndScience" class="btn btn-success btn-sm" value="保存" style="width:100px">
- </div>
- </div>
- <?php endif;?>
- <div class="step-eight steps-choose ">
- <h3 style="padding-left: 20px">自定义学科设置</h3>
- <div class="table-hide subject-icon">
- <?php
- if(isset($extendSubjectSchool) && $extendSubjectSchool){
- foreach ($extendSubjectSchool as $key=> $value){
- echo '<span class="hgc_tag">'.$value['subject_name'];
- if($value['used']==0){
- echo '<i subject_id="'.$value['subject_id'].'" class="close">X</i>';
- }
- echo '</span>';
- }
- }else{
- echo '暂未添加自定义科目';
- }
- ?>
- </div>
- <div class="create-orders table-hide">
- <input type="button" id="selectSubjects" class="btn btn-success btn-sm" value="添加学科" style="width:100px">
- </div>
- </div>
- <?php if (!isset(Yii::app()->session["crmUserInfo"])) {
- if ($grade) { ?>
- <div class="step-three steps-choose">
- <h3 style="padding-left: 20px">设置学校准考证号 <i class="fa fa-plus"
- style="font-style: normal;color:#2977ff "></i></h3>
- <form action="<?php echo Yii::app()->createUrl('school/grade_insert') ?>" method="post" id="orderAdd"
- onsubmit="return gradecheck();">
- <ul class="table-hide">
- <?php foreach ($grade as $v) { ?>
- <li class="row marginNo table-hide-li pt20" style="width: 760px">
- <div class="textRight fl " style="width:160px;line-height: 80px;height: 80px"><span
- class="mt15"><?php echo $v->grade_name ?>:</span>
- </div>
- <div class="col-xs-9 paddingNo fl ">
- <div class="col-xs-9 fl lineHeight40">
- 准考证号位数: <input class="students-search" type="text" placeholder=""
- name="card_length<?php echo $v->id ?>"
- value='<?php echo $v->card_length ?>'
- style="width:50px;"> 位
- </div>
- <div class="col-xs-8 fl lineHeight40 text-left">
- <span style="float: left">是否开启准考证号:</span> <div
- class="col-sm-4 mt6 ">
- <span class="inline blue">
- <input type="radio" class="ace" name="card_status<?php echo $v->id ?>"
- value="1" <?php echo $v->card_status == 1 ? "checked" : '' ?>>
- <span> 是</span>
- </span>
-
- <span class="inline blue">
- <input type="radio" class="ace" name="card_status<?php echo $v->id ?>"
- value="0" <?php echo $v->card_status == 0 ? "checked" : '' ?>>
- <span> 否</span>
- </span>
- </div>
- </div>
- </div>
- </li>
- <?php } ?>
- </ul>
- <div class="create-orders table-hide" style="line-height: 24px;color: red">
- 1、修改学校准考证号位数时,同时修改学生的学校准考证号的位数,两者位数必须一致,否则无法使用。 <br>2、如:学校准考证号设置为5位,学生的学校准考证号为“12345”<br>3、准考证号位数最好在14位内
- </div>
- <div class="create-orders table-hide">
- <input type="submit" name="grade_submit" id="grade_submit" class="btn btn-success btn-sm"
- value="保存" style="width:100px">
- </div>
- </div><?php }
- } ?>
- </form>
- </div>
- <div class="step-eight steps-choose ">
- <h3 style="padding-left: 20px">阅卷留痕</h3>
- <form action="<?php echo Yii::app()->createUrl('school/markingSet') ?>" method="post" id="markingset">
- <div class="table-hide subject-icon">
- <div class="create-orders table-hide" style="line-height: 24px;color: red">
- 若需要阅卷留痕请勾选下方复选框,勾选后需重新登录系统才可生效,生效后在教师端查看原卷时可看到分数痕迹。<br>
- </div>
- <span class="inline blue">
- <input type="checkbox" style="margin-left:20px" name="coordinate"
- value="1" <?php if(isset($schoolinfo['marking_coordinate']) && $schoolinfo['marking_coordinate']) echo 'checked'?>>
- <span> 阅卷留痕</span>
- </span>
- <div class="create-orders table-hide" style="line-height: 24px;color: red">
- 注:由于阅卷留痕需处理原卷图片,在上传原卷图片时将会增加耗时,请知悉!<br>
- </div>
- </div>
- <div class="create-orders table-hide">
- <input type="submit" id="" class="btn btn-success btn-sm" value="保存" style="width:100px">
- </div>
- </form>
- </div>
- <div class="step-two steps-choose">
- <h3 style="padding-left: 20px">联系人</h3>
- <form action="<?php echo Yii::app()->createUrl('school/contact_insert') ?>" method="post" id="orderAdd"
- onsubmit="return check_contact();">
- <table class="table-hide" style="margin-top: 15px;">
- <tbody>
- <tr style="line-height:40px">
- <th>校长: </th>
- <td>
- <input class="students-search" type="text" placeholder="" name="schoolMasterName"
- value='<?php echo $schoocontact['schoolMasterName'] ?>' style="width:240px">
- </td>
- <th>校长联系电话: </th>
- <td>
- <input class="students-search" type="text" placeholder="" name="schoolMasterMobile"
- value='<?php echo $schoocontact['schoolMasterMobile'] ?>' style="width:240px">
- </td>
- </tr>
- <tr style="line-height:40px">
- <th>分管项目副校长: </th>
- <td>
- <input class="students-search" type="text" placeholder="" name="schoolMaster2Name"
- value='<?php echo $schoocontact['schoolMaster2Name'] ?>' style="width:240px">
- </td>
- <th>分管项目副校长联系电话: </th>
- <td>
- <input class="students-search" type="text" placeholder="" name="schoolMaster2Mobile"
- value='<?php echo $schoocontact['schoolMaster2Mobile'] ?>' style="width:240px">
- </td>
- </tr>
- <?php if(Yii::app()->params['section']==1):?>
- <tr style="line-height:40px">
- <th>高一年级主任: </th>
- <td>
- <input class="students-search" type="text" placeholder="" name="grade1HeadName"
- value='<?php echo $schoocontact['grade1HeadName'] ?>' style="width:240px">
- </td>
- <th>高一年级主任电话: </th>
- <td>
- <input class="students-search" type="text" placeholder="" name="grade1HeadMobile"
- value='<?php echo $schoocontact['grade1HeadMobile'] ?>' style="width:240px">
- </td>
- </tr>
- <tr style="line-height:40px">
- <th>高二年级主任: </th>
- <td>
- <input class="students-search" type="text" placeholder="" name="grade2HeadName"
- value='<?php echo $schoocontact['grade2HeadName'] ?>' style="width:240px">
- </td>
- <th>高二年级主任电话: </th>
- <td>
- <input class="students-search" type="text" placeholder="" name="grade2HeadMobile"
- value='<?php echo $schoocontact['grade2HeadMobile'] ?>' style="width:240px">
- </td>
- </tr>
- <tr style="line-height:40px">
- <th>高三年级主任: </th>
- <td>
- <input class="students-search" type="text" placeholder="" name="grade3HeadName"
- value='<?php echo $schoocontact['grade3HeadName'] ?>' style="width:240px">
- </td>
- <th>高三年级主任电话: </th>
- <td>
- <input class="students-search" type="text" placeholder="" name="grade3HeadMobile"
- value='<?php echo $schoocontact['grade3HeadMobile'] ?>' style="width:240px">
- </td>
- </tr>
- <?php endif;?>
- </tbody>
- </table>
- <div class="create-orders table-hide">
- <input type="submit" name="my_submit" id="my_submit" class="btn btn-success btn-sm checkRepeat" value="保存"
- style="width:100px">
- </div>
- </form>
- </div>
- <div class="step-four steps-choose">
- <h3 style="padding-left: 20px">学校概况</h3>
- <form action="<?php echo Yii::app()->createUrl('school/profile_insert') ?>" method="post" id="orderAdd">
- <ul class="table-hide">
- <li class="row marginNo table-hide-li pt20 ">
- <div class="textRight lineHeight30 fl" style="width:160px"><span class="mt15">建校年份:</span>
- </div>
- <div class="fl col-xs-9 paddingNo">
- <div class='diy_select' style="width:238px;float: left;">
- <input type='hidden' class='diy_select_input' id="profileyear" name="profile[schoolBuildYear]"
- value="<?php echo $schoolprofile['schoolBuildYear'] ?>"/>
- <div class='diy_select_txt' style="width:205px;"
- id="year"><?php if ($schoolprofile['schoolBuildYear']) {
- echo $schoolprofile['schoolBuildYear'];
- } else {
- echo '选择年份';
- } ?></div>
- <div class='diy_select_btn'></div>
- <ul class='diy_select_list'>
- <?php for ($i = 1900; $i < (int)date("Y"); $i++) { ?>
- <li val="<?php echo $i; ?>" class=""><?php echo $i; ?></li>
- <?php } ?>
- </ul>
- </div>
- </li>
- <input type="hidden" name="profile[bookVersion]" value="<?php echo $schoolprofile['bookVersion'];?>">
- <li class="row marginNo table-hide-li pt20">
- <div class="textRight lineHeight30 fl" style="width:160px"><span class="mt15">文理科</span>
- </div>
- <div class="col-xs-9 paddingNo fl">
- <select name="profile[artsAndScience]">
- <option value="1" <?php if($schoolprofile['artsAndScience']==1) echo 'selected'?>>重文</option>
- <option value="2" <?php if($schoolprofile['artsAndScience']==2) echo 'selected'?>>重理</option>
- <option value="3" <?php if($schoolprofile['artsAndScience']==3) echo 'selected'?>>文理均衡</option>
- </select>
- </div>
- </li>
- <li class="row marginNo table-hide-li pt20">
- <div class="textRight lineHeight30 fl" style="width:160px"><span class="">学校性质:</span> </div>
- <div class="col-xs-9 paddingNo fl">
- <div class="col-sm-12 paddingNo mt6">
- <span class="inline blue mr15">
- <input class="ace"
- type="radio" <?php if ($schoolprofile['schoolNature'] == "0" || $schoolprofile['schoolNature'] == "") {
- echo ' checked="checked"';
- } ?> name="profile[schoolNature]" value="0">
- <span class="lbl middle">民办</span>
- </span>
- <span class="inline blue">
- <input class="ace"
- type="radio" <?php if ($schoolprofile['schoolNature'] == "1" ) {
- echo ' checked="checked"';
- } ?> name="profile[schoolNature]" value="1">
- <span class="lbl middle">公办</span>
- </span>
- </div>
- </div>
- </li>
- <li class="row marginNo table-hide-li pt20">
- <div class="textRight lineHeight30 fl" style="width:160px"><span class="mt15">学校类型:</span>
- </div>
- <div class="col-xs-9 paddingNo fl">
- <select name="profile[schoolType]">
- <option value="0" <?php if($schoolprofile['schoolType']==0) echo 'selected'?>>普通</option>
- <option value="1" <?php if($schoolprofile['schoolType']==1) echo 'selected'?>>省重点</option>
- <option value="2" <?php if($schoolprofile['schoolType']==2) echo 'selected'?>>市重点</option>
- <option value="3" <?php if($schoolprofile['schoolType']==3) echo 'selected'?>>县重点</option>
- </select>
- </div>
- </li>
- <li class="row marginNo table-hide-li pt20">
- <div class="textRight lineHeight30 fl" style="width:160px"><span class="">是否设少数民族:</span>
- </div>
- <div class="col-xs-9 paddingNo fl">
- <div class="col-sm-12 paddingNo mt6">
- <span class="inline blue mr15">
- <input class="ace"
- type="radio" <?php if ($schoolprofile['isMinority'] == "1") {
- echo ' checked="checked"';
- } ?> value="1"
- name="profile[isMinority]">
- <span class="lbl middle">是</span>
- </span>
- <span class="inline blue mr15">
- <input class="ace" type="radio" <?php if (!$schoolprofile['isMinority']) {
- echo ' checked="checked"';
- } ?> value="0" name="profile[isMinority]">
- <span class="lbl middle">否</span>
- </span>
- </div>
- </div>
- </li>
- <li class="row marginNo table-hide-li pt20">
- <div class="textRight lineHeight30 fl" style="width:160px"><span class="mt15">寄宿制形式:</span>
- </div>
- <div class="col-xs-9 paddingNo fl">
- <div class='diy_select' style="width:238px;float: left;">
- <input type='hidden' class='diy_select_input' id="type_id" name="profile[isStaying]"
- value="<?php echo $schoolprofile['isStaying'] ?>"/>
- <div class='diy_select_txt'
- style="width:205px;"><?php echo $schoolprofile['isStaying'] == 1 ? "寄宿制" : "非寄宿制" ?></div>
- <div class='diy_select_btn'></div>
- <ul class='diy_select_list'>
- <li val="0">非寄宿制</li>
- <li val="1">寄宿制</li>
- </ul>
- </div>
- </li>
- <li class="row marginNo table-hide-li pt20">
- <div class="textRight lineHeight30 fl" style="width:160px"><span class="mt15">升学率:</span>
- </div>
- <div class="col-xs-9 paddingNo fl">
- <div class="mt6"><a href="javascript:void(0);" id="addrate" >+添加</a></div>
- <div class="clearfix mt15 independentPd" id="rate">
- <?php
- if (!empty($schoolentrancerate)) {
- foreach ($schoolentrancerate as $k => $v) {
- ?>
- <div class="customK">
- <span class="inline blue mr15">
- <select class="school_year" name="schoolYear[]">
- <?php
- if(isset($schoolYear)){
- foreach ($schoolYear as $value){
- if(strcmp($v['schoolYearId'],$value['schoolYearId'])==0){
- echo '<option value="'.$value['schoolYearId'].'" selected>'.$value['schoolYearName'].'</option>';
- }else{
- echo '<option value="'.$value['schoolYearId'].'" >'.$value['schoolYearName'].'</option>';
- }
- }
- }
- ?>
- </select>
- </span>
- <span class="inline blue mr15">
- 一本
- <input class="customInput" name="level1Rate[]" type="text" value="<?php echo $v['level1Rate'] ?>" onkeyup="checknum(this.value,this)"> %
- </span>
- <span class="inline blue mr15">
- 二本
- <input class="customInput" name="level2Rate[]" type="text" value="<?php echo $v['level2Rate'] ?>" onkeyup="checknum(this.value,this)"> %
- </span>
- <span class="inline blue mr15">
- 三本
- <input class="customInput" name="level3Rate[]" type="text" value="<?php echo $v['level3Rate'] ?>" onkeyup="checknum(this.value,this)"> %
- </span>
- <a href="javascript:;">删除</a>
- </div>
- <?php }
- } ?>
- </div>
- </div>
- </li>
- <li class="row marginNo table-hide-li pt20">
- <div class="textRight lineHeight30 fl" style="width:160px"><span class="mt15">学校规模:</span>
- </div>
- <div class="col-xs-9 paddingNo fl">
- <div class="mt6"><a href="javascript:void(0);" class="addScale">+添加</a></div>
- <table id="scale" class="table table-striped table-bordered table-hover dataTable no-footer DTTT_selectable" >
- <tr>
- <th>学年</th>
- <th>高一规模</th>
- <th>高二规模</th>
- <th>高三规模</th>
- </tr>
- <?php
- if($scale){
- foreach ($scale as $val){
- ?>
- <tr>
- <td>
- <select class="school_year" name="schoolScale[]">
- <?php
- if(isset($schoolYear)){
- foreach ($schoolYear as $value){
- if(strcmp($val['schoolYearId'],$value['schoolYearId'])==0){
- echo '<option value="'.$value['schoolYearId'].'" selected>'.$value['schoolYearName'].'</option>';
- }else{
- echo '<option value="'.$value['schoolYearId'].'" >'.$value['schoolYearName'].'</option>';
- }
- }
- }
- ?>
- </select>
- </td>
- <td><input type="text" name="gradeOne[]" value="<?php echo $val['gradeOne']?>"></td>
- <td><input type="text" name="gradeTwo[]" value="<?php echo $val['gradeTwo']?>"></td>
- <td><input type="text" name="gradeThree[]" value="<?php echo $val['gradeThree']?>"></td>
- </tr>
- <?php
- }
- }
- ?>
- </table>
- </div>
- </li>
- </ul>
- <div class="create-orders table-hide">
- <input type="submit" name="my_submit" id="my_submit" class="btn btn-success btn-sm" value="保存"
- style="width:100px">
- </div>
- </form>
- <div id="hidrate" style="display:none">
- <div class="customK">
- <span class="inline blue mr15">
- <select class="school_year" name="schoolYear[]">
- <?php
- if(isset($schoolYear)){
- foreach ($schoolYear as $value){
- echo '<option value="'.$value['schoolYearId'].'" >'.$value['schoolYearName'].'</option>';
- }
- }
- ?>
- </select>
- </span>
- <span class="inline blue mr15">
- 一本
- <input class="customInput" name="level1Rate[]" type="text" value="" onkeyup="checknum(this.value,this)"> %
- </span>
- <span class="inline blue mr15">
- 二本
- <input class="customInput" name="level2Rate[]" type="text" value="" onkeyup="checknum(this.value,this)"> %
- </span>
- <span class="inline blue mr15">
- 三本
- <input class="customInput" name="level3Rate[]" type="text" value="" onkeyup="checknum(this.value,this)"> %
- </span>
- <a href="javascript:;">删除</a>
- </div>
- </div>
- </div>
- <!--
- <div class="step-six steps-choose">
- <h3 style="padding-left: 20px">安全与隐私</h3>
- <table class="table-hide" style="margin-top: 15px;margin-left: 15px;">
- <tbody>
- <tr style="line-height: 40px;">
- <th style="width: 280px;">校内试卷是否公开于“本省推荐试卷”:</th>
- <td>
- <select class="customSelect" style="width: 100px;" id="is_private" name="is_private">
- <option value="0" <?php if (!$is_private) echo 'selected'?> >公开</option>
- <option value="1" <?php if ($is_private) echo 'selected'?>>不公开</option>
- </select>
- </td>
- </tr>
- </tbody>
- </table>
- <div class="table-hide" style="margin-top: 20px;padding-left: 55px;">
- <input type="button" name="submit_private" onclick="saveSchoolPrivate()" class="btn btn-success btn-sm" value="保存"
- style="width:100px;">
- </div>
- </div>
- <div class="step-nine steps-choose">
- <h3 style="padding-left: 20px;">学生平板登录设备权限</h3>
- <div class="table-hide">
- <div>一个设备登录多个账号<input type="radio" name="stu-login-permission" value="0" <?php echo !$login_permission?"checked='checked'":'';?>></div>
- <div style="color:red">注:常用,设备退出登录后可登录多个账号</div>
- </br>
- <div>一个设备只能登录一个账号<input type="radio" name="stu-login-permission" value="1" <?php echo $login_permission?"checked='checked'":''?>></div>
- <div style="color:red">注:课堂平板学习防学生作弊,只能在一个设备上面登录一个账号。<br>修改登录设备:【学生管理】-【学生设置】-【学生端登录ID重置】</div>
- </div>
- </div>
- -->
- </div>
- <div class="ttd dn">
- <div class="s-state clearfix posirela">
- <div class="hint_size clearfix">
- <span class="fl ml15">错误信息</span>
- </div>
- <div class="mistake_character">
- <p class="ml15" id="err_msg"></p>
- <div class="clearfix" style="width:180px;margin:0px auto;text-align:center">
- <p class="mt20">
- <button class="roger shut">确定</button>
- </p>
- </div>
- </div>
- </div>
- </div>
- <!-- /.main-content -->
- <!-- /.main-container -->
- <div class="confirmbox-mask" style="display: none" id="classModal">
- <div class="class-modal">
- </div>
- </div>
- <div class="confirmbox-mask" style="display: none" id="classModal-1">
- <form name="table_set">
- <div class="class-modal-1">
- <i class="icon icon-close-1"></i><div class="class-modal-head-1">添加学科</div>
- <div class="class-modal-body-1">
- <div class="subject-area">
- </div>
- <p align="center" class="red notice"> </p>
- <div class="btn_area">
- <button class="cancel icon-close-subject">取消</button>
- <button class="select_subject">确定</button>
- </div>
- </div>
- </div>
- </form>
- </div>
- <!-- basic scripts -->
- <!--[if !IE]> -->
- <!--<script src="/js/jquery.2.1.1.min.js"></script>-->
- <!-- <![endif]-->
- <!--[if IE]>
- <script src="assets/js/jquery.1.11.1.min.js"></script>
- <![endif]-->
- <!--[if !IE]> -->
- <script type="text/javascript">
- window.jQuery || document.write("<script src='/js/jquery.min.js'>" + "<" + "/script>");
- </script>
- <!-- <![endif]-->
- <!--[if IE]>
- <script type="text/javascript">
- window.jQuery || document.write("<script src='assets/js/jquery1x.min.js'>" + "<" + "/script>");
- </script>
- <![endif]-->
- <script type="text/javascript">
- if ('ontouchstart' in document.documentElement) document.write("<script src='/js/jquery.mobile.custom.min.js'>" + "<" + "/script>");
- </script>
- <script src="/js/bootstrap.min.js"></script>
- <!-- page specific plugin scripts -->
- <!-- ace scripts -->
- <script src="/js/ace-elements.min.js"></script>
- <script src="/js/ace.min.js"></script>
- <!-- 学校管理 js -->
- <script src="/js/school.management.js"></script>
- <script src="/js/xsgl.js"></script>
- <!-- inline scripts related to this page -->
- <script>
- function check() {
- var card_length = parseInt($("input[name=card_length]").val());
- var regMobile = /[0-9]$/;
- if (!regMobile.test(card_length)) {
- layer.msg('非法数据!');
- return false;
- }
- if (4 > card_length || card_length > 14) {
- layer.msg('不在范围!只能取4--14位');
- return false;
- }
- if (4 <= card_length && card_length <= 14) {
- return true;
- } else {
- layer.msg('非法数据!');
- return false;
- }
- }
- function saveSchoolPrivate() {
- var is_private = $('#is_private').val();
- $.ajax({
- type: 'post',
- data: {'is_private': is_private},
- url: "<?php echo Yii::app()->createUrl('school/saveSchoolPrivate') ;?>",
- dataType: 'json',
- success: function (res) {
- if (res.status){
- layer.alert("保存成功", {icon:1})
- } else{
- layer.msg("保存失败");
- }
- },
- error: function () {
- layer.msg("保存异常");
- }
- })
- }
- function gradecheck() {
- var card_length1 = parseInt($("input[name=card_length1]").val());
- var card_length2 = parseInt($("input[name=card_length2]").val());
- var card_length3 = parseInt($("input[name=card_length3]").val());
- var card_status1 = parseInt($("input[name=card_status1]:checked").val());
- var card_status2 = parseInt($("input[name=card_status2]:checked").val());
- var card_status3 = parseInt($("input[name=card_status3]:checked").val());
- if (!card_check(card_length1, '高一', card_status1)) {
- return false;
- }
- if (!card_check(card_length2, '高二', card_status2)) {
- return false;
- }
- if (!card_check(card_length3, '高三', card_status3)) {
- return false;
- }
- return true;
- }
- function check_contact() {
- var president_tel = $("input[name=schoolMasterMobile]").val();
- var regMobile = /[0-9]$/;
- if (president_tel!='' && !regMobile.test(president_tel)) {
- layer.msg('手机号只能为数字!');
- return false;
- }
- <?php if(Yii::app()->params['section']==1){?>
- var core_tel = $("input[name=schoolMaster2Mobile]").val();
- var grade1HeadMobile = $("input[name=grade1HeadMobile]").val();
- var grade2HeadMobile = $("input[name=grade2HeadMobile]").val();
- var grade3HeadMobile = $("input[name=grade3HeadMobile]").val();
- if ((core_tel!='' && !regMobile.test(core_tel)) || (grade1HeadMobile!='' && !regMobile.test(grade1HeadMobile)) || (grade2HeadMobile!='' && !regMobile.test(grade2HeadMobile)) || (grade3HeadMobile!='' && !regMobile.test(grade3HeadMobile))) {
- layer.msg('手机号只能为数字111!');
- return false;
- }
- <?php }?>
- return true;
- }
- function card_check(card_length, msg, status) {
- if (status == 1) {
- var regMobile = /[0-9]$/;
- if (!regMobile.test(card_length)) {
- layer.msg(msg + ': ' + '非法数据!');
- return false;
- }
- if (4 > card_length || card_length > 14) {
- layer.msg(msg + ': ' + '不在范围!只能取4--14位');
- return false;
- }
- if (4 <= card_length && card_length <= 14) {
- return true;
- } else {
- layer.msg(msg + ': ' + '非法数据!');
- return false;
- }
- } else {
- return true;
- }
- }
- function edit_login(setting_status){
- $.ajax({
- url:'<?php echo $this->createUrl('school/ajaxSettingLoginpermission')?>',
- type:'POST',
- dataType:'json',
- data:{'setting_status':setting_status},
- success:function(res){
- if(res.status==1){
- layer.msg('修改成功');
- }else{
- if(res.msg!=undefined){
- layer.msg(res.msg);
- }else{
- layer.msg('修改失败');
- }
- }
- },
- error:function(){
- layer.msg('系统错误');
- }
- });
- }
- $("body").delegate(".customK a", "click", function () {
- if ($(this).closest(".independentPd").find(".customK").length > 1) {
- $(this).closest(".customK").remove();
- } else {
- layer.msg('最后一条不允许删除!');
- }
- }).on('click','.icon-close',function(){
- classModal.style.display = 'none';
- }).on('click','.cancel',function () {
- classModal.style.display = 'none';
- }).on('click','.select_class',function () {
- $input=$(this).closest('.class-modal').find('.class-modal-body input');
- $grade_id=$('input[name=grade_id]').val();
- $type=$('input[name=type]').val();
- if($type==1){
- var anotherClassId=$('input[name=grade_'+$grade_id+'_2]');
- var anotherClassName=$('.list_'+$grade_id+'_2');
- }else{
- var anotherClassId=$('input[name=grade_'+$grade_id+'_1]');
- var anotherClassName=$('.list_'+$grade_id+'_1');
- }
- //var anotherClassStr=anotherClassId.val();
- // var anotherClassNameStr=anotherClassName.html();
- anotherClassStr='';
- anotherClassNameStr='';
- var class_ids='',class_names='';
- for(var i=0;i<$input.length;i++){
- if($input.eq(i).is(":checked")){
- if(class_ids==''){
- class_ids=$input.eq(i).val();
- }else{
- class_ids=class_ids+','+$input.eq(i).val();
- }
- if(class_names==''){
- class_names=$input.eq(i).attr('name');
- }else{
- class_names=class_names+','+$input.eq(i).attr('name');
- }
- }else{
- if(anotherClassStr==''){
- anotherClassStr=$input.eq(i).val();
- }else{
- anotherClassStr=anotherClassStr+','+$input.eq(i).val();
- }
- if(anotherClassNameStr==''){
- anotherClassNameStr=$input.eq(i).attr('name');
- }else{
- anotherClassNameStr=anotherClassNameStr+','+$input.eq(i).attr('name');
- }
- }
- }
- $('.list_'+$grade_id+'_'+$type).html(class_names);
- $('input[name=grade_'+$grade_id+'_'+$type+']').val(class_ids);
- anotherClassId.val(anotherClassStr);
- anotherClassName.html(anotherClassNameStr);
- classModal.style.display = 'none';
- }).on("click",'.select_subject',function(){
- $(this).attr('disabled',true);
- var subjects=[];
- for(var i=0;i<$("input[name='extend_subject']").length;i++){
- if($("input[name='extend_subject']").eq(i).is(":checked")){
- subjects.push($("input[name='extend_subject']").eq(i).val());
- }
- }
- console.log(subjects);
- if(subjects.length>0){
- $.ajax({
- url:'<?php echo $this->createUrl('school/saveExtendSubjects')?>',
- type:'POST',
- dataType:'json',
- data:{subjects:subjects},
- success:function (res) {
- if(res.status==1){
- layer.msg('添加成功');
- window.location.reload();
- }
- }
- });
- }else{
- $('.notice').html('请选择科目');
- $('.select_subject').attr('disabled',false);
- return false;
- }
- })
- $('.changeAS').click(function () {
- value=$(this).val();
- grade_id=$(this).attr('id');
- if(value==1){
- $('.ClassList_'+grade_id).hide();
- }else if(value==2){
- $('.ClassList_'+grade_id).show();
- }
- });
- $('.add_class').click(function(){
- grade_id=$(this).attr('id');
- title=$(this).attr('name');
- type=$(this).attr('type');
- index=layer.msg('加载班级。。。。。。');
- var selected_class_id=$('input[name=grade_'+grade_id+'_'+type+']').val();
- $.ajax({
- url:'<?php echo $this->createUrl('school/getclass')?>',
- type:'POST',
- dataType:'json',
- data:{'grade_id':grade_id,'title':title,'type':type,'selected_class_id':selected_class_id},
- success:function(res){
- layer.close(index);
- if(res.status==1){
- $('.class-modal').html(res.html);
- classModal.style.display = 'block';
- }
- }
- });
- });
- $('#selectSubjects').click(function(){
- index=layer.msg('加载学科。。。。。。');
- $.ajax({
- url:'<?php echo $this->createUrl('school/getExtendSubjects')?>',
- type:'POST',
- dataType:'json',
- success:function(res){
- layer.close(index);
- if(res.status==1){
- $('.subject-area').html(res.data);
- $('#classModal-1').show();
- $('.select_subject').attr('disabled',false);
- }
- }
- });
- });
- $('#SaveArtsAndScience').click(function(){
- var grade=$('.grade');
- var class_data=new Array();
- for(var i=0;i<3;i++){
- selectType=$('input[name=as_'+i+']:checked').val();
- grade_id=$('input[name=as_'+i+']:checked').attr('id');
- if(selectType==1){
- class_data[grade_id]='close';
- }else{
- class_data[grade_id]=[];
- if($('input[name=grade_'+grade_id+'_1]').val()!=''){
- class_data[grade_id][1]=$('input[name=grade_'+grade_id+'_1]').val().split(',');
- }else{
- class_data[grade_id][1]='';
- }
- if($('input[name=grade_'+grade_id+'_2]').val()!=''){
- class_data[grade_id][2]=$('input[name=grade_'+grade_id+'_2]').val().split(',');
- }else{
- class_data[grade_id][2]='';
- }
- if(class_data[grade_id][1].length==0 && class_data[grade_id][2].length==0){
- index=layer.msg('请选择班级');
- return false;
- }
- console.log(class_data[grade_id]);
- }
- }
- index=layer.msg('保存中,请稍候。。。。。。');
- $.ajax({
- url:'<?php echo $this->createUrl('school/saveartsandscience')?>',
- type:'POST',
- dataType:'json',
- data:{'class_data':class_data},
- success:function(res){
- layer.close(index);
- if(res.status==1){
- for(var i in class_data){
- if(class_data[i]=='close'){
- $('input[name=grade_'+i+'_1]').val('');
- $('input[name=grade_'+i+'_2]').val('');
- $('.list_'+i+'_1').html('');
- $('.list_'+i+'_2').html('');
- }
- }
- layer.msg('保存成功');
- }else{
- layer.msg('保存失败');
- }
- }
- });
- });
- //删除自定义学科
- $('.close').click(function(){
- var subjectId=$(this).attr('subject_id');
- obj=$(this).closest('.hgc_tag');
- $.ajax({
- url:'<?php echo $this->createUrl('school/delExtendSubject')?>',
- type:'POST',
- dataType:'json',
- data:{'subjectId':subjectId},
- success:function(res){
- if(res.status==1){
- obj.remove();
- layer.msg('删除成功');
- }else{
- if(res.msg!=undefined){
- layer.msg(res.msg);
- }else{
- layer.msg('删除失败');
- }
- }
- }
- });
- });
- $('.icon-close-1,.icon-close-subject').click(function(){
- $('#classModal-1').hide();
- return false;
- });
- $('.checkRepeat').click(function(){
- $(this).attr('disabled',true);
- $(this).closest('form').submit();
- });
- $('input[name="stu-login-permission"]').change(function(){
- var setting_status = $(this).val();
- if(setting_status != 1){
- layer.confirm("确定切换吗?切换会清空所有已经绑定的信息", {
- time: 0,
- btn: ['确定', '取消'],
- yes: function(index){
- layer.close(index);
- edit_login(setting_status);
- },
- cancel:function(){
- $('input[name="stu-login-permission"]').prop("checked",false);
- $('input[name="stu-login-permission"][value="1"]').prop("checked",true);
- }
- });
- }else{
- edit_login(setting_status);
- }
- });
- var gradeConfig=[];
- <?php
- if($gradeConfig){
- foreach ($gradeConfig as $group => $val){
- echo 'gradeConfig['.$group.']=[];';
- foreach ($val as $gradeId =>$name){
- echo 'gradeConfig['.$group.']['.$gradeId.']="'.$name.'";';
- }
- }
- }
- ?>
- $('.gradeGroup').change(function(){
- showGradeConfig($(this).val());
- });
- var nowGroupId='<?php echo $schoolinfo['grade_group_id']?>';
- showGradeConfig(nowGroupId);
- function showGradeConfig(group){
- html='';
- console.log(group);
- if(gradeConfig[group]!=undefined){
- $.each(gradeConfig[group],function(k,v){
- if(v!=undefined){
- html+=(v+'<br>');
- }
- })
- $('.showGradeConfig').html(html);
- }
- }
- $('#saveGradeSection').click(function(){
- console.log($('.gradeGroup').val());
- var groupId=$('.gradeGroup').val();
- var groupName=$('.gradeGroup').find("option:selected").text();
- console.log(groupName);
- if(groupId){
- indexmsg=layer.confirm('确定学段按“'+groupName+'”模式进行设置吗?设置后不可再修改', {
- btn: ['确定', '取消'] //按钮
- }, function () {
- layer.close(indexmsg);
- layer.msg('更新中请稍候。。。。。。',{time:0});
- $.ajax({
- url:'<?php echo $this->createUrl('school/saveSection')?>',
- type:'POST',
- dataType:'json',
- data:{gradeGroup:groupId},
- success:function(res){
- if(res.status==1){
- layer.msg('设置成功');
- }else{
- if(res.msg!=undefined){
- layer.msg(res.msg);
- }else{
- layer.msg('设置失败');
- }
- }
- }
- });
- })
- }
- });
- </script>
- </body>
- </html>
|