holiday-close.html 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  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. <!-- loop zongbu -->
  93. <option value="{{zongbu' value.sid}}">{{zongbu' value.username}}</option>
  94. <!-- endloop -->
  95. </select>
  96. </td>
  97. </tr>
  98. <tr>
  99. <th class="taC" width="100"><span class="colRed">*</span>登记类型</th>
  100. <td>
  101. <select id="selecttype" name="type">
  102. <option value="1">事假</option>
  103. <option value="2">病假</option>
  104. <option value="3">旷工</option>
  105. </select>
  106. </td>
  107. </tr>
  108. <tr>
  109. <th class="taC" width="100"><span class="colRed">*</span><span id="holidaytype">事假</span>日期</th><td>
  110. <input type="date" name="day" id="holidayday"></td>
  111. </tr>
  112. <tr>
  113. <th class="taC" width="100">备注</th><td><textarea class="span4" name="description" placeholder="选填"></textarea></td>
  114. </tr>
  115. </tbody>
  116. </table>
  117. </div>
  118. <div class="modal-footer">
  119. <a href="#" class="button btn-gray" data-dismiss="modal" aria-hidden="true">取消</a>
  120. <button type="submit" class="button">确定</button>
  121. </div>
  122. </form>
  123. </div>
  124. </div>
  125. </div>
  126. <!--弹出内容-->
  127. <script type="text/javascript">autoFlashHeight();</script>
  128. <script>
  129. $(function() {
  130. $('#year').change(function(){
  131. var html = '/year/'+$(this).val()+'/month/'+$('#month').val();
  132. window.location.href = '/holidayclose' + html;
  133. });
  134. $('#month').change(function(){
  135. var html = '/year/'+$('#year').val()+'/month/'+$(this).val();
  136. window.location.href = '/holidayclose' + html;
  137. });
  138. $('#category').change(function(){
  139. $.ajax({
  140. type: 'post',
  141. url: '/getstaffcategory',
  142. data: {cid:$(this).val()},
  143. dataType: 'json',
  144. success: function(result){
  145. if(result.code == 200){
  146. $('#cidstaff').html('');
  147. var html = '';
  148. $.each(result.stafflist,function(k,v){
  149. html +='<option value="'+v.sid+'">'+v.username+'</option>';
  150. });
  151. $('#cidstaff').html(html);
  152. }
  153. }
  154. })
  155. });
  156. $('#selecttype').change(function(){
  157. $('#holidaytype').text($(this).find("option:selected").text());
  158. })
  159. });
  160. function addholiday(){
  161. if($('#holidayday').val() == ''){
  162. alert('请选择日期');
  163. return false;
  164. }
  165. }
  166. </script>
  167. </body>
  168. </html>