瀏覽代碼

admin updata and zanzan query add official_sn

xiaoyu 3 年之前
父節點
當前提交
0e2edff3a0

+ 11 - 1
admin/control/merchant.php

@@ -1190,6 +1190,15 @@ class merchantControl extends SystemControl
         if (trim($_GET['store_name']) != '') {
             $condition['store_name'] = ['like', '%' . $_GET['store_name'] . '%'];
         }
+        $start_unixtime = intval(strtotime($_GET['query_start_time']));
+        $end_unixtime = intval(strtotime($_GET['query_end_time']));
+        if ($start_unixtime > 0 && $end_unixtime > $start_unixtime) {
+            $condition['apply_time'] = [['egt', $start_unixtime], ['lt', $end_unixtime], 'and'];
+        } elseif ($start_unixtime > 0) {
+            $condition['apply_time'] = ['egt', $start_unixtime];
+        } elseif ($end_unixtime > 0) {
+            $condition['apply_time'] = ['lt', $end_unixtime];
+        }
 
         //上游充值申请列表
         $evidence_list = $mod->getProviderEvidence($condition, 30);
@@ -1212,7 +1221,7 @@ class merchantControl extends SystemControl
                 ["input" => $_POST["to_bank_username"], "require" => "true", "message" => '上游开户人姓名不能为空'],
                 ["input" => $_POST["to_bank_name"], "require" => "true", "message" => '上游开户银行不能为空'],
                 ["input" => $_POST["amount"], "require" => "true", "message" => '预存金额不能为空'],
-//                ["input" => $_POST["apply_time"], "require" => "true", "message" => '申请日期不能为空']
+                ["input" => $_POST["apply_time"], "require" => "true", "message" => '申请日期不能为空']
             ];
             $error = $obj_validate->validate();
             if ($error != '') {
@@ -1255,6 +1264,7 @@ class merchantControl extends SystemControl
             $input['to_bank_name'] = $_POST['to_bank_name'];
             $input['add_time'] = time();
             $input['bz'] = $_POST['bz'];
+            $input['apply_time'] = strtotime($_POST['apply_time']);
             $mod = Model('provider_evidence');
             $res = $mod->addProviderEvidence($input);
 

+ 114 - 0
admin/control/merchant_info.php

@@ -0,0 +1,114 @@
+<?php
+
+
+class merchant_infoControl extends SystemControl
+{
+    public function __construct()
+    {
+        parent::__construct();
+    }
+
+    public function indexOp()
+    {
+        $mod = Model('merchant_info');
+        $condition = [];
+        if(!empty($_GET['mchid'])) {
+            $condition['mchid'] = $_GET['mchid'];
+        }
+        $merchants = [];
+        $merchant_list = Model('')->table('merchant')->limit(1000)->select();
+        foreach ($merchant_list as $key => $value) {
+            $merchants[$value['mchid']] = $value;
+        }
+        $info_list = $mod->getMerchantInfoList($condition,50);
+        foreach ($info_list as $key => $value) {
+            $info_list[$key]['merchant_name'] = $merchants[$value['mchid']]['name'];
+            $info_list[$key]['company_name'] = $merchants[$value['mchid']]['company_name'];
+        }
+        Tpl::output('merchants', $merchants);
+        Tpl::output('info_list', $info_list);
+        Tpl::showpage('merchant.info');
+    }
+
+    public function addOp()
+    {
+        if (chksubmit()) {
+            $obj_validate = new Validator();
+            $obj_validate->validateparam = [
+                ["input" => $_POST["mchid"], "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 {
+                $merchant = Model('merchant')->getMerchantInfo(['mchid' => $_POST['mchid']]);
+                if(empty($merchant)) {
+                    showMessage('此上游通道不存在!');
+                }
+                $mod = Model('merchant_info');
+                $insert_array['mchid'] = $_POST['mchid'];
+                $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['bz'] = $_POST['bz'] ?? '';
+                $result = $mod->addInfo($insert_array);
+                if ($result) {
+                    showMessage('添加成功', 'index.php?act=merchant_info&op=index');
+                } else {
+                    showMessage('添加失败');
+                }
+            }
+        }
+        else
+        {
+            $merchant_list = Model('')->table('merchant')->limit(1000)->select();
+            Tpl::output('merchant_list', $merchant_list);
+            Tpl::showpage('merchant.info.add');
+        }
+    }
+
+    public function editOp()
+    {
+        $info_id = $_GET['info_id'] ?? $_POST['info_id'];
+        $mod = Model('merchant_info');
+        $merchant_info = $mod->getMerchantInfo(['info_id' => $info_id]);
+        if (empty($merchant_info)) {
+            showMessage('机构信息不存在');
+        }
+        if (chksubmit()) {
+            $update['bank_name'] = trim($_POST['bank_name']);
+            $update['bank_username'] = trim($_POST['bank_username']);
+            $update['bank_card_no'] = trim($_POST['bank_card_no']);
+            $update['bz'] = trim($_POST['bz']) ?? '';
+
+            $result = $mod->editMerchantInfo($update, ['info_id' => $info_id]);
+            if (!$result) {
+                showMessage('编辑失败');
+            }
+            showMessage('编辑成功','index.php?act=merchant_info&op=index');
+        }
+        else
+        {
+            Tpl::output('info', $merchant_info);
+            Tpl::showpage('merchant.info.edit');
+        }
+    }
+
+    public function delOp()
+    {
+        $info_id = $_GET['info_id'];
+        $mod = Model('merchant_info');
+        $merchant_info = $mod->getMerchantInfo(['info_id' => $info_id]);
+        if (empty($merchant_info)) {
+            showMessage('机构信息不存在');
+        }
+        $result = $mod->DelMerchantInfo(['info_id' => $info_id]);
+        if (!$result) {
+            showMessage('删除失败');
+        }
+        showMessage('删除成功','index.php?act=merchant_info&op=index');
+    }
+}

+ 51 - 0
admin/control/provider_info.php

@@ -119,4 +119,55 @@ class provider_infoControl extends SystemControl
         }
         showMessage('删除成功','index.php?act=provider_info&op=index');
     }
