holiday-close.html 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  1. <!-- include 'header' -->
  2. <body>
  3. <div class="mainLayout">
  4. <div class="mainMenu">
  5. <div class="menuItem">
  6. <a href="#" class="mLogo">CLD</a>
  7. <ul>
  8. <!-- include 'menu' -->
  9. </ul>
  10. </div>
  11. </div>
  12. <div class="warpContent">
  13. <div class="subMenu fL">
  14. <div class="menuItem">
  15. <ul>
  16. <!-- include 'holiday_menu' -->
  17. </ul>
  18. </div>
  19. </div>
  20. <div class="adminContent autoHeight" style="height: 821px;">
  21. <legend><div class="fR"><a class="button" href="#addClose" data-toggle="modal">结算登记</a></div>请假结算</legend>
  22. <div class="demandCate">
  23. <ul class="cateList">
  24. <li><a href="/holidayclose" class="now">正式员工</a><a href="/holidayclose2">实习生</a></li>
  25. <li>
  26. <select id="year">
  27. {{option}}
  28. </select>
  29. <select id="month">
  30. <option value="1" <!-- if {{thismonth}} == 1 -->selected<!-- endif -->>1月</option>
  31. <option value="2" <!-- if {{thismonth}} == 2 -->selected<!-- endif -->>2月</option>
  32. <option value="3" <!-- if {{thismonth}} == 3 -->selected<!-- endif -->>3月</option>
  33. <option value="4" <!-- if {{thismonth}} == 4 -->selected<!-- endif -->>4月</option>
  34. <option value="5" <!-- if {{thismonth}} == 5 -->selected<!-- endif -->>5月</option>
  35. <option value="6" <!-- if {{thismonth}} == 6 -->selected<!-- endif -->>6月</option>
  36. <option value="7" <!-- if {{thismonth}} == 7 -->selected<!-- endif -->>7月</option>
  37. <option value="8" <!-- if {{thismonth}} == 8 -->selected<!-- endif -->>8月</option>
  38. <option value="9" <!-- if {{thismonth}} == 9 -->selected<!-- endif -->>9月</option>
  39. <option value="10" <!-- if {{thismonth}} == 10 -->selected<!-- endif -->>10月</option>
  40. <option value="11" <!-- if {{thismonth}} == 11 -->selected<!-- endif -->>11月</option>
  41. <option value="12" <!-- if {{thismonth}} == 12 -->selected<!-- endif -->>12月</option>
  42. </select>
  43. </li>
  44. </ul>
  45. </div>
  46. <div class="saeaList">
  47. <div class="entry">
  48. <table class="table table-bordered table-condensed table-hover">
  49. <tbody>
  50. <tr><th class="taC" width="50"></th><th class="taC">员工</th><th class="taC">事假</th><th class="taC">病假</th><th class="taC">旷工</th></tr>
  51. <!-- loop stafflist -->
  52. <!-- loop stafflist' value.cidstafflist -->
  53. <tr>
  54. <!-- if !empty({{stafflist' cidstafflist' value.first}}) -->
  55. <th rowspan="{{stafflist' value.count}}">{{stafflist' value.categoryname}}</th>
  56. <!-- endif -->
  57. <th>{{stafflist' cidstafflist' value.username}}</th>
  58. <td class="taC">{{stafflist' cidstafflist' value.1}}</td>
  59. <td class="taC">{{stafflist' cidstafflist' value.2}}</td>
  60. <td class="taC">{{stafflist' cidstafflist' value.3}}</td>
  61. </tr>
  62. <!-- endloop -->
  63. <!-- endloop -->
  64. </tbody>
  65. </table>
  66. </div>
  67. </div>
  68. </div>
  69. </div>
  70. </div>
  71. <!--弹出-->
  72. <div class="modal hide fade" id="addClose">
  73. <div class="modal-dialog ">
  74. <div class="modal-content">
  75. <div class="modal-header">
  76. <h3>结算登记</h3>
  77. </div>
  78. <form method="post" action="/addholiday2" onsubmit="return addholiday();">
  79. <div class="modal-body saeaList">
  80. <table class="table table-bordered table-condensed">
  81. <tbody>
  82. <tr>
  83. <th class="taC" width="100"><span class="colRed">*</span>员工</th>
  84. <td>
  85. <select disabled><option>正式员工</option></select>
  86. <select id="category">
  87. <!-- loop category -->
  88. <option value="{{category' value.cid}}">{{category' value.title}}</option>
  89. <!-- endloop -->
  90. </select>
  91. <select id="cidstaff" name="uid">
  92. <option value="0">选择员工</option>
  93. <!-- loop zongbu -->
  94. <option value="{{zongbu' value.sid}}">{{zongbu' value.username}}</option>
  95. <!-- endloop -->
  96. </select>
  97. </td>
  98. </tr>
  99. <tr>
  100. <th class="taC" width="100"><span class="colRed">*</span>登记类型</th>
  101. <td>
  102. <select id="selecttype" name="type">
  103. <option value="1">事假</option>
  104. <option value="2">病假</option>
  105. <option value="3">旷工</option>
  106. </select>
  107. </td>
  108. </tr>
  109. <tr>
  110. <th class="taC" width="100"><span class="colRed">*</span><span id="holidaytype">事假</span>日期</th><td>
  111. <input type="date" name="day" id="holidayday"></td>
  112. </tr>
  113. <tr>
  114. <th class="taC" width="100">备注</th><td><textarea class="span4" name="description" placeholder="选填"></textarea></td>
  115. </tr>
  116. </tbody>
  117. </table>
  118. </div>
  119. <div class="modal-footer">
  120. <a href="#" class="button btn-gray" data-dismiss="modal" aria-hidden="true">取消</a>
  121. <button type="submit" class="button">确定</button>
  122. </div>
  123. </form>
  124. </div>
  125. </div>
  126. </div>
  127. <!--弹出内容-->
  128. <script type="text/javascript">autoFlashHeight();</script>
  129. <script>
  130. $(function() {
  131. $('#year').change(function(){
  132. var html = '/year/'+$(this).val()+'/month/'+$('#month').val();
  133. window.location.href = '/holidayclose' + html;
  134. });
  135. $('#month').change(function(){
  136. var html = '/year/'+$('#year').val()+'/month/'+$(this).val();
  137. window.location.href = '/holidayclose' + html;
  138. });
  139. $('#category').change(function(){
  140. $.ajax({
  141. type: 'post',
  142. url: '/getstaffcategory',
  143. data: {cid:$(this).val()},
  144. dataType: 'json',
  145. success: function(result){
  146. if(result.code == 200){
  147. $('#cidstaff').html('');
  148. var html = '<option value="0">选择员工</option>';
  149. $.each(result.stafflist,function(k,v){
  150. html +='<option value="'+v.sid+'">'+v.username+'</option>';
  151. });
  152. $('#cidstaff').html(html);
  153. }
  154. }
  155. })
  156. });
  157. $('#selecttype').change(function(){
  158. $('#holidaytype').text($(this).find("option:selected").text());
  159. })
  160. });
  161. function addholiday(){
  162. if($('#cidstaff').val() == 0){
  163. alert('请选择员工');
  164. return false;
  165. }
  166. if($('#holidayday').val() == ''){
  167. alert('请选择日期');
  168. return false;
  169. }
  170. }
  171. </script>
  172. </body>
  173. </html>