瀏覽代碼

admin update

xiaoyu 2 年之前
父節點
當前提交
26138e18c6

+ 26 - 0
admin/control/refill_analysis.php

@@ -174,6 +174,32 @@ class refill_analysisControl extends SystemControl
         echo json_encode($result);
     }
 
+    public function merchant_dataOp()
+    {
+        $merchant_list = $this->merchants();
+        $result = [];
+        foreach ($merchant_list as $value) {
+            $data['name'] = $value['company_name'] ?? $value['name'];
+            $data['value'] = $value['mchid'];
+            $data['alpha'] = $value['alpha'];
+            $data['color'] = false;
+            $result[] = $data;
+        }
+        echo json_encode($result);
+    }
+
+    public function card_type_dataOp()
+    {
+        $result = [
+            ['name' => '中石油', 'value' => mtopcard\PetroChinaCard],
+            ['name' => '中石化', 'value' => mtopcard\SinopecCard],
+            ['name' => '中国移动', 'value' => mtopcard\ChinaMobileCard],
+            ['name' => '中国联通', 'value' => mtopcard\ChinaUnicomCard],
+            ['name' => '中国电信', 'value' => mtopcard\ChinaTelecomCard],
+        ];
+        echo json_encode($result);
+    }
+
     private function object_array($array)
     {
         if(is_object($array))

+ 0 - 12
admin/control/refill_order.php

@@ -350,18 +350,6 @@ class refill_orderControl extends SystemControl
         echo json_encode($result);
     }
 
-    public function card_type_dataOp()
-    {
-        $result = [
-            ['name' => '中石油', 'value' => mtopcard\PetroChinaCard],
-            ['name' => '中石化', 'value' => mtopcard\SinopecCard],
-            ['name' => '中国移动', 'value' => mtopcard\ChinaMobileCard],
-            ['name' => '中国联通', 'value' => mtopcard\ChinaUnicomCard],
-            ['name' => '中国电信', 'value' => mtopcard\ChinaTelecomCard],
-        ];
-        echo json_encode($result);
-    }
-
     public function refill_third_infoOp()
     {
         $order_id = $_GET['order_id'];

+ 11 - 11
admin/templates/default/analysis.new_version.provider.php

@@ -28,11 +28,11 @@
                 </td>
                 <th><label>通道选择</label></th>
                 <td>
-                    <div id="selest_chnames"></div>
+                    <div id="select_chnames"></div>
                 </td>
                 <th><label>卡类型</label></th>
                 <td>
-                    <div id="select_cardtype"></div>
+                    <div id="select_cardtypes"></div>
                 </td>
                 <th><label>面额</label></th>
                 <td>
@@ -94,11 +94,11 @@
             type: 'datetime'
         });
 
-        let selest_chnames
+        let select_chnames
         $.get('index.php?act=refill_analysis&op=provider_data', function (data) {
             data = JSON.parse(data)
-            selest_chnames = xmSelect.render({
-                el: '#selest_chnames',
+            select_chnames = xmSelect.render({
+                el: '#select_chnames',
                 size: 'mini',
                 filterable: true,
                 style: {
@@ -112,11 +112,11 @@
             })
         })
 
-        let select_cardtype
-        $.get('index.php?act=refill_order&op=card_type_data', function (data) {
+        let select_cardtypes
+        $.get('index.php?act=refill_analysis&op=card_type_data', function (data) {
             data = JSON.parse(data)
-            select_cardtype = xmSelect.render({
-                el: '#select_cardtype',
+            select_cardtypes = xmSelect.render({
+                el: '#select_cardtypes',
                 size: 'mini',
                 filterable: true,
                 style: {
@@ -145,8 +145,8 @@
             let query_end_time = $("input[name=query_end_time]").val()
             let end_time = parseInt((new Date(query_end_time)).getTime()/1000);
 
-            let chnames = select_set(selest_chnames.getValue())
-            let card_types = select_set(select_cardtype.getValue())
+            let chnames = select_set(select_chnames.getValue())
+            let card_types = select_set(select_cardtypes.getValue())
             let spec = $("select[name=amount]").val()
             let filter_wave = $("select[name=filter_wave]").val()
             let src = window.location.origin + "/plot/ch_ratio?"

+ 16 - 16
admin/templates/default/analysis.new_version.system.php

@@ -26,13 +26,13 @@
                     <input class="txt date" type="text" value="<?php echo $_GET['query_end_time']; ?>"
                            id="endTime" name="query_end_time" autocomplete="off" style="width:120px" />
                 </td>
-                <th><label>通道选择</label></th>
+                <th><label>机构选择</label></th>
                 <td>
-                    <div id="selest_chnames"></div>
+                    <div id="select_merchants"></div>
                 </td>
                 <th><label>卡类型</label></th>
                 <td>
-                    <div id="select_cardtype"></div>
+                    <div id="select_cardtypes"></div>
                 </td>
                 <th><label>面额</label></th>
                 <td>
@@ -94,11 +94,11 @@
             type: 'datetime'
         });
 
-        let selest_chnames
-        $.get('index.php?act=refill_analysis&op=provider_data', function (data) {
+        let select_merchants
+        $.get('index.php?act=refill_analysis&op=merchant_data', function (data) {
             data = JSON.parse(data)
-            selest_chnames = xmSelect.render({
-                el: '#selest_chnames',
+            select_merchants = xmSelect.render({
+                el: '#select_merchants',
                 size: 'mini',
                 filterable: true,
                 style: {
@@ -112,11 +112,11 @@
             })
         })
 
-        let select_cardtype
-        $.get('index.php?act=refill_order&op=card_type_data', function (data) {
+        let select_cardtypes
+        $.get('index.php?act=refill_analysis&op=card_type_data', function (data) {
             data = JSON.parse(data)
-            select_cardtype = xmSelect.render({
-                el: '#select_cardtype',
+            select_cardtypes = xmSelect.render({
+                el: '#select_cardtypes',
                 size: 'mini',
                 filterable: true,
                 style: {
@@ -145,11 +145,11 @@
             let query_end_time = $("input[name=query_end_time]").val()
             let end_time = parseInt((new Date(query_end_time)).getTime()/1000);
 
-            let chnames = select_set(selest_chnames.getValue())
-            let card_types = select_set(select_cardtype.getValue())
+            let mchids = select_set(select_merchants.getValue())
+            let card_types = select_set(select_cardtypes.getValue())
             let spec = $("select[name=amount]").val()
             let filter_wave = $("select[name=filter_wave]").val()
-            let src = window.location.origin + "/plot/ch_ratio?"
+            let src = window.location.origin + "/plot/mch_ratio?"
             if (start_time) {
                 src += "&start_time=" + start_time;
             }
@@ -161,8 +161,8 @@
                 }
                 src += "&end_time=" + end_time;
             }
-            if (chnames) {
-                src += "&chnames=" + chnames;
+            if (mchids) {
+                src += "&mchids=" + mchids;
             }
             if (card_types) {
                 src += "&card_types=" + card_types;