holiday-close2.html 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. <!-- include 'header' -->
  2. <body xmlns="http://www.w3.org/1999/html">
  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">正式员工</a><a href="/holidayclose2" class="now">实习生</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><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.14}}</td>
  59. <td class="taC">{{stafflist' cidstafflist' value.1}}</td>
  60. <td class="taC">{{stafflist' cidstafflist' value.2}}</td>
  61. <td class="taC">{{stafflist' cidstafflist' value.3}}</td>
  62. </tr>
  63. <!-- endloop -->
  64. <!-- endloop -->
  65. </tbody>
  66. </table>
  67. </div>
  68. </div>
  69. </div>
  70. </div>
  71. </div>
  72. <!--弹出-->
  73. <div class="modal hide fade" id="addClose">
  74. <div class="modal-dialog ">
  75. <div class="modal-content">
  76. <div class="modal-header">
  77. <h3>结算登记</h3>
  78. </div>
  79. <form method="post" action="/addholiday2" onsubmit="return addholiday();">
  80. <div class="modal-body saeaList">
  81. <table class="table table-bordered table-condensed">
  82. <tbody>
  83. <tr>
  84. <th class="taC" width="100"><span class="colRed">*</span>员工</th>
  85. <td>
  86. <select disabled><option>实习生</option></select>
  87. <select id="cidstaff" name="uid">
  88. <option value="0">选择员工</option>
  89. <!-- loop internstafflist -->
  90. <option value="{{internstafflist' value.sid}}">{{internstafflist' value.username}}</option>
  91. <!-- endloop -->
  92. </select>
  93. </td>
  94. </tr>
  95. <tr>
  96. <th class="taC" width="100"><span class="colRed">*</span>登记类型</th>
  97. <td>
  98. <select id="selecttype" name="type">
  99. <option value="14">上班</option>
  100. <option value="1">事假</option>
  101. <option value="2">病假</option>
  102. <option value="3">旷工</option>
  103. </select>
  104. </td>
  105. </tr>
  106. <tr id="tr_all" class="changetr" style="display: none">
  107. <th class="taC" width="100"><span class="colRed">*</span><span id="holidaytype">事假</span>天数</th><td>
  108. <input type="date" name="day" id="holidayday" disabled="true"></td>
  109. </tr>
  110. <tr id="tr_14" class="changetr">
  111. <th class="taC" width="100"><span class="colRed">*</span>上班天数</th>
  112. <td>
  113. <select id="selectmonth" name="monthselect">
  114. {{monthlist}}
  115. </select>
  116. <input placeholder="请输入上班天数" id="daynum" name="daynum" type="number" step="0.5">
  117. </td>
  118. </tr>
  119. <tr>
  120. <th class="taC" width="100">备注</th><td><textarea class="span4" name="description" placeholder="选填"></textarea></td>
  121. </tr>
  122. </tbody>
  123. </table>
  124. </div>
  125. <div class="modal-footer">
  126. <a href="#" class="button btn-gray" data-dismiss="modal" aria-hidden="true">取消</a>
  127. <button type="submit" class="button" name="close2">确定</button>
  128. </div>
  129. </form>
  130. </div>
  131. </div>
  132. </div>
  133. <!--弹出内容-->
  134. <script type="text/javascript">autoFlashHeight();</script>
  135. <script>
  136. $(function() {
  137. $('#year').change(function(){
  138. var html = '/year/'+$(this).val()+'/month/'+$('#month').val();
  139. window.location.href = '/holidayclose2' + html;
  140. });
  141. $('#month').change(function(){
  142. var html = '/year/'+$('#year').val()+'/month/'+$(this).val();
  143. window.location.href = '/holidayclose2' + html;
  144. });
  145. $('#selecttype').change(function(){
  146. $('.changetr').hide();
  147. $('.changetr input').attr('disabled',true);
  148. if($(this).val() != 14){
  149. $('#tr_all').show();
  150. $('#tr_all input').removeAttr('disabled');
  151. $('#holidaytype').text($(this).find("option:selected").text());
  152. }else{
  153. $('#tr_14').show();
  154. $('#tr_14 input').removeAttr('disabled');
  155. }
  156. })
  157. });
  158. function addholiday(){
  159. if($('#cidstaff').val() == 0){
  160. alert('请选择员工');
  161. return false;
  162. }
  163. if($('#selecttype').val() != 14){
  164. if($('#holidayday').val() == ''){
  165. alert('请选择日期');
  166. return false;
  167. }
  168. }else {
  169. if ($('#selectmonth').val() == 0) {
  170. alert('请选择月份');
  171. return false;
  172. }
  173. if ($('#daynum').val() == '') {
  174. alert('请输入上班天数');
  175. return false;
  176. }
  177. }
  178. }
  179. </script>
  180. </body>