提交 b5ec9133 编写于 作者: D devil_gong

钱包管理

上级 699c8f77
...@@ -134,7 +134,7 @@ ...@@ -134,7 +134,7 @@
<span>待支付</span> <span>待支付</span>
<span class="animation-count-to" data-to="12" data-speed="1500">12</span> <span class="animation-count-to" data-to="12" data-speed="1500">12</span>
</div> </div>
<a href="#" class="view-to">查看 <i class="am-icon-angle-double-right"></i></a> <a href="{{:PluginsAdminUrl('wallet', 'recharge', 'index')}}" class="view-to">查看 <i class="am-icon-angle-double-right"></i></a>
</div> </div>
</li> </li>
<li class="module-cash"> <li class="module-cash">
...@@ -149,7 +149,7 @@ ...@@ -149,7 +149,7 @@
<span>今日</span> <span>今日</span>
<span class="animation-count-to" data-to="35" data-speed="1500">35</span> <span class="animation-count-to" data-to="35" data-speed="1500">35</span>
</div> </div>
<a href="#" class="view-to">查看 <i class="am-icon-angle-double-right"></i></a> <a href="{{:PluginsAdminUrl('wallet', 'walletlog', 'index')}}" class="view-to">查看 <i class="am-icon-angle-double-right"></i></a>
</div> </div>
</li> </li>
</ul> </ul>
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<!-- form start --> <!-- form start -->
<form class="am-form form-search" action="{{:PluginsAdminUrl('wallet', 'cash', 'index')}}" method="POST"> <form class="am-form form-search" action="{{:PluginsAdminUrl('wallet', 'cash', 'index')}}" method="POST">
<div class="am-g"> <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}} /> <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> <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"> <label class="fs-12 m-l-5 c-p fw-100 more-submit">
更多筛选 更多筛选
......
{{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', 'recharge', '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 $recharge_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 -->
<!-- 列表 -->
<table class="am-table am-table-striped">
<thead>
<tr>
<th class="am-hide-md-down">用户信息</th>
<th>充值信息</th>
<th class="am-hide-md-down">支付信息</th>
<th>更多</th>
<th>操作</th>
</tr>
</thead>
<tbody>
{{if !empty($data_list)}}
{{foreach $data_list as $v}}
<tr id="data-list-{{$v.id}}">
<td class="user-info am-hide-md-down">
{{if !empty($v['user'])}}
<img src="{{$v.user.avatar}}" alt="{{$v.user.user_name_view}}" class="am-img-thumbnail am-radius am-align-left" />
<ul class="user-base">
<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.recharge_no}}<br />
金额:{{$v.money}} 元
</td>
<td class="am-hide-md-down">
状态:{{$v.status_text}}<br />
{{if !empty($v['payment_name'])}}
方式:{{$v.payment_name}}<br />
{{/if}}
{{if !empty($v['pay_time_text'])}}
时间:{{$v.pay_time_text}}<br />
{{/if}}
{{if $v['pay_money'] gt 0}}
金额:<span class="money-bold money">{{$v.pay_money}} 元</span>
{{/if}}
</td>
<td>
<span class="am-icon-caret-down c-p" data-am-modal="{target: '#my-popup{{$v.id}}'}"> 查看更多</span>
<div class="am-popup am-radius" id="my-popup{{$v.id}}">
<div class="am-popup-inner">
<div class="am-popup-hd">
<h4 class="am-popup-title">详情内容</h4>
<span data-am-modal-close
class="am-close">&times;</span>
</div>
<div class="am-popup-bd">
<dl class="dl-content">
<dt>用户信息</dt>
<dd class="user-info">
{{if !empty($v['user'])}}
<img src="{{$v.user.avatar}}" alt="{{$v.user.user_name_view}}" class="am-img-thumbnail am-radius am-align-left" />
<ul class="user-base">
<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}}
</dd>
<dt>充值信息</dt>
<dd>
单号:{{$v.recharge_no}}<br />
金额:{{$v.money}} 元
</dd>
<dt>支付信息</dt>
<dd>
{{$v.status_text}}<br />
{{if !empty($v['payment_name'])}}
方式:{{$v.payment_name}}<br />
{{/if}}
{{if !empty($v['pay_time_text'])}}
时间:{{$v.pay_time_text}}<br />
{{/if}}
{{if $v['pay_money'] gt 0}}
金额:<span class="money-bold money">{{$v.pay_money}} 元</span>
{{/if}}
</dd>
<dt>创建时间</dt>
<dd>{{$v.add_time_text}}</dd>
</dl>
</div>
</div>
</div>
</td>
<td>
{{if $v['status'] eq 0}}
<button type="button" class="am-btn am-btn-danger am-btn-xs am-radius am-icon-trash-o submit-delete" data-url="{{:PluginsAdminUrl('wallet', 'recharge', 'delete')}}" data-id="{{$v.id}}" data-view="delete"> 删除</button>
{{/if}}
</td>
</tr>
{{/foreach}}
{{/if}}
</tbody>
</table>
{{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 -->
\ No newline at end of file
{{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="walletlog-content">
<!-- form start -->
<form class="am-form form-validation form-search" method="post" action="{{:PluginsAdminUrl('wallet', 'walletlog', 'index')}}" request-type="form">
<table class="so-list more-where">
<tbody>
<tr>
<td>
<span>业务:</span>
<select name="business_type" class="chosen-select" data-placeholder="业务类型...">
<option value="-1">业务类型...</option>
{{if !empty($business_type_list)}}
{{foreach $business_type_list as $v}}
<option value="{{$v.value}}" {{if isset($params['business_type']) and $params['business_type'] eq $v['value']}}selected{{/if}}>{{$v.name}}</option>
{{/foreach}}
{{/if}}
</select>
</td>
<td>
<span>操作:</span>
<select name="operation_type" class="chosen-select" data-placeholder="操作类型...">
<option value="-1">操作类型...</option>
{{if !empty($operation_type_list)}}
{{foreach $operation_type_list as $v}}
<option value="{{$v.value}}" {{if isset($params['operation_type']) and $params['operation_type'] eq $v['value']}}selected{{/if}}>{{$v.name}}</option>
{{/foreach}}
{{/if}}
</select>
</td>
</tr>
<tr>
<td>
<span>金额:</span>
<select name="money_type" class="chosen-select" data-placeholder="金额类型...">
<option value="-1">金额类型...</option>
{{if !empty($money_type_list)}}
{{foreach $money_type_list as $v}}
<option value="{{$v.value}}" {{if isset($params['money_type']) and $params['money_type'] eq $v['value']}}selected{{/if}}>{{$v.name}}</option>
{{/foreach}}
{{/if}}
</select>
</td>
<td>
<button type="submit" class="am-btn am-btn-secondary am-radius am-btn-xs btn-loading-example" data-am-loading="{spinner:'circle-o-notch', loadingText:'搜索中...'}">搜索</button>
<a href="{{:PluginsAdminUrl('wallet', 'walletlog', 'index')}}" class="am-btn am-btn-warning am-radius am-btn-sm reset-submit">清除条件</a>
</td>
</tr>
</tbody>
</table>
</form>
<!-- form end -->
<!-- 列表 -->
<table class="am-table am-table-striped">
<thead>
<tr>
<th class="am-hide-sm-only">业务类型</th>
<th class="am-hide-sm-only">操作类型</th>
<th>金额类型</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>
</tr>
</thead>
<tbody>
{{if !empty($data_list)}}
{{foreach $data_list as $v}}
<tr>
<td class="am-hide-sm-only">{{$v.business_type_text}}</td>
<td class="am-hide-sm-only">
{{if $v['operation_type'] eq 0}}
<span class="operation-reduce-icon">{{$v.operation_type_text}}</span>
{{elseif $v['operation_type'] eq 1}}
<span class="operation-increase-icon">{{$v.operation_type_text}}</span>
{{/if}}
</td>
<td>{{$v.money_type_text}}</td>
<td>
{{if $v['operation_type'] eq 0}}
<span class="operation-reduce-icon">-</span>
{{elseif $v['operation_type'] eq 1}}
<span class="operation-increase-icon">+</span>
{{/if}}
<span class="money-bold money">{{$v.operation_money}}</span>
</td>
<td class="am-hide-sm-only">
<span class="money-bold">{{$v.original_money}}</span>
</td>
<td>
<span class="money-bold">{{$v.latest_money}}</span>
</td>
<td class="am-hide-sm-only operation-msg">{{$v.msg|raw}}</td>
<td class="am-hide-sm-only">{{$v.add_time_text}}</td>
</tr>
{{/foreach}}
{{/if}}
</tbody>
</table>
{{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 -->
\ No newline at end of file
...@@ -26,7 +26,8 @@ ...@@ -26,7 +26,8 @@
{{include file="../../../plugins/view/wallet/index/public/nav" /}} {{include file="../../../plugins/view/wallet/index/public/nav" /}}
<!-- user menu end --> <!-- user menu end -->
<form class="am-form form-validation" method="post" action="{{:PluginsHomeUrl('wallet', 'cash', 'index')}}" request-type="form"> <!-- form start -->
<form class="am-form form-validation form-search" method="post" action="{{:PluginsHomeUrl('wallet', 'cash', 'index')}}" request-type="form">
<div class="thin"> <div class="thin">
<div class="am-input-group am-input-group-sm am-fl so"> <div class="am-input-group am-input-group-sm am-fl so">
<input type="text" autocomplete="off" name="keywords" class="am-radius" placeholder="申请单号" value="{{if !empty($params.keywords)}}{{$params.keywords}}{{/if}}" /> <input type="text" autocomplete="off" name="keywords" class="am-radius" placeholder="申请单号" value="{{if !empty($params.keywords)}}{{$params.keywords}}{{/if}}" />
...@@ -62,6 +63,7 @@ ...@@ -62,6 +63,7 @@
</tbody> </tbody>
</table> </table>
</form> </form>
<!-- form end -->
<!-- 列表 --> <!-- 列表 -->
<div class="data-list"> <div class="data-list">
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
{{include file="../../../plugins/view/wallet/index/public/nav" /}} {{include file="../../../plugins/view/wallet/index/public/nav" /}}
<!-- user menu end --> <!-- user menu end -->
<form class="am-form form-validation" method="post" action="{{:PluginsHomeUrl('wallet', 'recharge', 'index')}}" request-type="form"> <form class="am-form form-validation form-search" method="post" action="{{:PluginsHomeUrl('wallet', 'recharge', 'index')}}" request-type="form">
<div class="thin"> <div class="thin">
<div class="am-input-group am-input-group-sm am-fl so"> <div class="am-input-group am-input-group-sm am-fl so">
<input type="text" autocomplete="off" name="keywords" class="am-radius" placeholder="充值单号" value="{{if !empty($params.keywords)}}{{$params.keywords}}{{/if}}" /> <input type="text" autocomplete="off" name="keywords" class="am-radius" placeholder="充值单号" value="{{if !empty($params.keywords)}}{{$params.keywords}}{{/if}}" />
......
...@@ -26,7 +26,8 @@ ...@@ -26,7 +26,8 @@
{{include file="../../../plugins/view/wallet/index/public/nav" /}} {{include file="../../../plugins/view/wallet/index/public/nav" /}}
<!-- user menu end --> <!-- user menu end -->
<form class="am-form form-validation" method="post" action="{{:PluginsHomeUrl('wallet', 'wallet', 'index')}}" request-type="form"> <!-- form start -->
<form class="am-form form-validation form-search" method="post" action="{{:PluginsHomeUrl('wallet', 'wallet', 'index')}}" request-type="form">
<table class="so-list more-where"> <table class="so-list more-where">
<tbody> <tbody>
<tr> <tr>
...@@ -73,6 +74,7 @@ ...@@ -73,6 +74,7 @@
</tbody> </tbody>
</table> </table>
</form> </form>
<!-- form end -->
<!-- 列表 --> <!-- 列表 -->
<div class="data-list"> <div class="data-list">
......
...@@ -49,7 +49,7 @@ class Cash extends Controller ...@@ -49,7 +49,7 @@ class Cash extends Controller
'total' => $total, 'total' => $total,
'where' => $params, 'where' => $params,
'page' => isset($params['page']) ? intval($params['page']) : 1, 'page' => isset($params['page']) ? intval($params['page']) : 1,
'url' => PluginsHomeUrl('wallet', 'cash', 'index'), 'url' => PluginsAdminUrl('wallet', 'cash', 'index'),
); );
$page = new \base\Page($page_params); $page = new \base\Page($page_params);
$this->assign('page_html', $page->GetPageHtml()); $this->assign('page_html', $page->GetPageHtml());
......
<?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\BaseService;
use app\plugins\wallet\service\RechargeService;
/**
* 钱包 - 充值管理
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-01T21:51:08+0800
*/
class Recharge extends Controller
{
/**
* 充值明细
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @datetime 2019-03-15T23:51:50+0800
* @param [array] $params [输入参数]
*/
public function index($params = [])
{
// 分页
$number = MyC('admin_page_number', 10, true);
// 条件
$where = BaseService::RechargeWhere($params);
// 获取总数
$total = BaseService::RechargeTotal($where);
// 分页
$page_params = array(
'number' => $number,
'total' => $total,
'where' => $params,
'page' => isset($params['page']) ? intval($params['page']) : 1,
'url' => PluginsAdminUrl('wallet', 'recharge', '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::RechargeList($data_params);
$this->assign('data_list', $data['data']);
} else {
$this->assign('data_list', []);
}
// 静态数据
$this->assign('recharge_status_list', RechargeService::$recharge_status_list);
// 参数
$this->assign('params', $params);
return $this->fetch('../../../plugins/view/wallet/admin/recharge/index');
}
/**
* 充值纪录删除
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2018-09-14
* @desc description
* @param [array] $params [输入参数]
*/
public function delete($params = [])
{
// 是否ajax请求
if(!IS_AJAX)
{
$this->error('非法访问');
}
// 开始处理
return RechargeService::RechargeDelete($params);
}
}
?>
\ No newline at end of file
...@@ -48,7 +48,7 @@ class Wallet extends Controller ...@@ -48,7 +48,7 @@ class Wallet extends Controller
'total' => $total, 'total' => $total,
'where' => $params, 'where' => $params,
'page' => isset($params['page']) ? intval($params['page']) : 1, 'page' => isset($params['page']) ? intval($params['page']) : 1,
'url' => PluginsHomeUrl('wallet', 'wallet', 'index'), 'url' => PluginsAdminUrl('wallet', 'wallet', 'index'),
); );
$page = new \base\Page($page_params); $page = new \base\Page($page_params);
$this->assign('page_html', $page->GetPageHtml()); $this->assign('page_html', $page->GetPageHtml());
......
<?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\BaseService;
use app\plugins\wallet\service\WalletService;
/**
* 钱包 - 账户明细管理
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-01T21:51:08+0800
*/
class Walletlog extends Controller
{
/**
* 充值明细
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @datetime 2019-03-15T23:51:50+0800
* @param [array] $params [输入参数]
*/
public function index($params = [])
{
// 分页
$number = MyC('admin_page_number', 10, true);
// 条件
$where = BaseService::WalletLogWhere($params);
// 获取总数
$total = BaseService::WalletLogTotal($where);
// 分页
$page_params = array(
'number' => $number,
'total' => $total,
'where' => $params,
'page' => isset($params['page']) ? intval($params['page']) : 1,
'url' => PluginsAdminUrl('wallet', 'walletlog', 'index'),
);
$page = new \base\Page($page_params);
$this->assign('page_html', $page->GetPageHtml());
// 获取列表
$data_params = array(
'm' => $page->GetPageStarNumber(),
'n' => $number,
'where' => $where,
);
$data = BaseService::WalletLogList($data_params);
$this->assign('data_list', $data['data']);
// 静态数据
$this->assign('business_type_list', WalletService::$business_type_list);
$this->assign('operation_type_list', WalletService::$operation_type_list);
$this->assign('money_type_list', WalletService::$money_type_list);
// 参数
$this->assign('params', $params);
return $this->fetch('../../../plugins/view/wallet/admin/walletlog/index');
}
}
?>
\ No newline at end of file
...@@ -50,7 +50,7 @@ class Cash extends Common ...@@ -50,7 +50,7 @@ class Cash extends Common
$params['user'] = $this->user; $params['user'] = $this->user;
// 分页 // 分页
$number = MyC('admin_page_number', 10, true); $number = 10;
// 条件 // 条件
$where = BaseService::CashWhere($params); $where = BaseService::CashWhere($params);
......
...@@ -51,7 +51,7 @@ class Recharge extends Common ...@@ -51,7 +51,7 @@ class Recharge extends Common
$params['user'] = $this->user; $params['user'] = $this->user;
// 分页 // 分页
$number = MyC('admin_page_number', 10, true); $number = 10;
// 条件 // 条件
$where = BaseService::RechargeWhere($params); $where = BaseService::RechargeWhere($params);
......
...@@ -50,7 +50,7 @@ class Wallet extends Common ...@@ -50,7 +50,7 @@ class Wallet extends Common
$params['user'] = $this->user; $params['user'] = $this->user;
// 分页 // 分页
$number = MyC('admin_page_number', 10, true); $number = 10;
// 条件 // 条件
$where = BaseService::WalletLogWhere($params); $where = BaseService::WalletLogWhere($params);
......
...@@ -224,10 +224,26 @@ class BaseService ...@@ -224,10 +224,26 @@ class BaseService
$where[] = ['user_id', '=', $params['user']['id']]; $where[] = ['user_id', '=', $params['user']['id']];
} }
// 关键字 // 关键字根据用户筛选
if(!empty($params['keywords'])) if(!empty($params['keywords']))
{ {
$where[] = ['recharge_no', '=', $params['keywords']]; if(empty($params['user']))
{
$user_ids = Db::name('User')->where('username|nickname|mobile|email', '=', $params['keywords'])->column('id');
if(!empty($user_ids))
{
$where[] = ['user_id', 'in', $user_ids];
} else {
// 无数据条件,走单号条件
$where[] = ['recharge_no', '=', $params['keywords']];
}
}
}
// 状态
if(isset($params['status']) && $params['status'] > -1)
{
$where[] = ['status', '=', $params['status']];
} }
return $where; return $where;
...@@ -405,10 +421,20 @@ class BaseService ...@@ -405,10 +421,20 @@ class BaseService
$where[] = ['user_id', '=', $params['user']['id']]; $where[] = ['user_id', '=', $params['user']['id']];
} }
// 关键字 // 关键字根据用户筛选
if(!empty($params['keywords'])) if(!empty($params['keywords']))
{ {
$where[] = ['cash_no', '=', $params['keywords']]; if(empty($params['user']))
{
$user_ids = Db::name('User')->where('username|nickname|mobile|email', '=', $params['keywords'])->column('id');
if(!empty($user_ids))
{
$where[] = ['user_id', 'in', $user_ids];
} else {
// 无数据条件,走单号条件
$where[] = ['cash_no', '=', $params['keywords']];
}
}
} }
// 状态 // 状态
......
...@@ -111,6 +111,7 @@ class RechargeService ...@@ -111,6 +111,7 @@ class RechargeService
], ],
[ [
'checked_type' => 'empty', 'checked_type' => 'empty',
'is_checked' => 2,
'key_name' => 'user', 'key_name' => 'user',
'error_msg' => '用户信息有误', 'error_msg' => '用户信息有误',
], ],
...@@ -124,8 +125,11 @@ class RechargeService ...@@ -124,8 +125,11 @@ class RechargeService
// 删除 // 删除
$where = [ $where = [
'id' => intval($params['id']), 'id' => intval($params['id']),
'user_id' => $params['user']['id']
]; ];
if(!empty($params['user']['id']))
{
$where['user_id'] = $params['user']['id'];
}
if(Db::name('PluginsWalletRecharge')->where($where)->delete()) if(Db::name('PluginsWalletRecharge')->where($where)->delete())
{ {
return DataReturn('删除成功', 0); return DataReturn('删除成功', 0);
......
...@@ -293,4 +293,40 @@ button.colorpicker-submit:active { ...@@ -293,4 +293,40 @@ button.colorpicker-submit:active {
} }
button.colorpicker-submit img { button.colorpicker-submit img {
margin-right: 10px; margin-right: 10px;
}
/**
* 搜索表单
*/
.form-search .thin { overflow:hidden; }
.form-search .thin .so { width:66%; }
.form-search .thin_sub { font-weight:100; margin:10px 0px 0px 10px; cursor: pointer; }
.form-search .so-list { width:100%; margin-top: 10px; }
.form-search .so-list * { font-size:1.2rem !important; }
.form-search .so-list input { height:28px; display:inline !important; }
.form-search .time input, .form-search .so-list .chosen-container { background:#FFF !important; }
.form-search .time input { width:100px !important; }
.form-search .time i { position:absolute; margin:4px 0px 0px -15px; }
.form-search .price input { width:101px !important; }
.form-search .time { width:50%; }
.form-search .so-list tr+tr>td { padding-top:10px; }
.form-search .so-list .chosen-container { border-radius:2px; }
.form-search .text-grey { color: #999; }
.form-search .chosen-container-single .chosen-single, .form-search .so-list select { height: 28px; line-height: 28px; width: 100%; }
.form-search .reset-submit { margin-left: 20px; }
.form-search .so-list select { padding: 0 0 0 8px; }
@media only screen and (min-width: 641px) {
.form-search .so-list .chosen-container, .form-search .so-list select { width:217px !important; display: -webkit-inline-box; }
.form-search .thin_sub:hover { color:#F60; }
}
@media only screen and (max-width: 641px) {
.form-search .so-list input { width:40% !important; }
.form-search .so-list td { width:100%; display:block; }
.form-search .so-list tr td:last-child { margin-top:10px; }
.form-search .so-list .chosen-container { width:85%; }
.form-search .so-list .chosen-container { width:100%; }
.form-search .so-list tr td:last-child { padding-top:0px !important; }
.form-search .chosen-container-single .chosen-search input[type="text"] { width: 100% !important; }
.form-search .so-list select { width: calc(100% - 44px); display: -webkit-inline-box; }
} }
\ No newline at end of file
/**
* 搜索表单
*/
.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 .user-info img {
max-width: 35px;
max-height: 35px;
margin: 0 5px 2px 0;
}
.cash-content ul {
list-style: none;
padding: 0;
margin: 0;
}
/** /**
* 列表 * 列表
*/ */
......
/**
* 搜索表单
*/
.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; }
}
/**
* 用户信息
*/
.content-right .user-info img {
max-width: 35px;
max-height: 35px;
margin: 0 5px 2px 0;
}
.content-right ul {
list-style: none;
padding: 0;
margin: 0;
}
\ No newline at end of file
/**
* 搜索表单
*/
.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; }
}
/**
* 列表
*/
.wallet-content table.am-table ul {
list-style: none;
padding: 0;
margin: 0;
}
.wallet-content table.am-table .user-info img {
max-width: 35px;
max-height: 35px;
margin: 0 5px 2px 0;
}
/** /**
* 金额 * 金额
*/ */
......
/**
* 列表
*/
.walletlog-content table.am-table {
margin-top: 10px;
}
.walletlog-content table.am-table .money-bold {
font-weight: 700;
}
.walletlog-content table.am-table .money {
color: #E4393C;
}
.walletlog-content table.am-table .operation-reduce-icon {
color: #f00;
}
.walletlog-content table.am-table .operation-increase-icon {
color: #0a9610;
}
.walletlog-content table.am-table .operation-msg {
width: 30%;
}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册