+
+    public function apply_editOp()
+    {
+
+        $apply_id = $_GET['apply_id'] ?? $_POST['apply_id'];
+        $mod = Model('provider_evidence');
+        $provider_evidence_info = $mod->getProviderEvidenceInfo(['apply_id' => $apply_id]);
+        if (empty($provider_evidence_info)) {
+            showMessage('申请信息不存在');
+        }
+        if (chksubmit()) {
+            if(!empty($_FILES['voucher']['name'])) {
+                $upload = new UploadFile();
+                $upload->set('default_dir',ATTACH_UPFILE.'/provider');
+
+                $result = $upload->upfile('voucher');
+                if ($result){
+                    $_POST['voucher'] = $upload->file_name;
+                    $update['voucher_name'] = $_POST['voucher'];
+                }else {
+                    showMessage($upload->error);
+                }
+            }
+
+            $update['bank_username'] = trim($_POST['bank_username'])  ?? '';
+            $update['bank_name'] = trim($_POST['bank_name'])  ?? '';
+            $update['amount'] = trim($_POST['amount'])  ?? '';
+            $update['to_bank_username'] = trim($_POST['to_bank_username'])  ?? '';
+            $update['to_bank_name'] = trim($_POST['to_bank_name'])  ?? '';
+            $update['apply_time'] = strtotime($_POST['apply_time'])  ?? '';
+            $update['bz'] = $_POST['bz'] ?? '';
+
+            $result = $mod->editProviderEvidence($update, ['apply_id' => $apply_id]);
+            if (!$result) {
+                showMessage('编辑失败');
+            }
+            showMessage('编辑成功','index.php?act=merchant&op=provider_evidence');
+        }
+        else
+        {
+            $provider_list = Model('')->table('refill_provider,store')
+                ->field('refill_provider.*,store.store_name')
+                ->join('inner')
+                ->on('store.store_id=refill_provider.store_id')
+                ->limit(1000)
+                ->select();
+            Tpl::output('provider_list', $provider_list);
+            Tpl::output('info', $provider_evidence_info);
+            Tpl::showpage('provider.evidence.edit');
+        }
+    }
 }

+ 1 - 0
admin/include/limit.php

