syscomparisonyylEdit.jsp 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321
  1. <%--
  2. time:2022-05-18 09:25:50
  3. desc:edit the SYS_COMPARISONYYL
  4. --%>
  5. <%@page language="java" pageEncoding="UTF-8"%>
  6. <%@include file="/commons/include/html_doctype.html"%>
  7. <html>
  8. <head>
  9. <title>编辑退休档案</title>
  10. <%@include file="/commons/include/form.jsp" %>
  11. <script type="text/javascript" src="${ctx}/js/hotent/CustomValid.js"></script>
  12. <script type="text/javascript" src="${ctx}/js/hotent/platform/form/AttachMent.js"></script>
  13. <script type="text/javascript" src="${ctx}/js/hotent/platform/system/HtmlUploadDialog.js"></script>
  14. <script type="text/javascript" src="${ctx}/js/hotent/platform/system/FlexUploadDialog.js"></script>
  15. <f:link href="form.css" ></f:link>
  16. <style>
  17. .tab_page img{
  18. width:100%;
  19. height:100%;
  20. }
  21. .sp_border{
  22. width:208px;
  23. height: 93px;
  24. /*border: 3px solid #b31a0d;*/
  25. float:right;
  26. position: absolute;
  27. position: absolute;
  28. top: 75%;
  29. margin-top: -47px;
  30. left: 50%;
  31. margin-left: -102px;
  32. cursor:pointer;
  33. -webkit-user-select:none;
  34. -moz-user-select:none;
  35. -ms-user-select:none;
  36. user-select:none;
  37. z-index:9;
  38. }
  39. .sp_border img{
  40. -moz-user-select: none;
  41. -webkit-user-select: none;
  42. -ms-user-select: none;
  43. -khtml-user-select: none;
  44. user-select: none;
  45. width:auto;
  46. height:auto;
  47. }
  48. .sp_border span{
  49. float:left;
  50. display: block;
  51. height:20px;
  52. line-height: 20px;
  53. }
  54. .sp_border span input{
  55. border: 0px;
  56. width: 100%;
  57. height: 14px;
  58. line-height: 18px;
  59. font-family: "楷体";
  60. font-size: 13px;
  61. font-weight: bold;
  62. color: #043487;
  63. text-align:center;
  64. background:none;
  65. }
  66. .tab_page{
  67. position:relative;
  68. width:21cm;
  69. min-height:29.7cm;
  70. /*padding:2cm; */
  71. margin:1cm auto;
  72. border:1px#D3D3D3 solid;
  73. }
  74. </style>
  75. <script type="text/javascript">
  76. $(function() {
  77. $("a.save").click(function() {
  78. $("#syscomparisonyylForm").attr("action","save.ht");
  79. $("#saveData").val(1);
  80. submitForm();
  81. });
  82. $("#btnSelectImg").click(function(){
  83. HtmlUploadDialog({max:1,callback:function(data){
  84. if(data.length==1){
  85. var fileId=data[0].fileId;
  86. var url=__ctx +"/platform/system/sysFile/file_"+fileId+".ht"
  87. $("#kz1").val(fileId);
  88. $("#columnImg").attr("src",url)
  89. }
  90. }});
  91. });
  92. });
  93. function csfz(){
  94. var fullname=document.getElementById("fullname").value;
  95. $("#rm").attr("value",fullname);//推荐这种写法,可正常赋值
  96. var num=document.getElementById("num").value;
  97. $("#ye").attr("value",num);
  98. var ctime=document.getElementById("ctime").value;
  99. ctime = ctime.replace(/-/g, '/'); //格式化日期
  100. // 创建日期对象
  101. var date = new Date(ctime);
  102. var yyyy=date.getFullYear(); //获取完整的年份(4位,1970-????)
  103. var mm=date.getMonth()+1; //获取当前月份(0-11,0代表1月)
  104. var dd=date.getDate(); //获取当前日(1-31)
  105. if(isNaN(yyyy)){
  106. $("#yyyy").attr("value","");
  107. $("#mm").attr("value","");
  108. $("#dd").attr("value","");
  109. }else if(!isNaN(yyyy)){
  110. $("#yyyy").attr("value",yyyy);
  111. $("#mm").attr("value",mm);
  112. $("#dd").attr("value",dd);
  113. }
  114. }
  115. function fzrm(){
  116. var fullname=document.getElementById("fullname").value;
  117. $("#rm").attr("value",fullname);
  118. }
  119. function fuzhi(){
  120. var num=document.getElementById("num").value;
  121. $("#ye").attr("value",num);
  122. }
  123. function fzsj(){
  124. var ctime=document.getElementById("ctime").value;
  125. ctime = ctime.replace(/-/g, '/'); //格式化日期
  126. // 创建日期对象
  127. var date = new Date(ctime);
  128. var yyyy=date.getFullYear(); //获取完整的年份(4位,1970-????)
  129. var mm=date.getMonth()+1; //获取当前月份(0-11,0代表1月)
  130. var dd=date.getDate(); //获取当前日(1-31)
  131. if(isNaN(yyyy)){
  132. $("#yyyy").attr("value","");
  133. $("#mm").attr("value","");
  134. $("#dd").attr("value","");
  135. }else if(!isNaN(yyyy)){
  136. $("#yyyy").attr("value",yyyy);
  137. $("#mm").attr("value",mm);
  138. $("#dd").attr("value",dd);
  139. }
  140. }
  141. //提交表单
  142. function submitForm(){
  143. var options={};
  144. var fullname=document.getElementById("fullname").value;
  145. var kz2=document.getElementById("kz2").value;
  146. var kz3=document.getElementById("kz3").value;
  147. var card=document.getElementById("card").value;
  148. var unit=document.getElementById("unit").value;
  149. if(fullname==null){
  150. alert("姓名不能为空,请重新填写!");
  151. return false;
  152. }
  153. if(card==null){
  154. alert("身份证号不能为空,请重新填写!");
  155. return false;
  156. }
  157. if(unit==null){
  158. alert("单位不能为空,请重新填写!");
  159. return false;
  160. }
  161. if(kz2==null){
  162. alert("档案号不能为空,请重新填写!");
  163. return false;
  164. }
  165. if(kz3==null){
  166. alert("业务类别不能为空,请重新填写!");
  167. return false;
  168. }
  169. if(showResponse){
  170. options.success=showResponse;
  171. }
  172. var frm=$('#syscomparisonyylForm').form();
  173. frm.ajaxForm(options);
  174. if(frm.valid()){
  175. frm.submit();
  176. }
  177. }
  178. function showResponse(responseText) {
  179. var obj = new com.hotent.form.ResultMessage(responseText);
  180. if(!obj.isSuccess()){
  181. $.ligerDialog.err("提示信息"," SYS_COMPARISONYYL保存失败!",obj.getMessage());
  182. return;
  183. }
  184. $.ligerDialog.confirm(obj.getMessage()+",是否继续操作","提示信息", function(rtn) {
  185. if(rtn){
  186. window.location.href = window.location.href;
  187. }else{
  188. window.location.href = "${ctx}/platform/system/syscomparisonyyl/list.ht";
  189. }
  190. });
  191. }
  192. function validateImg(){
  193. var yes=true;
  194. var imgurl=$("#kz1").val();
  195. /* if(imgurl.length==0){
  196. $.ligerDialog.warn("请上传会议室图片!","消息提示");
  197. yes=false;
  198. } */
  199. return yes;
  200. };
  201. function isUrgentClick(str){
  202. $("#kz4").val(str);
  203. }
  204. </script>
  205. </head>
  206. <body>
  207. <div class="panel">
  208. <div class="panel-top">
  209. <div class="tbar-title">
  210. <c:choose>
  211. <c:when test="${syscomparisonyyl.id !=null}">
  212. <span class="tbar-label"><span></span>编辑SYS_COMPARISONYYL</span>
  213. </c:when>
  214. <c:otherwise>
  215. <span class="tbar-label"><span></span>添加SYS_COMPARISONYYL</span>
  216. </c:otherwise>
  217. </c:choose>
  218. </div>
  219. <div class="panel-toolbar">
  220. <div class="toolBar">
  221. <div class="group"><a class="link save" id="dataFormSave" href="#"><span></span>保存</a></div>
  222. <div class="l-bar-separator"></div>
  223. <div class="group"><a class="link back" href="list.ht"><span></span>返回</a></div>
  224. </div>
  225. </div>
  226. </div>
  227. <div class="panel-body">
  228. <form id="syscomparisonyylForm" method="post" action="save.ht">
  229. <table class="table-detail" cellpadding="0" cellspacing="0" border="0" type="main">
  230. <tr>
  231. <th width="20%">档案号: </th>
  232. <td><input type="text" id="kz2" name="kz2" style="width:180px;" value="${syscomparisonyyl.kz2}" class="inputText" validate="{required:false,maxlength:20}" /></td>
  233. </tr>
  234. <tr>
  235. <th width="20%">业务类别: </th>
  236. <td><input type="text" id="kz3" name="kz3" style="width:180px;" value="${syscomparisonyyl.kz3}" class="inputText" validate="{required:false,maxlength:20}" /></td>
  237. </tr>
  238. <tr>
  239. <th width="20%">人员姓名: </th>
  240. <td><input type="text" id="fullname" style="width:180px;" name="fullname" value="${syscomparisonyyl.fullname}" class="inputText" validate="{required:false,maxlength:20}" /></td>
  241. </tr>
  242. <tr>
  243. <th width="20%">身份证号: </th>
  244. <td><input type="text" id="card" name="card" style="width:180px;" value="${syscomparisonyyl.card}" class="inputText" validate="{required:false,maxlength:50}" /></td>
  245. </tr>
  246. <tr>
  247. <th width="20%">单位: </th>
  248. <td><input type="text" id="unit" name="unit" style="width:180px;" value="${syscomparisonyyl.unit}" class="inputText" validate="{required:false,maxlength:300}" /></td>
  249. </tr>
  250. <tr>
  251. <th width="20%">当前时间: </th>
  252. <td><input type="text" id="ctime" name="ctime" style="width:180px;" value="<fmt:formatDate value='${syscomparisonyyl.ctime}' pattern='yyyy-MM-dd'/>" class="inputText date" validate="{date:true}" /></td>
  253. </tr>
  254. <tr>
  255. <th width="20%">页数: </th>
  256. <td><input type="text" id="num" name="num" style="width:180px;" value="${syscomparisonyyl.num}" class="inputText" validate="{required:false,maxlength:10}" /></td>
  257. </tr>
  258. <tr>
  259. <th width="20%">附件上传: </th>
  260. <td>
  261. <div name="div_attachment_container">
  262. <div class="attachement"></div>
  263. <textarea style="display: none" controltype="attachment"
  264. name="attachment" lablename="附件" validate="{}">${syscomparisonyyl.attachment}</textarea>
  265. <a href="javascript:;" field="attachment" class="link selectFile"
  266. atype="select" onclick="AttachMent.addFile(this);">选择</a>
  267. </div>
  268. </td>
  269. <tr>
  270. <%--<tr>
  271. <th width="20%">附件上传: </th>
  272. <td><input type="text" id="attachment" name="attachment" value="${syscomparisonyyl.attachment}" class="inputText" validate="{required:false}" /></td>
  273. </tr>--%>
  274. <tr>
  275. <th width="20%">办理状态: </th>
  276. <td><input type="hidden" id="kz4" name="kz4" class="inputText" />
  277. <input type="radio" id="isUrgentYes" name="isUrgent" value="1" title="未办理" checked="checked" onclick="isUrgentClick(1)">未办理
  278. <input type="radio" id="isUrgentNo" name="isUrgent" value="2" title="已办理" onclick="isUrgentClick(2)">已办理
  279. </td>
  280. </tr>
  281. <tr>
  282. <th width="20%">备注: </th>
  283. <td><input type="text" id="kz5" name="kz5" style="width:500px;" value="${syscomparisonyyl.kz5}" class="inputText" validate="{required:false,maxlength:20}" /></td>
  284. </tr>
  285. <td id="td_gz" colspan="2">
  286. <input type="hidden" id="kz1" name="kz1" value="${syscomparisonyyl.kz1}">
  287. <div class="tab_page">
  288. <c:choose>
  289. <c:when test="${empty syscomparisony.kz1}">
  290. <img id="columnImg" alt="" src="" draggable="false">
  291. </c:when>
  292. <c:otherwise>
  293. <img id="columnImg" alt="" draggable="false" src="${ctx }/platform/system/sysFile/file_${syscomparisonyyl.kz1}.ht">
  294. </c:otherwise>
  295. </c:choose>
  296. <input id="btnSelectImg" type="button" value="选择">
  297. <div class="sp_border" id="sp_border" onmousedown="small_down(event)">
  298. <span><img src="../../../commons/image/yanglaozhang.png" draggable="false"/></span>
  299. </div>
  300. </div>
  301. </td>
  302. </tr>
  303. </table>
  304. <input type="hidden" name="id" value="${syscomparisonyyl.id}" />
  305. <input type="hidden" name="saveData" id="saveData" />
  306. <input type="hidden" name="executeType" value="start" />
  307. </form>
  308. </div>
  309. </div>
  310. </body>
  311. </html>