@@ -82,14 +80,11 @@
{{$v.status_text}}
- {{if !isset($params['is_admin_index']) or $params['is_admin_index'] neq 1}}
-
-
-
-
-
-
- {{/if}}
+
+
+
+
+
{{/foreach}}
{{else /}}
diff --git a/application/plugins/view/wallet/walletadmin/saveinfo.html b/application/plugins/view/wallet/walletadmin/saveinfo.html
index e3e0a367a..2b21b0b5a 100644
--- a/application/plugins/view/wallet/walletadmin/saveinfo.html
+++ b/application/plugins/view/wallet/walletadmin/saveinfo.html
@@ -50,6 +50,10 @@
+
+
+
+
diff --git a/application/plugins/wallet/install.sql b/application/plugins/wallet/install.sql
index ebd09d94a..f3e2e4e52 100644
--- a/application/plugins/wallet/install.sql
+++ b/application/plugins/wallet/install.sql
@@ -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`),
diff --git a/application/plugins/wallet/service/BaseService.php b/application/plugins/wallet/service/BaseService.php
index 4061f57d4..c93ebe7f2 100755
--- a/application/plugins/wallet/service/BaseService.php
+++ b/application/plugins/wallet/service/BaseService.php
@@ -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", '
', $v['msg']); + // 创建时间 $v['add_time_text'] = empty($v['add_time']) ? '' : date('Y-m-d H:i:s', $v['add_time']); } diff --git a/application/plugins/wallet/service/WalletService.php b/application/plugins/wallet/service/WalletService.php index 0604e9239..6b76cb116 100644 --- a/application/plugins/wallet/service/WalletService.php +++ b/application/plugins/wallet/service/WalletService.php @@ -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)) { diff --git a/public/static/plugins/css/wallet/index/common.css b/public/static/plugins/css/wallet/index/common.css index 109835221..1ce33da30 100644 --- a/public/static/plugins/css/wallet/index/common.css +++ b/public/static/plugins/css/wallet/index/common.css @@ -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; } \ No newline at end of file diff --git a/public/static/plugins/css/wallet/index/wallet.css b/public/static/plugins/css/wallet/index/wallet.css index 14e71e3a4..fb3f849ea 100644 --- a/public/static/plugins/css/wallet/index/wallet.css +++ b/public/static/plugins/css/wallet/index/wallet.css @@ -6,4 +6,7 @@ } .user-content-body .data-list .operation-increase-icon { color: #0a9610; +} +.user-content-body .data-list .operation-msg { + width: 30%; } \ No newline at end of file
', $v['msg']); + // 创建时间 $v['add_time_text'] = empty($v['add_time']) ? '' : date('Y-m-d H:i:s', $v['add_time']); } diff --git a/application/plugins/wallet/service/WalletService.php b/application/plugins/wallet/service/WalletService.php index 0604e9239..6b76cb116 100644 --- a/application/plugins/wallet/service/WalletService.php +++ b/application/plugins/wallet/service/WalletService.php @@ -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)) { diff --git a/public/static/plugins/css/wallet/index/common.css b/public/static/plugins/css/wallet/index/common.css index 109835221..1ce33da30 100644 --- a/public/static/plugins/css/wallet/index/common.css +++ b/public/static/plugins/css/wallet/index/common.css @@ -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; } \ No newline at end of file diff --git a/public/static/plugins/css/wallet/index/wallet.css b/public/static/plugins/css/wallet/index/wallet.css index 14e71e3a4..fb3f849ea 100644 --- a/public/static/plugins/css/wallet/index/wallet.css +++ b/public/static/plugins/css/wallet/index/wallet.css @@ -6,4 +6,7 @@ } .user-content-body .data-list .operation-increase-icon { color: #0a9610; +} +.user-content-body .data-list .operation-msg { + width: 30%; } \ No newline at end of file