Jelajahi Sumber

Merge branch 'remit' into rprofit

stanley-king 2 tahun lalu
induk
melakukan
f20c29ff47

+ 25 - 0
admin/control/control.php

@@ -10,6 +10,8 @@ defined('InShopNC') or exit('Access Invalid!');
 require_once(BASE_HELPER_PATH . '/mtopcard/mtopcard.php');
 require_once(BASE_HELPER_PATH . '/refill/RefillFactory.php');
 require_once(BASE_DATA_PATH . '/model/merchant.model.php');
+require_once(BASE_DATA_PATH . '/model/refill_company.model.php');
+
 class SystemControl
 {
     const STATE_TEXT = ['使用中', '已禁用'];
@@ -503,4 +505,27 @@ class SystemControl
         }
         return $order_list;
     }
+
+    protected function refill_companys($cond)
+    {
+        $data = [];
+        $cond['opened'] = refill_companyModel::opened_start;
+        $refill_company = Model('refill_company')->getCompanyList($cond);
+        foreach ($refill_company as $company)
+        {
+            $data[$company['co_id']] = $company;
+        }
+        return $data;
+    }
+
+    protected function remit_cfg()
+    {
+        $config = rcache('remit', 'refill-');
+        if (empty($config)) {
+            $config = [];
+        } else {
+            $config = unserialize($config['cfg']);
+        }
+        return $config;
+    }
 }

+ 9 - 1
admin/control/merchant.php

@@ -36,10 +36,13 @@ class merchantControl extends SystemControl
         $debt_total = 0;
         $available_total = 0;
         $merchant_list = $model_merchant->getMerchantList($condition, 200, 'available_predeposit desc,merchant_state asc,mchid desc', true);
+        $refill_company = $this->refill_companys(['co_type' => refill_companyModel::co_type_merchant]);
         foreach ($merchant_list as $key => $merchant) {
             $mchid = $merchant['mchid'];
             $available_predeposit = $merchant['available_predeposit'] - $merchant['credit_bonus'];
-            $merchant_list[$key]['available_predeposit'] = number_format($available_predeposit,4,'.',',');;
+            $merchant_list[$key]['available_predeposit'] = number_format($available_predeposit,4,'.',',');
+            $merchant_list[$key]['co_name'] = $refill_company[$merchant['co_id']]['co_name'] ?? '/';
+
             if(!in_array($mchid, $config['test_mchid']) && $merchant['merchant_state'] == 1) {
                 if($available_predeposit >= 0) {
                     $available_total += $available_predeposit;
@@ -194,6 +197,7 @@ class merchantControl extends SystemControl
             $update['password'] = md5($update['org_pwd']);
             $update['alarm_amount'] = $_POST['alarm_amount'] ?? 0;
             $update['manual_recharge'] = $_POST['manual_recharge'];
+            $update['co_id'] = $_POST['co_id'] ?? 0;
 
             $day_timeout = intval($_POST['day_timeout']);
             $night_timeout = intval($_POST['night_timeout']);
@@ -244,6 +248,8 @@ class merchantControl extends SystemControl
                 showMessage('机构编辑失败', 'index.php?act=merchant&op=merchant');
             }
         }
+        $refill_company = $this->refill_companys(['co_type' => refill_companyModel::co_type_merchant]);
+        Tpl::output('refill_company', $refill_company);
         Tpl::output('merchant', $merchant);
         Tpl::showpage('merchant.edit');
     }
@@ -999,6 +1005,8 @@ class merchantControl extends SystemControl
             showMessage('通道信息有误');
         }
         $type_text = ['油卡', '手机充值卡'];
+        $refill_company = $this->refill_companys(['co_type' => refill_companyModel::co_type_provider]);
+        Tpl::output('refill_company', $refill_company);
         Tpl::output('type_text', $type_text);
         Tpl::output('provider', $provider);
         Tpl::showpage('provider.edit');

+ 114 - 0
admin/control/provider.php

@@ -30,6 +30,7 @@ class providerControl extends SystemControl
             $condition['opened'] = 1;
         }
 
+        $refill_company = $this->refill_companys(['co_type' => refill_companyModel::co_type_provider]);
         $provider_items = $provider_model->table('refill_provider,store')
             ->field('refill_provider.*,store.store_name,store.member_id')
             ->join('inner')
@@ -49,6 +50,7 @@ class providerControl extends SystemControl
             $providers[$pid]['available_predeposit'] = 0;
             $quality_text = $provider['type'] == mtopcard\OilCardPaper ? $config['oil_quality_text'] : $config['phone_quality_text'];
             $providers[$pid]['quality_text'] = $quality_text[$provider['qualitys']];
+            $providers[$pid]['co_name'] = $refill_company[$provider['co_id']]['co_name'] ?? '/';
             $account_id = intval($provider['account_id']);
             if($account_id > 0) {
                 $mid_pids[$account_id] = $pid;
@@ -620,4 +622,116 @@ class providerControl extends SystemControl
         $excel_obj->addWorksheet($excel_obj->charset(L('exp_od_order'), CHARSET));
         $excel_obj->generateXML('通道余额明细导出-' . date('Y-m-d-H', time()));
     }
+
+    public function provider_remitOp()
+    {
+        $refill_company = $this->refill_companys(['co_type' => refill_companyModel::co_type_provider]);
+        if (chksubmit())
+        {
+            $remits = $_POST['remits'];
+            $strs = $_POST['strs'];
+            $operation = $_POST['operation'];
+            $title = '';
+            $remit_total = 0;
+            foreach ($strs as $key => $str)
+            {
+                $remit = $remits[$key];
+                if(empty($remit)) continue;
+                $item = explode('-', $str);
+                $co_id = $item[0];
+                $pid = $item[1];
+                $data[$co_id][$pid] = $remit;
+                $remit_total += $remit;
+            }
+            if(empty($data)) {
+                showMessage('未提交数据');
+            }
+            if(ADMIN_NAME === 'YEZI') {
+                $platform = '椰子';
+            }else{
+                $platform = '椰林';
+            }
+            foreach ($data as $co_id => $valuue)
+            {
+                $title .= "{$refill_company[$co_id]['co_name']}-";
+            }
+            $cur_time = time();
+            $date = date("YmdHi", $cur_time);
+            $title = "{$platform}-{$date}";
+
+            $remit_record = [
+                'title' => $title,
+                'amount' => $remit_total,
+                'params' => json_encode($data),
+                'operation' => $operation,
+                'add_time' => $cur_time,
+                'oper_time' => $cur_time
+            ];
+            Model('refill_company_remit')->addRemit($remit_record);
+            showMessage('操作成功', 'index.php?act=refill_company&op=remit_record');
+        }
+        else
+        {
+            $provider_items = $this->providers();
+            $result = $this->remit_data($provider_items, $refill_company);
+
+            Tpl::output('remit_data',$result);
+            Tpl::showpage('provider.remit');
+        }
+    }
+
+    private function remit_data($items, $refill_company): array
+    {
+        $providers = $mid_pids = $mids = $datas = $result =[];
+        foreach ($items as $item)
+        {
+            $co_id = $item['co_id'];
+            if(empty($co_id)) continue;
+            $pid = $item['provider_id'];
+            $account_id = intval($item['account_id']);
+            if($account_id > 0) {
+                $mid_pids[$account_id] = $pid;
+                $mids[] = $account_id;
+            }
+            $item['available_predeposit'] = 0;
+            $providers[$pid] = $item;
+        }
+        if(!empty($mids))
+        {
+            $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 ($providers as $provider)
+        {
+            $datas[$provider['co_id']][] = $provider;
+        }
+        $remit_cfg = $this->remit_cfg();
+        foreach ($datas as $co_id => $data)
+        {
+            $available_total = 0;
+            foreach ($data as $key => $value)
+            {
+                $remit = abs($value['available_predeposit'] - $remit_cfg['remit_money']);
+                if ($remit > 1000 && $value['available_predeposit'] < $remit_cfg['remit_money']) {
+                    $data[$key]['remit'] = intval($remit - ($remit % 1000));
+                } else {
+                    $data[$key]['remit'] = 0;
+                }
+                $available_total += $value['available_predeposit'];
+            }
+            if($available_total > $remit_cfg['remit_money']) continue;
+            $result[] = [
+                'co_name' => $refill_company[$co_id]['co_name'],
+                'providers' => $data
+            ];
+        }
+        return $result;
+    }
 }

+ 392 - 0
admin/control/refill_company.php

