钱包管理
parent
576079b913
commit
c5fed3fb0c
|
|
@ -65,7 +65,7 @@
|
|||
|
||||
<!-- 列表 -->
|
||||
<div class="data-list">
|
||||
<table class="am-table">
|
||||
<table class="am-table am-table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>操作类型</th>
|
||||
|
|
@ -87,15 +87,12 @@
|
|||
</tr>
|
||||
{{/foreach}}
|
||||
{{/if}}
|
||||
{{if empty($data_list)}}
|
||||
<tr>
|
||||
<td colspan="5">
|
||||
<div class="table-no"><i class="am-icon-warning"></i> 没有相关数据</div>
|
||||
</td>
|
||||
</tr>
|
||||
{{/if}}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{{if empty($data_list)}}
|
||||
<div class="table-no"><i class="am-icon-warning"></i> 没有相关数据</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
|
||||
<!-- 分页 -->
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
|
||||
<!-- 列表 -->
|
||||
<div class="data-list">
|
||||
<table class="am-table">
|
||||
<table class="am-table am-table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>充值单号</th>
|
||||
|
|
@ -68,15 +68,12 @@
|
|||
</tr>
|
||||
{{/foreach}}
|
||||
{{/if}}
|
||||
{{if empty($data_list)}}
|
||||
<tr>
|
||||
<td colspan="7">
|
||||
<div class="table-no"><i class="am-icon-warning"></i> 没有相关数据</div>
|
||||
</td>
|
||||
</tr>
|
||||
{{/if}}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{{if empty($data_list)}}
|
||||
<div class="table-no"><i class="am-icon-warning"></i> 没有相关数据</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
|
||||
<!-- 分页 -->
|
||||
|
|
|
|||
|
|
@ -76,22 +76,24 @@
|
|||
|
||||
<!-- 列表 -->
|
||||
<div class="data-list">
|
||||
<table class="am-table">
|
||||
<table class="am-table am-table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>业务类型</th>
|
||||
<th class="am-hide-sm-only">业务类型</th>
|
||||
<th>操作类型</th>
|
||||
<th>金额类型</th>
|
||||
<th>操作金额(元)</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>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{if !empty($data_list)}}
|
||||
{{foreach $data_list as $v}}
|
||||
<tr>
|
||||
<td>{{$v.business_type_text}}</td>
|
||||
<td class="am-hide-sm-only">{{$v.business_type_text}}</td>
|
||||
<td>
|
||||
{{if $v['operation_type'] eq 0}}
|
||||
<span class="operation-reduce-icon">{{$v.operation_type_text}}</span>
|
||||
|
|
@ -106,22 +108,25 @@
|
|||
{{elseif $v['operation_type'] eq 1}}
|
||||
<span class="operation-increase-icon">+</span>
|
||||
{{/if}}
|
||||
<span class="money">{{$v.money}}</span>
|
||||
<span class="money-bold money">{{$v.operation_money}}</span>
|
||||
</td>
|
||||
<td class="am-hide-sm-only">{{$v.msg}}</td>
|
||||
<td>
|
||||
<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}}
|
||||
{{if empty($data_list)}}
|
||||
<tr>
|
||||
<td colspan="6">
|
||||
<div class="table-no"><i class="am-icon-warning"></i> 没有相关数据</div>
|
||||
</td>
|
||||
</tr>
|
||||
{{/if}}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{{if empty($data_list)}}
|
||||
<div class="table-no"><i class="am-icon-warning"></i> 没有相关数据</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
|
||||
<!-- 分页 -->
|
||||
|
|
|
|||
|
|
@ -3,12 +3,10 @@
|
|||
<!-- right content start -->
|
||||
<div class="content-right">
|
||||
<div class="content">
|
||||
{{if !isset($params['is_admin_index']) or $params['is_admin_index'] neq 1}}
|
||||
<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>
|
||||
{{/if}}
|
||||
<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="wallet-content">
|
||||
<!-- form start -->
|
||||
|
|
@ -82,14 +80,11 @@
|
|||
</td>
|
||||
<td>{{$v.status_text}}</td>
|
||||
<td class="am-hide-sm-only">{{$v.add_time_text}}</td>
|
||||
{{if !isset($params['is_admin_index']) or $params['is_admin_index'] neq 1}}
|
||||
<td class="view-operation">
|
||||
<a href="{{:PluginsAdminUrl('wallet', 'walletadmin', 'saveinfo', ['id'=>$v['id']])}}">
|
||||
<button class="am-btn am-btn-secondary am-btn-xs am-radius am-icon-edit"> 编辑</button>
|
||||
</a>
|
||||
<button class="am-btn am-btn-danger am-btn-xs am-radius am-icon-trash-o submit-delete" data-url="{{:PluginsAdminUrl('wallet', 'walletadmin', 'delete')}}" data-id="{{$v.id}}"> 删除</button>
|
||||
</td>
|
||||
{{/if}}
|
||||
<td class="view-operation">
|
||||
<a href="{{:PluginsAdminUrl('wallet', 'walletadmin', 'saveinfo', ['id'=>$v['id']])}}">
|
||||
<button class="am-btn am-btn-secondary am-btn-xs am-radius am-icon-edit"> 编辑</button>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{{/foreach}}
|
||||
{{else /}}
|
||||
|
|
|
|||
|
|
@ -50,6 +50,10 @@
|
|||
</select>
|
||||
</div>
|
||||
|
||||
<div class="am-form-group">
|
||||
<label>操作原因</label>
|
||||
<textarea class="am-radius" name="msg" rows="3" maxlength="80" placeholder="最多80个字符" data-validation-message="操作原因格式最多 80 个字符"></textarea>
|
||||
</div>
|
||||
|
||||
<div class="am-form-group am-form-group-refreshing">
|
||||
<input type="hidden" name="id" {{if !empty($data['id'])}} value="{{$data.id}}"{{/if}} />
|
||||
|
|
|
|||
|
|
@ -37,9 +37,11 @@ CREATE TABLE `s_plugins_wallet_log` (
|
|||
`user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户id',
|
||||
`wallet_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '钱包id',
|
||||
`business_type` tinyint(2) unsigned NOT NULL DEFAULT '0' COMMENT '业务类型(0系统, 1充值, 2提现, 3消费)',
|
||||
`money_type` tinyint(2) unsigned NOT NULL DEFAULT '0' COMMENT '金额类型(0正常, 1冻结, 2赠送)',
|
||||
`operation_type` tinyint(2) unsigned NOT NULL DEFAULT '0' COMMENT '操作类型( 0减少, 1增加)',
|
||||
`money_type` tinyint(2) unsigned NOT NULL DEFAULT '0' COMMENT '金额类型(0有效, 1冻结, 2赠送)',
|
||||
`money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '操作金额',
|
||||
`operation_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '操作金额',
|
||||
`original_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '原始金额',
|
||||
`latest_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '最新金额',
|
||||
`msg` char(200) NOT NULL DEFAULT '' COMMENT '变更说明',
|
||||
`add_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '添加时间',
|
||||
PRIMARY KEY (`id`),
|
||||
|
|
|
|||
|
|
@ -420,6 +420,9 @@ class BaseService
|
|||
// 金额类型
|
||||
$v['money_type_text'] = (isset($v['money_type']) && isset($money_type_list[$v['money_type']])) ? $money_type_list[$v['money_type']]['name'] : '未知';
|
||||
|
||||
// 操作原因
|
||||
$v['msg'] = empty($v['msg']) ? '' : str_replace("\n", '<br />', $v['msg']);
|
||||
|
||||
// 创建时间
|
||||
$v['add_time_text'] = empty($v['add_time']) ? '' : date('Y-m-d H:i:s', $v['add_time']);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -240,7 +240,9 @@ class WalletService
|
|||
'business_type' => isset($params['business_type']) ? intval($params['business_type']) : 0,
|
||||
'operation_type' => isset($params['operation_type']) ? intval($params['operation_type']) : 0,
|
||||
'money_type' => isset($params['money_type']) ? intval($params['money_type']) : 0,
|
||||
'money' => isset($params['money']) ? PriceNumberFormat($params['money']) : 0.00,
|
||||
'operation_money' => isset($params['operation_money']) ? PriceNumberFormat($params['operation_money']) : 0.00,
|
||||
'original_money' => isset($params['original_money']) ? PriceNumberFormat($params['original_money']) : 0.00,
|
||||
'latest_money' => isset($params['latest_money']) ? PriceNumberFormat($params['latest_money']) : 0.00,
|
||||
'msg' => empty($params['msg']) ? '系统' : $params['msg'],
|
||||
'add_time' => time(),
|
||||
];
|
||||
|
|
@ -330,6 +332,9 @@ class WalletService
|
|||
['field' => 'frozen_money', 'money_type' => 1],
|
||||
['field' => 'give_money', 'money_type' => 2],
|
||||
];
|
||||
|
||||
// 操作原因
|
||||
$operation_msg = empty($params['msg']) ? '' : ' [ '.$params['msg'].' ]';
|
||||
foreach($money_field as $v)
|
||||
{
|
||||
// 有效金额
|
||||
|
|
@ -341,8 +346,10 @@ class WalletService
|
|||
'business_type' => 0,
|
||||
'operation_type' => ($wallet[$v['field']] < $data[$v['field']]) ? 1 : 0,
|
||||
'money_type' => $v['money_type'],
|
||||
'money' => ($wallet[$v['field']] < $data[$v['field']]) ? PriceNumberFormat($data[$v['field']]-$wallet[$v['field']]) : PriceNumberFormat($wallet[$v['field']]-$data[$v['field']]),
|
||||
'msg' => '管理员操作',
|
||||
'operation_money' => ($wallet[$v['field']] < $data[$v['field']]) ? PriceNumberFormat($data[$v['field']]-$wallet[$v['field']]) : PriceNumberFormat($wallet[$v['field']]-$data[$v['field']]),
|
||||
'original_money' => $wallet[$v['field']],
|
||||
'latest_money' => $data[$v['field']],
|
||||
'msg' => '管理员操作'.$operation_msg,
|
||||
];
|
||||
if(!self::WalletLogInsert($log_data))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -141,7 +141,9 @@
|
|||
.user-content-body .data-list {
|
||||
margin-top: 10px;
|
||||
}
|
||||
.user-content-body .data-list .money-bold {
|
||||
font-weight: 700;
|
||||
}
|
||||
.user-content-body .data-list .money {
|
||||
color: #E4393C;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
|
@ -6,4 +6,7 @@
|
|||
}
|
||||
.user-content-body .data-list .operation-increase-icon {
|
||||
color: #0a9610;
|
||||
}
|
||||
.user-content-body .data-list .operation-msg {
|
||||
width: 30%;
|
||||
}
|
||||
Loading…
Reference in New Issue