钱包优化
parent
bbe88f00d4
commit
75982982d4
|
|
@ -115,7 +115,7 @@
|
|||
<span>待处理</span>
|
||||
<span class="animation-count-to" data-to="12" data-speed="1500">12</span>
|
||||
</div>
|
||||
<a href="#" class="view-to">查看 <i class="am-icon-angle-double-right"></i></a>
|
||||
<a href="{{:PluginsAdminUrl('wallet', 'cash', 'index')}}" class="view-to">查看 <i class="am-icon-angle-double-right"></i></a>
|
||||
</div>
|
||||
</li>
|
||||
<li class="module-cash">
|
||||
|
|
|
|||
|
|
@ -0,0 +1,117 @@
|
|||
{{include file="public/header" /}}
|
||||
|
||||
<!-- right content start -->
|
||||
<div class="content-right">
|
||||
<div class="content">
|
||||
<legend>
|
||||
<span class="fs-16">钱包</span>
|
||||
<a href="{{:PluginsAdminUrl('wallet', 'admin', 'index')}}" class="fr fs-14 m-t-5 am-icon-mail-reply"> 返回</a>
|
||||
</legend>
|
||||
|
||||
<div class="cash-content">
|
||||
<!-- form start -->
|
||||
<form class="am-form form-search" action="{{:PluginsAdminUrl('wallet', 'cash', 'index')}}" method="POST">
|
||||
<div class="am-g">
|
||||
<input type="text" autocomplete="off" class="am-radius form-keyword" placeholder="申请单号" name="keywords" {{if !empty($params['keywords'])}} value="{{$params.keywords}}"{{/if}} />
|
||||
<button type="submit" class="am-btn am-btn-secondary am-btn-sm am-radius form-submit">查询</button>
|
||||
<label class="fs-12 m-l-5 c-p fw-100 more-submit">
|
||||
更多筛选
|
||||
{{if isset($params['is_more']) and $params['is_more'] eq 1}}
|
||||
<input type="checkbox" name="is_more" value="1" id="is_more" checked />
|
||||
<i class="am-icon-angle-up"></i>
|
||||
{{else /}}
|
||||
<input type="checkbox" name="is_more" value="1" id="is_more" />
|
||||
<i class="am-icon-angle-down"></i>
|
||||
{{/if}}
|
||||
</label>
|
||||
|
||||
<div class="more-where {{if !isset($params['is_more']) or $params['is_more'] neq 1}} none{{/if}}">
|
||||
<select name="status" class="am-radius m-t-10 chosen-select param-where" data-placeholder="状态...">
|
||||
<option value="-1">状态...</option>
|
||||
{{foreach $cash_status_list as $v}}
|
||||
<option value="{{$v.value}}" {{if isset($params['status']) and $params['status'] eq $v['value']}}selected{{/if}}>{{$v.name}}</option>
|
||||
{{/foreach}}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<!-- form end -->
|
||||
|
||||
<!-- list start -->
|
||||
<table class="am-table am-table-striped am-table-hover am-text-middle m-t-10">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="am-hide-sm-only">用户信息</th>
|
||||
<th>提现信息</th>
|
||||
<th>收款信息</th>
|
||||
<th class="am-hide-sm-only">打款信息</th>
|
||||
<th class="am-hide-sm-only">描述</th>
|
||||
<th class="am-hide-sm-only">申请时间</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{if !empty($data_list)}}
|
||||
{{foreach $data_list as $v}}
|
||||
<tr>
|
||||
<td class="user-info am-hide-sm-only">
|
||||
{{if !empty($v['user'])}}
|
||||
<img src="{{$v.user.avatar}}" alt="{{$v.user.user_name_view}}" class="am-fl am-img-thumbnail am-radius am-hide-md" />
|
||||
<ul class="user-base am-fl">
|
||||
<li>名称:{{if empty($v['user']['username'])}}<span class="cr-ccc">未填写</span>{{else /}}{{$v.user.username}}{{/if}}</li>
|
||||
<li>昵称:{{if empty($v['user']['nickname'])}}<span class="cr-ccc">未填写</span>{{else /}}{{$v.user.nickname}}{{/if}}</li>
|
||||
<li>手机:{{if empty($v['user']['mobile'])}}<span class="cr-ccc">未填写</span>{{else /}}{{$v.user.mobile}}{{/if}}</li>
|
||||
<li>邮箱:{{if empty($v['user']['email'])}}<span class="cr-ccc">未填写</span>{{else /}}{{$v.user.email}}{{/if}}</li>
|
||||
</ul>
|
||||
{{else /}}
|
||||
用户信息异常
|
||||
{{/if}}
|
||||
</td>
|
||||
<td>
|
||||
单号:{{$v.cash_no}}<br />
|
||||
金额:<span class="money-bold cash-money">{{$v.money}}</span> 元
|
||||
</td>
|
||||
<td>
|
||||
银行:{{$v.bank_name}}<br />
|
||||
账号:{{$v.bank_accounts}}<br />
|
||||
姓名:{{$v.bank_username}}<br />
|
||||
</td>
|
||||
<td class="am-hide-sm-only">
|
||||
{{$v.status_text}}<br />
|
||||
{{if $v['pay_money'] gt 0}}
|
||||
金额:<span class="money-bold money">{{$v.pay_money}}</span> 元<br />
|
||||
{{/if}}
|
||||
{{if !empty($v['pay_time_text'])}}
|
||||
时间:{{$v.pay_time_text}}
|
||||
{{/if}}
|
||||
</td>
|
||||
<td class="am-hide-sm-only operation-msg">{{$v.msg}}</td>
|
||||
<td class="am-hide-sm-only">{{$v.add_time_text}}</td>
|
||||
<td class="view-operation">
|
||||
<a href="{{:PluginsAdminUrl('wallet', 'wallet', 'saveinfo', ['id'=>$v['id']])}}">
|
||||
<button class="am-btn am-btn-secondary am-btn-xs am-radius am-icon-edit"> 编辑</button>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{{/foreach}}
|
||||
{{/if}}
|
||||
</tbody>
|
||||
</table>
|
||||
<!-- list end -->
|
||||
|
||||
{{if empty($data_list)}}
|
||||
<div class="table-no"><i class="am-icon-warning"></i> 没有相关数据</div>
|
||||
{{/if}}
|
||||
|
||||
<!-- 分页 -->
|
||||
{{if !empty($data_list)}}
|
||||
{{$page_html|raw}}
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- right content end -->
|
||||
|
||||
<!-- footer start -->
|
||||
{{include file="public/footer" /}}
|
||||
<!-- footer end -->
|
||||
|
|
@ -87,13 +87,15 @@
|
|||
</td>
|
||||
</tr>
|
||||
{{/foreach}}
|
||||
{{else /}}
|
||||
<tr><td colspan="7" class="table-no">没有相关数据</td></tr>
|
||||
{{/if}}
|
||||
</tbody>
|
||||
</table>
|
||||
<!-- list end -->
|
||||
|
||||
{{if empty($data_list)}}
|
||||
<div class="table-no"><i class="am-icon-warning"></i> 没有相关数据</div>
|
||||
{{/if}}
|
||||
|
||||
<!-- 分页 -->
|
||||
{{if !empty($data_list)}}
|
||||
{{$page_html|raw}}
|
||||
|
|
|
|||
|
|
@ -68,26 +68,27 @@
|
|||
<table class="am-table am-table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>提现单号</th>
|
||||
<th>提现金额(元)</th>
|
||||
<th class="am-hide-sm-only">提现信息</th>
|
||||
<th>收款信息</th>
|
||||
<th class="am-hide-sm-only">打款信息</th>
|
||||
<th>打款信息</th>
|
||||
<th class="am-hide-sm-only">描述</th>
|
||||
<th class="am-hide-sm-only">创建时间</th>
|
||||
<th class="am-hide-sm-only">申请时间</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{if !empty($data_list)}}
|
||||
{{foreach $data_list as $v}}
|
||||
<tr>
|
||||
<td>{{$v.cash_no}}</td>
|
||||
<td class="money-bold">{{$v.money}}</td>
|
||||
<td class="am-hide-sm-only">
|
||||
单号:{{$v.cash_no}}<br />
|
||||
金额:<span class="money-bold cash-money">{{$v.money}}</span> 元
|
||||
</td>
|
||||
<td>
|
||||
银行:{{$v.bank_name}}<br />
|
||||
账号:{{$v.bank_accounts}}<br />
|
||||
姓名:{{$v.bank_username}}<br />
|
||||
</td>
|
||||
<td class="am-hide-sm-only">
|
||||
<td>
|
||||
{{$v.status_text}}<br />
|
||||
{{if $v['pay_money'] gt 0}}
|
||||
金额:<span class="money-bold money">{{$v.pay_money}}</span> 元<br />
|
||||
|
|
|
|||
|
|
@ -0,0 +1,129 @@
|
|||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | ShopXO 国内领先企业级B2C免费开源电商系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2011~2019 http://shopxo.net All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: Devil
|
||||
// +----------------------------------------------------------------------
|
||||
namespace app\plugins\wallet\admin;
|
||||
|
||||
use think\Controller;
|
||||
use app\plugins\wallet\service\CashService;
|
||||
use app\plugins\wallet\service\BaseService;
|
||||
|
||||
/**
|
||||
* 钱包插件 - 提现管理
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-01T21:51:08+0800
|
||||
*/
|
||||
class Cash extends Controller
|
||||
{
|
||||
/**
|
||||
* 首页
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @datetime 2019-02-07T08:21:54+0800
|
||||
* @param [array] $params [输入参数]
|
||||
*/
|
||||
public function index($params = [])
|
||||
{
|
||||
// 分页
|
||||
$number = MyC('admin_page_number', 10, true);
|
||||
|
||||
// 条件
|
||||
$where = BaseService::CashWhere($params);
|
||||
|
||||
// 获取总数
|
||||
$total = BaseService::CashTotal($where);
|
||||
|
||||
// 分页
|
||||
$page_params = array(
|
||||
'number' => $number,
|
||||
'total' => $total,
|
||||
'where' => $params,
|
||||
'page' => isset($params['page']) ? intval($params['page']) : 1,
|
||||
'url' => PluginsHomeUrl('wallet', 'cash', 'index'),
|
||||
);
|
||||
$page = new \base\Page($page_params);
|
||||
$this->assign('page_html', $page->GetPageHtml());
|
||||
|
||||
// 获取列表
|
||||
if($total > 0)
|
||||
{
|
||||
$data_params = array(
|
||||
'm' => $page->GetPageStarNumber(),
|
||||
'n' => $number,
|
||||
'where' => $where,
|
||||
);
|
||||
$data = BaseService::CashList($data_params);
|
||||
$this->assign('data_list', $data['data']);
|
||||
} else {
|
||||
$this->assign('data_list', []);
|
||||
}
|
||||
|
||||
// 静态数据
|
||||
$this->assign('cash_status_list', CashService::$cash_status_list);
|
||||
|
||||
// 参数
|
||||
$this->assign('params', $params);
|
||||
return $this->fetch('../../../plugins/view/wallet/admin/cash/index');
|
||||
}
|
||||
|
||||
/**
|
||||
* 钱包编辑页面
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2019-05-05
|
||||
* @desc description
|
||||
* @param [array] $params [输入参数]
|
||||
*/
|
||||
public function saveinfo($params = [])
|
||||
{
|
||||
$data = [];
|
||||
if(!empty($params['id']))
|
||||
{
|
||||
$data_params = array(
|
||||
'm' => 0,
|
||||
'n' => 1,
|
||||
'where' => ['id'=>intval($params['id'])],
|
||||
);
|
||||
$ret = BaseService::WalletList($data_params);
|
||||
if(!empty($ret['data'][0]))
|
||||
{
|
||||
$data = $ret['data'][0];
|
||||
|
||||
// 静态数据
|
||||
$this->assign('wallet_status_list', WalletService::$wallet_status_list);
|
||||
} else {
|
||||
$this->assign('msg', '钱包有误');
|
||||
}
|
||||
} else {
|
||||
$this->assign('msg', '钱包id有误');
|
||||
}
|
||||
|
||||
$this->assign('data', $data);
|
||||
return $this->fetch('../../../plugins/view/wallet/admin/wallet/saveinfo');
|
||||
}
|
||||
|
||||
/**
|
||||
* 钱包编辑
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2019-05-06
|
||||
* @desc description
|
||||
* @param [array] $params [输入参数]
|
||||
*/
|
||||
public function save($params = [])
|
||||
{
|
||||
return WalletService::WalletEdit($params);
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
@ -175,15 +175,7 @@ class BaseService
|
|||
foreach($data as &$v)
|
||||
{
|
||||
// 用户信息
|
||||
if(!empty($v['user_id']))
|
||||
{
|
||||
$user = Db::name('User')->where(['id'=>$v['user_id']])->field('username,nickname,mobile,gender,avatar')->find();
|
||||
$v['username'] = empty($user['username']) ? '' : $user['username'];
|
||||
$v['nickname'] = empty($user['nickname']) ? '' : $user['nickname'];
|
||||
$v['mobile'] = empty($user['mobile']) ? '' : $user['mobile'];
|
||||
$v['avatar'] = empty($user['avatar']) ? '' : $user['avatar'];
|
||||
$v['gender_text'] = isset($user['gender']) ? $common_gender_list[$user['gender']]['name'] : '';
|
||||
}
|
||||
$v['user'] = self::GetUserInfo($v['user_id']);
|
||||
|
||||
// 支付状态
|
||||
$v['status_text'] = isset($v['status']) ? RechargeService::$recharge_status_list[$v['status']]['name'] : '';
|
||||
|
|
@ -362,15 +354,7 @@ class BaseService
|
|||
foreach($data as &$v)
|
||||
{
|
||||
// 用户信息
|
||||
if(!empty($v['user_id']))
|
||||
{
|
||||
$user = Db::name('User')->where(['id'=>$v['user_id']])->field('username,nickname,mobile,gender,avatar')->find();
|
||||
$v['username'] = empty($user['username']) ? '' : $user['username'];
|
||||
$v['nickname'] = empty($user['nickname']) ? '' : $user['nickname'];
|
||||
$v['mobile'] = empty($user['mobile']) ? '' : $user['mobile'];
|
||||
$v['avatar'] = empty($user['avatar']) ? '' : $user['avatar'];
|
||||
$v['gender_text'] = isset($user['gender']) ? $common_gender_list[$user['gender']]['name'] : '';
|
||||
}
|
||||
$v['user'] = self::GetUserInfo($v['user_id']);
|
||||
|
||||
// 提现状态
|
||||
$v['status_text'] = isset($v['status']) ? CashService::$cash_status_list[$v['status']]['name'] : '';
|
||||
|
|
|
|||
|
|
@ -0,0 +1,47 @@
|
|||
/**
|
||||
* 搜索表单
|
||||
*/
|
||||
.form-search .form-keyword { display: initial !important; }
|
||||
.form-search .more-submit input { display: none; }
|
||||
.form-search .param-date input { display: initial !important; }
|
||||
@media only screen and (max-width: 641px) {
|
||||
.form-search .form-keyword { width: calc(100% - 140px) !important; }
|
||||
.form-search .param-where { width: 100% !important; margin-left: 0px !important; }
|
||||
.form-search .param-date input { width: 47% !important; }
|
||||
}
|
||||
@media only screen and (min-width: 641px) {
|
||||
.form-search .form-keyword { width: 35% !important; }
|
||||
.form-search .param-where { width: 32% !important; float: left; }
|
||||
.form-search .param-date input { width: 45% !important; }
|
||||
.form-search .param-where:nth-child(1), .param-where:nth-child(4) { margin-left: 0px !important; }
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
.cash-content table.am-table ul {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
.cash-content table.am-table .user-info img {
|
||||
max-width: 75px;
|
||||
max-height: 75px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
.cash-content table.am-table .operation-msg {
|
||||
width: 20%;
|
||||
}
|
||||
|
||||
/**
|
||||
* 金额
|
||||
*/
|
||||
.cash-content .money-bold {
|
||||
font-weight: 700;
|
||||
}
|
||||
.cash-content .money {
|
||||
color: #4CAF50;
|
||||
}
|
||||
.cash-content .cash-money {
|
||||
color: #FF9800;
|
||||
}
|
||||
|
|
@ -16,7 +16,6 @@
|
|||
.form-search .param-where:nth-child(1), .param-where:nth-child(4) { margin-left: 0px !important; }
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
|
|
@ -52,8 +51,6 @@
|
|||
/**
|
||||
* 编辑
|
||||
*/
|
||||
|
||||
|
||||
@media only screen and (min-width: 641px) {
|
||||
.wallet-content form .am-alert {
|
||||
margin: 0;
|
||||
|
|
|
|||
|
|
@ -44,4 +44,7 @@
|
|||
*/
|
||||
.user-content-body .data-list .operation-msg {
|
||||
width: 20%;
|
||||
}
|
||||
.user-content-body .data-list .cash-money {
|
||||
color: #FF9800;
|
||||
}
|
||||
Loading…
Reference in New Issue