@@ -0,0 +1,392 @@
+<?php
+
+class refill_companyControl extends SystemControl
+{
+    public function __construct()
+    {
+        parent::__construct();
+    }
+
+    public function indexOp()
+    {
+        $cond = [];
+        $company_mod = Model('refill_company');
+        if(!empty($_GET['co_name'])) {
+            $cond['co_name'] = ['like', '%'.$_GET['co_name'].'%'];
+        }
+        if(!empty($_GET['co_type'])) {
+            $cond['params'] = $_GET['co_type'];
+        }
+        if(!empty($_GET['opened'])) {
+            $cond['opened'] = $_GET['opened'];
+        }
+        $list = $company_mod->getCompanyList($cond);
+
+        Tpl::output('list', $list);
+        Tpl::output('show_page', $company_mod->showpage());
+        Tpl::showpage('refill.company');
+    }
+
+    public function changeStateOp()
+    {
+        $co_id = intval($_GET['co_id']);
+        $opened = intval($_GET['opened']);
+        $company_mod = Model('refill_company');
+        $company_info = $company_mod->getCompanyInfo(['co_id' => $co_id]);
+        if (empty($company_info) || !in_array($opened, [1, 2])) {
+            showMessage('操作成功');
+        }
+        $resp = $company_mod->editCompany(['opened' => $opened], ['co_id' => $co_id]);
+        if (!$resp) {
+            showMessage('操作失败', 'index.php?act=refill_company&op=index', 'html', 'error');
+        }
+        showMessage('操作成功');
+    }
+
+    public function addOp()
+    {
+        $company_mod = Model('refill_company');
+        if (chksubmit())
+        {
+            $obj_validate = new Validator();
+            $obj_validate->validateparam = [
+                ["input" => $_POST["co_type"], "require" => "true", "message" => '必须选择公司类型'],
+                ["input" => $_POST["co_name"], "require" => "true", "message" => '公司名称不能为空'],
+                ["input" => $_POST["bank_name"], "require" => "true", "message" => '收款银行名称不能为空'],
+                ["input" => $_POST["bank_username"], "require" => "true", "message" => '开户人名称不能为空'],
+                ["input" => $_POST["bank_card_no"], "require" => "true", "message" => '收款卡号不能为空']
+            ];
+            $error = $obj_validate->validate();
+            if ($error != '') {
+                showMessage($error);
+            } else {
+                $insert_array['co_name'] = $_POST['co_name'];
+                $insert_array['co_type'] = $_POST['co_type'];
+                $insert_array['bank_name'] = $_POST['bank_name'];
+                $insert_array['bank_username'] = $_POST['bank_username'];
+                $insert_array['bank_card_no'] = $_POST['bank_card_no'];
+                $insert_array['max_debt'] = $_POST['max_debt'] ?? 0;
+                $insert_array['province'] = $_POST['province'] ?? '';
+                $insert_array['city'] = $_POST['city'] ?? '';
+                $insert_array['bank_code'] = $_POST['bank_code'] ?? '';
+                $insert_array['remark'] = $_POST['remark'] ?? '';
+                $insert_array['oper_time'] = time();
+                $co_id = $company_mod->addCompany($insert_array);
+                if ($co_id) {
+                    $cid = $_POST['cid'] ?? '';
+                    $this->co_id_bind($cid, $co_id, $insert_array['co_type']);
+                    showMessage('添加成功', 'index.php?act=refill_company&op=index');
+                } else {
+                    showMessage('添加失败');
+                }
+            }
+        }
+        else
+        {
+            Tpl::showpage('refill.company.add');
+        }
+    }
+
+    public function editOp()
+    {
+        $co_id = $_GET['co_id'] ?? $_POST['co_id'];
+        $company_mod = Model('refill_company');
+        $company_info = $company_mod->getCompanyInfo(['co_id' => $co_id]);
+        if (empty($company_info)) {
+            showMessage('公司信息不存在');
+        }
+        if (chksubmit()) {
+            $update['co_type'] = $_POST['co_type'];
+            $update['bank_name'] = trim($_POST['bank_name']);
+            $update['bank_username'] = trim($_POST['bank_username']);
+            $update['bank_card_no'] = trim($_POST['bank_card_no']);
+            $update['max_debt'] = trim($_POST['max_debt']);
+            $update['province'] = trim($_POST['province']);
+            $update['city'] = trim($_POST['city']);
+            $update['bank_code'] = trim($_POST['bank_code']);
+            $update['remark'] = trim($_POST['remark']);
+            $update['oper_time'] = time();
+
+            $result = $company_mod->editCompany($update, ['co_id' => $co_id]);
+            if (!$result) {
+                showMessage('编辑失败');
+            }
+            $cid = $_POST['cid'] ?? '';
+            $this->co_id_bind($cid, $co_id, $company_info['co_type']);
+            showMessage('编辑成功','index.php?act=refill_company&op=index');
+        }
+        else
+        {
+            $cid = [];
+            if($company_info['co_type'] == 'merchant') {
+                $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');
+            }
+            Tpl::output('cid', implode(',', $cid));
+            Tpl::output('company_info', $company_info);
+            Tpl::showpage('refill.company.edit');
+        }
+    }
+
+    private function co_id_bind($cid, $co_id, $co_type)
+    {
+        if(!empty($cid)) {
+            $cid = explode(',', $cid);
+            if($co_type == 'merchant'){
+                $cond['mchid'] = ['in', $cid];
+                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];
+                Model('')->table('refill_provider')->where(['co_id' => $co_id])->update(['co_id' => 0]);
+                Model('')->table('refill_provider')->where($cond)->update(['co_id' => $co_id]);
+            }
+        }
+    }
+
+    public function remit_cfgOp()
+    {
+        if(chksubmit())
+        {
+            unset($_POST['form_submit']);
+            $cache = [];
+            foreach ($_POST as $key => $value) {
+                $cache[$key] = $value;
+            }
+            wcache('remit', ['cfg' => serialize($cache)], 'refill-');
+            showMessage('编辑成功');
+        }
+        else
+        {
+            $config = rcache('remit', 'refill-');
+            if (empty($config)) {
+                $config = [];
+            } else {
+                $config = unserialize($config['cfg']);
+            }
+            Tpl::output('config', $config);
+            Tpl::showpage('remit.config');
+        }
+    }
+
+    public function remit_recordOp()
+    {
+        $mod_remit = Model('refill_company_remit');
+        $cond = [];
+        $start_unixtime = intval(strtotime($_GET['query_start_time']));
+        $end_unixtime = intval(strtotime($_GET['query_end_time']));
+        if ($start_unixtime > 0 && $end_unixtime > $start_unixtime) {
+            $cond['add_time'] = [['egt', $start_unixtime], ['lt', $end_unixtime], 'and'];
+        } elseif ($start_unixtime > 0) {
+            $cond['add_time'] = ['egt', $start_unixtime];
+        } elseif ($end_unixtime > 0) {
+            $cond['add_time'] = ['lt', $end_unixtime];
+        }
+        $list = $mod_remit->getRemitList($cond);
+        foreach ($list as $key => $value)
+        {
+            $list[$key]['amount'] = number_format($value['amount'],4,'.',',');
+        }
+        $refill_company = $this->refill_companys([]);
+
+        Tpl::output('list', $list);
+        Tpl::output('refill_company', $refill_company);
+        Tpl::output('show_page', $mod_remit->showpage());
+        Tpl::showpage('refill.company.remit');
+    }
+
+    public function remit_editOp()
+    {
+        $remit_id = $_GET['remit_id'] ?? $_POST['remit_id'];
+        $remit = $this->check_remit($remit_id);
+        $params = json_decode($remit['params'], true);
+        $provider_list = $this->providers();
+        foreach ($provider_list as $provider) {
+            $providers[$provider['provider_id']] = $provider;
+        }
+        $refill_company = $this->refill_companys(['co_type' => refill_companyModel::co_type_provider]);
+        if(chksubmit())
+        {
+            $remits = $_POST['remits'];
+            $strs = $_POST['strs'];
+            $operation = $_POST['operation'];
+            $remit_total = 0;
+            foreach ($strs as $key => $str)
+            {
+                $remit = $remits[$key];
+                if(empty($remit)) continue;
+                $item = explode('-', $str);
+                $co_id = $item[0];
+                $pid = $item[1];
+                $data[$co_id][$pid] = $remit;
+                $remit_total += $remit;
+            }
+            if(empty($data)) {
+                showMessage('未提交数据');
+            }
+            $remit_record = [
+                'amount' => $remit_total,
+                'params' => json_encode($data),
+                'operation' => $operation,
+                'oper_time' => time()
+            ];
+            Model('refill_company_remit')->editRemit($remit_record, ['remit_id' => $remit_id]);
+            showMessage('操作成功', 'index.php?act=refill_company&op=remit_record');
+        }
+        else
+        {
+            foreach ($params as $co_id => $item)
+            {
+                $data = [];
+                $data['co_name'] = $refill_company[$co_id]['co_name'];
+                foreach ($item as $pid => $remit_money)
+                {
+                    $providers[$pid]['remit'] = $remit_money;
+                    $data['providers'][] = $providers[$pid];
+                }
+                $result[] = $data;
+            }
+            Tpl::output('remit_data', $result);
+            Tpl::output('remit', $remit);
+            Tpl::showpage('provider.remit.edit');
+        }
+    }
+
+    public function remit_commitOp()
+    {
+        $mod = Model('refill_company_remit');
+
+        $remit_id = $_GET['remit_id'];
+        $remit = $this->check_remit($remit_id);
+        $params = json_decode($remit['params'], true);
+        $provider_list = $this->providers();
+        foreach ($provider_list as $provider) {
+            $providers[$provider['provider_id']] = $provider;
+        }
+        $bz = '批量打款';
+
+        foreach ($params as $item)
+        {
+            try {
+                $trans = new trans_wapper($mod, __METHOD__);
+                $remit_total = 0;
+                foreach ($item as $pid => $money)
+                {
+                    $amount_data = [
+                        'pointsnum' => $money,
+                        'operation' => $remit['operation'],
+                        'bz' => $bz
+                    ];
+                    $this->credit_save_money($money, 'add', $providers[$pid]['account_id'], $bz);
+                    $this->ct_provider_amount($amount_data, $providers[$pid]);
+                    $remit_total += $money;
+                }
+                $trans->commit();
+            } catch (Exception $e) {
+                $trans->rollback();
+                Log::record("remit_commit err: {$e->getMessage()}", Log::ERR);
+                showMessage('提交失败');
+            }
+        }
+        $mod->editRemit(['remit_state' => refill_company_remitModel::remit_have], ['remit_id' => $remit_id]);
+        showMessage('操作成功!');
+    }
+
+    private function ct_provider_amount($params, $provider_info)
+    {
+        $input['provider_id'] = $provider_info['provider_id'];
+        $input['memeber_id'] = $provider_info['account_id'];
+        $input['amount'] = $params['pointsnum'];
+        $input['operation'] = $params['operation'];
+        $input['add_time'] = time();
+        $input['bz'] = $params['bz'] ?? '';
+
+        return Model('provider_amount')->addAmount($input);
+    }
+
+    private function check_remit($remit_id)
+    {
+        $remit = Model('refill_company_remit')->getRemit($remit_id);
+        if(empty($remit)) {
+            showMessage('记录不存在');
+        }
+        return $remit;
+    }
+
+    public function remit_exportOp()
+    {
+        $remit_id = $_GET['remit_id'];
+        $remit = $this->check_remit($remit_id);
+        $params = json_decode($remit['params']);
+        $remit_cfg = $this->remit_cfg();
+        $remit_max = intval($remit_cfg['remit_max']);
+        $refill_company = $this->refill_companys(['co_type' => refill_companyModel::co_type_provider]);
+
+        foreach ($params as $co_id => $item)
+        {
+            $remit_total = 0;
+            foreach ($item as $money)
+            {
+                $remit_total += $money;
+            }
+            if( $remit_total < $remit_max) {
+                $refill_company[$co_id]['money'] = $remit_total;
+                $remit_data[] = $refill_company[$co_id];
+            }else{
+                for ( $i = $remit_total / $remit_max; $i>=0; --$i)
+                {
+                    if($i < 1) {
+                        $refill_company[$co_id]['money'] = $remit_total % $remit_max;
+                    } else {
+                        $refill_company[$co_id]['money'] = $remit_max;
+                    }
+                    $remit_data[] = $refill_company[$co_id];
+                }
+            }
+        }
+        $this->Export_file($remit['title'], $remit_data);
+    }
+
+    private function Export_file($file_name, $remit_data)
+    {
+        Language::read('export');
+        import('libraries.excel');
+        $excel_obj = new Excel();
+        $excel_data = [];
+        //设置样式
+        $excel_obj->setStyle(['id' => 's_title', 'Font' => ['FontName' => '宋体', 'Size' => '12', 'Bold' => '1']]);
+        //header
+        $excel_data[0][] = ['styleid' => 's_title', 'data' => '序号'];
+        $excel_data[0][] = ['styleid' => 's_title', 'data' => '收款人姓名'];
+        $excel_data[0][] = ['styleid' => 's_title', 'data' => '银行卡号'];
+        $excel_data[0][] = ['styleid' => 's_title', 'data' => '银行编码'];
+        $excel_data[0][] = ['styleid' => 's_title', 'data' => '省/直辖市'];
+        $excel_data[0][] = ['styleid' => 's_title', 'data' => '城市'];
+        $excel_data[0][] = ['styleid' => 's_title', 'data' => '开户行名称'];
+        $excel_data[0][] = ['styleid' => 's_title', 'data' => '付款金额'];
+        $excel_data[0][] = ['styleid' => 's_title', 'data' => '0(对私付款)/1(对公付款)'];
+
+        //data
+        foreach ($remit_data as $key => $data) {
+            if($data['money'] <= 0) continue;
+            $tmp = [];
+            $tmp[] = ['data' => $key+1];
+            $tmp[] = ['data' => $data['bank_username']];
+            $tmp[] = ['data' => $data['bank_card_no']];
+            $tmp[] = ['data' => $data['bank_code']];
+            $tmp[] = ['data' => $data['province']];
+            $tmp[] = ['data' => $data['city']];
+            $tmp[] = ['data' => $data['bank_name']];
+            $tmp[] = ['data' => $data['money']];
+            $tmp[] = ['data' => 1];
+            $excel_data[] = $tmp;
+        }
+        $excel_data = $excel_obj->charset($excel_data, CHARSET);
+        $excel_obj->addArray($excel_data);
+        $excel_obj->addWorksheet($excel_obj->charset(L('exp_od_order'), CHARSET));
+        $excel_obj->generateXML($file_name);
+    }
+}

