atsShiftInfoReplace.jsp 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. <%@page pageEncoding="UTF-8" import="com.hotent.platform.model.system.SysUser"%>
  2. <%@include file="/commons/include/html_doctype.html"%>
  3. <html>
  4. <head>
  5. <%@include file="/commons/include/form.jsp" %>
  6. <title>选择班次定义</title>
  7. <script type="text/javascript">
  8. /*KILLDIALOG*/
  9. var dialog = frameElement.dialog; //调用页面的dialog对象(ligerui对象)
  10. $(function(){
  11. //布局
  12. $("#listLayout").ligerLayout({
  13. topHeight :40,
  14. bottomHeight :40,
  15. height: '90%',
  16. allowBottomResize:false,
  17. minLeftWidth:200,
  18. allowLeftResize:false
  19. });
  20. });
  21. function selectData(){
  22. var params = dialog.get('params');
  23. var ids =[],
  24. names =[],
  25. codes = [],
  26. shiftTimes =[],
  27. chIds = $('#listFrame').contents().find(":input[name='data'][checked]");
  28. $.each(chIds,function(i,ch){
  29. var aryTmp=$(ch).val().split("#");
  30. ids.push(aryTmp[0]);
  31. names.push(aryTmp[1]);
  32. codes.push(aryTmp[2]);
  33. shiftTimes.push(aryTmp[3]);
  34. });
  35. var dateType = $(":input[name='dateType'][checked]").val(),
  36. shiftId = ids.join(","),
  37. title = names.join(","),holidayName ="";
  38. if(dateType == 1){
  39. if(shiftId== ""){
  40. alert("请选择班次!");
  41. return
  42. }
  43. }else if(dateType == 3){
  44. holidayName = $('#holidayName').val();
  45. }
  46. var obj={start:params.start,
  47. dateType:dateType,
  48. shiftId :shiftId,
  49. title:title,
  50. holidayName:holidayName
  51. };
  52. dialog.get('sucCall')(obj);
  53. dialog.close();
  54. }
  55. function clearData(){
  56. var obj={id:'',name:''};
  57. dialog.get('sucCall')(obj);
  58. dialog.close();
  59. }
  60. </script>
  61. <style type="text/css">
  62. div.bottom{text-align: center;padding-top: 10px;}
  63. html,body{width:100%;height:100%;margin: 0 0 0 0;padding: 0 0 0 0 ;overflow: hidden;}
  64. </style>
  65. </head>
  66. <body>
  67. <div position="top">
  68. 选择日期类型:
  69. <label><input type="radio" id="dateType1" name="dateType" value="1" checked="checked">工作日</label>
  70. <label><input type="radio" id="dateType2" name="dateType" value="2">休息日</label>
  71. <label><input type="radio" id="dateType3" name="dateType" value="3">法定假日</label>
  72. <select id="holidayName">
  73. <option value="">-请选择-</option>
  74. <c:forEach items="${holidayNameSet}" var="holidayName">
  75. <option value="${holidayName}">${holidayName}</option>
  76. </c:forEach>
  77. </select>
  78. </div>
  79. <div id="listLayout" style="height:100%;">
  80. <div position="center">
  81. <iframe id="listFrame" name="listFrame" height="95%" width="100%" frameborder="0"
  82. src="${ctx}/platform/ats/atsShiftInfo/selector.ht?isSingle=${isSingle}"
  83. ></iframe>
  84. </div>
  85. </div>
  86. <div position="bottom" class="bottom" style="margin-top:10px;">
  87. <a href="javascript:;" class="button" onclick="selectData()" style="margin-right:10px;" ><span class="icon ok"></span><span >选择</span></a>
  88. <a href="javascript:;" class="button" style="margin-left:10px;" onclick="dialog.close()"><span class="icon cancel"></span><span >取消</span></a>
  89. </div>
  90. </body>
  91. </html>