Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
jamesyang1999
ShopXO
提交
c5fed3fb
ShopXO
项目概览
jamesyang1999
/
ShopXO
与 Fork 源项目一致
Fork自
纵之格 / ShopXO
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
ShopXO
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
c5fed3fb
编写于
5月 07, 2019
作者:
D
devil_gong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
钱包管理
上级
576079b9
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
64 addition
and
49 deletion
+64
-49
application/plugins/view/wallet/cash/index.html
application/plugins/view/wallet/cash/index.html
+5
-8
application/plugins/view/wallet/recharge/index.html
application/plugins/view/wallet/recharge/index.html
+5
-8
application/plugins/view/wallet/wallet/index.html
application/plugins/view/wallet/wallet/index.html
+18
-13
application/plugins/view/wallet/walletadmin/index.html
application/plugins/view/wallet/walletadmin/index.html
+9
-14
application/plugins/view/wallet/walletadmin/saveinfo.html
application/plugins/view/wallet/walletadmin/saveinfo.html
+4
-0
application/plugins/wallet/install.sql
application/plugins/wallet/install.sql
+4
-2
application/plugins/wallet/service/BaseService.php
application/plugins/wallet/service/BaseService.php
+3
-0
application/plugins/wallet/service/WalletService.php
application/plugins/wallet/service/WalletService.php
+10
-3
public/static/plugins/css/wallet/index/common.css
public/static/plugins/css/wallet/index/common.css
+3
-1
public/static/plugins/css/wallet/index/wallet.css
public/static/plugins/css/wallet/index/wallet.css
+3
-0
未找到文件。
application/plugins/view/wallet/cash/index.html
浏览文件 @
c5fed3fb
...
...
@@ -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>
<!-- 分页 -->
...
...
application/plugins/view/wallet/recharge/index.html
浏览文件 @
c5fed3fb
...
...
@@ -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>
<!-- 分页 -->
...
...
application/plugins/view/wallet/wallet/index.html
浏览文件 @
c5fed3fb
...
...
@@ -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>
<!-- 分页 -->
...
...
application/plugins/view/wallet/walletadmin/index.html
浏览文件 @
c5fed3fb
...
...
@@ -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 /}}
...
...
application/plugins/view/wallet/walletadmin/saveinfo.html
浏览文件 @
c5fed3fb
...
...
@@ -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
}}
/>
...
...
application/plugins/wallet/install.sql
浏览文件 @
c5fed3fb
...
...
@@ -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`
),
...
...
application/plugins/wallet/service/BaseService.php
浏览文件 @
c5fed3fb
...
...
@@ -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'
]);
}
...
...
application/plugins/wallet/service/WalletService.php
浏览文件 @
c5fed3fb
...
...
@@ -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
))
{
...
...
public/static/plugins/css/wallet/index/common.css
浏览文件 @
c5fed3fb
...
...
@@ -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
public/static/plugins/css/wallet/index/wallet.css
浏览文件 @
c5fed3fb
...
...
@@ -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
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录