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.
441 lines
13 KiB
441 lines
13 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>
|
|
<base href="<%=basePath%>" target="_self">
|
|
|
|
<script type="text/javascript">
|
|
|
|
//获取参数数据
|
|
var param = $.getURLParam('param');
|
|
var jparam = $.str2json($.urlparam_decode(param));
|
|
var _actionflag = jparam.queryParams.actionflag; //操作类型 add-新增 update-修改,读取原信息
|
|
var _mid = jparam.queryParams.mid; //父界面刷新方法标识
|
|
var _selected_id = jparam.queryParams.selected_id; //主键
|
|
|
|
//初始化
|
|
$(function(){
|
|
|
|
//下拉框
|
|
Combo_box("org_type_scode","S_ORG_TYPE");
|
|
Combo_box("org_level_scode","S_ORG_LEVEL");
|
|
|
|
//行政区划下拉树
|
|
Combo_area_tree();
|
|
|
|
//如果是修改,则首先查询下详细信息
|
|
if('update'==_actionflag){
|
|
//初始化对象数据
|
|
initData();
|
|
}else{ //如果是新增,设置父组织名称
|
|
var parent_uuid = jparam.queryParams.parent_uuid; //父组织id
|
|
var parent_uuidname = jparam.queryParams.parent_uuidname; //父组织名称
|
|
//设置值
|
|
$("#parent_uuid").val(parent_uuid);
|
|
}
|
|
|
|
});
|
|
|
|
//行政区划下拉框
|
|
function Combo_area_tree(){
|
|
|
|
//组织参数
|
|
var dataJson = {
|
|
op_acc: $.getSessionUser().account_id
|
|
,result_fields:''
|
|
,parent_uuid: '-1'
|
|
};
|
|
|
|
var queryMethod="queryAdministrativeAreaListByParentID";//方法名
|
|
|
|
//组织请求数据集
|
|
var dataParam = {
|
|
_SRVNAME: 'service.usr.area',
|
|
_SRVMETHOD: queryMethod,
|
|
_DATA: $.json2str(dataJson),
|
|
_RSFIELD: 'result',//TODO:待确认
|
|
_RSTYPE: 'tree',
|
|
_RSPARAM: $.json2str({
|
|
idField: 'area_uuid'
|
|
,textField: 'area_name'
|
|
,parentField: 'parent_uuid'
|
|
,asyn:'1' //是否是异步 0:同步;1:异步
|
|
,asyn_dataField:'parent_uuid' //如果是异步,则从url中取出的参数替换_DATA参数的名
|
|
})
|
|
};
|
|
|
|
//注册人员选择控件
|
|
$.inputpop({
|
|
id:'area_uuid',
|
|
type:'tree',
|
|
title:'行政区划',
|
|
width:320,
|
|
height:480,
|
|
editable:false,
|
|
required:false,
|
|
checkbox:false,
|
|
asyn:true,
|
|
initid: '',
|
|
inittext: '',
|
|
initvalue: '',
|
|
dataurl:'wdk?action=wdk.pub&method=call_service&ajaxparam='+new Date().getTime(),
|
|
queryParams:dataParam,
|
|
onBeforeOpen:'',
|
|
callback:function(jparam){
|
|
$.inputpop_setValue ({
|
|
id:'area_uuid',
|
|
value_id:jparam.value_id,
|
|
value_text:jparam.value_text,
|
|
value_value:jparam.value_text
|
|
});
|
|
}
|
|
});
|
|
}
|
|
|
|
//下拉框
|
|
function Combo_box(id, moduleCode){
|
|
var condition = "";
|
|
/*
|
|
if(id == "org_level_scode"){
|
|
condition = "sysdic_para1='' ";
|
|
}*/
|
|
$.combobox({
|
|
id:id
|
|
,required:true
|
|
,tipPosition:'bottom'
|
|
,url:'wdk?action=wdk.pub&method=call_service&ajaxparam='+new Date().getTime()
|
|
,queryParams:{
|
|
_SRVNAME:'service.wdk.pub'
|
|
,_SRVMETHOD:'wql_queryCombobox'
|
|
,_DATA:$.json2str({
|
|
modulecode:moduleCode
|
|
,jparam:{
|
|
condition:condition
|
|
}
|
|
})
|
|
,_RSFIELD:'result'
|
|
},
|
|
//组织级别根据组织类型联动,但会出现css问题
|
|
/*
|
|
onChange : function(newValue,oldValue){
|
|
if(id == "org_level_scode"){
|
|
|
|
return;
|
|
}
|
|
$.combobox_loadData({
|
|
id:'org_level_scode',
|
|
url:'wdk?action=wdk.pub&method=call_service&ajaxparam='+new Date().getTime(),
|
|
data:{
|
|
_SRVNAME:'service.wdk.pub'
|
|
,_SRVMETHOD:'wql_queryCombobox'
|
|
,_DATA:$.json2str({
|
|
modulecode:"S_ORG_LEVEL"
|
|
,jparam:{
|
|
condition:"sysdic_para1='"+newValue+"' "
|
|
}
|
|
})
|
|
,_RSFIELD:'result'
|
|
}
|
|
});
|
|
}*/
|
|
});
|
|
}
|
|
|
|
//初始化对象数据
|
|
function initData(){
|
|
$.wait_open();
|
|
//组织参数
|
|
var dataParam = {
|
|
_SRVNAME:'service.uum.org'
|
|
,_SRVMETHOD:'queryByID'
|
|
,_DATA:$.json2str({
|
|
op_account_uuid:$.getSessionUser().account_id
|
|
,org_uuid:_selected_id
|
|
})
|
|
};
|
|
|
|
//加载数据
|
|
$.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"){
|
|
//回填数据
|
|
$.setFieldValue(jres.org_info, "#edit_form");
|
|
//inputpop 因为有两个值,需要单独设置下
|
|
$.inputpop_setValue ({
|
|
id:"area_uuid",
|
|
value_id:jres.org_info.area_uuid,
|
|
value_text:jres.org_info.area_uuidname,
|
|
value_value:jres.org_info.area_uuidname
|
|
});
|
|
|
|
}
|
|
},
|
|
error:function(result){
|
|
$.wait_close();
|
|
alert('网络错误!result='+result);
|
|
}
|
|
});
|
|
}
|
|
|
|
//保存对象
|
|
function opt_save(){
|
|
//验证
|
|
var isok = $("#edit_form").form('validate');
|
|
if (!isok) {
|
|
alert('尚有必填项未填或填写有误,请检查后提交');
|
|
return false;
|
|
}
|
|
|
|
//打开旋转
|
|
$.wait_open();
|
|
|
|
//获取所有input和textarea 的输入值
|
|
var orgBaseFieldValues= $.getFieldValue({formid:'edit_form'});
|
|
var jArr = []; //加入需要修改的兼职数组
|
|
//组织参数
|
|
var dataParam = {
|
|
_SRVNAME:'service.uum.org'
|
|
,_SRVMETHOD:'save'
|
|
,_DATA:$.json2str({
|
|
op_account_uuid:$.getSessionUser().account_id
|
|
,org_info:orgBaseFieldValues
|
|
,biz_info:jArr
|
|
})
|
|
};
|
|
|
|
//加载数据
|
|
$.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();
|
|
//返回值字符串转json
|
|
var jres = $.str2json(result);
|
|
alert(jres.desc);
|
|
if(jres.code=="1"){ //操作成功
|
|
//返回带对象的值
|
|
var retValues ={};
|
|
var org_uuid = $("#org_uuid").val();
|
|
if('update'!=_actionflag){
|
|
org_uuid = jres.org_uuid;
|
|
}
|
|
retValues.id = org_uuid;
|
|
retValues.pid = $("#parent_uuid").val();
|
|
retValues.text = $("#org_name").val();
|
|
//增加页面办理请求标志
|
|
retValues.actionflag =_actionflag;
|
|
|
|
//触发用户添加成功消息(返回给前一页面)
|
|
$.notify("uum_org_edit", retValues);
|
|
|
|
//关闭页面
|
|
opt_close();
|
|
}
|
|
},
|
|
error:function(result){
|
|
$.wait_close();
|
|
alert('网络错误!result='+result);
|
|
}
|
|
});
|
|
|
|
|
|
}
|
|
|
|
//关闭当前页面
|
|
function opt_close() {
|
|
$.closeActiveTab();
|
|
}
|
|
|
|
</script>
|
|
</head>
|
|
|
|
<body class="easyui-layout" data-options="fit:true">
|
|
<div data-options="region:'north',border:false,collapsed:false" class="page-title" style="height:45px;line-height:35px;">
|
|
<div class="page-title-text"></div>
|
|
<div class="page-toolbar">
|
|
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'fa fa-save'" onclick="opt_save()">保存</a>
|
|
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'fa fa-close'" onclick="opt_close()">关闭</a>
|
|
</div>
|
|
</div>
|
|
<div data-options="region:'center',border:false,collapsed:false" >
|
|
<div class="edit-container">
|
|
<form id="edit_form">
|
|
|
|
<input type="hidden" id="org_uuid" name="org_uuid"/>
|
|
<input type="hidden" id="parent_uuid" name="parent_uuid"/>
|
|
|
|
<div class="page-title" style="padding: 0 20px;">
|
|
<span class="page-title-text">基本信息</span>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="formgroup">
|
|
<label class="required">上级组织</label>
|
|
<div>
|
|
<input type="text" class="easyui-validatebox nospaceinside" id="parent_uuidname" name="parent_uuidname" value="" readonly="readonly"/>
|
|
</div>
|
|
</div>
|
|
<div class="formgroup">
|
|
<label class="required">组织编码</label>
|
|
<div>
|
|
<input type="text" class="easyui-validatebox nospaceinside" id="org_code" name="org_code" value="" data-options="required:true,validType:['length[0,20]'],tipPosition:'bottom'"/>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="formgroup">
|
|
<label>助记码</label>
|
|
<div>
|
|
<input type="text" class="easyui-validatebox nospaceinside" id="mark_code" data-options="validType:'length[0,20]',tipPosition:'bottom'" name="mark_code" value="" />
|
|
</div>
|
|
</div>
|
|
<div class="formgroup">
|
|
<label class="required">组织名称</label>
|
|
<div>
|
|
<input type="text" class="easyui-validatebox nospaceinside" id="org_name" name="org_name" value="" data-options="required:true,validType:['length[0,20]'],tipPosition:'bottom'"/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="formgroup">
|
|
<label>主数据标准名称</label>
|
|
<div>
|
|
<input type="text" class="easyui-validatebox nospaceinside" id="simple_name" name="simple_name" value=""/>
|
|
</div>
|
|
</div>
|
|
<div class="formgroup">
|
|
<label class="required">排序序号</label>
|
|
<div>
|
|
<input type="text" class="easyui-validatebox nospaceinside" id="display_order" name="display_order" value="" data-options="required:true,validType:['isNumber','length[0,5]'],tipPosition:'bottom'"/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="formgroup">
|
|
<label class="required">组织类型</label>
|
|
<div>
|
|
<input type="text" class="easyui-validatebox nospaceinside" id="org_type_scode" name="org_type_scode" value=""/>
|
|
</div>
|
|
</div>
|
|
<div class="formgroup">
|
|
<label class="required">组织级别</label>
|
|
<div>
|
|
<input type="text" class="easyui-validatebox nospaceinside" id="org_level_scode" name="org_level_scode" value=""/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="formgroup">
|
|
<label>虚拟组织</label>
|
|
<div>
|
|
<input type="checkbox" id="is_virtual_org" name="is_virtual_org"/>
|
|
</div>
|
|
</div>
|
|
<div class="formgroup" style="width:450px;">
|
|
<label>是否封存</label>
|
|
<div>
|
|
<input type="checkbox" id="is_seal_up" name="is_seal_up"/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="formgroup">
|
|
<label>英文名称</label>
|
|
<div>
|
|
<input type="text" class="easyui-validatebox nospaceinside" id="english_name" name="english_name" value=""/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row" style="height:50px;">
|
|
<div class="formgroup col-12">
|
|
<label>描述</label>
|
|
<div>
|
|
<textarea class="easyui-validatebox nospaceinside" id="remark" name="remark" rows="2" ></textarea>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-title" style="margin-top:10px;">
|
|
<span class="form-title-text">行政信息</span>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="formgroup">
|
|
<label>行政区划</label>
|
|
<div>
|
|
<input type="text" class="easyui-validatebox nospaceinside" id="area_uuid" name="area_uuid" value="" />
|
|
</div>
|
|
</div>
|
|
<div class="formgroup">
|
|
<label>法人单位</label>
|
|
<div>
|
|
<input type="checkbox" id="is_ppl_org" name="is_ppl_org"/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="formgroup">
|
|
<label>法人代表</label>
|
|
<div>
|
|
<input type="text" class="easyui-validatebox nospaceinside" id="principle" name="principle" value=""/>
|
|
</div>
|
|
</div>
|
|
<div class="formgroup">
|
|
<label>电话</label>
|
|
<div>
|
|
<input type="text" class="easyui-validatebox nospaceinside" id="tel_no" name="tel_no" data-options="validType:'isTel',tipPosition:'bottom'" value=""/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="formgroup">
|
|
<label>传真</label>
|
|
<div>
|
|
<input type="text" class="easyui-validatebox nospaceinside" id="fax" name="fax" data-options="validType:'isFax',tipPosition:'bottom'" value=""/>
|
|
</div>
|
|
</div>
|
|
<div class="formgroup">
|
|
<label>邮编</label>
|
|
<div>
|
|
<input type="text" class="easyui-validatebox nospaceinside" id="zip_code" name="zip_code" value=""/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row" style="height:50px;">
|
|
<div class="formgroup col-12">
|
|
<label>地址</label>
|
|
<div>
|
|
<textarea class="easyui-validatebox nospaceinside" id="address" name="address" rows="2" ></textarea>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|