@@ -42,6 +42,7 @@ $_limit =  array(
         array('name'=> '成功率监控', 'op'=>null, 'act'=>'refill_successful'),
         array('name'=> '订单手动处理', 'op'=>null, 'act'=>'refill_order_manual'),
         array('name'=> '上游信息管理', 'op'=>null, 'act'=>'provider_info'),
+        array('name'=> '机构信息管理', 'op'=>null, 'act'=>'merchant_info'),
     )),
 	array('name'=>$lang['nc_store'], 'child'=>array(
 		array('name'=>$lang['nc_store_manage'], 'op'=>null, 'act'=>'store'),

+ 1 - 0
admin/include/menu.php

@@ -105,6 +105,7 @@ $arr = array(
 					array('args'=>'index,refill_successful,merchant',		'text'=>'成功率监控'),
 					array('args'=>'index,refill_order_manual,merchant',		'text'=>'订单手动处理'),
 					array('args'=>'index,provider_info,merchant',			'text'=>'上游信息管理'),
+					array('args'=>'index,merchant_info,merchant',			'text'=>'机构信息管理'),
 				)
 			),
 			4 => array(

+ 146 - 0
admin/templates/default/merchant.info.add.php

@@ -0,0 +1,146 @@
+<?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=merchant_info&op=index"><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="user_form" enctype="multipart/form-data" method="post" class="layui-form">
+        <input type="hidden" name="form_submit" value="ok"/>
+        <table class="table tb-type2 nobdb">
+            <tbody>
+            <tr class="noborder">
+                <td colspan="2" class="required"><label class="validation" for="mchid">机构选择:</label></td>
+            </tr>
+            <tr class="">
+                <td class="">
+                    <select name="mchid" id="mchid" class="layui_in" lay-verify="" lay-search>
+                        <option value=""><?php echo $lang['nc_please_choose']; ?></option>
+                        <?php foreach($output['merchant_list'] as $merchant){?>
+                            <option value="<?php echo $merchant['mchid']?>"><?php echo $merchant['company_name']??$merchant['name'];?></option>
+                        <?php }?>
+                    </select>
+                </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>备注:</label></td>
+            </tr>
+            <tr class="noborder">
+                <td class="vatop rowform"><textarea name="bz" 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; ?>/laydate/laydate.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/jquery-ui/i18n/zh-CN.js"
+        charset="utf-8"></script>
+ <link rel="stylesheet" type="text/css"
+      href="<?php echo RESOURCE_SITE_URL; ?>/js/jquery-ui/themes/ui-lightness/jquery.ui.css"/> 
+<script type="text/javascript" src="<?php echo RESOURCE_SITE_URL;?>/refill/layer.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 type="text/javascript">
+    $(function () {
+        //按钮先执行验证再提交表单
+        $("#submitBtn").click(function () {
+            if ($("#user_form").valid()) {
+                $("#user_form").submit();
+            }
+        });
+        $('#user_form').validate({
+            errorPlacement: function (error, element) {
+                error.appendTo(element.parent().parent().prev().find('td:first'));
+            },
+            rules: {
+                mchid: {
+                    required: true,
+                },
+                bank_name: {
+                    required: true,
+                },
+                bank_username: {
+                    required: true,
+                },
+                bank_card_no: {
+                    required: true,
+                },
+            },
+            messages: {
+                mchid: {
+                    required: '必须选择机构',
+                },
+                bank_name: {
+                    required: '收款银行名称不能为空',
+                },
+                bank_username: {
+                    required: '开户人名称不能为空',
+                },
+                bank_card_no: {
+                    required: '收款卡号不能为空',
+                },
+            }
+        });
+    });
+    
+    function trim(str) {
+    if (str && typeof str === "text") {
+        return str.replace(/(^\s*)|(\s*)$/g,""); //去除前后空白符
+    }
+}
+</script>

+ 90 - 0
admin/templates/default/merchant.info.edit.php

@@ -0,0 +1,90 @@
+<?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=merchant_info&op=index"><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="user_form" enctype="multipart/form-data" method="post" class="layui-form">
+        <input type="hidden" name="form_submit" value="ok"/>
+        <input type="hidden" name="info_id" value="<?php echo $output['info']['info_id']?>"/>
+        <table class="table tb-type2">
+            <tbody>
+            <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['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['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" id="bank_card_no" name="bank_card_no" class="txt" value="<?php echo $output['info']['bank_card_no']?>"></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="bz" rows="6" class="tarea"><?php echo $output['info']['bz']?></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">
+    $(function () {
+        //按钮先执行验证再提交表单
+        $("#submitBtn").click(function () {
+            if ($("#user_form").valid()) {
+                $("#user_form").submit();
+            }
+        });
+        $('#user_form').validate({
+            errorPlacement: function (error, element) {
+                error.appendTo(element.parent().parent().prev().find('td:first'));
+            },
+            rules: {
+                bank_name: {
+                    required: true,
+                },
+                bank_username: {
+                    required: true,
+                },
+                bank_card_no: {
+                    required: true,
+                },
+            },
+            messages: {
+                bank_name: {
+                    required: '收款银行名称不能为空',
+                },
+                bank_username: {
+                    required: '开户人名称不能为空',
+                },
+                bank_card_no: {
+                    required: '收款卡号不能为空',
+                },
+            }
+        });
+    });
+</script>

+ 120 - 0
admin/templates/default/merchant.info.php

@@ -0,0 +1,120 @@
+<?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=merchant_info&op=add"><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="merchant_info" name="act">
+        <input type="hidden" value="index" name="op">
+        <table class="tb-type1 noborder search">
+            <tbody>
+            <tr>
+                <th><label>机构名称</label></th>
+                <td>
+                    <select name="mchid" class="querySelect" lay-verify="" lay-search>
+                        <option  value=""><?php echo $lang['nc_please_choose']; ?></option>
+                        <?php foreach($output['merchants'] as $merchant){?>
+                            <option value="<?php echo $merchant['mchid']?>"
+                                    <?php if ($_GET['mchid'] == $merchant['mchid']){ ?>selected<?php } ?>><?php echo $merchant['company_name'] ?? $merchant['name'];?>
+                            </option>
+                        <?php }?>
+                    </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="merchant_name_form">
+        <input type="hidden" name="form_submit" value="ok"/>
+        <table class="table tb-type2">
+            <thead>
+            <tr class="thead">
+                <th>记录ID</th>
+                <th>机构名称</th>
+                <th>机构ID</th>
+                <th class="align-center">收款银行名称</th>
+                <th class="align-center">开户人名称</th>
+                <th class="align-center">收款卡号</th>
+                <th class="align-center">备注</th>
+                <th class="align-center">操作</th>
+            </tr>
+            </thead>
+            <tbody>
+            <?php if (!empty($output['info_list']) && is_array($output['info_list'])) { ?>
+                <?php foreach ($output['info_list'] as $k => $v) { ?>
+                    <tr class="trFlex">
+                        <td><?php echo $v['info_id']; ?></td>
+                        <td><?php echo $v['company_name'] ?? $v['name']; ?> </td>
+                        <td><?php echo $v['mchid']; ?></td>
+                        <td class="align-center"><?php echo $v['bank_name']; ?></td>
+                        <td class="align-center"><?php echo $v['bank_username']; ?></td>
+                        <td class="align-center"><?php echo $v['bank_card_no']; ?></td>
+                        <td class="align-center"><?php echo $v['bz']; ?></td>
+                        <td class="align-center w200">
+                            <a href="index.php?act=merchant_info&op=edit&info_id=<?php echo $v['info_id'] ?>">编辑</a>
+                            |
+                            <a href="index.php?act=merchant_info&op=del&info_id=<?php echo $v['info_id'] ?>">删除</a>
+                        </td>
+                    </tr>
+                <?php } ?>
+            <?php } else { ?>
+                <tr class="no_data">
+                    <td colspan="10"><?php echo $lang['nc_no_record']; ?></td>
+                </tr>
+            <?php } ?>
+            </tbody>
+            <tfoot>
+            <tr class="tfoot">
+                <td></td>
+                <td colspan="10">
+                    <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>

+ 52 - 15
admin/templates/default/merchant.provider.evidence_list.php

@@ -1,5 +1,11 @@
 <?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;
+    }
+</style>
 <div class="page">
     <div class="fixed-bar">
         <div class="item-title">
@@ -21,6 +27,16 @@
                 <th><label for="store_name">通道店铺名称</label></th>
                 <td><input type="text" value="<?php echo $_GET['store_name']; ?>" name="store_name"
                            id="store_name" class="txt"></td>
+
+                <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:120px" />
+                    <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:120px" />
+                </td>
+
                 <td><a href="javascript:void(0);" id="ncsubmit" class="btn-search "
                        title="<?php echo $lang['nc_query']; ?>">&nbsp;</a>
                     <?php if ($output['mch_name'] != '') { ?>
@@ -31,20 +47,25 @@
             </tbody>
         </table>
     </form>
-    <!--   <table class="table tb-type2" id="prompt">-->
-    <!--    <tbody>-->
-    <!--      <tr class="space odd">-->
-    <!--        <th colspan="12"><div class="title">-->
-    <!--            <h5>--><?php //echo $lang['nc_prompts'];?><!--</h5>-->
-    <!--            <span class="arrow"></span></div></th>-->
-    <!--      </tr>-->
-    <!--      <tr>-->
-    <!--        <td><ul>-->
-    <!--            <li>--><?php //echo $lang['store_help1'];?><!--</li>-->
-    <!--          </ul></td>-->
-    <!--      </tr>-->
-    <!--    </tbody>-->
-    <!--  </table>-->
+    <table class="table tb-type2" id="prompt">
+        <tbody>
+        <tr class="space odd">
+            <th>
+                <div class="title">
+                    <h5>金额统计:</h5>
+                    <span class="arrow"></span>
+                </div>
+            </th>
+        </tr>
+        <tr>
+            <td>
+                <ul>
+                    <li>提交金额:<?php echo $output['amounts'];?></li>
+                </ul>
+            </td>
+        </tr>
+        </tbody>
+    </table>
     <form method="post" id="merchant_name_form">
         <input type="hidden" name="form_submit" value="ok"/>
         <table class="table tb-type2">
@@ -58,6 +79,7 @@
                 <th class="align-center">上游收款银行开户人姓名</th>
                 <th class="align-center">上游收款银行名称</th>
                 <th class="align-center">申请日期</th>
+                <th class="align-center">添加日期</th>
                 <th class="align-center">备注</th>
                 <th class="align-center"><?php echo $lang['operation']; ?></th>
             </tr>
@@ -73,10 +95,13 @@
                         <td class="align-center"><?php echo $v['bank_name']; ?></td>
                         <td class="align-center"><?php echo $v['to_bank_username']; ?></td>
                         <td class="align-center"><?php echo $v['to_bank_name']; ?></td>
+                        <td class="nowarp align-center"><?php echo $v['apply_time'] ? date('Y-m-d H:i', $v['apply_time']) : $lang['no_limit']; ?></td>
                         <td class="nowarp align-center"><?php echo $v['add_time'] ? date('Y-m-d H:i', $v['add_time']) : $lang['no_limit']; ?></td>
                         <td class="nowarp align-center"><?php echo $v['bz']?></td>
                         <td class="align-center w200">
+                            <a href="index.php?act=provider_info&op=apply_edit&apply_id=<?php echo $v['apply_id'] ?>">编辑</a>
                             <?php if(!empty($v['voucher_name'])) {?>
+                                    |
                             <a target="_blank"
                                href="<?php echo UPLOAD_SITE_URL . '/' . ATTACH_UPFILE . DS . 'provider/' .$v['voucher_name']; ?>">预览</a>
                             <?php }?>
@@ -101,8 +126,20 @@
     </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'
+        });
+        laydate.render({
+            elem: '#endTime',
+            type: 'datetime'
+        });
         $('#ncsubmit').click(function () {
             $('input[name="op"]').val('provider_evidence');
             $('#formSearch').submit();

+ 5 - 1
admin/templates/default/merchant.refill.evidence_list.php

@@ -1,5 +1,9 @@
 <?php defined('InShopNC') or exit('Access Invalid!'); ?>
-
+<style>
+    .btn-search {
+        margin-right: 60px;
+    }
+</style>
 <div class="page">
     <div class="fixed-bar">
         <div class="item-title">

+ 56 - 4
admin/templates/default/provider.evidence.add.php

@@ -1,5 +1,27 @@
 <?php defined('InShopNC') or exit('Access Invalid!');?>
 <!--//zmr>v20-->
+<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">
@@ -12,7 +34,7 @@
     </div>
   </div>
   <div class="fixed-empty"></div>
-  <form id="points_form" method="post" name="form1" enctype="multipart/form-data">
+  <form id="points_form" method="post" name="form1" enctype="multipart/form-data" class="layui-form">
     <input type="hidden" name="form_submit" value="ok" />
    
     <table class="table tb-type2 nobdb">
@@ -20,9 +42,9 @@
         <tr class="noborder">
           <td colspan="2" class="required"><label class="validation">上游店铺:</label></td>
         </tr>
-        <tr class="noborder">
-          <td class="vatop rowform">
-              <select name="provider_id" class="querySelect">
+        <tr class="">
+          <td class="">
+              <select name="provider_id" class="layui_in" lay-verify="" lay-search>
                   <option value=""><?php echo $lang['nc_please_choose']; ?></option>
                   <?php foreach($output['provider_list'] as $provider){?>
                       <option value="<?php echo $provider['provider_id']?>"><?php echo $provider['store_name']?>
@@ -84,6 +106,14 @@
             <td class="vatop tips"></td>
         </tr>
         <tr>
+            <td colspan="2"><label>转账日期:</label></td>
+        </tr>
+        <tr class="noborder">
+            <td class="vatop rowform">
+                <input class="txt date" type="text" id="apply_time" name="apply_time" autocomplete="off" style="width:230px" />
+            <td class="vatop tips"></td>
+        </tr>
+        <tr>
           <td colspan="2" class="required"><label>备注:</label></td>
         </tr>
         <tr class="noborder">
@@ -98,6 +128,16 @@
     </table>
   </form>
 </div>
+<script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/laydate/laydate.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/jquery-ui/i18n/zh-CN.js"
+        charset="utf-8"></script>
+ <link rel="stylesheet" type="text/css"
+      href="<?php echo RESOURCE_SITE_URL; ?>/js/jquery-ui/themes/ui-lightness/jquery.ui.css"/> 
+<script type="text/javascript" src="<?php echo RESOURCE_SITE_URL;?>/refill/layer.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 type="text/javascript">
 $(function(){
     $("#voucher").change(function(){
@@ -130,6 +170,9 @@ $(function(){
             },
             to_bank_name   : {
                 required : true,
+            },
+            apply_time   : {
+                required : true,
             }
         },
         messages : {
@@ -150,8 +193,17 @@ $(function(){
             },
             to_bank_name   : {
                 required : '不能为空',
+            },
+            apply_time   : {
+                required : '不能为空',
             }
         }
     });
+           // 日期选择器
+        laydate.render({
+        elem: '#apply_time',
+        type: 'datetime',
+        trigger: 'click'
+    });
 });
 </script>

+ 178 - 0
admin/templates/default/provider.evidence.edit.php

@@ -0,0 +1,178 @@
+<?php defined('InShopNC') or exit('Access Invalid!');?>
+<!--//zmr>v20-->
+<div class="page">
+  <div class="fixed-bar">
+    <div class="item-title">
+      <h3>上游信息管理</h3>
+      <ul class="tab-base">
+          <li><a href="index.php?act=provider_info&op=provider"><span>上游信息管理</span></a></li>
+          <li><a href="index.php?act=merchant&op=provider_evidence"><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="points_form" method="post" name="form1" enctype="multipart/form-data">
+        <input type="hidden" name="form_submit" value="ok" />
+        <input type="hidden" name="apply_id" value="<?php echo $output['info']['apply_id']?>" />
+    <table class="table tb-type2 nobdb">
+      <tbody>
+        <tr class="noborder">
+            <td colspan="2" class="required"><label class="validation">我方转账开户人姓名:</label></td>
+        </tr>
+        <tr class="noborder">
+            <td class="vatop rowform">
+                <input type="text" name="bank_username" id="bank_username" class="txt" value="<?php echo $output['info']['bank_username']?>">
+            <td class="vatop tips"></td>
+        </tr>
+        <tr class="noborder">
+            <td colspan="2" class="required"><label class="validation">我方转账银行名称:</label></td>
+        </tr>
+        <tr class="noborder">
+            <td class="vatop rowform">
+                <input type="text" name="bank_name" id="bank_name" class="txt" value="<?php echo $output['info']['bank_name']?>">
+            <td class="vatop tips"></td>
+        </tr>
+        <tr>
+          <td colspan="2" class="required"><label class="validation">金额:</label></td>
+        </tr>
+        <tr class="noborder">
+          <td class="vatop rowform"><input type="text" id="amount" name="amount" class="txt" value="<?php echo $output['info']['amount']?>"></td>
+          <td class="vatop tips"></td>
+        </tr>
+        <tr class="noborder">
+            <td colspan="2" class="required"><label class="validation">上游收款转账开户人姓名:</label></td>
+        </tr>
+        <tr class="noborder">
+            <td class="vatop rowform">
+                <input type="text" name="to_bank_username" id="to_bank_username" class="txt" value="<?php echo $output['info']['to_bank_username']?>">
+            <td class="vatop tips"></td>
+        </tr>
+        <tr class="noborder">
+            <td colspan="2" class="required"><label class="validation">上游收款转账银行名称:</label></td>
+        </tr>
+        <tr class="noborder">
+            <td class="vatop rowform">
+                <input type="text" name="to_bank_name" id="to_bank_name" class="txt" value="<?php echo $output['info']['to_bank_name']?>">
+            <td class="vatop tips"></td>
+        </tr>
+        <tr>
+            <td colspan="2"><label>充值申请凭证:</label></td>
+        </tr>
+        <tr class="noborder">
+            <td class="vatop rowform">
+                <span class="type-file-box">
+                    <input type='text' name='textfield' id='textfield1' class='type-file-text' />
+                    <input type='button' name='button' id='button1' value='' class='type-file-button' />
+                    <input name="voucher" type="file" class="type-file-file" id="voucher" size="30" hidefocus="true">
+                </span>
+            </td>
+            <td>
+                <?php if(!empty($output['info']['voucher_name'])) {?>
+                    <a target="_blank"
+                       href="<?php echo UPLOAD_SITE_URL . '/' . ATTACH_UPFILE . DS . 'provider/' .$output['info']['voucher_name']; ?>">预览旧凭证</a>
+                <?php }?>
+            </td>
+            <td class="vatop tips"></td>
+        </tr>
+        <tr>
+            <td colspan="2"><label>转账日期:</label></td>
+        </tr>
+        <tr class="noborder">
+            <td class="vatop rowform">
+                <input class="txt date" type="text" id="apply_time" name="apply_time" autocomplete="off" style="width:230px" value="<?php echo date('Y-m-d H:i', $output['info']['apply_time'])?>"/>
+            <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="bz" rows="6" class="tarea"><?php echo $output['info']['bz']?></textarea></td>
+        </tr>
+      </tbody>
+      <tfoot>
+        <tr class="tfoot">
+            <td><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; ?>/laydate/laydate.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/jquery-ui/i18n/zh-CN.js"
+        charset="utf-8"></script>
+<link rel="stylesheet" type="text/css"
+      href="<?php echo RESOURCE_SITE_URL; ?>/js/jquery-ui/themes/ui-lightness/jquery.ui.css"/>
+<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;?>/refill/layer.js"></script>
+
+<script type="text/javascript">
+$(function(){
+    $("#voucher").change(function(){
+        $("#textfield1").val($(this).val());
+    });
+    $("#submitBtn").click(function () {
+        if ($("#points_form").valid()) {
+            $("#points_form").submit();
+        }
+    });
+    $('#points_form').validate({
+        errorPlacement: function (error, element) {
+            error.appendTo(element.parent().parent().prev().find('td:first'));
+        },
+        rules : {
+            provider_id: {
+				required : true
+			},
+            bank_username   : {
+                required : true,
+            },
+            bank_name: {
+                required : true
+            },
+            amount   : {
+                required : true,
+            },
+            to_bank_username: {
+                required : true
+            },
+            to_bank_name   : {
+                required : true,
+            },
+            apply_time   : {
+                required : true,
+            }
+        },
+        messages : {
+            provider_id: {
+                required : '需选择上游店铺'
+            },
+            bank_username   : {
+                required : '不能为空',
+            },
+            bank_name: {
+                required : '不能为空'
+            },
+            amount   : {
+                required : '不能为空',
+            },
+            to_bank_username: {
+                required : '不能为空'
+            },
+            to_bank_name   : {
+                required : '不能为空',
+            },
+            apply_time   : {
+                required : '不能为空',
+            }
+        }
+    });
+           // 日期选择器
+        laydate.render({
+        elem: '#apply_time',
+        type: 'datetime',
+        trigger: 'click'
+    });
+});
+</script>

+ 28 - 5
admin/templates/default/provider.info.add.php

@@ -1,5 +1,26 @@
 <?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">
@@ -13,16 +34,16 @@
         </div>
     </div>
     <div class="fixed-empty"></div>
-    <form id="user_form" enctype="multipart/form-data" method="post">
+    <form id="user_form" enctype="multipart/form-data" method="post"  class="layui-form">
         <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="provider_id">上游选择:</label></td>
             </tr>
-            <tr class="noborder">
-                <td class="vatop rowform">
-                    <select name="provider_id" id="provider_id">
+            <tr class="">
+                <td class="">
+                    <select name="provider_id" id="provider_id" lay-verify="" lay-search>
                         <option value=""><?php echo $lang['nc_please_choose']; ?></option>
                         <?php foreach($output['provider_list'] as $provider){?>
                             <option value="<?php echo $provider['provider_id']?>">
@@ -91,6 +112,8 @@
 <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">

+ 71 - 17
data/config/win/refill.ini.php

@@ -546,14 +546,38 @@ $afandfs_phone = ['name' => 'afandfs', 'store_id' => 41, 'qualitys' => '1',
 
 $yunling_phone = ['name' => 'yunling', 'store_id' => 37, 'qualitys' => '1',
     'amount' => [
-        10 => [['goods_id' => 6456, 'price' => 9.53, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        20 => [['goods_id' => 6457, 'price' => 19.02, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        30 => [['goods_id' => 6458, 'price' => 28.59, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        50 => [['goods_id' => 6459, 'price' => 47.65, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        100 => [['goods_id' => 6460, 'price' => 95.3, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        200 => [['goods_id' => 6461, 'price' => 190.6, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        300 => [['goods_id' => 6462, 'price' => 285.9, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        500 => [['goods_id' => 6463, 'price' => 476.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
+        10 => [
+            ['goods_id' => 6456, 'price' => 9.56, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6456, 'price' => 9.53, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+        ],
+        20 => [
+            ['goods_id' => 6457, 'price' => 19.12, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6457, 'price' => 19.02, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+        ],
+        30 => [
+            ['goods_id' => 6458, 'price' => 28.68, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6458, 'price' => 28.59, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+        ],
+        50 => [
+            ['goods_id' => 6459, 'price' => 47.8, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6459, 'price' => 47.65, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+        ],
+        100 => [
+            ['goods_id' => 6460, 'price' => 95.6, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6460, 'price' => 95.3, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+        ],
+        200 => [
+            ['goods_id' => 6461, 'price' => 191.2, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6461, 'price' => 190.6, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+        ],
+        300 => [
+            ['goods_id' => 6462, 'price' => 286.8, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6462, 'price' => 285.9, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+        ],
+        500 => [
+            ['goods_id' => 6463, 'price' => 478, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6463, 'price' => 476.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+        ]
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
@@ -830,31 +854,60 @@ $weiyiwt_phone = ['name' => 'weiyiwt', 'store_id' => 58,'qualitys' => '1',
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
-$xiaochuang_phone = ['name' => 'xiaochuang', 'store_id' => 59, 'qualitys' => '7',
+$xiaochuang_phone = ['name' => 'xiaochuang', 'store_id' => 59, 'qualitys' => '5',
+    'amount' => [
+        10 => [
+            ['goods_id' => 6603, 'price' => 9.05, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+        ],
+        20 => [
+            ['goods_id' => 6604, 'price' => 18.1, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+        ],
+        30 => [
+            ['goods_id' => 6605, 'price' => 27.15, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+        ],
+        50 => [
+            ['goods_id' => 6606, 'price' => 45.25, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+        ],
+        100 => [
+            ['goods_id' => 6607, 'price' => 90.5, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+        ],
+        200 => [
+            ['goods_id' => 6608, 'price' => 181, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+        ],
+        300 => [
+            ['goods_id' => 6609, 'price' => 271.5, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+        ],
+        500 => [
+            ['goods_id' => 6610, 'price' => 452.5, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+        ],
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
+$zanzan_phone = ['name' => 'zanzan', 'store_id' => 60, 'qualitys' => '5',
     'amount' => [
         10 => [
-            ['goods_id' => 6603, 'price' => 9.05, 'quality' => 7, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+            ['goods_id' => 6611, 'price' => 8.9, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
         ],
         20 => [
-            ['goods_id' => 6604, 'price' => 18.1, 'quality' => 7, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+            ['goods_id' => 6612, 'price' => 17.8, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
         ],
         30 => [
-            ['goods_id' => 6605, 'price' => 27.15, 'quality' => 7, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+            ['goods_id' => 6613, 'price' => 26.7, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
         ],
         50 => [
-            ['goods_id' => 6606, 'price' => 45.25, 'quality' => 7, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+            ['goods_id' => 6614, 'price' => 44.5, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
         ],
         100 => [
-            ['goods_id' => 6607, 'price' => 90.5, 'quality' => 7, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+            ['goods_id' => 6615, 'price' => 89, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
         ],
         200 => [
-            ['goods_id' => 6608, 'price' => 181, 'quality' => 7, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+            ['goods_id' => 6616, 'price' => 178, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
         ],
         300 => [
-            ['goods_id' => 6609, 'price' => 271.5, 'quality' => 7, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+            ['goods_id' => 6617, 'price' => 267, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
         ],
         500 => [
-            ['goods_id' => 6610, 'price' => 452.5, 'quality' => 7, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+            ['goods_id' => 6618, 'price' => 445, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
         ],
     ],
     'official_sn' => true, 'refill_type' => 'api'];
@@ -895,6 +948,7 @@ $phone_providers = [
     ['name' => 'qianqianman', 'cfg' => $qianqianman_phone],
     ['name' => 'weiyiwt', 'cfg' => $weiyiwt_phone],
     ['name' => 'xiaochuang', 'cfg' => $xiaochuang_phone],
+    ['name' => 'zanzan', 'cfg' => $zanzan_phone]
 ];
 $config['phone_providers'] = $phone_providers;
 

+ 37 - 0
data/model/merchant_info.model.php

@@ -0,0 +1,37 @@
+<?php
+defined('InShopNC') or exit('Access Invalid!');
+
+class merchant_infoModel extends Model
+{
+    public function __construct()
+    {
+        parent::__construct('merchant_info');
+    }
+
+    public function getMerchantInfoList($condition, $pagesize = '', $field = '*', $order = 'info_id desc', $limit = '')
+    {
+        $list = $this->field($field)->where($condition)->page($pagesize)->order($order)->limit($limit)->select();
+        if (empty($list)) return [];
+        return $list;
+    }
+
+    public function addInfo($insert)
+    {
+        return $this->insert($insert);
+    }
+
+    public function getMerchantInfo($condition)
+    {
+        return $this->where($condition)->find();
+    }
+
+    public function editMerchantInfo($update,$condition)
+    {
+        return $this->where($condition)->update($update);
+    }
+
+    public function DelMerchantInfo($condition)
+    {
+        return $this->where($condition)->delete();
+    }
+}

+ 10 - 0
data/model/provider_evidence.model.php

@@ -21,4 +21,14 @@ class provider_evidenceModel extends Model
     {
         return $this->insert($params);
     }
+
+    public function editProviderEvidence($update,$condition)
+    {
+        return $this->where($condition)->update($update);
+    }
+
+    public function getProviderEvidenceInfo($condition)
+    {
+        return $this->where($condition)->find();
+    }
 }

+ 2 - 0
helper/refill/api/xyz/zanzan/RefillPhone.php

@@ -95,6 +95,8 @@ class RefillPhone extends refill\IRefillPhone
             if (empty($resp)) {
                 return [false, '系统错误'];
             } elseif ($resp['code'] === '0000') {
+                $updata['official_sn'] = $resp['serialno'];
+                Model('refill_order')->edit($refill_info['order_id'], $updata);
                 $order_state = ORDER_STATE_SUCCESS;
             } elseif ($resp['code'] === '0004') {
                 $order_state = ORDER_STATE_CANCEL;

+ 2 - 2
test/TestRefillThird.php

@@ -251,8 +251,8 @@ class TestRefillThird extends TestCase
     {
         $providers = $this->getProvider('zanzan','RefillPhone');
         $order_sn = $this->make_sn();
-        [$state, $ch_order, $neterr] = $providers->add(13911129867, 5, 100, ['order_sn' => $order_sn]);
+//        [$state, $ch_order, $neterr] = $providers->add(13911129867, 5, 100, ['order_sn' => $order_sn]);
 //        [$state, $ch_order, $neterr] = $providers->add(18500608333, 5, 100, ['order_sn' => $order_sn]);
-        $providers->query(['ch_trade_no' => '','order_sn' => '76881623077089338712']);
+        $providers->query(['ch_trade_no' => '','order_sn' => '7831020676477426808415']);
     }
 }