赛亿提成统计系统

index.php 7.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  1. <!DOCTYPE html>
  2. <html lang="en">
  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?123">
  8. <link rel="stylesheet" href="/static/css/index.css">
  9. <link rel="stylesheet" href="/static/css/bootstrap.min.css">
  10. <link rel="stylesheet" href="/static/css/bootstrap-select.min.css">
  11. <script src="/static/js/jquery.min.js"></script>
  12. <script src="/static/js/bootstrap.min.js"></script>
  13. <script src="/static/js/myfun.js"></script>
  14. <script src="/static/js/bootstrap-select.min.js"></script>
  15. <style>
  16. .table thead tr th {
  17. text-align: center;
  18. /* height: 30px;
  19. line-height: 30px; */
  20. }
  21. td.text-l {
  22. text-align: left;
  23. }
  24. td.td-manager {
  25. text-align: center;
  26. }
  27. .td-manager a {
  28. display: inline;
  29. line-height: 20px;
  30. }
  31. div.bj {
  32. display: none;
  33. }
  34. div.active {
  35. display: block;
  36. }
  37. .market-container {
  38. margin-left: 20px;
  39. }
  40. </style>
  41. </head>
  42. <body>
  43. <div class="market-container">
  44. <div class="header">
  45. <span><img src="../img/logo.jpg" alt=""></span>
  46. <span>北京赛亿科技有限公司</span>
  47. </div>
  48. <div class="aside">
  49. <div class="col-md-12 lin-height text_center"><a href="/index.php">提成汇总</a></div>
  50. <div class="col-md-12 lin-height text_center"><a href="javascript:;">计提数据录入</a></div>
  51. <div class="col-md-12 lin-height text_center"><a href="/seller.php">销售员管理</a></div>
  52. <div class="col-md-12 lin-height text_center"><a href="/company.php">销售单位管理</a></div>
  53. </div>
  54. <div class="content" style="width: 1400px;">
  55. <div class="time row">
  56. <div class="col-md-3">
  57. 请选择月份 :
  58. <select name="select_time" id="select_time">
  59. <?php
  60. foreach ($maonth_picker->monarr as $value) {
  61. if ($maonth_picker->cur_month == $value) {
  62. echo "<option value='$value' selected>$value</option>";
  63. } else {
  64. echo "<option value='$value'>$value</option>";
  65. }
  66. }
  67. ?>
  68. </select>
  69. </div>
  70. <div class="col-md-5 text_center">
  71. <h4><?php echo $maonth_picker->cur_month; ?>份销售提成表</h4>
  72. </div>
  73. <div class="col-md-3 " style="text-align:right;">
  74. <div class="btn-group ">
  75. <button type="button" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal">数据录入</button>
  76. </div>
  77. </div>
  78. </div>
  79. </div>
  80. <!-- <div style="text-align:right;">
  81. <ul class="pagination">
  82. <li><a href=" #">&laquo;</a></li>
  83. <li><a href="#">1</a></li>
  84. <li><a href="#">2</a></li>
  85. <li><a href="#">3</a></li>
  86. <li><a href="#">4</a></li>
  87. <li><a href="#">5</a></li>
  88. <li><a href="#">&raquo;</a></li>
  89. </ul>
  90. </div> -->
  91. <!-- <div class="footer" style="width: 1600px;">
  92. <div class="row text_center" style="margin:0 auto;">
  93. <div class="col-md-2" style="line-height: 40px;">制表:</div>
  94. <div class="col-md-2" style="line-height: 40px;">复核:</div>
  95. <div class="col-md-2" style="line-height: 40px;">审批:</div>
  96. <div class="col-md-2" style="line-height: 40px;">制表:</div>
  97. <div class="col-md-2" style="line-height: 40px;">日期:</div>
  98. <div class="col-md-2" style="line-height: 40px;">日期:</div>
  99. <div class="col-md-2" style="line-height: 40px;">日期:</div>
  100. <div class="col-md-2" style="line-height: 40px;">日期:</div>
  101. </div>
  102. </div> -->
  103. <?php include_once(__DIR__ . DS . 'input.php');?>
  104. </div>
  105. <script>
  106. function changUrl() {
  107. select_time = $("#select_time").val();
  108. c_type = $("#c_type").val();
  109. // console.log(select_time);
  110. // console.log(c_type);
  111. window.location.href = "/market.php?select_time=" + select_time+"&c_type=" + c_type;
  112. }
  113. $("#select_time").change(function() {
  114. changUrl()
  115. })
  116. $("#c_type").change(function(){
  117. changUrl()
  118. })
  119. function edit(obj) {
  120. let data = $(obj).data('val');
  121. // console.log(data);
  122. $("#id").val(data.id);
  123. $('#company').selectpicker('val', data.company);
  124. // $("#company").append('<option value="'+data.company+'" selected>'+data.company+'</option>').selectpicker('refresh');
  125. $("#contract_no").html('<option value="' + data.contract_no + '" selected>' + data.contract_no + '</option>');
  126. $("#goods_category").html('<option value=' + data.goods_category + ' selected>' + data.goods_category + '</option>');
  127. $("#goods_type").html('<option ' + data.goods_type + ' selected>' + data.goods_type + '</option>');
  128. $("#amount").val(data.amount);
  129. $("#price").val(data.price);
  130. $("#contract_value").val(data.contract_value);
  131. $("#receive_money").val(data.receive_money);
  132. $("#period_balance").val(data.period_balance);
  133. $("#actual_money").val(data.actual_money);
  134. $("#agency").val(data.agency);
  135. $("#shipping").val(data.shipping);
  136. $("#current_balance").val(data.current_balance);
  137. let type = data.type;
  138. // console.log(type)
  139. $('input[name="type"]').prop('checked', false);
  140. $("#type" + type).prop('checked', true);
  141. if (type != 0) {
  142. $("#base_price2").val(data.base_price);
  143. $("#actual_value").val(data.actual_value);
  144. $("#price_rate").val(data.price_rate);
  145. $("#commission_rate").val(data.c_rate);
  146. $("#commission_money").val(data.commission_money);
  147. $('#yiban').removeClass('active');
  148. $('#tepi').addClass('active');
  149. } else {
  150. $("#base_price").val(data.base_price);
  151. $("#base_value").val(data.base_value);
  152. $("#project").val(data.project);
  153. $("#total_profit").val(data.total_profit);
  154. $('#tepi').removeClass('active');
  155. $('#yiban').addClass('active');
  156. }
  157. $("#seller").val(data.seller);
  158. $("#remark").val(data.remark);
  159. $('#myModal').modal('show');
  160. return false;
  161. }
  162. function del(id, obj) {
  163. $.ajax({
  164. url: "/domarket.php?action=delete",
  165. type: "POST",
  166. data: {
  167. "id": id
  168. },
  169. dataType: 'json',
  170. success: function(data) {
  171. // console.log(data.code);
  172. if (data.code == 0) {
  173. $(obj).parents("tr").remove();
  174. } else {
  175. alert(data.msg);
  176. }
  177. return false;
  178. }
  179. });
  180. }
  181. </script>
  182. </body>
  183. </html>