123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311 |
- <%@page language="java" pageEncoding="UTF-8"%>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>修改外部机构</title>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <!--框架必需start-->
- <%@include file="../.././../../include1.jsp"%>
- <!--引用资源文件,JS CSS-->
- <script type="text/javascript"
- src="<%=path%>/scripts/jquery/plugins/jquery.extension.util.js"></script>
- <script type="text/javascript"
- src="<%=path%>/scripts/freamwork/com/sinosoft/common/common.js"></script>
- <script type="text/javascript"
- src="<%=path%>/scripts/freamwork/com/sinosoft/common/utils/utils.js"></script>
- <script type="text/javascript"
- src="<%=path%>/scripts/freamwork/com/sinosoft/common/frameWork/frameWork.js"></script>
- <script type="text/javascript"
- src="<%=path%>/scripts/freamwork/com/sinosoft/common/utils/Request.js"></script>
- <script type="text/javascript"
- src="<%=path%>/scripts/freamwork/com/sinosoft/common/searchUtil.js"></script>
- <link
- href="<%=path%>/scripts/freamwork/com/sinosoft/common/searchUtil.css"
- rel="stylesheet" type="text/css" />
-
- <style type = "text/css">
- .legend{
- font-family:宋体;
- font-weight: bold;
- font-size:14px;
- color:#3e62a0;
- }
- .table-style{
- border-style:solid;
- border-width:1px;
- border-color:#cdcaca;
- margin:0px 20px 0px 20px;
- border-collapse:collapse;
- width: 895px;
- }
- .table-style2{
- border:1px solid #cdcaca;
- margin:0px 20px 0px 20px;
- border-collapse:collapse;
- width: 895px;
- }
- .td-font{
- font-family:宋体;
- font-size:14px;
- color:#161616;
- }
- .td-move{
- padding: 10px 5px 0px 0px;
- }
- .td-style{
- border:1px solid #cdcaca;
- border-collapse:collapse;
- padding-left: 10px
- }
- </style>
-
- <script type="text/javascript">
- //登陆人的机构id
- var loginOrgId = top.com.sinosoft.lz.system.user.LoginInfo.getDeptids();
- //当前点击的机构节点
- var parentClickOrg = parent.selectedTreeNode;
- //tab 标签id
- var tabId = parent.tabIndex;
- //定义重置记录值
- var resetValue = {};
- $(function(){
- //绑定重置按钮事件
- $("#OrgReset").bind("click",function(){
- reset_input();
- })
- //给下拉框赋值--常量表中的
- $("#ORG_DEPT_TYPE_212").initCanstSelect('BM_OUT_ORG_TYPE');
-
- var url = $.pathname() + '/ws/crud/CRUDService/getDataById/';
- fd_id = parentClickOrg.id;
- var params = {
- classid : '212',
- objectID : fd_id
- };
- $.ajax({
- url : url,
- type : 'post',
- timeout : 60000,
- data : params,
- dataType : 'json',
- success : function(data) {
- resetValue=data;
-
- $("#fillForm").ajaxWrite({
- data : data
- });
- $("#fillForm input[name='classid']").val("212");
- $("#fillForm input[name='fd_id212']").val(fd_id);
- //修改标题
- $("#titleShow").html("修改"+data.ORG_DEPT_NAME_212+"信息");
-
- $("#UPDATEDATE").html(data.UPDATEDATE_212);
- typein(data.ENTRY_MAN_ID_212);
- },
- error : function(e) {
- $.messager.alert('系统提示信息', '访问服务失败!', 'error');
- }
- });
- });
- //录入人信息
- function typein(id){
- var url = $.pathname() + '/ws/crud/CRUDService/getDataById/';
- var params1 = {
- classid : '880',
- objectID : id
- };
- $.ajax({
- url : url,
- type : 'post',
- timeout : 60000,
- data : params1,
- async:false, //异步
- dataType : 'json',
- success : function(data){
- $("#REAL_NAME_880").html(data.REAL_NAME_880); //录入人
- $("#MOBILE_880").html(data.MOBILE_880); //手机
- $("#ORG_ID_880").html(data.ORG_ID_880_SHOW);//所属部门
- getDeptName(data.DEPT_ID_880);
- },
- error : function(e){
- $.messager.alert('系统提示信息', '访问服务失败!', 'error');
- }
- });
- }
- function getDeptName(id){
-
- $.ajax({
- url : $.pathname()+ "/ws/DrillCount/DrillCountService/getDeptNameInfo",
- type : 'post',
- timeout : 60000,
- data : {id:id},
- dataType : 'text',
- success : function(data){
-
- $("#COMPANY_ID_880").html(data);
-
- }
- });
- }
- //新增表单验证
- function editValidate() {
- var valid = $("#fillForm").validationEngine({
- returnIsValid : true,
- });
- if (valid == true) {
- editfn();
- } else {
- top.Dialog.alert('表单填写不正确,请按要求填写!');
- }
- };
- //新增机构信息--发送请求后台交互
- function editfn(){
- var orgNameInform = $("#ORG_DEPT_NAME_212").val();
- //记录新增的机构类别
- var addorgType = $("#ORG_DEPT_TYPE_212").attr("relValue");
- //$("#fillForm input[name='PARENT_ID_212']").val(parentClickOrg.id);
- $form = $("#fillForm");
- $("#classid").val("212");
- var formValue = $form.serialize();
- var url = $.pathname() + "/ws/crud/CRUDService/update/";
- $.ajax({
- url : url,
- type : "post",
- timeout : 60000,
- data : formValue,
- async:false,
- dataType : "json",
- success : function(data) {
- if(data.Msg.info =="修改成功"){
-
- var newNode={id:data.Msg.objectID, parentId: parentClickOrg.id, name: orgNameInform,
- objectId:data.Msg.objectID,classId:"210",orgType:addorgType,
- icon:"/nwyj/scripts/qui/libs/icons/home.gif"};
- top.Dialog.alert("修改"+ orgNameInform +"外部机构成功");
-
- parent.updateOutOrg(newNode,parentClickOrg,tabId);
-
-
- }
- if(data.Msg.info =="修改失败"){
-
- top.Dialog.alert("修改机构失败,稍后再试");
- }
- },
- error : function() {
- top.Dialog.alert("修改机构失败,稍后再试...");
- }
- });
-
- };
- // 重置按钮
- function reset_input() {
-
- $("#ORG_DEPT_NAME_212").val(resetValue.ORG_DEPT_NAME_212);
- $("#ORG_DEPT_TYPE_212").resetValue();
- $("#LOCATION_212").val(resetValue.LOCATION_212);
- $("#CODE_212").val(resetValue.CODE_212);
- $("#SITE_212").val(resetValue.SITE_212);
- $("#EMERGENCY_MAN").val(resetValue.EMERGENCY_MAN_212);
- $("#EMERGENCY_PHONE").val(resetValue.EMERGENCY_PHONE_212);
- }
- </script>
- </head>
- <body>
- <div id="formContent" style="border: 1px solid #cdcaca;background:white;">
-
- <div style="height: 50px;border: 1px solid #cdcaca;border-right:1px;border-left:1px;border-top:1px;" align="center">
- <font style="font-weight: bold;font-size: 20px;line-height: 45px;color:#3e62a0;" id="titleShow"></font>
- </div>
-
- <form id="fillForm" action="javascript:editValidate()" method="post" failAlert="表单填写错误,请检查">
- <input type="hidden" id="fd_id212" name="FD_OBJECTID212"required="true" />
- <input type="hidden" name="classid" value="212" required="true" />
- <!-- <input type="hidden" name="PARENT_ID_212" required="true" /> -->
- <div style="margin:10px 20px 0px 0px;float:right;">
- <input type="submit" value="保存 " />
- <input type="button" id="OrgReset" value="重置 " />
- </div><br />
-
- <!-- /***********************************机构基本信息********************************************/ -->
- <fieldset style="border-color:#cdcaca;margin:0px 20px 10px 20px" >
- <legend class="legend">基本信息:</legend>
- <table class="table-style" align="center">
-
- <tr>
- <td align="right" width="120px"><span class="star">*</span><span class="td-font">机构名称:</span></td>
- <td width="280px"><input id="ORG_DEPT_NAME_212" name="ORG_DEPT_NAME_212" type="text" value="" maxlength="20" class="validate[required,length[1,20]]" /></td>
- <td align="right" width="120px"><span class="star">*</span><span class="td-font">机构类别:</span></td>
- <td width="280px"><select id="ORG_DEPT_TYPE_212" name="ORG_DEPT_TYPE_212" prompt="请选择" class="validate[required]" selWidth="206"/></td>
- </tr>
-
- <tr>
- <td align="right" ><span class="td-font">所在区域:</span></td>
- <td colspan="3"><input id="LOCATION_212" name="LOCATION_212" style="width: 86%; " maxlength="46" type="text" class=" validate[length[0,46]]" />
- </td>
- </tr>
-
- <tr>
- <td align="right"><span class="td-font">办公地点:</span></td>
- <td colspan="3"> <input id="WORK_ADDRESS_212" style="width: 86%; " maxlength="100"name="WORK_ADDRESS_212" type="text" maxlength="46" class=" validate[length[0,46]]" /></td>
- </tr>
- <tr>
- <td align="right" ><span class="star">*</span><span class="td-font">紧急联系人:</span></td>
- <td ><input id="EMERGENCY_MAN_212" maxlength="13"
- name="EMERGENCY_MAN_212" type="text" class=" validate[required,length[0,13]]"
- /></td>
- <td align="right" ><span class="star">*</span><span class="td-font">紧急联系电话:</span></td>
- <td ><input id="EMERGENCY_PHONE_212" name="EMERGENCY_PHONE_212" maxlength="20" class=" validate[required,length[0,20]]"
- type="text" /></td>
- </tr>
- <tr>
- <td align="right" align="right" ><span class="td-font">邮编:</span></td>
- <td ><input id="CODE_212" name="CODE_212" maxlength="10"
- type="text" class=" validate[custom[zipcode]]" /></td>
- <td align="right" align="right" ><span class="td-font">网址:</span></td>
- <td ><input id="SITE_212" name="SITE_212" maxlength="20"
- type="text" class="Validate[length[0,20]]" /></td>
- </tr>
- </table>
- </fieldset>
-
- <!-- /***************************************机构基本信息end************************************/ -->
-
-
- <!-- *****************************录入人信息部分************************************** -->
- <fieldset style="border-color:#cdcaca;margin:10px 20px 20px 20px" >
- <legend class="legend">填写人员信息:</legend>
- <table align="center" class="table-style2" id="fillForm">
- <tr>
- <td align="right" width="120px" class="td-style"><span class="td-font">单位:</span></td>
- <td width="280px" class="td-style"><div id="COMPANY_ID_880" name="COMPANY_ID_880" readOnly="true"/></td>
- <td align="right" width="120px" class="td-style"><span class="td-font">部门:</span></td>
- <td width="280px" class="td-style"><div id="ORG_ID_880" name="ORG_ID_880" readOnly="true"/></td>
- </tr>
- <tr>
- <td align="right" class="td-style"><span class="td-font">填写人员:</span></td>
- <td class="td-style"><div id="REAL_NAME_880" name="REAL_NAME_880" readOnly="true"/></td>
- <td align="right" class="td-style"><span class="td-font">填写人员联系方式:</span></td>
- <td class="td-style"><div id="MOBILE_880" name="MOBILE_880" readOnly="true"/></td>
- </tr>
- <tr>
- <td align="right" class="td-style"><span class="td-font">录入时间:</span></td>
- <td colspan="3" class="td-style"><div id="UPDATEDATE" name="UPDATEDATE" readOnly="true"/></td>
- </tr>
- </table>
- </fieldset>
- <!-- /***************************************录入人信息end***************************************/ -->
- </form>
- </div>
- </body>
- </html>
|