Selaa lähdekoodia

Merge branch 'raccount' of 39.97.239.116:gyfl/xyzshop into raccount

stanley-king 2 vuotta sitten
vanhempi
commit
ea7b70614d

+ 1 - 1
admin/control/provider.php

@@ -726,7 +726,7 @@ class providerControl extends SystemControl
                 }
                 $available_total += $value['available_predeposit'];
             }
-            if($available_total > $remit_cfg['remit_money']) continue;
+            if($available_total > $remit_cfg['remit_money'] || !array_key_exists($co_id, $refill_company)) continue;
             $result[] = [
                 'co_name' => $refill_company[$co_id]['co_name'],
                 'providers' => $data

+ 37 - 4
admin/control/refill_company.php

@@ -97,6 +97,7 @@ class refill_companyControl extends SystemControl
         }
         if (chksubmit()) {
             $update['co_type'] = $_POST['co_type'];
+            $update['co_name'] = $_POST['co_name'];
             $update['bank_name'] = trim($_POST['bank_name']);
             $update['bank_username'] = trim($_POST['bank_username']);
             $update['bank_card_no'] = trim($_POST['bank_card_no']);
@@ -113,6 +114,7 @@ class refill_companyControl extends SystemControl
             }
             $cid = $_POST['cid'] ?? '';
             $this->co_id_bind($cid, $co_id, $company_info['co_type']);
+            $this->log("修改公司信息,公司ID:{$co_id},公司名称:{$company_info['co_name']}");
             showMessage('编辑成功','index.php?act=refill_company&op=index');
         }
         else
@@ -122,8 +124,8 @@ class refill_companyControl extends SystemControl
                 $cid = Model('')->table('merchant')->where(['co_id' => $co_id])->field('mchid')->select();
                 $cid = array_column($cid, 'mchid');
             }elseif ($company_info['co_type'] == 'provider') {
-                $cid = Model('')->table('refill_provider')->where(['co_id' => $co_id])->field('provider_id')->select();
-                $cid = array_column($cid, 'provider_id');
+                $cid = Model('')->table('refill_provider')->where(['co_id' => $co_id])->field('store_id')->select();
+                $cid = array_column($cid, 'store_id');
             }
             Tpl::output('cid', implode(',', $cid));
             Tpl::output('company_info', $company_info);
@@ -140,7 +142,7 @@ class refill_companyControl extends SystemControl
                 Model('')->table('merchant')->where(['co_id' => $co_id])->update(['co_id' => 0]);
                 Model('')->table('merchant')->where($cond)->update(['co_id' => $co_id]);
             }elseif ($co_type == 'provider'){
-                $cond['provider_id'] = ['in', $cid];
+                $cond['store_id'] = ['in', $cid];
                 Model('')->table('refill_provider')->where(['co_id' => $co_id])->update(['co_id' => 0]);
                 Model('')->table('refill_provider')->where($cond)->update(['co_id' => $co_id]);
             }
@@ -198,6 +200,19 @@ class refill_companyControl extends SystemControl
         Tpl::showpage('refill.company.remit');
     }
 