+ 2 - 1
admin/include/menu.php

@@ -102,7 +102,8 @@ $arr = array(
 					array('args'=>'index,provider_group,merchant',			'text'=>'通道组管理'),
 					array('args'=>'index,ordersendlist,merchant',			'text'=>'订单监控'),
 					array('args'=>'index,orderstats,merchant',				'text'=>'对账管理'),
-					array('args'=>'intercept,refill_config,merchant',			'text'=>'充值拦截设置'),
+					array('args'=>'index,refill_company,merchant',				'text'=>'公司信息管理'),
+					array('args'=>'intercept,refill_config,merchant',		'text'=>'充值拦截设置'),
 					array('args'=>'stats,card_key,merchant',				'text'=>'卡密管理'),
 					array('args'=>'index,refill_third,merchant',			'text'=>'增值业务管理'),
 					array('args'=>'index,refill_stock,merchant',			'text'=>'库存管理'),

+ 15 - 0
admin/templates/default/merchant.edit.php

@@ -91,6 +91,21 @@
                     </label>关闭
                 </td>
             </tr>
+            <tr class="noborder">
+                <td colspan="2" class="required"><label class="validation" for="co_type">公司绑定:</label></td>
+            </tr>
+            <tr class="">
+                <td class="vatop rowform">
+                    <label for="co_id"></label>
+                    <select name="co_id" id="co_id">
+                        <option value="">请选择...</option>
+                        <?php foreach ($output['refill_company'] as $company){ ?>
+                            <option value="<?php echo $company['co_id'];?>" <?php if($output['provider']['co_id'] == $company['co_id']){ echo 'selected';}?>><?php echo $company['co_name'];?></option>
+                        <?php }?>
+                    </select>
+                </td>
+                <td class="vatop tips"></td>
+            </tr>
             </tbody>
             <tfoot>
             <tr class="tfoot">

+ 2 - 0
admin/templates/default/merchant.index.php

@@ -81,6 +81,7 @@ defined('InShopNC') or exit('Access Invalid!'); ?>
                         <th class="align-left" style="text-align: left">机构账号</th>
                         <th class="align-center">会员ID</th>
                         <th class="align-left">机构公司名称</th>
+                        <th class="align-left">绑定公司名称</th>
                         <th class="align-right">所剩余额</th>
                         <th class="align-right">授信额度</th>
                         <th class="align-right">预警余额</th>
@@ -102,6 +103,7 @@ defined('InShopNC') or exit('Access Invalid!'); ?>
                                     <td class="align-left"><?php echo $v['name']; ?></td>
                                     <td class="align-center"><?php echo $v['admin_id']; ?></td>
                                     <td class="align-left"><?php echo $v['company_name']; ?></td>
+                                    <td class="align-left"><?php echo $v['co_name']; ?></td>
                                     <td id="just" class="align-right">
                                         <?php if ($v['available_predeposit'] > 0) { ?>
                                             <span style="color: #0bb20c">

+ 15 - 0
admin/templates/default/provider.edit.php

@@ -74,6 +74,21 @@
                 <td class="vatop rowform"><input type="text" value="<?php echo $output['provider']['end_period']?>" name="end_period" id="end_period" class="txt"></td>
                 <td class="vatop tips"></td>
             </tr>
+            <tr class="noborder">
+                <td colspan="2" class="required"><label class="validation" for="co_type">公司绑定:</label></td>
+            </tr>
+            <tr class="">
+                <td class="vatop rowform">
+                    <label for="co_id"></label>
+                    <select name="co_id" id="co_id">
+                        <option value="">请选择...</option>
+                        <?php foreach ($output['refill_company'] as $company){ ?>
+                            <option value="<?php echo $company['co_id'];?>" <?php if($output['provider']['co_id'] == $company['co_id']){ echo 'selected';}?>><?php echo $company['co_name'];?></option>
+                        <?php }?>
+                    </select>
+                </td>
+                <td class="vatop tips"></td>
+            </tr>
             </tbody>
             <tfoot>
             <tr class="tfoot">

+ 3 - 0
admin/templates/default/provider.index.php

@@ -17,6 +17,7 @@
             <ul class="tab-base">
                 <li><a href="JavaScript:void(0);" class="current"><span><?php echo $lang['nc_manage'] ?></span></a></li>
                 <li><a href="index.php?act=provider&op=provider_amount"><span>调款记录</span></a></li>
+                <li><a href="index.php?act=provider&op=provider_remit"><span>打款</span></a></li>
             </ul>
         </div>
     </div>
@@ -127,6 +128,7 @@
                     <th>通道名称</th>
                     <th>店铺ID</th>
                     <th>会员ID</th>
+                    <th>绑定公司名称</th>
                     <th>通道类型</th>
                     <th>通道质量</th>
                     <th class="align-center">通道状态</th>
@@ -146,6 +148,7 @@
                             <td><?php echo $v['name']; ?> (<?php echo $v['store_name']; ?>)</td>
                             <td><?php echo $v['store_id']; ?></td>
                             <td><?php echo $v['account_id']; ?></td>
+                            <td><?php echo $v['co_name']; ?></td>
                             <td><?php echo $output['type_text'][$v['type'] - 1]; ?></td>
                             <td><?php echo $v['quality_text']; ?></td>
                             <td class="align-center">

+ 221 - 0
admin/templates/default/provider.remit.edit.php

@@ -0,0 +1,221 @@
+<?php defined('InShopNC') or exit('Access Invalid!'); ?>
+<style>
+</style>
+<div class="page">
+    <div class="fixed-bar">
+        <div class="item-title">
+            <h3>公司信息管理</h3>
+            <ul class="tab-base">
+                <li><a href="index.php?act=refill_company&op=index"><span>公司信息管理</span></a></li>
+                <li><a href="index.php?act=refill_company&op=add"><span>新增</span></a></li>
+                <li><a href="index.php?act=refill_company&op=remit_cfg"><span>打款配置</span></a></li>
+                <li><a href="index.php?act=refill_company&op=remit_record"><span>公司打款记录</span></a></li>
+                <li><a href="JavaScript:void(0);" class="current"><span>打款记录编辑</span></a></li>
+            </ul>
+        </div>
+    </div>
+    <div class="fixed-empty"></div>
+    <form id="price_form" enctype="multipart/form-data" method="post">
+        <input type="hidden" name="form_submit" value="ok" />
+        <input type="hidden" name="remit_id" value="<?php echo $output['remit']['remit_id'];?>">
+        <table class="table tb-type2">
+            <tbody>
+                <tr class="noborder">
+                    <td colspan="2" class="required"><label class="validation" for="mchid">操作人:</label></td>
+                </tr>
+                <tr class="noborder">
+                    <td class="vatop rowform"><input type="text" name="operation" id="operation" class="txt" value="<?php echo $output['remit']['operation'];?>">
+                    </td>
+                    <td class="vatop tips"></td>
+                </tr>
+                <tr>
+                    <td colspan="2" class="required"><label class="validation" for="password">打款:</label></td>
+                </tr>
+                <?php foreach ($output['remit_data'] as $data) { ?>
+                <tr class="noborder">
+                    <td>
+                        <table class="spec_table tb-type2 setTable" style="width: 780px">
+                            <tr>
+                                <th>公司名称:<?php echo $data['co_name'];?></th>
+                            </tr>
+                            <tr class="w500">
+                                <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">
+                                        <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'];?>">
+                                        <div id="money" style="color:red;"></div>
+                                    </td>
+                                </tr>
+                            </tbody>
+                            <?php }?>
+                        </table>
+                    </td>
+                </tr>
+                <?php } ?>
+                <tr>
+                    <th></th>
+                    <td text-align="right">总计:<span id="total" style="color:red;">0</span></td>
+                </tr>
+            </tbody>
+            <tfoot>
+                <tr class="tfoot">
+                    <td colspan="15"><a href="JavaScript:void(0);" class="btn" id="submitBtn"><span><?php echo $lang['nc_submit']; ?></span></a></td>
+                </tr>
+            </tfoot>
+        </table>
+    </form>
+</div>
+<script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/js/dialog/dialog.js" id="dialog_js" charset="utf-8"></script>
+<script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/js/jquery-ui/jquery.ui.js"></script>
+<script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/js/ajaxfileupload/ajaxfileupload.js"></script>
+<script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/js/jquery.Jcrop/jquery.Jcrop.js"></script>
+<link href="<?php echo RESOURCE_SITE_URL; ?>/js/jquery.Jcrop/jquery.Jcrop.min.css" rel="stylesheet" type="text/css" id="cssfile2" />
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjs/3.16.0/math.min.js"></script>
+<script>
+    math.config({
+        number: 'BigNumber',
+        precision: 20
+    });
+</script>
+<script type="text/javascript">
+    $(function() {
+        total_calculation()
+        function total_calculation()
+        {
+            let total = 0;
+            var $priceInput = $('.priceInput');
+         
+            for(let i=0;i<$priceInput.length;i++){
+                if($priceInput.eq(i).val() && !isNaN($priceInput.eq(i).val())){
+                    const value = parseFloat($priceInput.eq(i).val());
+                    total = math.add(math.bignumber(total),math.bignumber(value)).toNumber();
+                }
+            }
+
+            total = parseFloat(total);
+            let num = total % 1000;
+            total = total - num;
+            let total_chineseStr = cnMoneyFormat(total);
+            total = numFormat(total);
+            let total_text = total + '('+ total_chineseStr +')';
+            $('#total').html(total_text)
+        }
+
+        function numFormat(num){
+            return num.toString().replace(/\d+/, function (n) { // 先提取小数点前后的整数部分
+                //(\d)(?=(\d{3})正则的意思是匹配连续三个数结尾的数字,例如1234,1后面有234连续三个数的数字,就可以匹配上,匹配的是1这个数字。如果是123,因为1后面是两位数,所以就匹配不上了
+                return n.replace(/(\d)(?=(\d{3})+$)/g, function ($1) {
+                    return $1 + ",";
+                });
+            });
+        }
+
+        $("#submitBtn").click(function() {
+            if ($("#price_form").valid()) {
+                $("#price_form").submit();
+            }
+        });
+        $('.priceInput').blur(function (){
+            let money = $(this).val();
+            money = parseFloat(money)
+            console.log(money)
+            let chineseStr = cnMoneyFormat(money);
+            $(this).next().html(chineseStr)
+            total_calculation()
+        })
+
+        $('#price_form').validate({
+            errorPlacement: function (error, element) {
+                error.appendTo(element.parent().parent().prev().find('td:first'));
+            },
+            rules: {
+                operation: {
+                    required: true,
+                },
+            },
+            messages: {
+                operation: {
+                    required: '操作人不能为空',
+                },
+            }
+        });
+    });
+    //数字转大写
+    function cnMoneyFormat(money) {
+        let number_data = money;
+        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; //亿
+        //取整
+        function qz(data) {
+            data = Math.floor(data);
+            return data;
+        }
+        //为0判断输出
+        function data_if(data, amount) {
+            if (data === 0) {
+                return '';
+            } else {
+                return data + amount;
+            }
+        }
+        //亿
+        function yi_f(data) {
+            yi = qz(data / 100000000);
+            data = data - (yi * yi_s);
+            return {
+                data1: data_if(yi, '亿'),
+                data2: data,
+            };
+        }
+        //万
+        function wan_f(data) {
+            wan = qz(data / 10000);
+            data = data - (wan * wan_s);
+            return {
+                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,
+            };
+        }
+        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') {
+            return ''
+        }else {
+            return result
+        }
+    }
+</script>

