diff --git a/app/kaoshi/controller/Kaohao.php b/app/kaoshi/controller/Kaohao.php index d68306fd..f4f390f6 100644 --- a/app/kaoshi/controller/Kaohao.php +++ b/app/kaoshi/controller/Kaohao.php @@ -98,9 +98,10 @@ class Kaohao extends BaseController } ]) ->select(); - - - $njlist = nianjiList(); + + // 获取参加考试年级数组 + $bfdate = KS::where('id',$list['kaoshi'])->value('bfdate'); + $njlist = nianjiList($bfdate); // 重新组合学生信息 $kaohao = array(); foreach ($stulist as $key => $value) { @@ -208,12 +209,17 @@ class Kaohao extends BaseController return json($data); } + // 获取参加考试年级数组 + $bfdate = KS::where('id',$list['kaoshi'])->value('bfdate'); + $njlist = nianjiList($bfdate); + + // 获取班级信息 $bj = new \app\teach\model\Banji; $bjinfo = $bj->where('id',$list['banji'])->find(); $list['school'] = $bjinfo->school; $list['ruxuenian'] = $bjinfo->ruxuenian; - $list['nianji'] = $bjinfo->ruxuenian; + $list['nianji'] = $njlist[$bjinfo->ruxuenian]; $list['paixu'] = $bjinfo->paixu; $data = KH::create($list); diff --git a/app/login/view/index/shangma_log.html b/app/login/view/index/shangma_log.html index 9f5190bb..8844f1eb 100644 --- a/app/login/view/index/shangma_log.html +++ b/app/login/view/index/shangma_log.html @@ -38,7 +38,7 @@
  • -

    2020-01-12

    +

    V1.2.3 2020-01-12

    将与表格录入相关功能整合到同一个页面。
    @@ -46,11 +46,16 @@
    取消上传成绩表格成功提示,避免因没有单击“批传”而出现成绩没有导入的情况。
    - 修复已知错误。 -
    增加统计成绩时的加载动画,避免多次重复提交。
    将成绩录入相关操作放到独立控制中 +
    + 增加单条添加考号功能 +
    + 增加教师删除列表、教师退休查询和删除恢复 +
    + 增加学生毕业、删除列表和删除恢复,增加设置学生不参加考试功能。 +
    修复已知错误

  • diff --git a/app/renshi/controller/Student.php b/app/renshi/controller/Student.php index ef0fe32c..735de2de 100644 --- a/app/renshi/controller/Student.php +++ b/app/renshi/controller/Student.php @@ -249,7 +249,7 @@ class Student extends BaseController // 获取表单数据 - $list = request()->only(['xingming','sex','shenfenzhenghao','shengri','school','ruxuenian','banji'],'post'); + $list = request()->only(['xingming','sex','shenfenzhenghao','shengri','school','ruxuenian','banji','kaoshi'],'post'); // 验证表单数据 $result = $validate->check($list); @@ -416,7 +416,7 @@ class Student extends BaseController $validate = new \app\renshi\validate\Student; // 获取表单数据 - $list = request()->only(['xingming','sex','shengri','school','shenfenzhenghao','ruxuenian','banji'],'put'); + $list = request()->only(['xingming','sex','shengri','school','shenfenzhenghao','ruxuenian','banji','kaoshi'],'put'); // 验证表单数据 $result = $validate->check($list); diff --git a/app/renshi/controller/Teacher.php b/app/renshi/controller/Teacher.php index 39d57905..11aee51e 100644 --- a/app/renshi/controller/Teacher.php +++ b/app/renshi/controller/Teacher.php @@ -163,7 +163,7 @@ class Teacher extends BaseController // 获取表单数据 - $list = request()->only(['xingming','sex','quanpin','shoupin','shengri','zhiwu','zhicheng','xueli','biye','worktime','zhuanye','danwei'],'post'); + $list = request()->only(['xingming','sex','quanpin','shoupin','shengri','zhiwu','zhicheng','xueli','biye','worktime','zhuanye','danwei','tuixiu'],'post'); // 验证表单数据 @@ -236,7 +236,7 @@ class Teacher extends BaseController { // 获取教师信息 - $list['data'] = TC::field('id,xingming,sex,quanpin,shoupin,shengri,zhiwu,zhicheng,xueli,biye,worktime,zhuanye,danwei') + $list['data'] = TC::field('id,xingming,sex,quanpin,shoupin,shengri,zhiwu,zhicheng,xueli,biye,worktime,zhuanye,danwei,tuixiu') ->find($id); // 设置页面标题 @@ -263,7 +263,7 @@ class Teacher extends BaseController $validate = new \app\renshi\validate\Teacher; // 获取表单数据 - $list = request()->only(['xingming','sex','quanpin','shoupin','shengri','zhiwu','zhicheng','xueli','biye','worktime','zhuanye','danwei'],'put'); + $list = request()->only(['xingming','sex','quanpin','shoupin','shengri','zhiwu','zhicheng','xueli','biye','worktime','zhuanye','danwei','tuixiu'],'put'); // 验证表单数据 $result = $validate->check($list); @@ -292,6 +292,7 @@ class Teacher extends BaseController $teacherlist->worktime = $list['worktime']; $teacherlist->zhuanye = $list['zhuanye']; $teacherlist->danwei = $list['danwei']; + $teacherlist->tuixiu = $list['tuixiu']; $data = $teacherlist->save(); // $data = TC::where('id',$id)->update($list); diff --git a/app/renshi/model/Student.php b/app/renshi/model/Student.php index 75ef3683..a5e3aab4 100644 --- a/app/renshi/model/Student.php +++ b/app/renshi/model/Student.php @@ -50,6 +50,13 @@ class Student extends Base return $sex[$value]; } + // 性别获取器 + public function getKaoshiAttr($value) + { + $sex = array('0'=>'不参加','1'=>'参加','2'=>'未知'); + return $sex[$value]; + } + // 数据筛选 public function search($srcfrom) diff --git a/app/renshi/model/Teacher.php b/app/renshi/model/Teacher.php index 86a4eef9..e59253c0 100644 --- a/app/renshi/model/Teacher.php +++ b/app/renshi/model/Teacher.php @@ -203,6 +203,13 @@ class Teacher extends Base return $sex[$value]; } + // 退休获取器 + public function getTuixiuAttr($value) + { + $sex = array('0'=>'否','1'=>'是','2'=>'未知'); + return $sex[$value]; + } + // 年龄获取器 diff --git a/app/renshi/validate/Student.php b/app/renshi/validate/Student.php index ed6c5440..79263d2f 100644 --- a/app/renshi/validate/Student.php +++ b/app/renshi/validate/Student.php @@ -19,7 +19,8 @@ class Student extends Validate 'shenfenzhenghao|身份证号' => "require|idCard", 'school|学校' => 'require|number', 'ruxuenian|年级' => 'require|number', - 'banji|班级' => 'require|number' + 'banji|班级' => 'require|number', + 'kaoshi|是否参加考试' => 'require|number', ]; /** diff --git a/app/renshi/validate/Teacher.php b/app/renshi/validate/Teacher.php index bfa381b8..0c1c9dc7 100644 --- a/app/renshi/validate/Teacher.php +++ b/app/renshi/validate/Teacher.php @@ -25,6 +25,7 @@ class Teacher extends Validate 'biye|毕业院校' => 'length:1,50', 'zhuanye|专业' => 'length:1,20', 'worktime|参加工作时间' => 'date', + 'tuixiu|退休' => 'require|number|max:2', ]; /** diff --git a/app/renshi/view/student/create.html b/app/renshi/view/student/create.html index 6cc82531..3d16c911 100644 --- a/app/renshi/view/student/create.html +++ b/app/renshi/view/student/create.html @@ -44,23 +44,19 @@
    - - + + {/eq}> + {else /} + + + {/if}
    diff --git a/app/renshi/view/student/read.html b/app/renshi/view/student/read.html index 82e0b553..65c02e61 100644 --- a/app/renshi/view/student/read.html +++ b/app/renshi/view/student/read.html @@ -36,6 +36,9 @@ 学校班级 {$list.stuSchool.title}        {$list.stuBanji.banjiTitle} + + 是否参加考试 + {$list.kaoshi} 创建时间 {$list.create_time} diff --git a/app/renshi/view/teacher/create.html b/app/renshi/view/teacher/create.html index e91d7a5b..a87e98d4 100644 --- a/app/renshi/view/teacher/create.html +++ b/app/renshi/view/teacher/create.html @@ -164,6 +164,24 @@
    +
    + +
    + {if (isset($list.data.tuixiu)) } + + + {else /} + + + {/if} +
    +