analysis.new_version.php 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  1. <div class="page">
  2. <div class="fixed-bar">
  3. <div class="item-title">
  4. <h3>成功率监控列表</h3>
  5. <ul class="tab-base">
  6. <li><a href="?index.php&act=refill_analysis&op=index&type=provider"><span>通道成功率监控</span></a></li>
  7. <li><a href="?index.php&act=refill_analysis&op=index&type=system"><span>平台成功率监控</span></a></li>
  8. <li><a href="?index.php&act=refill_analysis&op=merchant_ratios"><span>机构成功率统计</span></a></li>
  9. <li><a href="JavaScript:void(0);" class="current"><span>新通道成功率监控</span></a></li>
  10. </ul>
  11. </div>
  12. </div>
  13. <div class="fixed-empty"></div>
  14. <div style="margin-top: 10px;color: #e60d0d;">
  15. 请先选择时间
  16. </div>
  17. <form method="get" action="index.php" name="formSearch" id="formSearch" style="min-width: 1200px;">
  18. <table class="tb-type1 noborder search tableFixed">
  19. <tr>
  20. <th><label for="query_start_time">统计时间</label></th>
  21. <td>
  22. <input class="txt date" type="text" value="<?php echo $_GET['query_start_time']; ?>"
  23. id="startTime" name="query_start_time" autocomplete="off" style="width:120px" />
  24. <label for="query_start_time">~</label>
  25. <input class="txt date" type="text" value="<?php echo $_GET['query_end_time']; ?>"
  26. id="endTime" name="query_end_time" autocomplete="off" style="width:120px" />
  27. </td>
  28. <th><label>通道选择</label></th>
  29. <td>
  30. <div id="selest_chnames"></div>
  31. </td>
  32. <th><label>面额</label></th>
  33. <td>
  34. <select name="amount">
  35. <option value=""><?php echo $lang['nc_please_choose']; ?></option>
  36. <option value="10" <?php if ($_GET['refill_amount'] == '10') { ?>selected<?php } ?>>10</option>
  37. <option value="20" <?php if ($_GET['refill_amount'] == '20') { ?>selected<?php } ?>>20</option>
  38. <option value="30" <?php if ($_GET['refill_amount'] == '30') { ?>selected<?php } ?>>30</option>
  39. <option value="50" <?php if ($_GET['refill_amount'] == '50') { ?>selected<?php } ?>>50</option>
  40. <option value="100" <?php if ($_GET['refill_amount'] == '100') { ?>selected<?php } ?>>100</option>
  41. <option value="200" <?php if ($_GET['refill_amount'] == '200') { ?>selected<?php } ?>>200</option>
  42. <option value="300" <?php if ($_GET['refill_amount'] == '300') { ?>selected<?php } ?>>300</option>
  43. <option value="500" <?php if ($_GET['refill_amount'] == '500') { ?>selected<?php } ?>>500</option>
  44. <option value="1000" <?php if ($_GET['refill_amount'] == '1000') { ?>selected<?php } ?>>1000</option>
  45. <option value="2000" <?php if ($_GET['refill_amount'] == '2000') { ?>selected<?php } ?>>2000</option>
  46. </select>
  47. </td>
  48. <th><label>卡类型</label></th>
  49. <td>
  50. <div id="select_cardtype"></div>
  51. </td>
  52. <th><label>滤波器</label></th>
  53. <td>
  54. <select name="filter_wave">
  55. <option value=""><?php echo $lang['nc_please_choose']; ?></option>
  56. <option value="60">1分钟</option>
  57. <option value="300">5分钟</option>
  58. <option value="600">10分钟</option>
  59. <option value="900">15分钟</option>
  60. <option value="0" selected>关闭</option>
  61. </select>
  62. </td>
  63. <td>
  64. <a href="javascript:void(0);" id="ncsubmit" class="btn-search"
  65. title="<?php echo $lang['nc_query']; ?>">&nbsp;
  66. </a>
  67. </td>
  68. </tr>
  69. </table>
  70. </form>
  71. <div id="box">
  72. <!-- <iframe
  73. src="https://www.xyzshops.cn/plot/index?time_stamp=1621488600&interval=60" scrolling="no" id="Iframe" frameborder="0"></iframe> -->
  74. </div>
  75. </div>
  76. <script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/laydate/laydate.js"></script>
  77. <script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/js/jquery-ui/jquery.ui.js"></script>
  78. <script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/js/jquery-ui/i18n/zh-CN.js"
  79. charset="utf-8"></script>
  80. <script type="text/javascript" src="<?php echo ADMIN_TEMPLATES_URL;?>/js/xm-select.js"></script>
  81. <script type="text/javascript" src="<?php echo RESOURCE_SITE_URL;?>/refill/layer.js"></script>
  82. <script type="text/javascript" src="<?php echo RESOURCE_SITE_URL;?>/refill/moment-with-locales.js"></script>
  83. <link rel="stylesheet" type="text/css"
  84. href="<?php echo RESOURCE_SITE_URL; ?>/js/jquery-ui/themes/ui-lightness/jquery.ui.css"/>
  85. <script type="text/javascript">
  86. $(function () {
  87. laydate.render({
  88. elem: '#startTime',
  89. type: 'datetime'
  90. });
  91. laydate.render({
  92. elem: '#endTime',
  93. type: 'datetime'
  94. });
  95. let selest_chnames
  96. $.get('index.php?act=refill_analysis&op=provider_data', function (data) {
  97. data = JSON.parse(data)
  98. selest_chnames = xmSelect.render({
  99. el: '#selest_chnames',
  100. size: 'mini',
  101. filterable: true,
  102. style: {
  103. minHeight: '27px',
  104. lineHeight: '27px',
  105. marginLeft: '4px',
  106. width: '250px'
  107. },
  108. language: 'zn',
  109. data: data
  110. })
  111. })
  112. let select_cardtype
  113. $.get('index.php?act=refill_order&op=card_type_data', function (data) {
  114. data = JSON.parse(data)
  115. select_cardtype = xmSelect.render({
  116. el: '#select_cardtype',
  117. size: 'mini',
  118. filterable: true,
  119. style: {
  120. minHeight: '27px',
  121. lineHeight: '27px',
  122. marginLeft: '4px',
  123. width: '250px'
  124. },
  125. language: 'zn',
  126. data: data
  127. })
  128. })
  129. function select_set(selectArr){
  130. let selectStr = ''
  131. for (let i = 0; i < selectArr.length; i++) {
  132. selectStr += selectArr[i].value+','
  133. }
  134. selectStr = selectStr.substr(0, selectStr.length-1)
  135. return selectStr
  136. }
  137. $('#ncsubmit').click(function () {
  138. let query_start_time = $("input[name=query_start_time]").val()
  139. let start_time = parseInt((new Date(query_start_time)).getTime()/1000);
  140. let query_end_time = $("input[name=query_end_time]").val()
  141. let end_time = parseInt((new Date(query_end_time)).getTime()/1000);
  142. let chnames = select_set(selest_chnames.getValue())
  143. let card_types = select_set(select_cardtype.getValue())
  144. let spec = $("select[name=amount]").val()
  145. let filter_wave = $("select[name=filter_wave]").val()
  146. let src = window.location.origin + "/plot/ch_ratio?"
  147. if (start_time) {
  148. src += "&start_time=" + start_time;
  149. }
  150. if (end_time) {
  151. if(end_time < start_time || !start_time)
  152. {
  153. layer.msg('日期有误,结束日期需大于开始日期');
  154. return
  155. }
  156. src += "&end_time=" + end_time;
  157. }
  158. if (chnames) {
  159. src += "&chnames=" + chnames;
  160. }
  161. if (card_types) {
  162. src += "&card_types=" + card_types;
  163. }
  164. if (spec) {
  165. src += "&spec=" + spec;
  166. }
  167. if(filter_wave > 0) {
  168. src += '&filter_wave=' + filter_wave;
  169. }
  170. $.get(src, function (data){
  171. if (!data) {
  172. return
  173. }
  174. $('#box').html(data)
  175. });
  176. });
  177. })
  178. </script>