+ 226 - 0
admin/templates/default/provider.remit.php

@@ -0,0 +1,226 @@
+<?php defined('InShopNC') or exit('Access Invalid!'); ?>
+<style>
+</style>
+<div class="page">
+    <div class="fixed-bar">
+        <div class="item-title">
+            <h3>通道管理</h3>
+            <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="index.php?act=provider&op=provider_amount"><span>调款记录</span></a></li>
+                <li><a href="JavaScript:void(0);" class="current"><span>打款</span></a></li>
+            </ul>
+        </div>
+    </div>
+    <div class="fixed-empty"></div>
+    <form id="price_form" enctype="multipart/form-data" method="post">
+        <input type="hidden" name="form_submit" value="ok" />
+        <table class="table tb-type2">
+            <tbody>
+                <tr class="noborder">
+                    <td colspan="2" class="required"><label class="validation" for="mchid">操作人:</label></td>
+                </tr>
+                <tr class="noborder">
+                    <td class="vatop rowform"><input type="text" name="operation" id="operation" class="txt" value="">
+                    </td>
+                    <td class="vatop tips"></td>
+                </tr>
+                <tr>
+                    <td colspan="2" class="required"><label class="validation" for="password">打款:</label></td>
+                </tr>
+                <?php foreach ($output['remit_data'] as $data) { ?>
+                <tr class="noborder">
+                    <td>
+                        <table class="spec_table tb-type2 setTable" style="width: 780px">
+                            <tr>
+                                <th>公司名称:<?php echo $data['co_name'];?></th>
+                            </tr>
+                            <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>
+                            <?php }?>
+                        </table>
+                    </td>
+                </tr>
+                <?php } ?>
+                <tr>
+                    <th></th>
+                    <td text-align="right">总计:<span id="total" style="color:red;">0</span></td>
+                </tr>
+            </tbody>
+            <tfoot>
+                <tr class="tfoot">
+                    <td colspan="15"><a href="JavaScript:void(0);" class="btn" id="submitBtn"><span><?php echo $lang['nc_submit']; ?></span></a></td>
+                </tr>
+            </tfoot>
+        </table>
+    </form>
+</div>
+<script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/js/dialog/dialog.js" id="dialog_js" charset="utf-8"></script>
+<script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/js/jquery-ui/jquery.ui.js"></script>
+<script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/js/ajaxfileupload/ajaxfileupload.js"></script>
+<script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/js/jquery.Jcrop/jquery.Jcrop.js"></script>
+<link href="<?php echo RESOURCE_SITE_URL; ?>/js/jquery.Jcrop/jquery.Jcrop.min.css" rel="stylesheet" type="text/css" id="cssfile2" />
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjs/3.16.0/math.min.js"></script>
+<script>
+    math.config({
+        number: 'BigNumber',
+        precision: 20
+    });
+</script>
+<script type="text/javascript">
+    $(function() {
+
+        total_calculation()
+        function total_calculation()
+        {
+            let total = 0;
+            var $priceInput = $('.priceInput');
+         
+            for(let i=0;i<$priceInput.length;i++){
+                if($priceInput.eq(i).val() && !isNaN($priceInput.eq(i).val())){
+                    const value = parseFloat($priceInput.eq(i).val());
+                    // total = math.parser().eval(total + "+" + value);
+                    total = math.add(math.bignumber(total),math.bignumber(value)).toNumber();
+                }
+            }
+            total = parseFloat(total);
+            let num = total % 1000;
+            total = total - num;
+            let total_chineseStr = cnMoneyFormat(total);
+            total = numFormat(total);
+            let total_text = total + '('+ total_chineseStr +')';
+            $('#total').html(total_text)
+        }
+
+        function numFormat(num){
+            return num.toString().replace(/\d+/, function (n) { // 先提取小数点前后的整数部分
+                //(\d)(?=(\d{3})正则的意思是匹配连续三个数结尾的数字,例如1234,1后面有234连续三个数的数字,就可以匹配上,匹配的是1这个数字。如果是123,因为1后面是两位数,所以就匹配不上了
+                return n.replace(/(\d)(?=(\d{3})+$)/g, function ($1) {
+                    return $1 + ",";
+                });
+            });
+        }
+
+        $("#submitBtn").click(function() {
+            if ($("#price_form").valid()) {
+                $("#price_form").submit();
+            }
+        });
+        $('.priceInput').blur(function (){
+            let money = $(this).val();
+            money = parseFloat(money)
+            let chineseStr = cnMoneyFormat(money);
+            $(this).next().html(chineseStr)
+            total_calculation()
+        })
+
+        $('#price_form').validate({
+            errorPlacement: function (error, element) {
+                error.appendTo(element.parent().parent().prev().find('td:first'));
+            },
+            rules: {
+                operation: {
+                    required: true,
+                },
+            },
+            messages: {
+                operation: {
+                    required: '操作人不能为空',
+                },
+            }
+        });
+    });
+
+    //数字转大写
+    function cnMoneyFormat(money) {
+        let number_data = money;
+        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; //亿
+        //取整
+        function qz(data) {
+            data = Math.floor(data);
+            return data;
+        }
+        //为0判断输出
+        function data_if(data, amount) {
+            if (data === 0) {
+                return '';
+            } else {
+                return data + amount;
+            }
+        }
+        //亿
+        function yi_f(data) {
+            yi = qz(data / 100000000);
+            data = data - (yi * yi_s);
+            return {
+                data1: data_if(yi, '亿'),
+                data2: data,
+            };
+        }
+        //万
+        function wan_f(data) {
+            wan = qz(data / 10000);
+            data = data - (wan * wan_s);
+            return {
+                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,
+            };
+        }
+        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') {
+            return ''
+        }else {
+            return result
+        }
+    }
+</script>

+ 225 - 0
admin/templates/default/refill.company.add.php

@@ -0,0 +1,225 @@
+<?php defined('InShopNC') or exit('Access Invalid!'); ?>
+<style>
+.page .fixed-bar .item-title h3 {
+    margin-top: 18px !important;
+    margin-bottom: 10px !important;
+    font-weight: 700 !important;
+}
+.tab-base li span {
+    font-size: 12px !important;
+}
+</style>
+<div class="page">
+    <div class="fixed-bar">
+        <div class="item-title">
+            <h3>公司信息管理</h3>
+            <ul class="tab-base">
+                <li><a href="index.php?act=refill_company&op=index"><span>公司信息管理</span></a></li>
+                <li><a href="JavaScript:void(0);" class="current"><span>新增</span></a>
+                <li><a href="index.php?act=refill_company&op=remit_cfg"><span>打款配置</span></a></li>
+                <li><a href="index.php?act=refill_company&op=remit_record"><span>公司打款记录</span></a></li>
+            </ul>
+        </div>
+    </div>
+    <div class="fixed-empty"></div>
+    <form id="user_form" enctype="multipart/form-data" method="post"  class="layui-form">
+        <input type="hidden" name="form_submit" value="ok"/>
+        <input type="hidden" name="cid" value=""/>
+        <table class="table tb-type2">
+            <tbody>
+            <tr class="noborder">
+                <td colspan="2" class="required"><label class="validation" for="co_type">公司类型:</label></td>
+            </tr>
+            <tr class="">
+                <td class="">
+                    <label for="co_type"></label>
+                    <select name="co_type" id="co_type">
+                        <option value="">请选择...</option>
+                        <option value="<?php echo refill_companyModel::co_type_merchant;?>" <?php if($_GET['co_type'] == refill_companyModel::co_type_merchant){ echo 'selected';}?>>机构</option>
+                        <option value="<?php echo refill_companyModel::co_type_provider;?>" <?php if($_GET['co_type'] == refill_companyModel::co_type_provider){ echo 'selected';}?>>通道</option>
+                    </select>
+                </td>
+                <td class="vatop tips"></td>
+            </tr>
+            <tr class="noborder">
+                <td colspan="2" class="required"><label class="validation" for="co_type">通道(机构)选择:</label></td>
+            </tr>
+            <tr class="noborder">
+                <td>
+                    <div id="select_nc"></div>
+                </td>
+                <td class="vatop tips"></td>
+            </tr>
+            <tr class="noborder">
+                <td colspan="2" class="required"><label class="validation" for="co_name">公司名称:</label></td>
+            </tr>
+            <tr class="noborder">
+                <td class="vatop rowform"><input type="text" value="" name="co_name" id="co_name" class="txt"></td>
+                <td class="vatop tips"></td>
+            </tr>
+            <tr class="noborder">
+                <td colspan="2" class="required"><label class="validation" for="bank_name">开户银行名称:</label></td>
+            </tr>
+            <tr class="noborder">
+                <td class="vatop rowform"><input type="text" value="" name="bank_name" id="bank_name" class="txt"></td>
+                <td class="vatop tips"></td>
+            </tr>
+            <tr class="noborder">
+                <td colspan="2" class="required"><label class="validation" for="bank_username">开户人名称:</label></td>
+            </tr>
+            <tr class="noborder">
+                <td class="vatop rowform"><input type="text" value="" name="bank_username" id="bank_username" class="txt"></td>
+                <td class="vatop tips"></td>
+            </tr>
+            <tr>
+                <td colspan="2" class="required"><label class="validation" for="bank_card_no">银行卡号:</label></td>
+            </tr>
+            <tr class="noborder">
+                <td class="vatop rowform"><input type="text" id="bank_card_no" name="bank_card_no" class="txt"></td>
+                <td class="vatop tips"></td>
+            </tr>
+
+
+            <tr>
+                <td colspan="2" class="required"><label for="max_debt">最大欠款额度:</label></td>
+            </tr>
+            <tr class="noborder">
+                <td class="vatop rowform"><input type="text" id="max_debt" name="max_debt" class="txt"></td>
+                <td class="vatop tips"></td>
+            </tr>
+            <tr>
+                <td colspan="2" class="required"><label for="province">开户行省份:</label></td>
+            </tr>
+            <tr class="noborder">
+                <td class="vatop rowform"><input type="text" id="province" name="province" class="txt"></td>
+                <td class="vatop tips"></td>
+            </tr>
+            <tr>
+                <td colspan="2" class="required"><label for="city">开户行城市:</label></td>
+            </tr>
+            <tr class="noborder">
+                <td class="vatop rowform"><input type="text" id="city" name="city" class="txt"></td>
+                <td class="vatop tips"></td>
+            </tr>
+            <tr>
+                <td colspan="2" class="required"><label for="bank_code">第三方银行编码:</label></td>
+            </tr>
+            <tr class="noborder">
+                <td class="vatop rowform"><input type="text" id="bank_code" name="bank_code" class="txt"></td>
+                <td class="vatop tips"></td>
+            </tr>
+            <tr>
+                <td colspan="2" class="required"><label>备注:</label></td>
+            </tr>
+            <tr class="noborder">
+                <td class="vatop rowform"><textarea name="remark" rows="6" class="tarea"></textarea></td>
+            </tr>
+            </tbody>
+            <tfoot>
+            <tr class="tfoot">
+                <td colspan="15"><a href="JavaScript:void(0);" class="btn" id="submitBtn"><span><?php echo $lang['nc_submit']; ?></span></a></td>
+            </tr>
+            </tfoot>
+        </table>
+    </form>
+</div>
+<script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/js/dialog/dialog.js" id="dialog_js"
+        charset="utf-8"></script>
+<script type="text/javascript" src="<?php echo ADMIN_TEMPLATES_URL;?>/js/xm-select.js"></script>
+<script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/js/jquery-ui/jquery.ui.js"></script>
+<script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/js/ajaxfileupload/ajaxfileupload.js"></script>
+<script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/js/jquery.Jcrop/jquery.Jcrop.js"></script>
+<link href="<?php echo RESOURCE_SITE_URL; ?>/js/jquery.Jcrop/jquery.Jcrop.min.css" rel="stylesheet" type="text/css"
+      id="cssfile2"/>
+<script type="text/javascript">
+    $(function () {
+        //按钮先执行验证再提交表单
+        $("#submitBtn").click(function () {
+            if ($("#user_form").valid()) {
+                select_set();
+                $("#user_form").submit();
+            }
+        });
+        $('#user_form').validate({
+            errorPlacement: function (error, element) {
+                error.appendTo(element.parent().parent().prev().find('td:first'));
+            },
+            rules: {
+                co_type: {
+                    required: true,
+                },
+                co_name: {
+                    required: true,
+                },
+                bank_name: {
+                    required: true,
+                },
+                bank_username: {
+                    required: true,
+                },
+                bank_card_no: {
+                    required: true,
+                },
+            },
+            messages: {
+                co_type: {
+                    required: '必须选择公司类型',
+                },
+                co_name: {
+                    required: '公司名称不能为空',
+                },
+                bank_name: {
+                    required: '收款银行名称不能为空',
+                },
+                bank_username: {
+                    required: '开户人名称不能为空',
+                },
+                bank_card_no: {
+                    required: '收款卡号不能为空',
+                },
+            }
+        });
+        function select_set(){
+            let selectArr = select_nc.getValue();
+            let selectStr = ''
+            for (let i = 0; i < selectArr.length; i++) {
+                selectStr += selectArr[i].value+','
+            }
+            selectStr = selectStr.substr(0, selectStr.length-1)
+            $('input[name="cid"]').val(selectStr);
+        }
+
+        let select_nc
+        let url = '';
+        $('#co_type').on('change', function() {
+            console.log('querySelect', $(this).val());
+            $('#select_nc').children().remove();
+            const co_type = $(this).val();
+            _select(co_type)
+        })
+        function _select (co_type)
+        {
+            if(co_type === 'merchant') {
+                url = 'index.php?act=refill_order&op=merchant_data'
+            }else{
+                url = 'index.php?act=refill_order&op=provider_data'
+            }
+            $.get(url, function (data) {
+                data = JSON.parse(data)
+                select_nc = xmSelect.render({
+                    el: '#select_nc',
+                    size: 'mini',
+                    filterable: true,
+                    style: {
+                        minHeight: '27px',
+                        lineHeight: '27px',
+                        marginLeft: '4px',
+                        width: '250px'
+                    },
+                    language: 'zn',
+                    data: data
+                })
+            })
+        }
+    });
+</script>