+    public function remit_delOp()
+    {
+        $mod_remit = Model('refill_company_remit');
+        $remit_id = $_GET['remit_id'];
+        $this->check_remit($remit_id);
+        $result = $mod_remit->DelRemit($remit_id);
+        if ($result) {
+            showMessage('删除成功');
+        } else {
+            showMessage('删除失败');
+        }
+    }
+
     public function remit_editOp()
     {
         $remit_id = $_GET['remit_id'] ?? $_POST['remit_id'];
@@ -205,7 +220,16 @@ class refill_companyControl extends SystemControl
         $params = json_decode($remit['params'], true);
         $provider_list = $this->providers();
         foreach ($provider_list as $provider) {
-            $providers[$provider['provider_id']] = $provider;
+            $co_id = $provider['co_id'];
+            if(empty($co_id)) continue;
+            $pid = $provider['provider_id'];
+            $account_id = intval($provider['account_id']);
+            if($account_id > 0) {
+                $mid_pids[$account_id] = $pid;
+                $mids[] = $account_id;
+            }
+            $provider['available_predeposit'] = 0;
+            $providers[$pid] = $provider;
         }
         $refill_company = $this->refill_companys(['co_type' => refill_companyModel::co_type_provider]);
         if(chksubmit())
@@ -238,6 +262,15 @@ class refill_companyControl extends SystemControl
         }
         else
         {
+            $member_data = Model('member')->field('member_id,available_predeposit')->where(['member_id' => ['in',$mids]])->select();
+            foreach ($member_data as $member)
+            {
+                $mid = intval($member['member_id']);
+                if(array_key_exists($mid,$mid_pids)) {
+                    $pid = $mid_pids[$mid];
+                    $providers[$pid]['available_predeposit'] = $member['available_predeposit'];
+                }
+            }
             foreach ($params as $co_id => $item)
             {
                 $data = [];

+ 1 - 0
admin/include/limit.php

@@ -39,6 +39,7 @@ $_limit =  array(
         array('name'=> '通道组管理', 'op'=> null, 'act'=>'provider_group'),
         array('name'=> '订单监控', 'op'=>null, 'act'=>'ordersendlist'),
         array('name'=> '对账管理', 'op'=>null, 'act'=>'orderstats'),
+        array('name'=> '公司信息管理', 'op'=>null, 'act'=>'refill_company'),
         array('name'=> '充值拦截设置', 'op'=>null, 'act'=>'refill_config'),
         array('name'=> '卡密管理', 'op'=>null, 'act'=>'card_key'),
         array('name'=> '库存管理', 'op'=>null, 'act'=>'refill_stock'),

+ 3 - 2
admin/templates/default/provider.amount.php

@@ -33,6 +33,7 @@
             <ul class="tab-base">
                 <li><a href="index.php?act=provider&op=index"><span><?php echo $lang['nc_manage'] ?></span></a></li>
                 <li><a href="JavaScript:void(0);" class="current"><span>调款记录</span></a></li>
+                <li><a href="index.php?act=provider&op=provider_remit"><span>打款</span></a></li>
             </ul>
         </div>
     </div>
@@ -96,9 +97,9 @@
             <thead>
             <tr class="thead">
                 <th>序号</th>
+                <th>通道ID</th>
                 <th>记录ID</th>
                 <th>通道名称</th>
-                <th>通道ID</th>
                 <th class="align-right">调整金额</th>
                 <th class="align-left">操作人</th>
                 <th class="align-left">操作日期</th>
@@ -111,9 +112,9 @@
                 <?php foreach ($output['info_list'] as $k => $v) { ?>
                     <tr class="trFlex">
                         <td><?php echo $k+1;?></td>
+                        <td><?php echo $v['provider_id']; ?></td>
                         <td><?php echo $v['id']; ?></td>
                         <td><?php echo $v['provider_name']; ?> (<?php echo $v['store_name'];?>)</td>
-                        <td><?php echo $v['provider_id']; ?></td>
                         <td class="align-right"><?php echo $v['amount']; ?></td>
                         <td class="align-left"><?php echo $v['operation']; ?></td>
                         <td class="align-left"><?php echo $v['add_time'] ? date('Y-m-d H:i', $v['add_time']) : $lang['no_limit']; ?></td>

+ 38 - 29
admin/templates/default/provider.remit.edit.php

@@ -40,7 +40,7 @@
                             </tr>
                             <tr class="w500">
                                 <th class="w150 align-center">通道名称</th>
-
+                                <th class="w150 align-center">当前余额</th>
                                 <th class="w150 align-center">打款金额</th>
                             </tr>
                             <?php foreach ($data['providers'] as $v){?>
@@ -50,6 +50,10 @@
                                     <td class="w100 align-center">
                                         <?php echo $v['store_name']; ?>
                                     </td>
+                                    <td class="w100 align-center" id="available">
+                                        <span><?php echo $v['available_predeposit']; ?></span>
+                                        <div style="color:red;"></div>
+                                    </td>
                                     <td class="w100 align-center">
                                         <input type="hidden" name="strs[]" value="<?php echo $v['co_id']?>-<?php echo $v['provider_id']?>">
                                         <input type="number" name="remits[]" class="priceInput" value="<?php echo $v['remit'];?>">
@@ -120,6 +124,19 @@
             });
         }
 
+        //接口查询余额
+        $('#available div').each(function(index, item) {
+            let txt = $(item).prev().text()
+            txt = parseFloat(txt)
+            if (txt < 0 && txt < -10000) {
+                $(item).text('(' + '-' + cnMoneyFormat(txt) + ')')
+            } else if (txt > 0 && txt > 10000) {
+                $(item).text('(' + cnMoneyFormat(txt) + ')')
+            } else {
+                $(item).text(cnMoneyFormat(txt))
+            }
+        })
+
         $("#submitBtn").click(function() {
             if ($("#price_form").valid()) {
                 $("#price_form").submit();
@@ -150,14 +167,17 @@
             }
         });
     });
