123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322 |
- <%--
- time:2019-08-21 17:05:24
- desc:edit the SYS_COMPARISONY
- --%>
- <%@page language="java" pageEncoding="UTF-8"%>
- <%@include file="/commons/include/html_doctype.html"%>
- <html>
- <head>
- <title>编辑档案</title>
- <%@include file="/commons/include/form.jsp" %>
- <script type="text/javascript" src="${ctx}/js/hotent/CustomValid.js"></script>
- <script type="text/javascript" src="${ctx}/js/hotent/platform/form/AttachMent.js"></script>
- <script type="text/javascript" src="${ctx}/js/hotent/platform/system/HtmlUploadDialog.js"></script>
- <script type="text/javascript" src="${ctx}/js/hotent/platform/system/FlexUploadDialog.js"></script>
- <f:link href="form.css" ></f:link>
- <style>
- .tab_page img{
- width:100%;
- height:100%;
- }
- .sp_border{
- width:208px;
- height: 93px;
- /*border: 3px solid #b31a0d;*/
- float:right;
- position: absolute;
- position: absolute;
- top: 75%;
- margin-top: -47px;
- left: 50%;
- margin-left: -102px;
- cursor:pointer;
- -webkit-user-select:none;
- -moz-user-select:none;
- -ms-user-select:none;
- user-select:none;
- z-index:9;
- }
- .sp_border img{
- -moz-user-select: none;
- -webkit-user-select: none;
- -ms-user-select: none;
- -khtml-user-select: none;
- user-select: none;
- width:auto;
- height:auto;
- }
- .sp_border span{
- float:left;
- display: block;
- height:20px;
- line-height: 20px;
- }
- .sp_border span input{
- border: 0px;
- width: 100%;
- height: 14px;
- line-height: 18px;
- font-family: "楷体";
- font-size: 13px;
- font-weight: bold;
- color: #043487;
- text-align:center;
- background:none;
- }
- .tab_page{
- position:relative;
- width:21cm;
- min-height:29.7cm;
- /*padding:2cm; */
- margin:1cm auto;
- border:1px#D3D3D3 solid;
- }
- </style>
- <script type="text/javascript">
- $(function() {
- $("a.save").click(function() {
- if(!validateImg()) return;
- $("#syscomparisonyForm").attr("action","save.ht");
- $("#saveData").val(1);
- submitForm();
- });
- $("#btnSelectImg").click(function(){
- HtmlUploadDialog({max:1,callback:function(data){
- if(data.length==1){
- var fileId=data[0].fileId;
- var url=__ctx +"/platform/system/sysFile/file_"+fileId+".ht"
- $("#kz1").val(fileId);
- $("#columnImg").attr("src",url)
- }
- }});
- });
- });
- function csfz(){
- var fullname=document.getElementById("fullname").value;
- $("#rm").attr("value",fullname);//推荐这种写法,可正常赋值
- var num=document.getElementById("num").value;
- $("#ye").attr("value",num);
- var ctime=document.getElementById("ctime").value;
- ctime = ctime.replace(/-/g, '/'); //格式化日期
- // 创建日期对象
- var date = new Date(ctime);
- var yyyy=date.getFullYear(); //获取完整的年份(4位,1970-????)
- var mm=date.getMonth()+1; //获取当前月份(0-11,0代表1月)
- var dd=date.getDate(); //获取当前日(1-31)
- if(isNaN(yyyy)){
- $("#yyyy").attr("value","");
- $("#mm").attr("value","");
- $("#dd").attr("value","");
- }else if(!isNaN(yyyy)){
- $("#yyyy").attr("value",yyyy);
- $("#mm").attr("value",mm);
- $("#dd").attr("value",dd);
- }
- }
- function fzrm(){
- var fullname=document.getElementById("fullname").value;
- $("#rm").attr("value",fullname);
- }
- function fuzhi(){
- var num=document.getElementById("num").value;
- $("#ye").attr("value",num);
- }
- function fzsj(){
- var ctime=document.getElementById("ctime").value;
- ctime = ctime.replace(/-/g, '/'); //格式化日期
- // 创建日期对象
- var date = new Date(ctime);
- var yyyy=date.getFullYear(); //获取完整的年份(4位,1970-????)
- var mm=date.getMonth()+1; //获取当前月份(0-11,0代表1月)
- var dd=date.getDate(); //获取当前日(1-31)
- if(isNaN(yyyy)){
- $("#yyyy").attr("value","");
- $("#mm").attr("value","");
- $("#dd").attr("value","");
- }else if(!isNaN(yyyy)){
- $("#yyyy").attr("value",yyyy);
- $("#mm").attr("value",mm);
- $("#dd").attr("value",dd);
- }
- }
- //提交表单
- function submitForm(){
- var options={};
- var fullname=document.getElementById("fullname").value;
- var kz2=document.getElementById("kz2").value;
- var kz3=document.getElementById("kz3").value;
- var card=document.getElementById("card").value;
- var unit=document.getElementById("unit").value;
- if(fullname==null){
- alert("姓名不能为空,请重新填写!");
- return false;
- }
- if(card==null){
- alert("身份证号不能为空,请重新填写!");
- return false;
- }
- if(unit==null){
- alert("单位不能为空,请重新填写!");
- return false;
- }
- if(kz2==null){
- alert("档案号不能为空,请重新填写!");
- return false;
- }
- if(kz3==null){
- alert("业务类别不能为空,请重新填写!");
- return false;
- }
- //if(card.length!=18){
- // alert("身份证号不满足18位,请重新填写!");
- // return false;
- //}
- if(showResponse){
- options.success=showResponse;
- }
- var frm=$('#syscomparisonyForm').form();
- frm.ajaxForm(options);
- if(frm.valid()){
- frm.submit();
- }
- }
- function showResponse(responseText) {
- var obj = new com.hotent.form.ResultMessage(responseText);
- if(!obj.isSuccess()){
- $.ligerDialog.err("提示信息"," SYS_COMPARISON保存失败!",obj.getMessage());
- return;
- }
- $.ligerDialog.confirm(obj.getMessage()+",是否继续操作","提示信息", function(rtn) {
- if(rtn){
- window.location.href = window.location.href;
- }else{
- window.location.href = "${ctx}/platform/system/syscomparisony/list.ht";
- }
- });
- }
- function validateImg(){
- var yes=true;
- var imgurl=$("#kz1").val();
- /* if(imgurl.length==0){
- $.ligerDialog.warn("请上传会议室图片!","消息提示");
- yes=false;
- } */
- return yes;
- };
- function isUrgentClick(str){
- $("#kz4").val(str);
- }
- </script>
- </head>
- <body>
- <div class="panel">
- <div class="panel-top">
- <div class="tbar-title">
- <c:choose>
- <c:when test="${syscomparisony.id !=null}">
- <span class="tbar-label"><span></span>编辑SYS_COMPARISONY</span>
- </c:when>
- <c:otherwise>
- <span class="tbar-label"><span></span>添加SYS_COMPARISONY</span>
- </c:otherwise>
- </c:choose>
- </div>
- <div class="panel-toolbar">
- <div class="toolBar">
- <div class="group"><a class="link save" id="dataFormSave" href="#"><span></span>保存</a></div>
- <div class="l-bar-separator"></div>
- <div class="group"><a class="link back" href="list.ht"><span></span>返回</a></div>
- </div>
- </div>
- </div>
- <div class="panel-body">
- <form id="syscomparisonyForm" method="post" action="save.ht">
- <table class="table-detail" cellpadding="0" cellspacing="0" border="0" type="main">
- <tr>
- <th width="20%">档案号: </th>
- <td><input type="text" id="kz2" name="kz2" style="width:180px;" value="${syscomparisony.kz2}" class="inputText" validate="{required:false,maxlength:20}" /></td>
- </tr>
- <tr>
- <th width="20%">业务类别: </th>
- <td><input type="text" id="kz3" name="kz3" style="width:180px;" value="${syscomparisony.kz3}" class="inputText" validate="{required:false,maxlength:20}" /></td>
- </tr>
- <tr>
- <th width="20%">人员姓名: </th>
- <td><input type="text" id="fullname" style="width:180px;" name="fullname" value="${syscomparisony.fullname}" onblur="fzrm()" class="inputText" validate="{required:false,maxlength:20}" /></td>
- </tr>
- <tr>
- <th width="20%">身份证号: </th>
- <td><input type="text" id="card" style="width:180px;" name="card" value="${syscomparisony.card}" class="inputText" validate="{required:false,maxlength:50}" /></td>
- </tr>
- <tr>
- <th width="20%">单位: </th>
- <td><input type="text" id="unit" style="width:180px;" name="unit" value="${syscomparisony.unit}" class="inputText" validate="{required:false,maxlength:300}" /></td>
- </tr>
- <tr>
- <th width="20%">当前时间: </th>
- <td><input type="text" id="ctime" style="width:180px;" name="ctime" value="<fmt:formatDate value='${syscomparisony.ctime}' pattern='yyyy-MM-dd'/>" class="inputText date" validate="{date:true}" /></td>
- </tr>
- <tr>
- <th width="20%">页数: </th>
- <td><input type="text" id="num" style="width:180px;" name="num" value="${syscomparisony.num}" onblur="fuzhi()" class="inputText" validate="{required:false,maxlength:10}" /></td>
- </tr>
- <tr>
- <th width="20%">附件上传: </th>
- <td>
- <div name="div_attachment_container">
- <div class="attachement"></div>
- <textarea style="display: none" controltype="attachment"
- name="attachment" lablename="附件" validate="{}">${syscomparisony.attachment}</textarea>
- <a href="javascript:;" field="attachment" class="link selectFile"
- atype="select" onclick="AttachMent.addFile(this);">选择</a>
- </div>
- </td>
- <tr>
- <tr>
- <th width="20%">办理状态: </th>
- <td><input type="hidden" id="kz4" name="kz4" class="inputText" />
- <input type="radio" id="isUrgentYes" name="isUrgent" value="1" title="未办理" checked="checked" onclick="isUrgentClick(1)">未办理
- <input type="radio" id="isUrgentNo" name="isUrgent" value="2" title="已办理" onclick="isUrgentClick(2)">已办理
- </td>
- </tr>
- <tr>
- <th width="20%">备注: </th>
- <td><input type="text" id="kz5" name="kz5" style="width:500px;" value="${syscomparisony.kz5}" class="inputText" validate="{required:false,maxlength:200}" /></td>
- </tr>
- <td id="td_gz" colspan="2">
- <input type="hidden" id="kz1" name="kz1" value="${syscomparisony.kz1}">
- <div class="tab_page">
- <c:choose>
- <c:when test="${empty syscomparisony.kz1}">
- <img id="columnImg" alt="" src="" draggable="false">
- </c:when>
- <c:otherwise>
- <img id="columnImg" alt="" draggable="false" src="${ctx }/platform/system/sysFile/file_${syscomparisony.kz1}.ht">
- </c:otherwise>
- </c:choose>
- <input id="btnSelectImg" type="button" value="选择">
- <div class="sp_border" id="sp_border" onmousedown="small_down(event)">
- <span><img src="../../../commons/image/rsjdaqz.png" draggable="false"/></span>
- </div>
- </div>
- </td>
- </tr>
- </table>
- <input type="hidden" name="id" value="${syscomparisony.id}" />
- <input type="hidden" name="saveData" id="saveData" />
- <input type="hidden" name="executeType" value="start" />
- </form>
- </div>
- </div>
- </body>
- </html>
|