+ 255 - 0
admin/templates/default/refill.company.edit.php

@@ -0,0 +1,255 @@
+<?php defined('InShopNC') or exit('Access Invalid!'); ?>
+<style>
+      .layui-form-select .layui-input {
+    padding: 13px 5px;
+}
+.layui-form-select dl {
+    top: 29px !important;
+}
+.layui-form-select {
+    width: 85%;
+}
+.layui-select-title {
+    width: 100%;
+}
+.page .fixed-bar .item-title h3 {
+    margin-top: 18px !important;
+    margin-bottom: 10px !important;
+    font-weight: 700 !important;
+}
+.tab-base li span {
+    font-size: 12px !important;
+}
+</style>
+<div class="page">
+    <div class="fixed-bar">
+        <div class="item-title">
+            <h3>公司信息管理</h3>
+            <ul class="tab-base">
+                <li><a href="index.php?act=refill_company&op=index"><span>公司信息管理</span></a></li>
+                <li><a href="JavaScript:void(0);" class="current"><span>编辑</span></a></li>
+                <li><a href="index.php?act=refill_company&op=remit_cfg"><span>打款配置</span></a></li>
+                <li><a href="index.php?act=refill_company&op=remit_record"><span>公司打款记录</span></a></li>
+            </ul>
+        </div>
+    </div>
+    <div class="fixed-empty"></div>
+    <form id="user_form" enctype="multipart/form-data" method="post"  class="layui-form">
+        <input type="hidden" name="form_submit" value="ok"/>
+        <input type="hidden" name="co_id" value="<?php echo $output['company_info']['co_id'];?>"/>
+        <input type="hidden" name="default_no_mch" value="<?php echo $output['cid']; ?>"/>
+        <input type="hidden" name="cid" value=""/>
+        <table class="table tb-type2">
+            <tbody>
+            <tr class="noborder">
+                <td colspan="2" class="required"><label class="validation" for="co_type">公司类型:</label></td>
+            </tr>
+            <tr class="">
+                <td class="">
+                    <label for="co_type"></label>
+                    <select name="co_type" id="co_type">
+                        <option value="">请选择...</option>
+                        <option value="<?php echo refill_companyModel::co_type_merchant;?>" <?php if($output['company_info']['co_type'] == refill_companyModel::co_type_merchant){ echo 'selected';}?>>机构</option>
+                        <option value="<?php echo refill_companyModel::co_type_provider;?>" <?php if($output['company_info']['co_type'] == refill_companyModel::co_type_provider){ echo 'selected';}?>>通道</option>
+                    </select>
+                </td>
+                <td class="vatop tips"></td>
+            </tr>
+            <tr class="noborder">
+                <td colspan="2" class="required"><label class="validation" for="co_type">通道(机构)选择:</label></td>
+            </tr>
+            <tr class="noborder">
+                <td>
+                    <div id="select_nc"></div>
+                </td>
+                <td class="vatop tips"></td>
+            </tr>
+
+            <tr class="noborder">
+                <td colspan="2" class="required"><label class="validation" for="co_name">公司名称:</label></td>
+            </tr>
+            <tr class="noborder">
+                <td class="vatop rowform"><input type="text" value="<?php echo $output['company_info']['co_name']; ?>" name="co_name" id="co_name" class="txt"></td>
+                <td class="vatop tips"></td>
+            </tr>
+            <tr class="noborder">
+                <td colspan="2" class="required"><label class="validation" for="bank_name">开户银行名称:</label></td>
+            </tr>
+            <tr class="noborder">
+                <td class="vatop rowform"><input type="text" value="<?php echo $output['company_info']['bank_name']; ?>" name="bank_name" id="bank_name" class="txt"></td>
+                <td class="vatop tips"></td>
+            </tr>
+            <tr class="noborder">
+                <td colspan="2" class="required"><label class="validation" for="bank_username">开户人名称:</label></td>
+            </tr>
+            <tr class="noborder">
+                <td class="vatop rowform"><input type="text" value="<?php echo $output['company_info']['bank_username']; ?>" name="bank_username" id="bank_username" class="txt"></td>
+                <td class="vatop tips"></td>
+            </tr>
+            <tr>
+                <td colspan="2" class="required"><label class="validation" for="bank_card_no">银行卡号:</label></td>
+            </tr>
+            <tr class="noborder">
+                <td class="vatop rowform"><input type="text" value="<?php echo $output['company_info']['bank_card_no']; ?>" id="bank_card_no" name="bank_card_no" class="txt"></td>
+                <td class="vatop tips"></td>
+            </tr>
+
+            <tr>
+                <td colspan="2" class="required"><label for="max_debt">最大欠款额度:</label></td>
+            </tr>
+            <tr class="noborder">
+                <td class="vatop rowform"><input type="text" id="max_debt" name="max_debt" value="<?php echo $output['company_info']['max_debt']; ?>" class="txt"></td>
+                <td class="vatop tips"></td>
+            </tr>
+            <tr>
+                <td colspan="2" class="required"><label for="province">开户行省份:</label></td>
+            </tr>
+            <tr class="noborder">
+                <td class="vatop rowform"><input type="text" value="<?php echo $output['company_info']['province']; ?>" id="province" name="province" class="txt"></td>
+                <td class="vatop tips"></td>
+            </tr>
+            <tr>
+                <td colspan="2" class="required"><label for="city">开户行城市:</label></td>
+            </tr>
+            <tr class="noborder">
+                <td class="vatop rowform"><input type="text" value="<?php echo $output['company_info']['city']; ?>" id="city" name="city" class="txt"></td>
+                <td class="vatop tips"></td>
+            </tr>
+            <tr>
+                <td colspan="2" class="required"><label for="bank_code">第三方银行编码:</label></td>
+            </tr>
+            <tr class="noborder">
+                <td class="vatop rowform"><input type="text" value="<?php echo $output['company_info']['bank_code']; ?>" id="bank_code" name="bank_code" class="txt"></td>
+                <td class="vatop tips"></td>
+            </tr>
+            <tr>
+                <td colspan="2" class="required"><label>备注:</label></td>
+            </tr>
+            <tr class="noborder">
+                <td class="vatop rowform"><textarea name="remark" rows="6" class="tarea"><?php echo $output['company_info']['remark']; ?></textarea></td>
+            </tr>
+            </tbody>
+            <tfoot>
+            <tr class="tfoot">
+                <td colspan="15"><a href="JavaScript:void(0);" class="btn" id="submitBtn"><span><?php echo $lang['nc_submit']; ?></span></a></td>
+            </tr>
+            </tfoot>
+        </table>
+    </form>
+</div>
+<script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/js/dialog/dialog.js" id="dialog_js"
+        charset="utf-8"></script>
+<script type="text/javascript" src="<?php echo ADMIN_TEMPLATES_URL;?>/js/xm-select.js"></script>
+<script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/js/jquery-ui/jquery.ui.js"></script>
+<script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/js/ajaxfileupload/ajaxfileupload.js"></script>
+<script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/js/jquery.Jcrop/jquery.Jcrop.js"></script>
+<script type="text/javascript" src="<?php echo ADMIN_TEMPLATES_URL;?>/layui/layui.js"></script>
+<link rel="stylesheet" type="text/css" href="<?php echo ADMIN_TEMPLATES_URL; ?>/layui/css/layui.css"/>
+<link href="<?php echo RESOURCE_SITE_URL; ?>/js/jquery.Jcrop/jquery.Jcrop.min.css" rel="stylesheet" type="text/css"
+      id="cssfile2"/>
+<script type="text/javascript">
+    $(function () {
+        //按钮先执行验证再提交表单
+        $("#submitBtn").click(function () {
+            if ($("#user_form").valid()) {
+                select_set();
+                $("#user_form").submit();
+            }
+        });
+        $('#user_form').validate({
+            errorPlacement: function (error, element) {
+                error.appendTo(element.parent().parent().prev().find('td:first'));
+            },
+            rules: {
+                co_type: {
+                    required: true,
+                },
+                co_name: {
+                    required: true,
+                },
+                bank_name: {
+                    required: true,
+                },
+                bank_username: {
+                    required: true,
+                },
+                bank_card_no: {
+                    required: true,
+                },
+            },
+            messages: {
+                co_type: {
+                    required: '必须选择公司类型',
+                },
+                co_name: {
+                    required: '公司名称不能为空',
+                },
+                bank_name: {
+                    required: '收款银行名称不能为空',
+                },
+                bank_username: {
+                    required: '开户人名称不能为空',
+                },
+                bank_card_no: {
+                    required: '收款卡号不能为空',
+                },
+            }
+        });
+        function select_set(){
+            let selectArr = select_nc.getValue();
+            let selectStr = ''
+            for (let i = 0; i < selectArr.length; i++) {
+                selectStr += selectArr[i].value+','
+            }
+            selectStr = selectStr.substr(0, selectStr.length-1)
+            $('input[name="cid"]').val(selectStr);
+        }
+
+        let select_nc
+        let url = '';
+        let co_type = $('#co_type').val();
+        let default_no_mch = $('input[name="default_no_mch"]').val().split(',');
+        _select(co_type);
+
+        $('#co_type').on('change', function() {
+            console.log('querySelect', $(this).val());
+            $('#select_nc').children().remove();
+            const co_type = $(this).val();
+            _select(co_type)
+        })
+
+        function _select (co_type)
+        {
+            if(co_type === 'merchant') {
+                url = 'index.php?act=refill_order&op=merchant_data'
+            }else{
+                url = 'index.php?act=refill_order&op=provider_data'
+            }
+            $.get(url, function (data) {
+                data = JSON.parse(data)
+                if (default_no_mch) {
+                    for (let index = 0; index < default_no_mch.length; index++) {
+                        for (let j = 0; j < data.length; j++) {
+                            if (default_no_mch[index] === data[j].value) {
+                                data[j].selected = true
+                            }
+                        }
+                    }
+                }
+                select_nc = xmSelect.render({
+                    el: '#select_nc',
+                    size: 'mini',
+                    filterable: true,
+                    style: {
+                        minHeight: '27px',
+                        lineHeight: '27px',
+                        marginLeft: '4px',
+                        width: '250px'
+                    },
+                    language: 'zn',
+                    data: data
+                })
+            })
+        }
+    });
+</script>

