赛亿提成统计系统

index.html 9.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  1. <!DOCTYPE html>
  2. <html lang="zh-cn">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title>赛亿销售统计</title>
  7. <link rel="stylesheet" href="/static/css/base.css">
  8. <link rel="stylesheet" href="/static/css/bootstrap.min.css">
  9. <link rel="stylesheet" href="/static/css/index.css">
  10. <script src="/static/js/jquery.min.js"></script>
  11. <script src="/static/js/bootstrap.min.js"></script>
  12. <style type="text/css">
  13. @media print {
  14. .noprint {
  15. display: none;
  16. }
  17. input {
  18. border: none;
  19. }
  20. }
  21. </style>
  22. </head>
  23. <body>
  24. <div class="wrap container">
  25. <div class="header">
  26. <span><img src="/img/logo.jpg" alt=""></span>
  27. <span>北京赛亿科技有限公司</span>
  28. </div>
  29. <div class="aside">
  30. <div class="col-md-12 lin-height text_center"><a href="/index">提成汇总</a></div>
  31. <div class="col-md-12 lin-height text_center"><a href="/index/commission">计提数据录入</a></div>
  32. <div class="col-md-12 lin-height text_center"><a href="/index/seller">销售员管理</a></div>
  33. <div class="col-md-12 lin-height text_center"><a href="/index/company">销售单位管理</a></div>
  34. </div>
  35. <!--startprint-->
  36. <div class="content">
  37. <div class="time row">
  38. <div class="col-md-3 noprint">
  39. 请选择月份 :
  40. <select name="select_time" id="select_time">
  41. <?php
  42. foreach ($maonth_picker->monarr as $value) {
  43. if ($maonth_picker->cur_month == $value) {
  44. echo "<option value='$value' selected>$value</option>";
  45. } else {
  46. echo "<option value='$value'>$value</option>";
  47. }
  48. }
  49. ?>
  50. </select>
  51. </div>
  52. <div class="col-md-5 text_center">
  53. <h4><?php echo $maonth_picker->cur_month; ?>份提成汇总表</h4>
  54. </div>
  55. <div class="col-md-2 noprint" style="text-align:right;">
  56. <div class="btn-group ">
  57. <button type="button" class="btn btn-default" onclick=" doPrint()">打印</button>
  58. </div>
  59. </div>
  60. </div>
  61. <div class="row">
  62. <div class="col-md-10 ">
  63. <table class=" table table-hover table-bordered">
  64. <thead>
  65. <tr>
  66. <th>序 号</th>
  67. <th>销售员</th>
  68. <th>其他业务费</th>
  69. <th>总利润</th>
  70. <th>提成比例</th>
  71. <th>提成金额</th>
  72. <th>特批</th>
  73. <th>提成比例</th>
  74. <th>提成金额</th>
  75. <th>历史欠款</th>
  76. <th>合 计</th>
  77. <th>备 注</th>
  78. </tr>
  79. </thead>
  80. <tbody>
  81. <?php
  82. foreach ($data as $value) {
  83. ?>
  84. <tr>
  85. <td><?php echo $value['id']; ?></td>
  86. <td><?php echo $value['name']; ?></td>
  87. <td><?php echo $value['other_expenses'] ? $value['other_expenses'] : 0; ?></td>
  88. <td><?php echo $value['total_profit'] ? $value['total_profit'] : 0; ?></td>
  89. <td><?php echo $value['c_rate'] * 100 . '%'; ?></td>
  90. <td><?php echo $value['c_money']; ?></td>
  91. <td><?php echo $value['tepi']; ?></td>
  92. <td><?php echo $value['t_rate'] * 100 . '%'; ?></td>
  93. <td><?php echo $value['t_money']; ?></td>
  94. <td><?php echo $value['overdraft'] ? $value['overdraft'] : 0; ?></td>
  95. <td><?php echo $value['s_money']; ?></td>
  96. <td><?php echo $value['remark']; ?></td>
  97. <!-- <td><a href="javascript:;" data-other_expenses="<?php echo $value['other_expenses']; ?>" data-seller="<?php echo $value['name']; ?>" data-su_id="<?php echo $value['su_id']; ?>" data-overdraft="<?php echo $value['overdraft']; ?>" onclick="modify(this)">
  98. <?php echo $value['name']; ?></a></td> -->
  99. </tr>
  100. <?php
  101. }
  102. ?>
  103. <tr>
  104. <td colspan='2' style="text-align: center;font-weight:bold;">合计</td>
  105. <td><?php echo $total['other_expenses'];?></td>
  106. <td><?php echo $total['total_profit'];?></td>
  107. <td>25%</td>
  108. <td><?php echo $total['c_money'];?></td>
  109. <td><?php echo $total['tepi'];?></td>
  110. <td>100%</td>
  111. <td><?php echo $total['t_money'];?></td>
  112. <td></td>
  113. <td><?php echo $total['s_money'];?></td>
  114. <td></td>
  115. </tr>
  116. </tbody>
  117. </table>
  118. </div>
  119. </div>
  120. <div style="margin-left:50px;">
  121. <div class="row" style="margin:0 auto;">
  122. <span class="col-md-1" style="line-height: 40px;margin-right:50px;">制表:</span>
  123. <span class="col-md-1" style="line-height: 40px;margin-right:50px;">复核:</span>
  124. <span class="col-md-1" style="line-height: 40px;margin-right:50px;">审批:</span>
  125. <span class="col-md-1" style="line-height: 40px;margin-right:50px;">制表:</span>
  126. </div>
  127. <div class="row" style="margin:0 auto;">
  128. <span class="col-md-1" style="line-height: 40px;margin-right:50px;">日期:</span>
  129. <span class="col-md-1" style="line-height: 40px;margin-right:50px;">日期:</span>
  130. <span class="col-md-1" style="line-height: 40px;margin-right:50px;">日期:</span>
  131. <span class="col-md-1" style="line-height: 40px;margin-right:50px;">日期:</span>
  132. </div>
  133. </div>
  134. </div>
  135. <!--endprint-->
  136. </div>
  137. <!-- loading -->
  138. <div class="modal fade" id="loading" tabindex="-1" role="dialog" aria-labelledby="myModalLabelLoading" aria-hidden="true" style="top: 200px;">
  139. <div class="modal-dialog" role="document">
  140. <div class="modal-content">
  141. <div class="modal-header">
  142. <h4 class="modal-title" id="myModalLabelLoading">提示</h4>
  143. </div>
  144. <div class="modal-body">
  145. 系统初始化中, 请稍候。。。<span id="resultLoading" style="color:red;"></span>
  146. </div>
  147. </div>
  148. </div>
  149. </div>
  150. <script src="/static/js/init.js"></script>
  151. <script>
  152. init();
  153. function doPrint() {
  154. var bdhtml = window.document.body.innerHTML;
  155. var startprint = "<!--startprint-->";
  156. var endprint = "<!--endprint-->";
  157. prnhtml = bdhtml.substr(bdhtml.indexOf(startprint) + 17, bdhtml.indexOf(endprint));
  158. window.document.body.innerHTML = prnhtml;
  159. window.print();
  160. }
  161. $("#select_time").change(function() {
  162. var select_time = $("#select_time").val();
  163. window.location.href = "/index.php?select_time=" + select_time;
  164. })
  165. // 修改其他业务费, 历史欠款
  166. function modify(obj) {
  167. var su_id = $(obj).data("su_id")
  168. var seller = $(obj).data("seller");
  169. var other_expenses = $(obj).data("other_expenses");
  170. var overdraft = $(obj).data("overdraft");
  171. $("#su_id").val(su_id);
  172. $("#seller").val(seller);
  173. $("#other_expenses").val(other_expenses);
  174. $("#overdraft").val(overdraft);
  175. $("#myModal").modal("show");
  176. }
  177. $("#tj").click(function() {
  178. var data = {
  179. "id": Number($("#su_id").val()),
  180. "name": $("#seller").val(),
  181. "month": $("#month").val(),
  182. "other_expenses": Number($("#other_expenses").val()),
  183. "overdraft": Number($("#overdraft").val()),
  184. }
  185. console.log(data);
  186. // return false;
  187. $.post('/dosummary.php', data, function(res) {
  188. if (res.code == 0) {
  189. window.location.reload();
  190. } else {
  191. alert(res.msg);
  192. }
  193. }, 'json');
  194. })
  195. </script>
  196. </body>
  197. </html>