-    //数字转大写
     function cnMoneyFormat(money) {
         let number_data = money;
-        number_data = parseInt(number_data);
+        if (number_data < 0) {
+            number_data = number_data.toString();
+            let num_data = number_data.substring(1, number_data.length)
+            number_data = parseInt(num_data);
+        } else {
+            number_data = parseInt(number_data);
+        }
         let yi = 0; //亿
         let wan = 0; //万
-        let qian = 0; //千
-        let qian_s = 1000; //千
         let wan_s = 10000; //万
         let yi_s = 100000000; //亿
         //取整
@@ -165,6 +185,7 @@
             data = Math.floor(data);
             return data;
         }
+
         //为0判断输出
         function data_if(data, amount) {
             if (data === 0) {
@@ -173,49 +194,37 @@
                 return data + amount;
             }
         }
+
         //亿
         function yi_f(data) {
             yi = qz(data / 100000000);
             data = data - (yi * yi_s);
-            return {
+            let data_json = {
                 data1: data_if(yi, '亿'),
                 data2: data,
-            };
+            }
+            return data_json;
         }
+
         //万
         function wan_f(data) {
             wan = qz(data / 10000);
             data = data - (wan * wan_s);
-            return {
+            let data_json = {
                 data1: data_if(wan, '万'),
                 data2: data,
-            };
-        }
-        //千
-        function qian_f(data) {
-            qian = qz(data / 1000);
-            data = data - (qian * qian_s);
-            return {
-                data1: data_if(qian, '千'),
-                data2: data,
-            };
+            }
+            return data_json;
         }
+
         yi = yi_f(number_data);
         number_data = yi.data2;
         wan = wan_f(number_data);
         number_data = wan.data2;
-        qian = qian_f(number_data);
-        number_data = qian.data2;
-        let result = yi.data1 + wan.data1 + qian.data1   + number_data;
-        let resultvalue = result.substr(0, 1)
-        if (resultvalue === 0) {
-            result = result.substr(1, result.length)
-        }
-        let resultvali = result.substr(0, 3);
-        if(resultvali === 'NaN') {
+        let result = yi.data1 + wan.data1;
+        if (result == 0) {
             return ''
-        }else {
-            return result
         }
+        return result
     }
 </script>

+ 49 - 48
admin/templates/default/provider.remit.php

@@ -38,29 +38,25 @@
                             <tr class="w500">
                                 <th class="w150 align-center">通道名称</th>
                                 <th class="w150 align-center">当前余额</th>
-                                <th class="w150 align-center">接口余额</th>
                                 <th class="w150 align-center">打款金额</th>
                             </tr>
                             <?php foreach ($data['providers'] as $v){?>
-
-                            <tbody class="tbody">
-                                <tr class="w500" style="height: 50px;">
-                                    <td class="w100 align-center">
-                                        <?php echo $v['store_name']; ?>
-                                    </td>
-                                    <td class="w100 align-center">
-                                        <?php echo $v['available_predeposit']; ?>
-                                    </td>
-                                    <td class="w100 align-center">
-                                        <?php echo $v['balance']; ?>
-                                    </td>
-                                    <td class="w100 align-center">
-                                        <input type="hidden" name="strs[]" value="<?php echo $v['co_id']?>-<?php echo $v['provider_id']?>">
-                                        <input type="text" name="remits[]" class="priceInput" value="<?php echo $v['remit'];?>">
-                                        <div id="money" style="color:red;"></div>
-                                    </td>
-                                </tr>
-                            </tbody>
+                                <tbody class="tbody">
+                                    <tr class="w500" style="height: 50px;">
+                                        <td class="w100 align-center">
+                                            <?php echo $v['store_name']; ?>
+                                        </td>
+                                        <td id="available" class="align-center">
+                                            <span><?php echo $v['available_predeposit'] ?? 0; ?></span>
+                                            <div style=" display: inline-block;margin-left: 7px; color:red;"></div>
+                                        </td>
+                                        <td class="w100 align-center">
+                                            <input type="hidden" name="strs[]" value="<?php echo $v['co_id']?>-<?php echo $v['provider_id']?>">
+                                            <input type="text" name="remits[]" class="priceInput" value="<?php echo $v['remit'];?>">
+                                            <div id="money" style="color:red;"></div>
+                                        </td>
+                                    </tr>
+                                </tbody>
                             <?php }?>
                         </table>
                     </td>
@@ -125,6 +121,19 @@
             });
         }
 
