066892453513d0ba362299088dc28304159cbddc.svn-base 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311
  1. <%@page language="java" pageEncoding="UTF-8"%>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5. <title>修改外部机构</title>
  6. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  7. <!--框架必需start-->
  8. <%@include file="../.././../../include1.jsp"%>
  9. <!--引用资源文件,JS CSS-->
  10. <script type="text/javascript"
  11. src="<%=path%>/scripts/jquery/plugins/jquery.extension.util.js"></script>
  12. <script type="text/javascript"
  13. src="<%=path%>/scripts/freamwork/com/sinosoft/common/common.js"></script>
  14. <script type="text/javascript"
  15. src="<%=path%>/scripts/freamwork/com/sinosoft/common/utils/utils.js"></script>
  16. <script type="text/javascript"
  17. src="<%=path%>/scripts/freamwork/com/sinosoft/common/frameWork/frameWork.js"></script>
  18. <script type="text/javascript"
  19. src="<%=path%>/scripts/freamwork/com/sinosoft/common/utils/Request.js"></script>
  20. <script type="text/javascript"
  21. src="<%=path%>/scripts/freamwork/com/sinosoft/common/searchUtil.js"></script>
  22. <link
  23. href="<%=path%>/scripts/freamwork/com/sinosoft/common/searchUtil.css"
  24. rel="stylesheet" type="text/css" />
  25. <style type = "text/css">
  26. .legend{
  27. font-family:宋体;
  28. font-weight: bold;
  29. font-size:14px;
  30. color:#3e62a0;
  31. }
  32. .table-style{
  33. border-style:solid;
  34. border-width:1px;
  35. border-color:#cdcaca;
  36. margin:0px 20px 0px 20px;
  37. border-collapse:collapse;
  38. width: 895px;
  39. }
  40. .table-style2{
  41. border:1px solid #cdcaca;
  42. margin:0px 20px 0px 20px;
  43. border-collapse:collapse;
  44. width: 895px;
  45. }
  46. .td-font{
  47. font-family:宋体;
  48. font-size:14px;
  49. color:#161616;
  50. }
  51. .td-move{
  52. padding: 10px 5px 0px 0px;
  53. }
  54. .td-style{
  55. border:1px solid #cdcaca;
  56. border-collapse:collapse;
  57. padding-left: 10px
  58. }
  59. </style>
  60. <script type="text/javascript">
  61. //登陆人的机构id
  62. var loginOrgId = top.com.sinosoft.lz.system.user.LoginInfo.getDeptids();
  63. //当前点击的机构节点
  64. var parentClickOrg = parent.selectedTreeNode;
  65. //tab 标签id
  66. var tabId = parent.tabIndex;
  67. //定义重置记录值
  68. var resetValue = {};
  69. $(function(){
  70. //绑定重置按钮事件
  71. $("#OrgReset").bind("click",function(){
  72. reset_input();
  73. })
  74. //给下拉框赋值--常量表中的
  75. $("#ORG_DEPT_TYPE_212").initCanstSelect('BM_OUT_ORG_TYPE');
  76. var url = $.pathname() + '/ws/crud/CRUDService/getDataById/';
  77. fd_id = parentClickOrg.id;
  78. var params = {
  79. classid : '212',
  80. objectID : fd_id
  81. };
  82. $.ajax({
  83. url : url,
  84. type : 'post',
  85. timeout : 60000,
  86. data : params,
  87. dataType : 'json',
  88. success : function(data) {
  89. resetValue=data;
  90. $("#fillForm").ajaxWrite({
  91. data : data
  92. });
  93. $("#fillForm input[name='classid']").val("212");
  94. $("#fillForm input[name='fd_id212']").val(fd_id);
  95. //修改标题
  96. $("#titleShow").html("修改"+data.ORG_DEPT_NAME_212+"信息");
  97. $("#UPDATEDATE").html(data.UPDATEDATE_212);
  98. typein(data.ENTRY_MAN_ID_212);
  99. },
  100. error : function(e) {
  101. $.messager.alert('系统提示信息', '访问服务失败!', 'error');
  102. }
  103. });
  104. });
  105. //录入人信息
  106. function typein(id){
  107. var url = $.pathname() + '/ws/crud/CRUDService/getDataById/';
  108. var params1 = {
  109. classid : '880',
  110. objectID : id
  111. };
  112. $.ajax({
  113. url : url,
  114. type : 'post',
  115. timeout : 60000,
  116. data : params1,
  117. async:false, //异步
  118. dataType : 'json',
  119. success : function(data){
  120. $("#REAL_NAME_880").html(data.REAL_NAME_880); //录入人
  121. $("#MOBILE_880").html(data.MOBILE_880); //手机
  122. $("#ORG_ID_880").html(data.ORG_ID_880_SHOW);//所属部门
  123. getDeptName(data.DEPT_ID_880);
  124. },
  125. error : function(e){
  126. $.messager.alert('系统提示信息', '访问服务失败!', 'error');
  127. }
  128. });
  129. }
  130. function getDeptName(id){
  131. $.ajax({
  132. url : $.pathname()+ "/ws/DrillCount/DrillCountService/getDeptNameInfo",
  133. type : 'post',
  134. timeout : 60000,
  135. data : {id:id},
  136. dataType : 'text',
  137. success : function(data){
  138. $("#COMPANY_ID_880").html(data);
  139. }
  140. });
  141. }
  142. //新增表单验证
  143. function editValidate() {
  144. var valid = $("#fillForm").validationEngine({
  145. returnIsValid : true,
  146. });
  147. if (valid == true) {
  148. editfn();
  149. } else {
  150. top.Dialog.alert('表单填写不正确,请按要求填写!');
  151. }
  152. };
  153. //新增机构信息--发送请求后台交互
  154. function editfn(){
  155. var orgNameInform = $("#ORG_DEPT_NAME_212").val();
  156. //记录新增的机构类别
  157. var addorgType = $("#ORG_DEPT_TYPE_212").attr("relValue");
  158. //$("#fillForm input[name='PARENT_ID_212']").val(parentClickOrg.id);
  159. $form = $("#fillForm");
  160. $("#classid").val("212");
  161. var formValue = $form.serialize();
  162. var url = $.pathname() + "/ws/crud/CRUDService/update/";
  163. $.ajax({
  164. url : url,
  165. type : "post",
  166. timeout : 60000,
  167. data : formValue,
  168. async:false,
  169. dataType : "json",
  170. success : function(data) {
  171. if(data.Msg.info =="修改成功"){
  172. var newNode={id:data.Msg.objectID, parentId: parentClickOrg.id, name: orgNameInform,
  173. objectId:data.Msg.objectID,classId:"210",orgType:addorgType,
  174. icon:"/nwyj/scripts/qui/libs/icons/home.gif"};
  175. top.Dialog.alert("修改"+ orgNameInform +"外部机构成功");
  176. parent.updateOutOrg(newNode,parentClickOrg,tabId);
  177. }
  178. if(data.Msg.info =="修改失败"){
  179. top.Dialog.alert("修改机构失败,稍后再试");
  180. }
  181. },
  182. error : function() {
  183. top.Dialog.alert("修改机构失败,稍后再试...");
  184. }
  185. });
  186. };
  187. // 重置按钮
  188. function reset_input() {
  189. $("#ORG_DEPT_NAME_212").val(resetValue.ORG_DEPT_NAME_212);
  190. $("#ORG_DEPT_TYPE_212").resetValue();
  191. $("#LOCATION_212").val(resetValue.LOCATION_212);
  192. $("#CODE_212").val(resetValue.CODE_212);
  193. $("#SITE_212").val(resetValue.SITE_212);
  194. $("#EMERGENCY_MAN").val(resetValue.EMERGENCY_MAN_212);
  195. $("#EMERGENCY_PHONE").val(resetValue.EMERGENCY_PHONE_212);
  196. }
  197. </script>
  198. </head>
  199. <body>
  200. <div id="formContent" style="border: 1px solid #cdcaca;background:white;">
  201. <div style="height: 50px;border: 1px solid #cdcaca;border-right:1px;border-left:1px;border-top:1px;" align="center">
  202. <font style="font-weight: bold;font-size: 20px;line-height: 45px;color:#3e62a0;" id="titleShow"></font>
  203. </div>
  204. <form id="fillForm" action="javascript:editValidate()" method="post" failAlert="表单填写错误,请检查">
  205. <input type="hidden" id="fd_id212" name="FD_OBJECTID212"required="true" />
  206. <input type="hidden" name="classid" value="212" required="true" />
  207. <!-- <input type="hidden" name="PARENT_ID_212" required="true" /> -->
  208. <div style="margin:10px 20px 0px 0px;float:right;">
  209. <input type="submit" value="保存 " />&nbsp;&nbsp;
  210. <input type="button" id="OrgReset" value="重置 " />
  211. </div><br />
  212. <!-- /***********************************机构基本信息********************************************/ -->
  213. <fieldset style="border-color:#cdcaca;margin:0px 20px 10px 20px" >
  214. <legend class="legend">基本信息:</legend>
  215. <table class="table-style" align="center">
  216. <tr>
  217. <td align="right" width="120px"><span class="star">*</span><span class="td-font">机构名称:</span></td>
  218. <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>
  219. <td align="right" width="120px"><span class="star">*</span><span class="td-font">机构类别:</span></td>
  220. <td width="280px"><select id="ORG_DEPT_TYPE_212" name="ORG_DEPT_TYPE_212" prompt="请选择" class="validate[required]" selWidth="206"/></td>
  221. </tr>
  222. <tr>
  223. <td align="right" ><span class="td-font">所在区域:</span></td>
  224. <td colspan="3"><input id="LOCATION_212" name="LOCATION_212" style="width: 86%; " maxlength="46" type="text" class=" validate[length[0,46]]" />
  225. </td>
  226. </tr>
  227. <tr>
  228. <td align="right"><span class="td-font">办公地点:</span></td>
  229. <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>
  230. </tr>
  231. <tr>
  232. <td align="right" ><span class="star">*</span><span class="td-font">紧急联系人:</span></td>
  233. <td ><input id="EMERGENCY_MAN_212" maxlength="13"
  234. name="EMERGENCY_MAN_212" type="text" class=" validate[required,length[0,13]]"
  235. /></td>
  236. <td align="right" ><span class="star">*</span><span class="td-font">紧急联系电话:</span></td>
  237. <td ><input id="EMERGENCY_PHONE_212" name="EMERGENCY_PHONE_212" maxlength="20" class=" validate[required,length[0,20]]"
  238. type="text" /></td>
  239. </tr>
  240. <tr>
  241. <td align="right" align="right" ><span class="td-font">邮编:</span></td>
  242. <td ><input id="CODE_212" name="CODE_212" maxlength="10"
  243. type="text" class=" validate[custom[zipcode]]" /></td>
  244. <td align="right" align="right" ><span class="td-font">网址:</span></td>
  245. <td ><input id="SITE_212" name="SITE_212" maxlength="20"
  246. type="text" class="Validate[length[0,20]]" /></td>
  247. </tr>
  248. </table>
  249. </fieldset>
  250. <!-- /***************************************机构基本信息end************************************/ -->
  251. <!-- *****************************录入人信息部分************************************** -->
  252. <fieldset style="border-color:#cdcaca;margin:10px 20px 20px 20px" >
  253. <legend class="legend">填写人员信息:</legend>
  254. <table align="center" class="table-style2" id="fillForm">
  255. <tr>
  256. <td align="right" width="120px" class="td-style"><span class="td-font">单位:</span></td>
  257. <td width="280px" class="td-style"><div id="COMPANY_ID_880" name="COMPANY_ID_880" readOnly="true"/></td>
  258. <td align="right" width="120px" class="td-style"><span class="td-font">部门:</span></td>
  259. <td width="280px" class="td-style"><div id="ORG_ID_880" name="ORG_ID_880" readOnly="true"/></td>
  260. </tr>
  261. <tr>
  262. <td align="right" class="td-style"><span class="td-font">填写人员:</span></td>
  263. <td class="td-style"><div id="REAL_NAME_880" name="REAL_NAME_880" readOnly="true"/></td>
  264. <td align="right" class="td-style"><span class="td-font">填写人员联系方式:</span></td>
  265. <td class="td-style"><div id="MOBILE_880" name="MOBILE_880" readOnly="true"/></td>
  266. </tr>
  267. <tr>
  268. <td align="right" class="td-style"><span class="td-font">录入时间:</span></td>
  269. <td colspan="3" class="td-style"><div id="UPDATEDATE" name="UPDATEDATE" readOnly="true"/></td>
  270. </tr>
  271. </table>
  272. </fieldset>
  273. <!-- /***************************************录入人信息end***************************************/ -->
  274. </form>
  275. </div>
  276. </body>
  277. </html>