holiday-close2.html 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  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_day" class="changetr" style="display: none">
  111. <th class="taC" width="100"><span class="colRed">*</span>时间</th>
  112. <td>
  113. <select name="daytype">
  114. <option value="1">全天(1天)</option>
  115. <option value="2">上午(0.5天)</option>
  116. <option value="3">下午(0.5天)</option>
  117. </select>
  118. </td>
  119. </tr>
  120. <tr id="tr_14" class="changetr">
  121. <th class="taC" width="100"><span class="colRed">*</span>上班天数</th>
  122. <td>
  123. <select id="selectmonth" name="monthselect">
  124. {{monthlist}}
  125. </select>
  126. <input placeholder="请输入上班天数" id="daynum" name="daynum" type="number" step="0.5">
  127. </td>
  128. </tr>
  129. <tr>
  130. <th class="taC" width="100">备注</th><td><textarea class="span4" name="description" placeholder="选填"></textarea></td>
  131. </tr>
  132. </tbody>
  133. </table>
  134. </div>
  135. <div class="modal-footer">
  136. <a href="#" class="button btn-gray" data-dismiss="modal" aria-hidden="true">取消</a>
  137. <button type="submit" class="button" name="close2">确定</button>
  138. </div>
  139. </form>
  140. </div>
  141. </div>
  142. </div>
  143. <!--弹出内容-->
  144. <script type="text/javascript">autoFlashHeight();</script>
  145. <script>
  146. $(function() {
  147. $('#year').change(function(){
  148. var html = '/year/'+$(this).val()+'/month/'+$('#month').val();
  149. window.location.href = '/holidayclose2' + html;
  150. });
  151. $('#month').change(function(){
  152. var html = '/year/'+$('#year').val()+'/month/'+$(this).val();
  153. window.location.href = '/holidayclose2' + html;
  154. });
  155. $('#selecttype').change(function(){
  156. $('.changetr').hide();
  157. $('.changetr input').attr('disabled',true);
  158. $('.changetr select').attr('disabled',true);
  159. if($(this).val() != 14){
  160. $('#tr_all').show();
  161. $('#tr_all input').removeAttr('disabled');
  162. $('#tr_day').show();
  163. $('#tr_day select').removeAttr('disabled');
  164. $('#holidaytype').text($(this).find("option:selected").text());
  165. }else{
  166. $('#tr_14').show();
  167. $('#tr_14 input').removeAttr('disabled');
  168. }
  169. })
  170. });
  171. function addholiday(){
  172. if($('#cidstaff').val() == 0){
  173. alert('请选择员工');
  174. return false;
  175. }
  176. if($('#selecttype').val() != 14){
  177. if($('#holidayday').val() == ''){
  178. alert('请选择日期');
  179. return false;
  180. }
  181. }else {
  182. if ($('#selectmonth').val() == 0) {
  183. alert('请选择月份');
  184. return false;
  185. }
  186. if ($('#daynum').val() == '') {
  187. alert('请输入上班天数');
  188. return false;
  189. }
  190. }
  191. }
  192. </script>
  193. </body>