+        //接口查询余额
+        $('#available div').each(function(index, item) {
+            let txt = $(item).prev().text()
+            txt = parseFloat(txt)
+            if (txt < 0 && txt < -10000) {
+                $(item).text('(' + '-' + cnMoneyFormat(txt) + ')')
+            } else if (txt > 0 && txt > 10000) {
+                $(item).text('(' + cnMoneyFormat(txt) + ')')
+            } else {
+                $(item).text(cnMoneyFormat(txt))
+            }
+        })
+
         $("#submitBtn").click(function() {
             if ($("#price_form").valid()) {
                 $("#price_form").submit();
@@ -155,14 +164,17 @@
         });
     });
 
-    //数字转大写
     function cnMoneyFormat(money) {
         let number_data = money;
-        number_data = parseInt(number_data);
+        if (number_data < 0) {
+            number_data = number_data.toString();
+            let num_data = number_data.substring(1, number_data.length)
+            number_data = parseInt(num_data);
+        } else {
+            number_data = parseInt(number_data);
+        }
         let yi = 0; //亿
         let wan = 0; //万
-        let qian = 0; //千
-        let qian_s = 1000; //千
         let wan_s = 10000; //万
         let yi_s = 100000000; //亿
         //取整
@@ -170,6 +182,7 @@
             data = Math.floor(data);
             return data;
         }
+
         //为0判断输出
         function data_if(data, amount) {
             if (data === 0) {
@@ -178,49 +191,37 @@
                 return data + amount;
             }
         }
+
         //亿
         function yi_f(data) {
             yi = qz(data / 100000000);
             data = data - (yi * yi_s);
-            return {
+            let data_json = {
                 data1: data_if(yi, '亿'),
                 data2: data,
-            };
+            }
+            return data_json;
         }
+
         //万
         function wan_f(data) {
             wan = qz(data / 10000);
             data = data - (wan * wan_s);
-            return {
+            let data_json = {
                 data1: data_if(wan, '万'),
                 data2: data,
-            };
-        }
-        //千
-        function qian_f(data) {
-            qian = qz(data / 1000);
-            data = data - (qian * qian_s);
-            return {
-                data1: data_if(qian, '千'),
-                data2: data,
-            };
+            }
+            return data_json;
         }
+
         yi = yi_f(number_data);
         number_data = yi.data2;
         wan = wan_f(number_data);
         number_data = wan.data2;
-        qian = qian_f(number_data);
-        number_data = qian.data2;
-        let result = yi.data1 + wan.data1 + qian.data1   + number_data;
-        let resultvalue = result.substr(0, 1)
-        if (resultvalue === 0) {
-            result = result.substr(1, result.length)
-        }
-        let resultvali = result.substr(0, 3);
-        if(resultvali === 'NaN') {
+        let result = yi.data1 + wan.data1;
+        if (result == 0) {
             return ''
-        }else {
-            return result
         }
+        return result
     }
 </script>

+ 6 - 4
admin/templates/default/refill.company.remit.php

@@ -101,10 +101,12 @@
                         <td class="align-center">
                             <?php if ($v['remit_state'] == refill_company_remitModel::remit_init) { ?>
                                 <a href="index.php?act=refill_company&op=remit_commit&remit_id=<?php echo $v['remit_id'] ?>">确认提交</a>
-                            <?php } ?>
-                            |
-                            <a href="index.php?act=refill_company&op=remit_edit&remit_id=<?php echo $v['remit_id'] ?>">编辑</a>
-                            |
+                                |
+                                <a href="index.php?act=refill_company&op=remit_del&remit_id=<?php echo $v['remit_id'] ?>">删除</a>
+                                |
+                                <a href="index.php?act=refill_company&op=remit_edit&remit_id=<?php echo $v['remit_id'] ?>">编辑</a>
+                                |
+                            <?php }?>
                             <a href="index.php?act=refill_company&op=remit_export&remit_id=<?php echo $v['remit_id'] ?>">下载表格</a>
                         </td>
                     </tr>

+ 25 - 25
data/config/xyz/refill.ini.php

