123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192 |
- <link type="text/css" rel="stylesheet" href="/css/needDetail.css" />
- <script type="text/javascript" src="/js/vue.min.js"></script>
- <div class="main-content-inner">
- <ul class="clearfix main-content-inner-ul">
- <?php if(Yii::app()->session['coachInfo']['leader']==1){?>
- <li class="pull-left">
- <button onclick='location.href="<?php echo $this->createUrl("semester/index");?>"' class="button button_normal button_group button_arrow" data-button="red">学期管理</button>
- <img src="/images/line.jpg" style="height:45px;" />
- </li>
- <?php }?>
- <li class="pull-left">
- <button onclick='location.href="<?php echo $this->createUrl("teacher/index");?>"' class="button button_normal button_group button_arrow" data-button="red">教师管理</button>
- <img src="/images/line.jpg" style="height:45px;" />
- </li>
- <li class="pull-left">
- <button onclick='location.href="<?php echo $this->createUrl("classes/index");?>"' class="button button_normal button_group button_arrow" data-button="red">班级管理</button>
- <img src="/images/line.jpg" style="height:45px;" />
- </li>
- <li class="pull-left">
- <button onclick='location.href="<?php echo $this->createUrl("studentinfo/index");?>"' class="button button_normal button_group button_arrow button_active" data-button="red">学生管理</button>
- <img src="/images/line.jpg" style="height:45px;" />
- </li>
- <li class="pull-left">
- <button onclick='location.href="<?php echo $this->createUrl("classes/export");?>"' class="button button_normal button_group button_arrow " data-button="red">导出学生</button>
- <img src="/images/line.jpg" style="height:45px;" />
- </li>
- </ul>
- <title>Document</title>
- <style>
- * {
- margin: 0;
- padding: 0;
- }
- #app {
- padding: 0 20px;
- }
- .body {
- display: flex;
- /* align-items: center; */
- margin-top: 20px;
- padding: 0 10px;
- max-width: 100%;
- overflow: auto;
- }
- th, td {
- padding: 5px 15px;
- min-height: 30px;
- border: 1px solid #cccccc;
- }
- td > div {
- min-height: 20px;
- white-space: nowrap;
- }
- td.reducer {
- padding: 10px 10px 0;
- }
- td.reducer div {
- border: 2px solid green;
- text-align: center;
- font-size: 30px
- }
- tfoot td {
- border: none;
- }
- div.add {
- display: flex;
- margin-left: 10px;
- width: 50px;
- min-width: 50px;
- justify-content: center;
- align-items: center;
- border: 2px solid green;
- font-size: 30px;
- }
- div.table-wrap {
- display: inline-block;
- overflow: auto;
- }
- div.head {
- display: flex;
- align-items: center;
- justify-content: space-between;
- margin-top: 20px;
- padding: 0 10px 5px;
- border-bottom: 1px solid #cccccc;
- color: #585858;
- }
- div.head a {
- color: green;
- text-decoration: none;
- }
- </style>
- <div class="layout-gap" id="app">
- <section class="anc-top flex ">
- <div class="flex-one flex">
- <p class="anc-title">导入教学班学生</p>
- </div>
- <div class="anc-opt-btn green-font pointer reback" ><a href="<?php echo $this->createUrl('classes/index?class_type=2');?>">返回</a></div>
- </section>
- <br>
- excel模板示例如下:
- <table border="0" cellspacing="0">
- <thead>
- <tr>
- <td></td>
- <td>*教学班名称</td>
- <td>*姓名</td>
- <td>系统准考证号</td>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>1</td>
- <td>物理1班</td>
- <td>张三1</td>
- <td></td>
- </tr>
- <tr>
- <td>2</td>
- <td>物理2班</td>
- <td>张三2</td>
- <td></td>
- </tr>
- <tr>
- <td>3</td>
- <td>物理3班</td>
- <td>张三3</td>
- <td></td>
- </tr>
- </tbody>
- </table>
- <form id="form1" action="<?php echo $this->createUrl('importstudent/importClassified')?>" method="post" enctype="multipart/form-data">
- <section class="anc-top ">
- <p>请分学科导入名单</p>
- <div>
- <select name="subject" id="subject">
- <option value="0">请选择学科</option>
- <?php
- if(isset($subjects)){
- foreach ($subjects as $key => $val){
- echo '<option value="'.$key.'">'.$val.'</option>';
- }
- }
- ?>
- </select>
- </div>
- </section>
- <section class="anc-finish-opt " >
- <div class="anc-finish-btn i_fl select_file" >上传excel</div>
- <input type="file" name="student_file" id="uploadFile" style="display: none">
- </section>
- </form>
- </div>
- </div>
- <script>
- $(function(){
- $('#uploadFile').val('');
- $('.select_file').click(function(){
- if($('#subject').val()==0){
- alert('请选择学科');
- }else{
- $('#uploadFile').click();
- }
- });
- $('#uploadFile').change(function(){
- if($('#uploadFile').val()!=''){
- $('#form1').submit();
- }
- });
- })
- </script>
|