-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
2. 系统设置管理修改 3. 修复不能添加用户 4. 添加PHPEXCEL
- Loading branch information
Showing
9 changed files
with
825 additions
and
660 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
80 changes: 63 additions & 17 deletions
80
Application/Home/Controller/SystemConfigController.class.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,79 @@ | ||
<?php | ||
/*--------------------------------------------------------------------------- | ||
小微OA系统 - 让工作更轻松快乐 | ||
小微OA系统 - 让工作更轻松快乐 | ||
Copyright (c) 2013 http://www.smeoa.com All rights reserved. | ||
Copyright (c) 2013 http://www.smeoa.com All rights reserved. | ||
Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) | ||
Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) | ||
Author: jinzhu.yin<[email protected]> | ||
Author: jinzhu.yin<[email protected]> | ||
Support: https://git.oschina.net/smeoa/smeoa | ||
Support: https://git.oschina.net/smeoa/smeoa | ||
-------------------------------------------------------------------------*/ | ||
|
||
|
||
namespace Home\Controller; | ||
|
||
class SystemConfigController extends HomeController { | ||
//过滤查询字段 | ||
protected $config=array('app_type'=>'master'); | ||
|
||
function _search_filter(&$map) { | ||
$keyword=I('keyword'); | ||
if (!empty($keyword)){ | ||
$map['val|name|code'] = array('like', "%" . $keyword . "%"); | ||
|
||
protected $config = array('app_type' => 'master'); | ||
|
||
public function index(){ | ||
|
||
$node = M("SystemConfig"); | ||
|
||
if (!empty($_POST['eq_pid'])) { | ||
$eq_pid = $_POST['eq_pid']; | ||
} else { | ||
$eq_pid = "#"; | ||
} | ||
|
||
$this -> assign('eq_pid', $eq_pid); | ||
|
||
$list = $node -> where('pid=0') -> order('sort desc') -> getField('id,name'); | ||
$this -> assign('groupList', $list); | ||
|
||
$node = M("SystemConfig"); | ||
$menu = array(); | ||
$menu = $node -> where($map) -> field('id,pid,name,is_del') -> order('sort desc') -> select(); | ||
|
||
if ($eq_pid != "#") { | ||
$tree = list_to_tree($menu,$eq_pid); | ||
} else { | ||
$tree = list_to_tree($menu); | ||
} | ||
|
||
$this -> assign('menu', popup_tree_menu($tree)); | ||
|
||
$model = M("SystemConfig"); | ||
$list = $model -> order('sort asc') -> getField('id,name'); | ||
$this -> assign('system_config_list', $list); | ||
|
||
$model = M("DeptGrade"); | ||
$list = $model -> where('is_del=0') -> order('sort asc') -> getField('id,name'); | ||
$this -> assign('dept_grade_list', $list); | ||
|
||
$this -> display(); | ||
} | ||
|
||
function del(){ | ||
$id=$_POST['id']; | ||
$this->_destory($id); | ||
|
||
public function del($id) { | ||
$this -> _destory($id); | ||
} | ||
|
||
public function winpop() { | ||
$node = M("SystemConfig"); | ||
$menu = array(); | ||
$menu = $node -> where('is_del=0') -> field('id,pid,name') -> order('sort asc') -> select(); | ||
|
||
$tree = list_to_tree($menu); | ||
$this -> assign('menu', popup_tree_menu($tree)); | ||
|
||
$this -> assign('pid', $pid); | ||
$this -> display(); | ||
} | ||
|
||
public function winpop2() { | ||
$this -> winpop(); | ||
} | ||
|
||
} | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,77 @@ | ||
<extend name="Layout/page_detail" /> | ||
<extend name="Layout/page_popup" /> | ||
<block name="content"> | ||
{:W('PageHeader/simple',array('name'=>'新建系统参数','search'=>'N'))} | ||
|
||
<div class="operate panel panel-default"> | ||
<div class="panel-body"> | ||
<div class="pull-left"> | ||
<a onclick="go_return_url();" class="btn btn-sm btn-primary">返回</a> | ||
</div> | ||
<div class="pull-right"> | ||
<a onclick="save();" class="btn btn-sm btn-primary">保存</a> | ||
</div> | ||
</div> | ||
</div> | ||
<form method='post' id="form_data" action="" name="form_data" class="well form-horizontal clearfix"> | ||
<input type="hidden" name="opmode" id="opmode" value="add"> | ||
<div class="form-group col-xs-12"> | ||
<label class="col-sm-4 control-label" for="code">代码*:</label> | ||
<div class="col-sm-8"> | ||
<input class="form-control" type="text" id="code" name="code" check="require" msg="请输入代码"> | ||
</div> | ||
</div> | ||
<div class="form-group col-xs-12"> | ||
<label class="col-sm-4 control-label" for="name">名称*:</label> | ||
<div class="col-sm-8"> | ||
<input class="form-control" type="text" id="name" name="name" check="require" msg="请输入名称"> | ||
</div> | ||
</div> | ||
<div class="form-group col-xs-12"> | ||
<label class="col-sm-4 control-label" for="val">数据*:</label> | ||
<div class="col-sm-8"> | ||
<input class="form-control" type="text" id="val" name="val" check="require" msg="请输入数据"> | ||
</div> | ||
</div> | ||
<div class="form-group col-xs-12"> | ||
<label class="col-sm-4 control-label" for="sort">排序:</label> | ||
<div class="col-sm-8"> | ||
<input class="form-control" value="{$vo.sort}" type="text" id="sort" name="sort" > | ||
<input type="hidden" name="ajax" id="ajax" value="1"> | ||
{:W('PageHeader/popup',array('name'=>'新建系统参数','search'=>'N'))} | ||
<!-- 功能操作区域结束 --> | ||
<!-- 列表显示区域 --> | ||
<div class="row"> | ||
<div class="col-xs-12"> | ||
<form id="form_data" name="form_data" method="post" class="well form-horizontal clearfix"> | ||
<input type="hidden" name="opmode" id="opmode" value="add"> | ||
<input type="hidden" name="pid" id="pid" value=""> | ||
<div class="form-group col-xs-12"> | ||
<label class="col-xs-3 control-label" for="code">编码*:</label> | ||
<div class="col-xs-9"> | ||
<input class="form-control" type="text" id="code" name="code" check="require" msg="请输入编码"> | ||
</div> | ||
</div> | ||
<div class="form-group col-xs-12"> | ||
<label class="col-xs-3 control-label" for="name">名称*:</label> | ||
<div class="col-xs-9"> | ||
<input class="form-control" type="text" id="name" name="name" check="require" msg="请输入名称"> | ||
</div> | ||
</div> | ||
<div class="form-group col-xs-12"> | ||
<label class="col-xs-3 control-label" for="val">数据*:</label> | ||
<div class="col-xs-9"> | ||
<input class="form-control" type="text" id="val" name="val" check="require" msg="请输入数据"> | ||
</div> | ||
</div> | ||
<div class="form-group col-xs-12"> | ||
<label class="col-xs-3 control-label" for="sort">排序:</label> | ||
<div class="col-xs-9"> | ||
<input class="form-control" type="text" id="sort" name="sort" > | ||
</div> | ||
</div> | ||
<div class="form-group col-xs-12"> | ||
<label class="col-xs-3 control-label" for="is_del">状态*:</label> | ||
<div class="col-xs-9"> | ||
<select name="is_del" id="is_del" class="form-control"> | ||
<option value="0">启用</option> | ||
<option value="1">禁用</option> | ||
</select> | ||
</div> | ||
</div> | ||
<div class="form-group col-xs-12"> | ||
<label class="col-xs-3 control-label" for="remark" >其他:</label> | ||
<div class="col-xs-9" > | ||
<textarea class="form-control" name="remark" id="remark" rows="5" class="col-xs-12" ></textarea> | ||
</div> | ||
</div> | ||
</form> | ||
</div> | ||
</div> | ||
<div class="form-group col-xs-12"> | ||
<label class="col-sm-4 control-label" for="is_del">状态*:</label> | ||
<div class="col-sm-8"> | ||
<select name="is_del" id="is_del" class="form-control"> | ||
<option value="0">启用</option> | ||
<option value="1">禁用</option> | ||
</select> | ||
</div> | ||
</div> | ||
</form> | ||
</block> | ||
<block name="js"> | ||
<script type="text/javascript"> | ||
function save() { | ||
if (check_form("form_data")) { | ||
sendForm("form_data", "{:U('save')}"); | ||
<script type="text/javascript"> | ||
function save() { | ||
if (check_form("form_data")) { | ||
var vars = $("#form_data").serialize(); | ||
sendAjax("{:U('save')}", vars, function(data) { | ||
if (data.status) { | ||
ui_alert(data.info, function() { | ||
parent.location.reload(true); | ||
myclose(); | ||
}); | ||
} | ||
}); | ||
} | ||
} | ||
} | ||
</script> | ||
|
||
$(document).ready(function() { | ||
$pid = $("#id", parent.document).val(); | ||
$("#pid").val($pid); | ||
}); | ||
</script> | ||
|
||
</block> |
Oops, something went wrong.