@@ -5391,47 +5391,47 @@ $guitong_phone = ['name' => 'guitong', 'store_id' => 210, 'qualitys' => '1',
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
-$jike_phone = ['name' => 'jike', 'store_id' => 211, 'qualitys' => '3',
+$jike_phone = ['name' => 'jike', 'store_id' => 211, 'qualitys' => '1',
     'amount' => [
 //        10 => [
-//            ['goods_id' => 7786, 'price' => 9.96, 'quality' => 3, 'card_type' => 'chinamobile'],
-//            ['goods_id' => 7786, 'price' => 9.96, 'quality' => 3, 'card_type' => 'chinaunicom'],
-//            ['goods_id' => 7786, 'price' => 9.96, 'quality' => 3, 'card_type' => 'chinatelecom']
+//            ['goods_id' => 7786, 'price' => 9.96, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7786, 'price' => 9.96, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7786, 'price' => 9.96, 'quality' => 1, 'card_type' => 'chinatelecom']
 //        ],
 //        20 => [
-//            ['goods_id' => 7787, 'price' => 19.92, 'quality' => 3, 'card_type' => 'chinamobile'],
-//            ['goods_id' => 7787, 'price' => 19.92, 'quality' => 3, 'card_type' => 'chinaunicom'],
-//            ['goods_id' => 7787, 'price' => 19.92, 'quality' => 3, 'card_type' => 'chinatelecom']
+//            ['goods_id' => 7787, 'price' => 19.92, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7787, 'price' => 19.92, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7787, 'price' => 19.92, 'quality' => 1, 'card_type' => 'chinatelecom']
 //        ],
 //        30 => [
-//            ['goods_id' => 7788, 'price' => 29.92, 'quality' => 3, 'card_type' => 'chinamobile'],
-//            ['goods_id' => 7788, 'price' => 28.92, 'quality' => 3, 'card_type' => 'chinaunicom'],
-//            ['goods_id' => 7788, 'price' => 29.92, 'quality' => 3, 'card_type' => 'chinatelecom']
+//            ['goods_id' => 7788, 'price' => 29.92, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7788, 'price' => 28.92, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7788, 'price' => 29.92, 'quality' => 1, 'card_type' => 'chinatelecom']
 //        ],
         50 => [
-            ['goods_id' => 7789, 'price' => 49.8, 'quality' => 3, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7789, 'price' => 49.8, 'quality' => 3, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7789, 'price' => 49.8, 'quality' => 3, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7789, 'price' => 49.8, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7789, 'price' => 49.8, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7789, 'price' => 49.8, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
         100 => [
-            ['goods_id' => 7790, 'price' => 99.6, 'quality' => 3, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7790, 'price' => 99.6, 'quality' => 3, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7790, 'price' => 99.6, 'quality' => 3, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7790, 'price' => 99.6, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7790, 'price' => 99.6, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7790, 'price' => 99.6, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
         200 => [
-            ['goods_id' => 7791, 'price' => 199.2, 'quality' => 3, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7791, 'price' => 199.2, 'quality' => 3, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7791, 'price' => 199.2, 'quality' => 3, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7791, 'price' => 199.2, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7791, 'price' => 199.2, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7791, 'price' => 199.2, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
 //        300 => [
-//            ['goods_id' => 7792, 'price' => 298.8, 'quality' => 3, 'card_type' => 'chinamobile'],
-//            ['goods_id' => 7792, 'price' => 298.8, 'quality' => 3, 'card_type' => 'chinaunicom'],
-//            ['goods_id' => 7792, 'price' => 298.8, 'quality' => 3, 'card_type' => 'chinatelecom']
+//            ['goods_id' => 7792, 'price' => 298.8, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7792, 'price' => 298.8, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7792, 'price' => 298.8, 'quality' => 1, 'card_type' => 'chinatelecom']
 //        ],
 //        500 => [
-//            ['goods_id' => 7793, 'price' => 498, 'quality' => 3, 'card_type' => 'chinamobile'],
-//            ['goods_id' => 7793, 'price' => 498, 'quality' => 3, 'card_type' => 'chinaunicom'],
-//            ['goods_id' => 7793, 'price' => 498, 'quality' => 3, 'card_type' => 'chinatelecom']
+//            ['goods_id' => 7793, 'price' => 498, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7793, 'price' => 498, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7793, 'price' => 498, 'quality' => 1, 'card_type' => 'chinatelecom']
 //        ]
     ],
     'official_sn' => true, 'refill_type' => 'api'];

+ 25 - 25
data/config/yl/refill.ini.php

@@ -5360,47 +5360,47 @@ $huoshenguoman_phone = ['name' => 'huoshenguoman', 'store_id' => 209, 'qualitys'
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
-$jike_phone = ['name' => 'jike', 'store_id' => 211, 'qualitys' => '3',
+$jike_phone = ['name' => 'jike', 'store_id' => 211, 'qualitys' => '1',
     'amount' => [
 //        10 => [
-//            ['goods_id' => 7786, 'price' => 9.96, 'quality' => 3, 'card_type' => 'chinamobile'],
-//            ['goods_id' => 7786, 'price' => 9.96, 'quality' => 3, 'card_type' => 'chinaunicom'],
-//            ['goods_id' => 7786, 'price' => 9.96, 'quality' => 3, 'card_type' => 'chinatelecom']
+//            ['goods_id' => 7786, 'price' => 9.96, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7786, 'price' => 9.96, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7786, 'price' => 9.96, 'quality' => 1, 'card_type' => 'chinatelecom']
 //        ],
 //        20 => [
-//            ['goods_id' => 7787, 'price' => 19.92, 'quality' => 3, 'card_type' => 'chinamobile'],
-//            ['goods_id' => 7787, 'price' => 19.92, 'quality' => 3, 'card_type' => 'chinaunicom'],
-//            ['goods_id' => 7787, 'price' => 19.92, 'quality' => 3, 'card_type' => 'chinatelecom']
+//            ['goods_id' => 7787, 'price' => 19.92, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7787, 'price' => 19.92, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7787, 'price' => 19.92, 'quality' => 1, 'card_type' => 'chinatelecom']
 //        ],
 //        30 => [
-//            ['goods_id' => 7788, 'price' => 29.92, 'quality' => 3, 'card_type' => 'chinamobile'],
-//            ['goods_id' => 7788, 'price' => 28.92, 'quality' => 3, 'card_type' => 'chinaunicom'],
-//            ['goods_id' => 7788, 'price' => 29.92, 'quality' => 3, 'card_type' => 'chinatelecom']
+//            ['goods_id' => 7788, 'price' => 29.92, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7788, 'price' => 28.92, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7788, 'price' => 29.92, 'quality' => 1, 'card_type' => 'chinatelecom']
 //        ],
         50 => [
-            ['goods_id' => 7789, 'price' => 49.8, 'quality' => 3, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7789, 'price' => 49.8, 'quality' => 3, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7789, 'price' => 49.8, 'quality' => 3, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7789, 'price' => 49.8, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7789, 'price' => 49.8, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7789, 'price' => 49.8, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
         100 => [
-            ['goods_id' => 7790, 'price' => 99.6, 'quality' => 3, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7790, 'price' => 99.6, 'quality' => 3, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7790, 'price' => 99.6, 'quality' => 3, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7790, 'price' => 99.6, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7790, 'price' => 99.6, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7790, 'price' => 99.6, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
         200 => [
-            ['goods_id' => 7791, 'price' => 199.2, 'quality' => 3, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7791, 'price' => 199.2, 'quality' => 3, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7791, 'price' => 199.2, 'quality' => 3, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7791, 'price' => 199.2, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7791, 'price' => 199.2, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7791, 'price' => 199.2, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
 //        300 => [
-//            ['goods_id' => 7792, 'price' => 298.8, 'quality' => 3, 'card_type' => 'chinamobile'],
-//            ['goods_id' => 7792, 'price' => 298.8, 'quality' => 3, 'card_type' => 'chinaunicom'],
-//            ['goods_id' => 7792, 'price' => 298.8, 'quality' => 3, 'card_type' => 'chinatelecom']
+//            ['goods_id' => 7792, 'price' => 298.8, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7792, 'price' => 298.8, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7792, 'price' => 298.8, 'quality' => 1, 'card_type' => 'chinatelecom']
 //        ],
 //        500 => [
-//            ['goods_id' => 7793, 'price' => 498, 'quality' => 3, 'card_type' => 'chinamobile'],
-//            ['goods_id' => 7793, 'price' => 498, 'quality' => 3, 'card_type' => 'chinaunicom'],
-//            ['goods_id' => 7793, 'price' => 498, 'quality' => 3, 'card_type' => 'chinatelecom']
+//            ['goods_id' => 7793, 'price' => 498, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7793, 'price' => 498, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7793, 'price' => 498, 'quality' => 1, 'card_type' => 'chinatelecom']
 //        ]
     ],
     'official_sn' => true, 'refill_type' => 'api'];

+ 6 - 1
data/model/refill_company_remit.model.php

@@ -12,7 +12,7 @@ class refill_company_remitModel extends Model
         parent::__construct('refill_company_remit');
     }
 
-    public function getRemitList($condition, $pagesize = '',$total = 0, $field = '*', $order = 'add_time asc', $limit = '', $master = false)
+    public function getRemitList($condition, $pagesize = '',$total = 0, $field = '*', $order = 'add_time desc', $limit = '', $master = false)
     {
         $list = $this->field($field)->where($condition)->page($pagesize,$total)->order($order)->limit($limit)->master($master)->select();
         if (empty($list)) return [];
@@ -33,4 +33,9 @@ class refill_company_remitModel extends Model
     {
         return $this->where($condition)->update($update);
     }
+
+    public function DelRemit($remit_id)
+    {
+        return $this->where(['remit_id' => $remit_id])->delete();
+    }
 }

BIN
helper/refill/api/xyz/guochuang/20220715广东移动调价函.png


BIN
helper/refill/api/xyz/guochuang/20220718辽宁移动调价函.png


BIN
helper/refill/api/xyz/guochuang/20220718青海移动调价函.png


+ 3 - 3
helper/refill/api/xyz/guochuang/config.php

@@ -64,15 +64,15 @@ class config
     const Price = [
         //移动
         "4-10-2" => 10.15, "4-20-2" => 19.92, "4-30-2" => 29.94, "4-50-2" => 49.9, "4-100-2" => 99.8, "4-200-2" => 199.6, "4-300-2" => 299.4, "4-500-2" => 499,//天津 2
-        "4-10-6" => 9.8, "4-20-6" => 19.6, "4-30-6" => 29.4, "4-50-6" => 49, "4-100-6" => 98, "4-200-6" => 196, "4-300-6" => 294, "4-500-6" => 490,//辽宁 6
+        "4-10-6" => 9.85, "4-20-6" => 19.7, "4-30-6" => 29.55, "4-50-6" => 49.25, "4-100-6" => 98.5, "4-200-6" => 197, "4-300-6" => 295.5, "4-500-6" => 492.5,//辽宁 6
         "4-10-9" => 9.94, "4-20-9" => 19.88, "4-30-9" => 29.82, "4-50-9" => 49.7, "4-100-9" => 99.4,//上海 9
         "4-10-8" => 10.015, "4-20-8" => 20.03, "4-30-8" => 30.045, "4-50-8" => 50.075, "4-100-8" => 100.15, "4-200-8" => 200.3, "4-300-8" => 300.9, "4-500-8" => 501.5,//黑龙江 8
-        "4-10-29" => 9.765, "4-20-29" => 19.53, "4-30-29" => 29.295, "4-50-29" => 48.825, "4-100-29" => 97.65, "4-200-29" => 195.3, "4-300-29" => 292.95, "4-500-29" => 488.25,//青海 29
+        "4-10-29" => 9.78, "4-20-29" => 19.56, "4-30-29" => 29.34, "4-50-29" => 48.9, "4-100-29" => 97.8, "4-200-29" => 195.6, "4-300-29" => 293.4, "4-500-29" => 489,//青海 29
         "4-10-28" => 9.985, "4-20-28" => 19.97, "4-30-28" => 29.955, "4-50-28" => 49.925, "4-100-28" => 99.85, "4-200-28" => 199.7, "4-300-28" => 299.55, "4-500-28" => 499.25,//甘肃 28
         "4-10-13" => 10.22, "4-20-13" => 19.94, "4-30-13" => 29.91, "4-50-13" => 49.85, "4-100-13" => 99.7, "4-200-13" => 199.4, "4-300-13" => 300.9, "4-500-13" => 501.5,//福建 13
         "4-10-5" => 10.035, "4-20-5" => 20.07, "4-30-5" => 30.09, "4-50-5" => 50.15, "4-100-5" => 100.3, "4-200-5" => 200.4, "4-300-5" => 300.6, "4-500-5" => 501,//内蒙古 5
         "4-30-18" => 29.835, "4-50-18" => 49.725, "4-100-18" => 99.45, "4-200-18" => 198.3,//湖南 18
-        "4-10-19" => 9.975, "4-20-19" => 19.95, "4-30-19" => 29.964, "4-50-19" => 49.94, "4-100-19" => 99.88, "4-200-19" => 199.76, "4-300-19" => 299.64, "4-500-19" => 499.4,//广东 19
+        "4-10-19" => 9.975, "4-20-19" => 19.95, "4-30-19" => 29.94, "4-50-19" => 49.9, "4-100-19" => 99.8, "4-200-19" => 199.6, "4-300-19" => 299.4, "4-500-19" => 499,//广东 19
         "4-10-7" => 9.93, "4-20-7" => 19.86, "4-30-7" => 29.52, "4-50-7" => 49.2, "4-100-7" => 98.4, "4-200-7" => 196.8, "4-300-7" => 295.2, "4-500-7" => 492,//吉林 7
         "4-10-1" => 10.31, "4-20-1" => 20.32, "4-30-1" => 30.33, "4-50-1" => 50.35, "4-100-1" => 100.4, "4-200-1" => 200.3, "4-300-1" => 300.45, "4-500-1" => 500.75,//北京 1
         "4-10-22" => 10.015, "4-20-22" => 20.03, "4-30-22" => 30.045, "4-50-22" => 50.075, "4-100-22" => 100.15, "4-200-22" => 200.3, "4-300-22" => 300.45, "4-500-22" => 500.75,//重庆 22

+ 3 - 3
helper/refill/api/yl/guochuang/config.php

@@ -64,15 +64,15 @@ class config
     const Price = [
         //移动
         "4-10-2" => 10.15, "4-20-2" => 19.92, "4-30-2" => 29.94, "4-50-2" => 49.9, "4-100-2" => 99.8, "4-200-2" => 199.6, "4-300-2" => 299.4, "4-500-2" => 499,//天津 2
-        "4-10-6" => 9.8, "4-20-6" => 19.6, "4-30-6" => 29.4, "4-50-6" => 49, "4-100-6" => 98, "4-200-6" => 196, "4-300-6" => 294, "4-500-6" => 490,//辽宁 6
+        "4-10-6" => 9.85, "4-20-6" => 19.7, "4-30-6" => 29.55, "4-50-6" => 49.25, "4-100-6" => 98.5, "4-200-6" => 197, "4-300-6" => 295.5, "4-500-6" => 492.5,//辽宁 6
         "4-10-9" => 9.94, "4-20-9" => 19.88, "4-30-9" => 29.82, "4-50-9" => 49.7, "4-100-9" => 99.4,//上海 9
         "4-10-8" => 10.015, "4-20-8" => 20.03, "4-30-8" => 30.045, "4-50-8" => 50.075, "4-100-8" => 100.15, "4-200-8" => 200.3, "4-300-8" => 300.9, "4-500-8" => 501.5,//黑龙江 8
-        "4-10-29" => 9.765, "4-20-29" => 19.53, "4-30-29" => 29.295, "4-50-29" => 48.825, "4-100-29" => 97.65, "4-200-29" => 195.3, "4-300-29" => 292.95, "4-500-29" => 488.25,//青海 29
+        "4-10-29" => 9.78, "4-20-29" => 19.56, "4-30-29" => 29.34, "4-50-29" => 48.9, "4-100-29" => 97.8, "4-200-29" => 195.6, "4-300-29" => 293.4, "4-500-29" => 489,//青海 29
         "4-10-28" => 9.985, "4-20-28" => 19.97, "4-30-28" => 29.955, "4-50-28" => 49.925, "4-100-28" => 99.85, "4-200-28" => 199.7, "4-300-28" => 299.55, "4-500-28" => 499.25,//甘肃 28
         "4-10-13" => 10.22, "4-20-13" => 19.94, "4-30-13" => 29.91, "4-50-13" => 49.85, "4-100-13" => 99.7, "4-200-13" => 199.4, "4-300-13" => 300.9, "4-500-13" => 501.5,//福建 13
         "4-10-5" => 10.035, "4-20-5" => 20.07, "4-30-5" => 30.09, "4-50-5" => 50.15, "4-100-5" => 100.3, "4-200-5" => 200.4, "4-300-5" => 300.6, "4-500-5" => 501,//内蒙古 5
         "4-30-18" => 29.835, "4-50-18" => 49.725, "4-100-18" => 99.45, "4-200-18" => 198.3,//湖南 18
-        "4-10-19" => 9.975, "4-20-19" => 19.95, "4-30-19" => 29.964, "4-50-19" => 49.94, "4-100-19" => 99.88, "4-200-19" => 199.76, "4-300-19" => 299.64, "4-500-19" => 499.4,//广东 19
+        "4-10-19" => 9.975, "4-20-19" => 19.95, "4-30-19" => 29.94, "4-50-19" => 49.9, "4-100-19" => 99.8, "4-200-19" => 199.6, "4-300-19" => 299.4, "4-500-19" => 499,//广东 19
         "4-10-7" => 9.93, "4-20-7" => 19.86, "4-30-7" => 29.52, "4-50-7" => 49.2, "4-100-7" => 98.4, "4-200-7" => 196.8, "4-300-7" => 295.2, "4-500-7" => 492,//吉林 7
         "4-10-1" => 10.31, "4-20-1" => 20.32, "4-30-1" => 30.33, "4-50-1" => 50.35, "4-100-1" => 100.4, "4-200-1" => 200.3, "4-300-1" => 300.45, "4-500-1" => 500.75,//北京 1
         "4-10-22" => 10.015, "4-20-22" => 20.03, "4-30-22" => 30.045, "4-50-22" => 50.075, "4-100-22" => 100.15, "4-200-22" => 200.3, "4-300-22" => 300.45, "4-500-22" => 500.75,//重庆 22