supervisedelay.html 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281
  1. <!DOCTYPE HTML>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="renderer" content="webkit|ie-comp|ie-stand">
  6. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  7. <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
  8. <meta http-equiv="Cache-Control" content="no-siteapp" />
  9. <link rel="stylesheet" href="${ctx}/assets/lib/bootstrap-3.3.7/css/bootstrap.min.css">
  10. <link rel="stylesheet" href="${ctx}/assets/lib/bootstrap-upload/css/default.css">
  11. <link rel="stylesheet" href="${ctx}/assets/lib/bootstrap-upload/css/fileinput.css">
  12. <link rel="stylesheet" href="${ctx}/assets/lib/bootstrap-spinner/bootstrap-spinner.css">
  13. <link rel="stylesheet" href="${ctx}/assets/lib/font-awesome-4.7.0/css/font-awesome.css">
  14. <link rel="stylesheet" type="text/css" media="screen" href="${ctx}/assets/lib/zTree/v3/css/zTreeStyle/zTreeStyle.css" >
  15. <script type="text/javascript" src="${ctx}/assets/lib/jquery/1.9.1/jquery.min.js"></script>
  16. <script type="text/javascript" src="${ctx}/assets/lib/jquery.form/jquery.form.min.js"></script>
  17. <script type="text/javascript" src="${ctx}/assets/lib/layer/3.0.3/layer.js"></script>
  18. <script type="text/javascript" src="${ctx}/assets/lib/My97DatePicker/WdatePicker.js"></script>
  19. <script type="text/javascript" src="${ctx}/assets/lib/bootstrap-upload/js/fileinput.js"></script>
  20. <script type="text/javascript" src="${ctx}/assets/lib/bootstrap-upload/js/locales/zh.js"></script>
  21. <script type="text/javascript" src="${ctx}/assets/lib/bootstrap-3.3.7/js/bootstrap.min.js"></script>
  22. <script type="text/javascript" src="${ctx}/assets/lib/zTree/v3/js/jquery.ztree.all-3.5.min.js"></script>
  23. <script type="text/javascript" src="${ctx}/assets/lib/bootstrap-spinner/jquery.spinner.js"></script>
  24. <script type="text/javascript" src="${ctx}/assets/js/base.js"></script>
  25. <script src="${ctx}/assets/js/validate.js" ></script>
  26. <script type="text/javascript">
  27. function doSubmit(){
  28. if(doValidate(form1))
  29. {
  30. $('#form1').attr('action','${ctx}/myconsole/complaint/supervise/doDelay');
  31. $('#form1').ajaxSubmit(resultHandle);
  32. }
  33. }
  34. function resultHandle(data){
  35. var res=eval('(' + data + ')');
  36. if(res.flag){
  37. layer.alert(res.message, {skin: 'layui-layer-molv',closeBtn: 1},
  38. function(){
  39. if($("#SendInterfaceFlag").val()=="true")
  40. {
  41. $('#form1').attr('action','${ctx}/myconsole/complaint/interface/sendInterfaceData');
  42. $('#form1').ajaxSubmit();
  43. layer.closeAll('dialog');
  44. window.close();
  45. }
  46. else
  47. {
  48. layer.closeAll('dialog');
  49. //window.location.reload();
  50. //window.close();
  51. window.parent.location.reload();
  52. }
  53. });
  54. }else{
  55. if(res.flag == false)
  56. {
  57. layer.alert(res.message, {skin: 'layui-layer-molv',closeBtn: 0}, function(){
  58. layer.closeAll('dialog');
  59. window.close();
  60. });
  61. }
  62. }
  63. }
  64. function setCollapseIcon(collapseIcon)
  65. {
  66. var curCollapseIconClass=$("#"+collapseIcon).attr("class");
  67. if(curCollapseIconClass=="glyphicon glyphicon-menu-up")
  68. {
  69. $("#"+collapseIcon).attr("class","glyphicon glyphicon-menu-down");
  70. }
  71. else
  72. {
  73. $("#"+collapseIcon).attr("class","glyphicon glyphicon-menu-up");
  74. }
  75. }
  76. Date.prototype.format =function(format)
  77. {
  78.     var o = {
  79.         "M+" : this.getMonth()+1, //month
  80.         "d+" : this.getDate(), //day
  81.         "h+" : this.getHours(), //hour
  82.         "m+" : this.getMinutes(), //minute
  83.         "s+" : this.getSeconds(), //second
  84.         "q+" : Math.floor((this.getMonth()+3)/3), //quarter
  85.         "S" : this.getMilliseconds() //millisecond
  86.     }
  87.     if(/(y+)/.test(format)){ 
  88.         format=format.replace(RegExp.$1,(this.getFullYear()+"").substr(4- RegExp.$1.length));
  89.     }
  90.     for(var k in o){
  91.         if(new RegExp("("+ k +")").test(format)){
  92.             format = format.replace(RegExp.$1,RegExp.$1.length==1? o[k] :("00"+ o[k]).substr((""+o[k]).length));
  93.         }
  94.     }
  95.     return format;
  96. }
  97.  
  98. var addNDays=function(date,n){
  99.     var d = new Date(Date.parse(date.replace(/-/g,"/")));  
  100.     var time=d.getTime();
  101.     var newTime=time+n*24*60*60*1000;
  102.     return new Date(newTime);
  103. };
  104. //设置申请截止日期
  105. function setLimitEndDate()
  106. {
  107. var curDate=$("#ApplyDate").val();
  108. var limitDays=parseInt($("#ApplyDays").val());
  109. var limitDaysType=$("#ApplyDaysType").val();
  110. if(limitDaysType=="工作日")
  111. {
  112. var mydate = new Date(curDate);
  113. var week=parseInt(mydate.getDay());
  114. var iSat=0;
  115. if(week==6)
  116. {
  117. week=0;
  118. iSat=1;
  119. }
  120. var iCountDate=parseInt(limitDays+week);
  121. if(iCountDate>5&&iCountDate<=10)
  122. {
  123. limitDays=limitDays+2;
  124. }
  125. if(iCountDate>10&&iCountDate<=15)
  126. {
  127. limitDays=limitDays+4;
  128. }
  129. if(iCountDate>15&&iCountDate<=20)
  130. {
  131. limitDays=limitDays+6;
  132. }
  133. if(iCountDate>20&&iCountDate<=25)
  134. {
  135. limitDays=limitDays+8;
  136. }
  137. if(iCountDate>25&&iCountDate<=30)
  138. {
  139. limitDays=limitDays+10;
  140. }
  141. limitDays=limitDays+iSat;
  142. }
  143. var nds = addNDays(curDate,limitDays);
  144. var limitEndDate = nds.format('yyyy-MM-dd');
  145. if($("#ApplyDate").val()!='')
  146. {
  147. $("#ApplyEndDate").val(limitEndDate);
  148. }
  149. }
  150. $(function() {
  151. $('#LimitDaysSpinner').spinner('changed', function(e, newVal, oldVal) {
  152. setLimitEndDate();
  153. });
  154. });
  155. </script>
  156. <title>监管件延期申请</title>
  157. <meta name="keywords" content="">
  158. <meta name="description" content="">
  159. </head>
  160. <body >
  161. <form id="form1" method="post" class="form-horizontal" role="form">
  162. <div style="display: none">
  163. <input type="hidden" id="AppealID" name="AppealID" value="${AppealID!''}"/>
  164. <input type="hidden" id="TName" name="TName" value="${transact.TName!''}"/>
  165. <input type="hidden" id="SerialNumber" name="SerialNumber" value="${transact.SerialNumber!''}"/>
  166. <input type="hidden" id="AppealDate" name="AppealDate" value="${transact.AppealDate!''}"/>
  167. <input type="hidden" id="ResultID" name="ResultID" value="${resultID!''}"/>
  168. <input type="hidden" id="EndUserID" name="EndUserID" value=""/>
  169. <input type="hidden" id="EndUserName" name="EndUserName" value=""/>
  170. </div>
  171. <div class="container-fluid" style="margin-top:15px;">
  172. <div class="panel panel-primary">
  173. <div class="panel-heading">
  174. <div style="display:inline;" >案件延期申请&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>
  175. </div>
  176. <div id="collapsePerson" class="panel-collapse collapse in">
  177. <div class="panel-body" style="font-size:14px">
  178. <div class="row" style="padding:5px">
  179. <div class="col-xs-12 col-sm-1 col-md-1 col-lg-1" >
  180. <label class="control-label" for="ApplyInfo" style="line-height:60px;">情况说明</label></div>
  181. <div class="col-xs-12 col-sm-11 col-md-11 col-lg-11">
  182. <textarea class="form-control" rows="3" value="" placeholder="" id="ApplyInfo" name="ApplyInfo" maxlength="1000" vmode="not null" vdisp="退回原因" vtype="string" ></textarea>
  183. </div>
  184. </div>
  185. <div class="row" style="padding:5px" >
  186. <div class="col-xs-2 col-sm-1 col-md-1 col-lg-1 has-error has-feedback" >
  187. <label class="control-label" for="LimitEndDate">截止日期</label></div>
  188. <div class="col-xs-3 col-sm-3 col-md-3 col-lg-3 has-error has-feedback" >
  189. <input type="text" class="form-control" value="${limitendDate}" placeholder="" id="LimitEndDate" name="LimitEndDate" maxlength="40" vmode="not null" vdisp="办理人" readonly>
  190. </div>
  191. <div class="col-xs-2 col-sm-1 col-md-1 col-lg-1 has-error has-feedback" >
  192. <label class="control-label" for="ApplyDate">申请日期</label></div>
  193. <div class="col-xs-3 col-sm-3 col-md-3 col-lg-3 has-error has-feedback" >
  194. <input type="text" class="form-control" value="${ApplyDate}" placeholder="" id="ApplyDate" name="ApplyDate" maxlength="40" vmode="not null" vdisp="申请日期" readonly>
  195. </div>
  196. </div>
  197. <div class="row" style="padding:5px" >
  198. <div class="col-xs-2 col-sm-1 col-md-1 col-lg-1 has-error has-feedback" >
  199. <label class="control-label" for="LimitDays">延长天数</label>
  200. </div>
  201. <div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">
  202. <div class="input-group spinner" data-trigger="spinner" id="LimitDaysSpinner">
  203. <input type="text" class="form-control text-center" value="0" data-max="10" data-min="0" data-step="1" id="ApplyDays" name="ApplyDays" onChange="setLimitEndDate()" maxlength="2" vmode="not null" vdisp="延长天数" vtype="int">
  204. <span class="input-group-addon" id="basic-addon2">${dateType!}</span>
  205. <div class="input-group-addon">
  206. <a href="javascript:;" class="spin-up" data-spin="up" ><i class="fa fa-caret-up"></i></a>
  207. <a href="javascript:;" class="spin-down" data-spin="down"><i class="fa fa-caret-down"></i></a>
  208. </div>
  209. </div>
  210. </div>
  211. <div class="col-xs-2 col-sm-1 col-md-1 col-lg-1" >
  212. <label class="control-label" for="ApplyEndDate">申请截止日期</label>
  213. </div>
  214. <div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">
  215. <input type="text" class="form-control" value="${ApplyDate}" placeholder="" id="ApplyEndDate" name="ApplyEndDate" readonly>
  216. </div>
  217. </div>
  218. </div>
  219. </div>
  220. </div>
  221. <div class="row" style="padding:5px">
  222. <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12" align=center>
  223. <button type="button" class="btn btn-primary" id="SubmitButton" onclick=doSubmit() ><span class="glyphicon glyphicon-save"></span>&nbsp;&nbsp;提&nbsp;&nbsp;&nbsp;&nbsp;交</button>
  224. </div>
  225. </div>
  226. </div>
  227. </form>
  228.  
  229. </body>
  230. <script type="text/javascript">
  231. $(document).on('ready', function() {
  232. $('#file-0a').fileinput({
  233. language: 'zh',
  234. uploadUrl: '${ctx}/myconsole/complaint/uploadfile/upload?FileAppealID=${AppealID}&FileType=back',
  235. deleteUrl: '${ctx}/myconsole/complaint/uploadfile/delete',
  236. dropZoneEnabled: false,
  237. allowedFileExtensions : ['jpg', 'png','gif','doc','docx','pdf','mp3','mp4'],
  238. }).on("fileuploaded", function(event,data,previewId,index) {
  239. if(data.response)
  240. {
  241. var result = data.response.id; 
  242. }
  243. });
  244. });
  245. </script>
  246. </html>