+ 153 - 0
admin/templates/default/refill.company.php

@@ -0,0 +1,153 @@
+<?php defined('InShopNC') or exit('Access Invalid!'); ?>
+<style>
+    .page .fixed-bar .item-title h3 {
+        margin-top:18px !important;
+        margin-bottom:10px !important;
+        font-weight:700 !important;
+    }
+    .tab-base li span {
+        font-size:12px !important;
+    }
+    .layui-form-select .layui-input {
+        height:26px;
+    }
+    input::placeholder{ 
+        color:#333; 
+    }
+</style>
+<div class="page">
+    <div class="fixed-bar">
+        <div class="item-title">
+            <h3>公司信息管理</h3>
+            <ul class="tab-base">
+                <li><a href="JavaScript:void(0);" class="current"><span>公司信息管理</span></a></li>
+                <li><a href="index.php?act=refill_company&op=add"><span>新增</span></a></li>
+                <li><a href="index.php?act=refill_company&op=remit_cfg"><span>打款配置</span></a></li>
+                <li><a href="index.php?act=refill_company&op=remit_record"><span>公司打款记录</span></a></li>
+            </ul>
+        </div>
+    </div>
+    <div class="fixed-empty"></div>
+    <form method="get" name="formSearch" id="formSearch" class="layui-form">
+        <input type="hidden" value="refill_company" name="act">
+        <input type="hidden" value="index" name="op">
+        <table class="tb-type1 noborder search">
+            <tbody>
+            <tr>
+                <th><label>公司名称</label></th>
+                <td><input class="txt2" type="text" name="co_name" value="<?php echo $_GET['co_name']; ?>"/></td>
+
+                <th><label for="co_type">公司类型</label></th>
+                <td>
+                    <select name="co_type" id="co_type">
+                        <option value="">请选择...</option>
+                        <option value="<?php echo refill_companyModel::co_type_merchant;?>" <?php if($_GET['co_type'] == refill_companyModel::co_type_merchant){ echo 'selected';}?>>机构</option>
+                        <option value="<?php echo refill_companyModel::co_type_provider;?>" <?php if($_GET['co_type'] == refill_companyModel::co_type_provider){ echo 'selected';}?>>通道</option>
+                    </select>
+                </td>
+                <th><label for="opened">启用状态</label></th>
+                <td>
+                    <select name="opened" id="opened">
+                        <option value="">请选择...</option>
+                        <option value="<?php echo refill_companyModel::opened_start;?>" <?php if($_GET['opened'] == refill_companyModel::opened_start){ echo 'selected';}?>>启用</option>
+                        <option value="<?php echo refill_companyModel::opened_close;?>" <?php if($_GET['opened'] == refill_companyModel::opened_close){ echo 'selected';}?>>关闭</option>
+                    </select>
+                </td>
+                <td><a href="javascript:void(0);" id="ncsubmit" class="btn-search "
+                       title="<?php echo $lang['nc_query']; ?>">&nbsp;</a>
+            </tr>
+            </tbody>
+        </table>
+    </form>
+    <form method="post" id="refill_company">
+        <input type="hidden" name="form_submit" value="ok"/>
+        <table class="table tb-type2">
+            <thead>
+            <tr class="thead">
+                <th>记录ID</th>
+                <th>公司名称</th>
+                <th>公司类型</th>
+                <th>最大欠款额度</th>
+                <th class="align-left">收款银行名称</th>
+                <th class="align-left">开户人名称</th>
+                <th class="align-left">收款卡号</th>
+                <th class="align-left">开户行省份</th>
+                <th class="align-left">开户行城市</th>
+                <th class="align-left">银行编码</th>
+                <th class="align-left">备注</th>
+                <th class="align-left">启用状态</th>
+                <th class="align-left">更新日期</th>
+                <th class="align-center">操作</th>
+            </tr>
+            </thead>
+            <tbody>
+            <?php if (!empty($output['list']) && is_array($output['list'])) { ?>
+                <?php foreach ($output['list'] as $k => $v) { ?>
+                    <tr class="trFlex">
+                        <td><?php echo $v['co_id']; ?></td>
+                        <td><?php echo $v['co_name']; ?></td>
+                        <td><?php echo $v['co_type']; ?></td>
+                        <td><?php echo $v['max_debt'] ?? '0'; ?></td>
+                        <td class="align-left"><?php echo $v['bank_name']; ?></td>
+                        <td class="align-left"><?php echo $v['bank_username']; ?></td>
+                        <td class="align-left"><?php echo $v['bank_card_no']; ?></td>
+                        <td class="align-left"><?php echo $v['province']; ?></td>
+                        <td class="align-left"><?php echo $v['city']; ?></td>
+                        <td class="align-left"><?php echo $v['bank_code']; ?></td>
+                        <td class="align-left"><?php echo $v['remark']; ?></td>
+                        <td class="align-left">
+                            <?php if ($v['opened'] == refill_companyModel::opened_start) { ?>
+                                <span style="color: #48975A">启用</span>
+                            <?php } ?><?php if ($v['opened'] == refill_companyModel::opened_close) { ?>
+                                <span style="color: #E53737">禁用</span>
+                            <?php } ?>
+                        </td>
+                        <td class="align-left"><?php echo date("Y-m-d H:i:s", $v['oper_time']); ?></td>
+                        <td class="align-center w200">
+                            <a href="index.php?act=refill_company&op=edit&co_id=<?php echo $v['co_id'];?>">编辑</a>
+                            |
+                            <?php if ($v['opened'] == refill_companyModel::opened_start) { ?>
+                                <a href="index.php?act=refill_company&op=changeState&opened=<?php echo refill_companyModel::opened_close;?>&co_id=<?php echo $v['co_id'] ?>">禁用公司</a>
+                            <?php } ?>
+                            <?php if ($v['opened'] == refill_companyModel::opened_close) { ?>
+                                <a href="index.php?act=refill_company&op=changeState&opened=<?php echo refill_companyModel::opened_start;?>&co_id=<?php echo $v['co_id'] ?>">启用公司</a>
+                            <?php } ?>
+                        </td>
+                    </tr>
+                <?php } ?>
+            <?php } else { ?>
+                <tr class="no_data">
+                    <td colspan="13"><?php echo $lang['nc_no_record']; ?></td>
+                </tr>
+            <?php } ?>
+            </tbody>
+            <tfoot>
+            <tr class="tfoot">
+                <td></td>
+                <td colspan="13">
+                    <div class="pagination"><?php echo $output['page']; ?></div>
+                </td>
+            </tr>
+            </tfoot>
+        </table>
+    </form>
+</div>
+<script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/js/jquery.edit.js" charset="utf-8"></script>
+<script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/laydate/laydate.js"></script>
+<script type="text/javascript" src="<?php echo ADMIN_TEMPLATES_URL;?>/layui/layui.js"></script>
+<link rel="stylesheet" type="text/css" href="<?php echo ADMIN_TEMPLATES_URL; ?>/layui/css/layui.css"/>
+<script>
+    $(function () {
+        $('#ncsubmit').click(function () {
+            $('#formSearch').submit();
+        });
+        // 表格hover时背景
+        $('.trFlex').each(function () {
+            $(this).hover(function () {
+                $(this)[0].style.backgroundColor = '#cbe9f3'
+            },function() {
+                $(this)[0].style.backgroundColor = '#fff'
+            })
+        })
+    });
+</script>

+ 171 - 0
admin/templates/default/refill.company.remit.php

