diff --git a/application/keti/controller/KetiInfo.php b/application/keti/controller/KetiInfo.php index b41e17cd..111013f1 100644 --- a/application/keti/controller/KetiInfo.php +++ b/application/keti/controller/KetiInfo.php @@ -197,7 +197,7 @@ class KetiInfo extends Base } // 批量保存图片 - public function createAllSave($ketice) + public function saveall($ketice) { // 获取文件信息 $list['text'] = $this->request->post('text'); diff --git a/application/login/view/index/index.html b/application/login/view/index/index.html index bde44023..1de918fe 100644 --- a/application/login/view/index/index.html +++ b/application/login/view/index/index.html @@ -22,13 +22,13 @@
- +
- +
captcha
- +

diff --git a/application/renshi/view/index/create.html b/application/renshi/view/index/create.html index d15cf7eb..0d8013ad 100644 --- a/application/renshi/view/index/create.html +++ b/application/renshi/view/index/create.html @@ -158,7 +158,7 @@ 入职时间
- +
@@ -178,11 +178,13 @@ //执行一个laydate实例 laydate.render({ elem: '#shengri' //指定元素 + ,trigger: 'click' //采用click弹出 }); // //执行一个laydate实例 laydate.render({ elem: '#worktime' //指定元素 + ,trigger: 'click' //采用click弹出 }); }); diff --git a/application/renshi/view/student/create.html b/application/renshi/view/student/create.html index 92c1d0c4..c1c97d90 100644 --- a/application/renshi/view/student/create.html +++ b/application/renshi/view/student/create.html @@ -16,14 +16,13 @@ *身份证号
- +
- - layui.use(['laydate','form'], function(){ var laydate = layui.laydate ,form = layui.form; //执行一个laydate实例 laydate.render({ elem: '#shengri' //指定元素 + ,trigger: 'click' //采用click弹出 }); // 监听选择按钮 @@ -194,15 +193,30 @@ layui.use(['laydate','form'], function(){ }); } }); + } - -} + $('#shenfenzhenghao').bind('change',function sfz(){ + // 获取身份证号 210281198510288213 + var str = $(this).val(); + // 如果身份证号为18位则自动填表 + if(str.length == 18){ + // 填写性别 + var sex = str.substr(16,1) % 2; + if(sex == 1){ + // 选择性别男 + $("input[name='sex']:first").prop('checked', true); + }else{ + // 选择性别女 + $("input[name='sex']:last").prop('checked', true); + } + form.render('radio'); + // 填写出生日期 + $("#shengri").val(str.substr(6,4) +'-'+ str.substr(10,2) +'-'+ str.substr(12,2)); + $("#school").focus(); + } + }) }); - - - - {/block} diff --git a/application/rongyu/controller/DwRongyu.php b/application/rongyu/controller/DwRongyu.php index bb885e57..d14b9fff 100644 --- a/application/rongyu/controller/DwRongyu.php +++ b/application/rongyu/controller/DwRongyu.php @@ -142,7 +142,7 @@ class DwRongyu extends Base * @return \think\Response */ // 批量添加 - public function createAll() + public function saveall() { // 设置页面标题 $list['set'] = array( diff --git a/application/rongyu/controller/JsRongyuInfo.php b/application/rongyu/controller/JsRongyuInfo.php index a020841f..649290b9 100644 --- a/application/rongyu/controller/JsRongyuInfo.php +++ b/application/rongyu/controller/JsRongyuInfo.php @@ -202,7 +202,7 @@ class JsRongyuInfo extends Base } // 保存批传 - public function createAllSave($rongyuce) + public function saveall($rongyuce) { // 获取文件信息 $list['text'] = $this->request->post('text'); diff --git a/application/teach/model/Banji.php b/application/teach/model/Banji.php index d9f5ff28..ec42b631 100644 --- a/application/teach/model/Banji.php +++ b/application/teach/model/Banji.php @@ -33,11 +33,13 @@ class Banji extends Base 'glSchool'=>function($query){ $query->field('id,title'); }, - 'glStudent'=>function($query){ - $query->count(); - }, ] ) + ->withCount([ + 'glStudent'=>function($query){ + $query->where('status',1); + } + ]) ->append(['title']) ->select(); return $data; @@ -90,21 +92,6 @@ class Banji extends Base } - - - - - // 学校获取器 - // public function getSchoolAttr($value) - // { - // // 查询学校名称 - // $schoolname = db('school')->where('id',$value)->value('title'); - // // 返回学校名称 - // return $schoolname; - // } - - - // 班级学生数 public function getStusumAttr() { diff --git a/application/teach/view/banji/index.html b/application/teach/view/banji/index.html index 982d7463..b24f3b56 100644 --- a/application/teach/view/banji/index.html +++ b/application/teach/view/banji/index.html @@ -89,7 +89,7 @@ layui.use(['table','laypage','form','cjgl'], function(){ cols: [[ //表头 {type:'checkbox', fixed: 'left'}, {field: 'id', title: 'ID', minWidth:100,sort: true}, - {field: 'title', title: '班级名称', minWidth:100,sort: true}, + {field: 'title', title: '班级名称', minWidth:100}, {field: 'school', title: '单位名称',sort: true, minWidth:240,templet:function(d){ var str=''; if(d.gl_school) @@ -100,14 +100,7 @@ layui.use(['table','laypage','form','cjgl'], function(){ }}, {field: "ruxuenian",title: '入学年',sort: true}, {field: 'paixu', title: '排序', sort: true}, - {title: '班级学生数',sort: true,templet:function(d){ - var str=''; - if(d.gl_student) - { - str = d.gl_student; - } - return str; - }}, + {field:"gl_student_count",title: '班级学生数',sort: true}, {field: 'status', title: '状态',templet:'#status', sort: true}, {field: 'id', title: '操作',toolbar: '#barDemo',minWidth:160} ]], diff --git a/application/teach/view/xueqi/create.html b/application/teach/view/xueqi/create.html index 8cc136db..7fd22178 100644 --- a/application/teach/view/xueqi/create.html +++ b/application/teach/view/xueqi/create.html @@ -45,10 +45,10 @@ *时间范围
- +
- +
diff --git a/database/seeds/Rule.php b/database/seeds/Rule.php index d26a51d5..c3133bbf 100644 --- a/database/seeds/Rule.php +++ b/database/seeds/Rule.php @@ -111,6 +111,7 @@ class Rule extends Seeder ['title'=>'状态','name'=>'renshi/Student/setStatus','paixu'=>5,'pid'=>401], ['title'=>'下载模板','name'=>'renshi/Student/download','paixu'=>6,'pid'=>401], ['title'=>'批量上传','name'=>'renshi/Student/createAll','paixu'=>7,'pid'=>401], + // 教师管理权限 ['title'=>'添加','name'=>'renshi/Index/create','paixu' =>1,'pid'=>402], ['title'=>'删除','name'=>'renshi/Index/delete','paixu'=>2,'pid'=>402], @@ -118,7 +119,9 @@ class Rule extends Seeder ['title'=>'查看','name'=>'renshi/Index/read','paixu'=>4,'pid'=>402,], ['title'=>'状态','name'=>'renshi/Index/setStatus','paixu'=>5,'pid'=>402], ['title'=>'查询教师','name'=>'renshi/Index/srcTeacher','paixu'=>6,'pid'=>402], - ['title'=>'批量上传','name'=>'renshi/Index/createAll','paixu'=>7,'pid'=>401], + ['title'=>'批量上传','name'=>'renshi/Index/createAll','paixu'=>7,'pid'=>402], + ['title'=>'表格模板下载','name'=>'renshi/Index/download','paixu'=>8,'pid'=>402], + ['title'=>'姓名转换VBA下载','name'=>'renshi/Index/downloadVba','paixu'=>9,'pid'=>402], // 教务管理 @@ -182,7 +185,7 @@ class Rule extends Seeder ['title'=>'编辑','name'=>'rongyu/DwRongyu/edit','paixu'=>3,'pid'=>801,], ['title'=>'查看','name'=>'rongyu/DwRongyu/read','paixu'=>4,'pid'=>801,], ['title'=>'状态','name'=>'rongyu/DwRongyu/setStatus','paixu'=>5,'pid'=>801], - ['title'=>'批量上传','name'=>'rongyu/DwRongyu/createAllSave','paixu'=>6,'pid'=>801], + ['title'=>'批量上传','name'=>'rongyu/DwRongyu/createAll','paixu'=>6,'pid'=>801], // 教师荣誉册管理 ['title'=>'添加','name'=>'rongyu/JsRongyu/create','paixu' =>1,'pid'=>802], ['title'=>'删除','name'=>'rongyu/JsRongyu/delete','paixu'=>2,'pid'=>802], diff --git a/route/keti.php b/route/keti.php index 3c527b91..7eba7ae4 100644 --- a/route/keti.php +++ b/route/keti.php @@ -22,7 +22,7 @@ Route::put('ktjt/:id','keti/KetiInfo/jtUpdate'); Route::get('ktinfoadd/:ketice','keti/KetiInfo/create'); // 批量添加立项图片 Route::get('ktinfoaddall/:ketice','keti/KetiInfo/createAll'); -Route::post('ktinfoaddall/:ketice','keti/KetiInfo/createAllSave'); +Route::post('ktinfoaddall/:ketice','keti/KetiInfo/saveall'); diff --git a/route/rongyu.php b/route/rongyu.php index 8c314f52..de91f94e 100644 --- a/route/rongyu.php +++ b/route/rongyu.php @@ -14,11 +14,11 @@ Route::resource('dwry','rongyu/DwRongyu'); Route::resource('jsry','rongyu/JsRongyu'); Route::resource('jsryinfo','rongyu/JsRongyuInfo'); Route::get('dwry/createall','rongyu/DwRongyu/createAll'); -Route::post('dwry/createall','rongyu/DwRongyu/createAllSave'); +Route::post('dwry/createall','rongyu/DwRongyu/saveall'); // 荣誉册中荣誉信息列表 Route::get('rylist/:rongyuce/:title','rongyu/JsRongyuInfo/rongyuList'); Route::get('ryout/:rongyuce','rongyu/JsRongyuInfo/outXlsx'); Route::get('jsryinfoadd/:rongyuce','rongyu/JsRongyuInfo/create'); Route::get('jsryinfoaddall/:rongyuce','rongyu/JsRongyuInfo/createAll'); -Route::post('jsryinfoaddall/:rongyuce','rongyu/JsRongyuInfo/createAllSave'); \ No newline at end of file +Route::post('jsryinfoaddall/:rongyuce','rongyu/JsRongyuInfo/saveall'); \ No newline at end of file