1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687 |
- <!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>
|