@@ -0,0 +1,171 @@
+<?php defined('InShopNC') or exit('Access Invalid!'); ?>
+<style>
+    .page .fixed-bar .item-title h3 {
+        margin-top:18px !important;
+        margin-bottom:10px !important;
+        font-weight:700 !important;
+    }
+    .tab-base li span {
+        font-size:12px !important;
+    }
+    .layui-form-select .layui-input {
+        height:26px;
+    }
+    input::placeholder{ 
+        color:#333; 
+    }
+    .layui-input {
+        width: 160px!important;
+    }
+    .layui-edge {
+        right: 202px!important;
+    }
+    .layui-form-select dl {
+        left: 3px!important;
+        top: 26px!important;
+        min-width: 45%!important;
+    }
+</style>
+<div class="page">
+    <div class="fixed-bar">
+        <div class="item-title">
+            <h3>公司信息管理</h3>
+            <ul class="tab-base">
+                <li><a href="index.php?act=refill_company&op=index"><span>公司信息管理</span></a></li>
+                <li><a href="index.php?act=refill_company&op=add"><span>新增</span></a></li>
+                <li><a href="index.php?act=refill_company&op=remit_cfg"><span>打款配置</span></a></li>
+                <li><a href="JavaScript:void(0);" class="current"><span>公司打款记录</span></a></li>
+            </ul>
+        </div>
+    </div>
+    <div class="fixed-empty"></div>
+    <form method="get" name="formSearch" id="formSearch" class="layui-form">
+        <input type="hidden" value="refill_company" name="act">
+        <input type="hidden" value="remit_record" name="op">
+        <input type="hidden" name="export" value=""/>
+        <table class="tb-type1 noborder search">
+            <tbody>
+            <tr>
+                <th><label for="query_start_time">记录时间</label></th>
+                <td>
+                    <input class="txt date" type="text" value="<?php echo $_GET['query_start_time']; ?>"
+                           id="startTime" name="query_start_time" autocomplete="off" style="width:130px" />
+                    <label for="query_start_time">~</label>
+                    <input class="txt date" type="text" value="<?php echo $_GET['query_end_time']; ?>"
+                           id="endTime" name="query_end_time" autocomplete="off" style="width:130px" />
+                </td>
+                <td>
+                    <a href="javascript:void(0);" id="ncsubmit" class="btn-search"
+                       title="<?php echo $lang['nc_query']; ?>">&nbsp;</a>
+                </td>
+            </tr>
+            </tbody>
+        </table>
+    </form>
+    <table class="table tb-type2" id="prompt">
+        <tbody>
+        </tbody>
+    </table>
+    <form method="post" id="merchant_name_form">
+        <input type="hidden" name="form_submit" value="ok"/>
+        <table class="table tb-type2">
+            <thead>
+            <tr class="thead">
+                <th>序号</th>
+                <th>标题</th>
+                <th class="align-right">打款金额</th>
+                <th class="align-left">打款状态</th>
+                <th class="align-left">操作人</th>
+                <th class="align-left">生成日期</th>
+                <th class="align-left">更新日期</th>
+                <th class="align-center">操作</th>
+            </tr>
+            </thead>
+            <tbody>
+            <?php if (!empty($output['list']) && is_array($output['list'])) { ?>
+                <?php foreach ($output['list'] as $k => $v) { ?>
+                    <tr class="trFlex">
+                        <td><?php echo $k+1;?></td>
+                        <td><?php echo $v['title']; ?></td>
+                        <td class="align-right"><?php echo $v['amount']; ?></td>
+                        <td class="align-left">
+                            <?php if ($v['remit_state'] == refill_company_remitModel::remit_have) { ?>
+                                <span style="color: #48975A">已打款</span>
+                            <?php } ?><?php if ($v['remit_state'] == refill_company_remitModel::remit_init) { ?>
+                                <span style="color: #E53737">未打款</span>
+                            <?php } ?>
+                        </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>
+                        <td class="align-left"><?php echo $v['oper_time'] ? date('Y-m-d H:i', $v['oper_time']) : $lang['no_limit']; ?></td>
+                        <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_export&remit_id=<?php echo $v['remit_id'] ?>">下载表格</a>
+                        </td>
+                    </tr>
+                <?php } ?>
+            <?php } else { ?>
+                <tr class="no_data">
+                    <td colspan="8"><?php echo $lang['nc_no_record']; ?></td>
+                </tr>
+            <?php } ?>
+            </tbody>
+            <tfoot>
+            <tr class="tfoot">
+
+                <td></td>
+                <td colspan="8">
+                    <div class="pagination"><?php echo $output['show_page']; ?></div>
+                </td>
+            </tr>
+            </tfoot>
+        </table>
+    </form>
+</div>
+<script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/js/jquery.edit.js" charset="utf-8"></script>
+<script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/laydate/laydate.js"></script>
+<script type="text/javascript" src="<?php echo ADMIN_TEMPLATES_URL;?>/layui/layui.js"></script>
+<link rel="stylesheet" type="text/css" href="<?php echo ADMIN_TEMPLATES_URL; ?>/layui/css/layui.css"/>
+<script>
+    $(function () {
+        // 日期选择器
+        laydate.render({
+            elem: '#startTime',
+            type: 'datetime',
+            trigger: 'click'
+        });
+        laydate.render({
+            elem: '#endTime',
+            type: 'datetime',
+            trigger: 'click'
+        });
+        $('#ncsubmit').click(function () {
+            $('#formSearch').submit();
+        });
+        // 表格hover时背景
+        $('.trFlex').each(function () {
+            $(this).hover(function () {
+                $(this)[0].style.backgroundColor = '#cbe9f3'
+            },function() {
+                $(this)[0].style.backgroundColor = '#fff'
+            })
+        })
+
+        // 导出
+        $('#ncexport').click(function () {
+            $('input[name="export"]').val('1');
+            $('#formSearch').submit();
+            $('input[name="export"]').val('');
+            let ii = layer.load();
+            setTimeout(function(){
+                layer.close(ii);
+            }, 800);
+        })
+
+    });
+</script>

+ 58 - 0
admin/templates/default/remit.config.php

@@ -0,0 +1,58 @@
+<?php defined('InShopNC') or exit('Access Invalid!'); ?>
+
+<div class="page">
+    <div class="fixed-bar">
+        <div class="item-title">
+            <h3>公司信息管理</h3>
+            <ul class="tab-base">
+                <li><a href="index.php?act=refill_company&op=index"><span>公司信息管理</span></a></li>
+                <li><a href="index.php?act=refill_company&op=add"><span>新增</span></a></li>
+                <li><a href="JavaScript:void(0);" class="current"><span>打款配置</span></a></li>
+                <li><a href="index.php?act=refill_company&op=remit_record"><span>公司打款记录</span></a></li>
+            </ul>
+        </div>
+    </div>
+    <div class="fixed-empty"></div>
+    <form id="user_form" enctype="multipart/form-data" method="post">
+        <input type="hidden" name="form_submit" value="ok" />
+        <table class="table tb-type2">
+            <tbody>
+            <tr class="noborder">
+                <td colspan="2" class="required"><label class="validation" for="remit_money">回款金额限制:</label></td>
+            </tr>
+            <tr class="noborder">
+                <td class="vatop rowform">小于<input type="text" value="<?php echo $output['config']['remit_money'] ?? 0;?>" name="remit_money" id="remit_money" class="txt">可回款</td>
+                <td class="vatop tips">(余额低于-5w打款,填写-50000)</td>
+            </tr>
+            <tr class="noborder">
+                <td colspan="2" class="required"><label class="validation" for="remit_max">单条记录最大金额:</label></td>
+            </tr>
+            <tr class="noborder">
+                <td class="vatop rowform"><input type="text" value="<?php echo $output['config']['remit_max'] ?? 0;?>" name="remit_max" class="txt"></td>
+                <td class="vatop tips"></td>
+            </tr>
+            </tbody>
+            <tfoot>
+            <tr class="tfoot">
+                <td colspan="15"><a href="JavaScript:void(0);" class="btn"
+                                    id="submitBtn"><span><?php echo $lang['nc_submit']; ?></span></a></td>
+            </tr>
+            </tfoot>
+        </table>
+    </form>
+</div>
+<script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/js/dialog/dialog.js" id="dialog_js"
+        charset="utf-8"></script>
+<script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/js/jquery-ui/jquery.ui.js"></script>
+<script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/js/ajaxfileupload/ajaxfileupload.js"></script>
+<script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/js/jquery.Jcrop/jquery.Jcrop.js"></script>
+<link href="<?php echo RESOURCE_SITE_URL; ?>/js/jquery.Jcrop/jquery.Jcrop.min.css" rel="stylesheet" type="text/css"
+      id="cssfile2"/>
+<script type="text/javascript">
+    $(function () {
+        //按钮先执行验证再提交表单
+        $("#submitBtn").click(function () {
+            $("#user_form").submit();
+        });
+    });
+</script>

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

