You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

231 lines
7.6 KiB

<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<%@include file="/wdk/theme/je/module/public/common.jsp"%>
<!-- 上述3个meta标签*必须*放在最前面,任何其他内容都*必须*跟随其后! -->
<title>工业人员档案</title>
<style type="text/css">
#checkbox_terminal_status{
width:185px;
}
</style>
<script type="text/javascript">
var _gridcode = "platform.uum.factoryusergrid";
var _gridid = $.getUUID();
var _manageunituuid = $.getSessionUser().manageunituuid;
var _orguuid = $.getSessionUser().orguuid;
//初始化加载左侧的树
$(function(){
$('#org_name').val($.getSessionUser().orgname);
//初始化grid数据
var params = getGridQueryParam();
$.grid({
id : _gridid,
containerid : 'layout_grid',
gridcode : _gridcode,
checkbox : false,
checkOnSelect : false,
selectOnCheck : false,
url: 'wdk?action=wdk.pub&method=call_service&ajaxparam=' + new Date().getTime(),
queryParams: params,
idField : 'person_uuid',
fitColumns:true, //是否自动填充满
nowrap:true, //自动换行
pagination:true,
pageSize:20,
formatter:{
operation: 'formatOperation'
,person_name: 'formatperson_name'
}
});
});
function getGridQueryParam(){
var dataParam = {
_SRVNAME:'service.usr.staff'
,_SRVMETHOD:'pagequeryStaffList'
,_DATA:$.json2str({
op_account_uuid:$.getSessionUser().account_id
,staff_info: {
depart_uuid : _orguuid
, manage_unit_uuid : _manageunituuid
, search_bar:$('#search_bar').val()
}
,result_fields:''
,order_fields:'display_order'
})
,_RSTYPE:'grid'
,_RSFIELD:'staff_info'
,_RSPARAM:$.json2str({pagequery:'1'})
,totalRowIndex:0
};
return dataParam;
}
function formatOperation(value,row,index){
var str = '<i tilte="修改" class="fa fa-pencil-square-o grid-oper-icon" aria-hidden="true" onclick="btn_change(\''+ row.person_uuid +'\')"></i>';
str += '<i tilte="删除" class="fa fa-trash-o grid-oper-icon" aria-hidden="true" onclick="btn_del(\''+ row.person_uuid +'\')"></i>';
return str;
}
function formatperson_name(value,row,index){
return "<a style='margin:5px;' href='javascript:void(0)' onclick=btn_view('"+ row.person_uuid +"')>"+value+"</a>";
}
function btn_query(){
var params = getGridQueryParam();
$.grid_reload({
id : _gridid,
queryParams : params
});
}
function btn_view(person_uuid){
if(person_uuid==null||person_uuid==""){
alert('请选择记录进行操作!');
return;
}
$.openInTab({
id:$.getUUID(),
title:'人员详情',
height:600,
width:1250,
url:'platform/uum/uum_factory_user_view.jsp',
queryParams:{
person_uuid:person_uuid
,org_uuid:_orguuid
,org_name:$('#org_name').val()
}
});
}
function btn_add(){
$.addListener('factoryuser_list.query',"btn_query");//添加打开修改页签事件监听
if(_orguuid==null||_orguuid==""){
alert('必须是工业公司人员才能操作!');
return;
}
$.openInTab({
id:$.getUUID(),
title:'人员新增',
height:600,
width:1250,
url:'platform/uum/uum_factory_user_edit.jsp',
queryParams:{
actionflag:'add'
,org_uuid:_orguuid
,org_name:$('#org_name').val()
}
});
}
function btn_change(person_uuid){
if(person_uuid==null||person_uuid==""){
alert('请选择记录进行操作!');
return;
}
$.addListener('factoryuser_list.query',"btn_query");//添加打开修改页签事件监听
$.openInTab({
id:$.getUUID(),
title:'人员修改',
height:600,
width:1250,
url:'platform/uum/uum_factory_user_edit.jsp',
queryParams:{
actionflag:'update'
,person_uuid:person_uuid
,org_uuid:_orguuid
,org_name:$('#org_name').val()
}
});
}
function btn_del(person_uuid){
if(person_uuid==null||person_uuid==""){
alert('请选择记录进行操作!');
return;
}
confirmDialog('是否确认删除,删除后不能恢复!',function(){
//打开旋转
$.wait_open();
//组织参数
var dataParam = {
_SRVNAME:'service.uum.staff'
,_SRVMETHOD:'deleteStaff'
,_DATA:$.json2str({
op_account_uuid:$.getSessionUser().account_id
,person_uuid:person_uuid
})
};
//加载数据
$.cuajax({
url:'wdk?action=wdk.pub&method=call_service&ajaxparam='+new Date().getTime()
,method:"post"
,timeout:WDK_Timeout
,data:dataParam
,success:function(result) {
//关闭旋转
$.wait_close();
var jres = $.str2json(result);
if (jres.code == "1") { //操作成功
alert(jres.desc);
//删除后重新请求
btn_query();
}else{
alert(jres.desc);
}
},
error:function(result){
$.wait_close();
alert('网络错误!result='+result);
}
});
},function(){});
}
</script>
</head>
<body class="easyui-layout" data-options="fit:true">
<div data-options="region:'north',border:false,collapsed:false" class="row-1" style="padding:10px 10px;overflow:hidden;" >
<div class="page-toolbar">
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'fa fa-plus'" onclick="btn_add()">新增</a>
</div>
</div>
<div data-options="region:'center',border:false,collapsed:false" >
<div class="easyui-layout" data-options="fit:true">
<div data-options="region:'north',border:false,collapsed:false" style="padding:0 10px;overflow:hidden;" >
<form id="search_form" >
<div class="h_layout fixed">
<div>
<div class="inputgroup">
<label>工业公司</label>
<div>
<input type="text" class="easyui-validatebox nospaceinside" id="org_name" name="org_name" value="" disabled/>
</div>
</div>
<div class="inputgroup" >
<label>关键字</label>
<div>
<input id="search_bar" name="search_bar" placeholder="输入姓名进行模糊查询"/>
</div>
</div>
</div>
<div style="width:125px;">
<a class="eapbutton" style="float:right;" onclick="btn_query()"><i class="fa fa-search" aria-hidden="true"></i><span><span>查询</span></span></a>
</div>
</div>
</form>
</div>
<div id="layout_grid" data-options="region:'center',border:false,collapsed:false" style="padding:0px 10px;" >
</div>
</div>
</div>
</div>
</body>
</html>