@@ -3265,14 +3265,14 @@ $dashang_normal_phone = ['name' => 'dashang_normal', 'store_id' => 148, 'quality
 
 $yunchonggongfs_phone = ['name' => 'yunchonggongfs', 'store_id' => 149,'qualitys' => '1',
     'amount' => [
-        10 => [['goods_id' => 7275, 'price' => 9.41, 'quality' => 1, 'card_type' => 'chinamobile']],
-        20 => [['goods_id' => 7276, 'price' => 18.82, 'quality' => 1, 'card_type' => 'chinamobile']],
+//        10 => [['goods_id' => 7275, 'price' => 9.41, 'quality' => 1, 'card_type' => 'chinamobile']],
+//        20 => [['goods_id' => 7276, 'price' => 18.82, 'quality' => 1, 'card_type' => 'chinamobile']],
         30 => [['goods_id' => 7277, 'price' => 28.23, 'quality' => 1, 'card_type' => 'chinamobile']],
         50 => [['goods_id' => 7278, 'price' => 47.05, 'quality' => 1, 'card_type' => 'chinamobile']],
         100 => [['goods_id' => 7279, 'price' => 94.1, 'quality' => 1, 'card_type' => 'chinamobile']],
         200 => [['goods_id' => 7280, 'price' => 188.2, 'quality' => 1, 'card_type' => 'chinamobile']],
-        300 => [['goods_id' => 7281, 'price' => 282.3, 'quality' => 1, 'card_type' => 'chinamobile']],
-        500 => [['goods_id' => 7282, 'price' => 470.5, 'quality' => 1, 'card_type' => 'chinamobile']]
+//        300 => [['goods_id' => 7281, 'price' => 282.3, 'quality' => 1, 'card_type' => 'chinamobile']],
+//        500 => [['goods_id' => 7282, 'price' => 470.5, 'quality' => 1, 'card_type' => 'chinamobile']]
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 

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

@@ -3275,14 +3275,14 @@ $dashang_normal_phone = ['name' => 'dashang_normal', 'store_id' => 148, 'quality
 
 $yunchonggongfs_phone = ['name' => 'yunchonggongfs', 'store_id' => 149,'qualitys' => '1',
     'amount' => [
-        10 => [['goods_id' => 7275, 'price' => 9.41, 'quality' => 1, 'card_type' => 'chinamobile']],
-        20 => [['goods_id' => 7276, 'price' => 18.82, 'quality' => 1, 'card_type' => 'chinamobile']],
+//        10 => [['goods_id' => 7275, 'price' => 9.41, 'quality' => 1, 'card_type' => 'chinamobile']],
+//        20 => [['goods_id' => 7276, 'price' => 18.82, 'quality' => 1, 'card_type' => 'chinamobile']],
         30 => [['goods_id' => 7277, 'price' => 28.23, 'quality' => 1, 'card_type' => 'chinamobile']],
         50 => [['goods_id' => 7278, 'price' => 47.05, 'quality' => 1, 'card_type' => 'chinamobile']],
         100 => [['goods_id' => 7279, 'price' => 94.1, 'quality' => 1, 'card_type' => 'chinamobile']],
         200 => [['goods_id' => 7280, 'price' => 188.2, 'quality' => 1, 'card_type' => 'chinamobile']],
-        300 => [['goods_id' => 7281, 'price' => 282.3, 'quality' => 1, 'card_type' => 'chinamobile']],
-        500 => [['goods_id' => 7282, 'price' => 470.5, 'quality' => 1, 'card_type' => 'chinamobile']]
+//        300 => [['goods_id' => 7281, 'price' => 282.3, 'quality' => 1, 'card_type' => 'chinamobile']],
+//        500 => [['goods_id' => 7282, 'price' => 470.5, 'quality' => 1, 'card_type' => 'chinamobile']]
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 

+ 41 - 0
data/model/refill_company.model.php

@@ -0,0 +1,41 @@
+<?php
+
+defined('InShopNC') or exit('Access Invalid!');
+
+class refill_companyModel extends Model
+{
+    const co_type_merchant = 'merchant';
+    const co_type_provider = 'provider';
+
+    const opened_start = 1;
+    const opened_close = 2;
+
+    public function __construct()
+    {
+        parent::__construct('refill_company');
+    }
+
+    public function getCompanyList($condition, $pagesize = '',$total = 0, $field = '*', $order = 'co_id asc', $limit = '', $master = false)
+    {
+        $list = $this->field($field)->where($condition)->page($pagesize,$total)->order($order)->limit($limit)->master($master)->select();
+        if (empty($list)) return [];
+        return $list;
+    }
+
+    public function addCompany($insert)
+    {
+        return $this->insert($insert);
+    }
+
+    public function getCompanyInfo($condition = [], $fields = '*', $master = false,$lock=false)
+    {
+        $info = $this->field($fields)->where($condition)->master($master)->lock($lock)->find();
+        if (empty($info)) return [];
+        return $info;
+    }
+
+    public function editCompany($update,$condition)
+    {
+        return $this->where($condition)->update($update);
+    }
+}

+ 36 - 0
data/model/refill_company_remit.model.php

@@ -0,0 +1,36 @@
+<?php
+
+defined('InShopNC') or exit('Access Invalid!');
+
+class refill_company_remitModel extends Model
+{
+    const remit_init = 0;
+    const remit_have = 1;
+
+    public function __construct()
+    {
+        parent::__construct('refill_company_remit');
+    }
+
+    public function getRemitList($condition, $pagesize = '',$total = 0, $field = '*', $order = 'add_time asc', $limit = '', $master = false)
+    {
+        $list = $this->field($field)->where($condition)->page($pagesize,$total)->order($order)->limit($limit)->master($master)->select();
+        if (empty($list)) return [];
+        return $list;
+    }
+
+    public function addRemit($insert)
+    {
+        return $this->insert($insert);
+    }
+
+    public function getRemit($remit_id)
+    {
+        return $this->where(['remit_id' => $remit_id])->find();
+    }
+
+    public function editRemit($update,$condition)
+    {
+        return $this->where($condition)->update($update);
+    }
+}

TEMPAT SAMPAH
helper/refill/api/xyz/guochuang/20220708辽宁 青海 贵州调价函.png


TEMPAT SAMPAH
helper/refill/api/xyz/guochuang/20220710河南移动调价函.png


TEMPAT SAMPAH
helper/refill/api/xyz/guochuang/20220710辽宁移动调价函.png


TEMPAT SAMPAH
helper/refill/api/xyz/guochuang/20220711吉林移动调价函.png


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

@@ -64,25 +64,25 @@ 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.82, "4-20-6" => 19.64, "4-30-6" => 29.46, "4-50-6" => 49.1, "4-100-6" => 98.2, "4-200-6" => 196.4, "4-300-6" => 294.6, "4-500-6" => 491,//辽宁 6
+        "4-10-6" => 9.84, "4-20-6" => 19.68, "4-30-6" => 29.52, "4-50-6" => 49.2, "4-100-6" => 98.4, "4-200-6" => 196.8, "4-300-6" => 295.2, "4-500-6" => 492,//辽宁 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.755, "4-20-29" => 19.51, "4-30-29" => 29.265, "4-50-29" => 48.775, "4-100-29" => 97.55, "4-200-29" => 195.1, "4-300-29" => 292.65, "4-500-29" => 487.75,//青海 29
+        "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-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-7" => 9.82, "4-20-7" => 19.64, "4-30-7" => 29.46, "4-50-7" => 49.1, "4-100-7" => 98.2, "4-200-7" => 196.4, "4-300-7" => 294.6, "4-500-7" => 491,//吉林 7
+        "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
         "4-10-15" => 9.945, "4-20-15" => 19.89, "4-30-15" => 29.835, "4-50-15" => 49.725, "4-100-15" => 99.45, "4-200-15" => 198.9, "4-300-15" => 298.35, "4-500-15" => 497.25,//山东 15
         "4-10-10" => 9.945, "4-20-10" => 19.89, "4-30-10" => 29.835, "4-50-10" => 49.725, "4-100-10" => 99.45, "4-200-10" => 198.9, "4-300-10" => 298.35, "4-500-10" => 497.25,//江苏 10
         "4-10-11" => 9.945, "4-20-11" => 19.89, "4-30-11" => 29.835, "4-50-11" => 49.725, "4-100-11" => 99.45, "4-200-11" => 198.9, "4-300-11" => 298.35, "4-500-11" => 497.25,//浙江 11
         "4-10-17" => 9.945, "4-20-17" => 19.89, "4-30-17" => 29.835, "4-50-17" => 49.725, "4-100-17" => 99.45, "4-200-17" => 198.9, "4-300-17" => 298.35, "4-500-17" => 497.25,//湖北 17
-        "4-10-16" => 10.14, "4-20-16" => 20.28, "4-30-16" => 30.21, "4-50-16" => 50.15, "4-100-16" => 100.3, "4-200-16" => 200.6, "4-300-16" => 300.9, "4-500-16" => 501.5,//河南 16
+        "4-10-16" => 10.19, "4-20-16" => 20.28, "4-30-16" => 30.21, "4-50-16" => 50.15, "4-100-16" => 100.3, "4-200-16" => 200.6, "4-300-16" => 300.9, "4-500-16" => 501.5,//河南 16
         "4-50-4" => 49.75, "4-100-4" => 99.5, "4-200-4" => 199,//山西 4
-        "4-10-24" => 10.21, "4-20-24" => 20.22, "4-30-24" => 30.24, "4-50-24" => 50.25, "4-100-24" => 100.3, "4-200-24" => 200.4, "4-300-24" => 300.6, "4-500-24" => 501,//贵州 24
+        "4-10-24" => 10.22, "4-20-24" => 20.44, "4-30-24" => 30.24, "4-50-24" => 50.25, "4-100-24" => 100.3, "4-200-24" => 200.4, "4-300-24" => 300.6, "4-500-24" => 501,//贵州 24
         "4-10-30" => 10.12, "4-20-30" => 20.24, "4-30-30" => 30.129, "4-50-30" => 50.15, "4-100-30" => 100.2, "4-200-30" => 200.4, "4-300-30" => 300.3, "4-500-30" => 500.5,//宁夏 30
         //联通
         "5-10-19" => 10.04, "5-20-19" => 20.08, "5-30-19" => 30.06, "5-50-19" => 50.1, "5-100-19" => 100.2, "5-200-19" => 200.4, "5-300-19" => 300.6, "5-500-19" => 501,//广东 19

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

@@ -64,25 +64,25 @@ 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.82, "4-20-6" => 19.64, "4-30-6" => 29.46, "4-50-6" => 49.1, "4-100-6" => 98.2, "4-200-6" => 196.4, "4-300-6" => 294.6, "4-500-6" => 491,//辽宁 6
+        "4-10-6" => 9.84, "4-20-6" => 19.68, "4-30-6" => 29.52, "4-50-6" => 49.2, "4-100-6" => 98.4, "4-200-6" => 196.8, "4-300-6" => 295.2, "4-500-6" => 492,//辽宁 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.755, "4-20-29" => 19.51, "4-30-29" => 29.265, "4-50-29" => 48.775, "4-100-29" => 97.55, "4-200-29" => 195.1, "4-300-29" => 292.65, "4-500-29" => 487.75,//青海 29
+        "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-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-7" => 9.82, "4-20-7" => 19.64, "4-30-7" => 29.46, "4-50-7" => 49.1, "4-100-7" => 98.2, "4-200-7" => 196.4, "4-300-7" => 294.6, "4-500-7" => 491,//吉林 7
+        "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
         "4-10-15" => 9.945, "4-20-15" => 19.89, "4-30-15" => 29.835, "4-50-15" => 49.725, "4-100-15" => 99.45, "4-200-15" => 198.9, "4-300-15" => 298.35, "4-500-15" => 497.25,//山东 15
         "4-10-10" => 9.945, "4-20-10" => 19.89, "4-30-10" => 29.835, "4-50-10" => 49.725, "4-100-10" => 99.45, "4-200-10" => 198.9, "4-300-10" => 298.35, "4-500-10" => 497.25,//江苏 10
         "4-10-11" => 9.945, "4-20-11" => 19.89, "4-30-11" => 29.835, "4-50-11" => 49.725, "4-100-11" => 99.45, "4-200-11" => 198.9, "4-300-11" => 298.35, "4-500-11" => 497.25,//浙江 11
         "4-10-17" => 9.945, "4-20-17" => 19.89, "4-30-17" => 29.835, "4-50-17" => 49.725, "4-100-17" => 99.45, "4-200-17" => 198.9, "4-300-17" => 298.35, "4-500-17" => 497.25,//湖北 17
-        "4-10-16" => 10.14, "4-20-16" => 20.28, "4-30-16" => 30.21, "4-50-16" => 50.15, "4-100-16" => 100.3, "4-200-16" => 200.6, "4-300-16" => 300.9, "4-500-16" => 501.5,//河南 16
+        "4-10-16" => 10.19, "4-20-16" => 20.28, "4-30-16" => 30.21, "4-50-16" => 50.15, "4-100-16" => 100.3, "4-200-16" => 200.6, "4-300-16" => 300.9, "4-500-16" => 501.5,//河南 16
         "4-50-4" => 49.75, "4-100-4" => 99.5, "4-200-4" => 199,//山西 4
-        "4-10-24" => 10.21, "4-20-24" => 20.22, "4-30-24" => 30.24, "4-50-24" => 50.25, "4-100-24" => 100.3, "4-200-24" => 200.4, "4-300-24" => 300.6, "4-500-24" => 501,//贵州 24
+        "4-10-24" => 10.22, "4-20-24" => 20.44, "4-30-24" => 30.24, "4-50-24" => 50.25, "4-100-24" => 100.3, "4-200-24" => 200.4, "4-300-24" => 300.6, "4-500-24" => 501,//贵州 24
         "4-10-30" => 10.12, "4-20-30" => 20.24, "4-30-30" => 30.129, "4-50-30" => 50.15, "4-100-30" => 100.2, "4-200-30" => 200.4, "4-300-30" => 300.3, "4-500-30" => 500.5,//宁夏 30
         //联通
         "5-10-19" => 10.04, "5-20-19" => 20.08, "5-30-19" => 30.06, "5-50-19" => 50.1, "5-100-19" => 100.2, "5-200-19" => 200.4, "5-300-19" => 300.6, "5-500-19" => 501,//广东 19