1.4.5.2
This commit is contained in:
6
EdgeAdmin/web/views/@default/finance/accounts/@menu.html
Normal file
6
EdgeAdmin/web/views/@default/finance/accounts/@menu.html
Normal file
@@ -0,0 +1,6 @@
|
||||
<first-menu>
|
||||
<menu-item href="." code="index">账户列表</menu-item>
|
||||
<menu-item href=".update" code="update">充值消费</menu-item>
|
||||
</first-menu>
|
||||
|
||||
<div class="margin"></div>
|
||||
@@ -0,0 +1,6 @@
|
||||
<first-menu>
|
||||
<menu-item href="/finance/accounts">账户列表</menu-item>
|
||||
<menu-item :href="'.?accountId=' + account.id" code="index">"{{account.user.fullname}}<span class="small">({{account.user.username}})</span>"账户详情</menu-item>
|
||||
<menu-item :href="'.logs?accountId=' + account.id" code="log">收支明细</menu-item>
|
||||
<menu-item :href="'.update?accountId=' + account.id" code="update">充值消费</menu-item>
|
||||
</first-menu>
|
||||
@@ -0,0 +1,53 @@
|
||||
{$layout}
|
||||
{$template "menu"}
|
||||
|
||||
<table class="ui table selectable definition">
|
||||
<tr>
|
||||
<td class="title">余额</td>
|
||||
<td>{{account.total}}元</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>冻结</td>
|
||||
<td>{{account.totalFrozen}}元 <tip-icon content="冻结后不能使用的余额"></tip-icon></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h3>最近收支明细</h3>
|
||||
<p class="comment" v-if="logs.length == 0">暂时还没有操作日志。</p>
|
||||
|
||||
<table class="ui table selectable celled" v-if="logs.length > 0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="two wide">操作类型</th>
|
||||
<th class="two wide">操作金额</th>
|
||||
<th class="two wide">冻结金额</th>
|
||||
<th class="two wide">剩余余额</th>
|
||||
<th class="two wide">剩余冻结余额</th>
|
||||
<th class="four wide">时间</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody v-for="log in logs">
|
||||
<tr>
|
||||
<td>
|
||||
<span v-if="log.event != null">{{log.event.name}}</span>
|
||||
<span v-else class="disabled">其他</span>
|
||||
</td>
|
||||
<td>
|
||||
<span v-if="log.delta != 0" :class="{red: log.delta < 0, green: log.delta > 0}">{{log.delta}}元</span>
|
||||
<span v-else class="disabled">0</span>
|
||||
</td>
|
||||
<td>
|
||||
<span v-if="log.deltaFrozen != 0">{{log.deltaFrozen}}元</span>
|
||||
<span v-else class="disabled">0</span>
|
||||
</td>
|
||||
<td>{{log.total}}元</td>
|
||||
<td><span :class="{disabled: log.totalFrozen == 0}">{{log.totalFrozen}}元</span></td>
|
||||
<td>{{log.createdTime}}</td>
|
||||
</tr>
|
||||
<tr v-if="log.description.length > 0">
|
||||
<td colspan="10">
|
||||
<span class="grey">描述:<keyword :v-word="keyword">{{log.description}}</keyword></span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -0,0 +1,46 @@
|
||||
{$layout}
|
||||
{$template "menu"}
|
||||
|
||||
|
||||
<p class="comment" v-if="logs.length == 0">暂时还没有操作日志。</p>
|
||||
|
||||
<table class="ui table selectable celled" v-if="logs.length > 0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="two wide">操作类型</th>
|
||||
<th class="two wide">操作金额</th>
|
||||
<th class="two wide">冻结金额</th>
|
||||
<th class="two wide">剩余余额</th>
|
||||
<th class="two wide">剩余冻结余额</th>
|
||||
<th class="three wide">时间</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody v-for="log in logs">
|
||||
<tr>
|
||||
<td>
|
||||
<span v-if="log.event != null">{{log.event.name}}</span>
|
||||
<span v-else class="disabled">其他</span>
|
||||
</td>
|
||||
<td>
|
||||
<span v-if="log.delta != 0" :class="{red: log.delta < 0, green: log.delta > 0}">{{log.delta}}元</span>
|
||||
<span v-else class="disabled">0</span>
|
||||
</td>
|
||||
<td>
|
||||
<span v-if="log.deltaFrozen != 0">{{log.deltaFrozen}}元</span>
|
||||
<span v-else class="disabled">0</span>
|
||||
</td>
|
||||
<td>{{log.total}}元</td>
|
||||
<td>
|
||||
<span :class="{disabled: log.totalFrozen == 0}">{{log.totalFrozen}}元</span>
|
||||
</td>
|
||||
<td>{{log.createdTime}}</td>
|
||||
</tr>
|
||||
<tr v-if="log.description.length > 0">
|
||||
<td colspan="10">
|
||||
<span class="grey">描述:<keyword :v-word="keyword">{{log.description}}</keyword></span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="page" v-html="page"></div>
|
||||
@@ -0,0 +1,40 @@
|
||||
{$layout}
|
||||
{$template "menu"}
|
||||
|
||||
<form class="ui form" data-tea-action="$" data-tea-success="success">
|
||||
<csrf-token></csrf-token>
|
||||
<input type="hidden" name="accountId" :value="account.id"/>
|
||||
<table class="ui table definition selectable">
|
||||
<tr>
|
||||
<td>当前账户余额</td>
|
||||
<td>{{account.total}}元</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="title">操作类型 *</td>
|
||||
<td>
|
||||
<select class="ui dropdown auto-width" name="eventType" v-model="eventType">
|
||||
<option v-for="eventType in eventTypes" :value="eventType.code">{{eventType.name}}</option>
|
||||
</select>
|
||||
<p class="comment">{{event.description}}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>操作金额 *</td>
|
||||
<td>
|
||||
<div class="ui input left right labeled">
|
||||
<span class="ui label green" v-if="event != null && event.isPositive">+</span>
|
||||
<span class="ui label red" v-if="event != null && !event.isPositive">-</span>
|
||||
<input type="text" name="delta" value="" style="width: 8em" maxlength="8"/>
|
||||
<span class="ui label">元</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>描述</td>
|
||||
<td>
|
||||
<textarea rows="3" name="description"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<submit-btn></submit-btn>
|
||||
</form>
|
||||
@@ -0,0 +1,14 @@
|
||||
Tea.context(function () {
|
||||
this.eventType = this.eventTypes[0].code
|
||||
this.event = this.eventTypes[0]
|
||||
|
||||
this.$delay(function () {
|
||||
this.$watch("eventType", function (eventType) {
|
||||
this.event = this.eventTypes.$find(function (k, v) {
|
||||
return v.code == eventType
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
this.success = NotifyReloadSuccess("操作成功")
|
||||
})
|
||||
39
EdgeAdmin/web/views/@default/finance/accounts/index.html
Normal file
39
EdgeAdmin/web/views/@default/finance/accounts/index.html
Normal file
@@ -0,0 +1,39 @@
|
||||
{$layout}
|
||||
{$template "menu"}
|
||||
|
||||
<form class="ui form" method="get" action="/finance/accounts">
|
||||
<div class="ui fields inline">
|
||||
<div class="ui field">
|
||||
<input type="text" name="keyword" v-model="keyword" placeholder="用户名、全名"/>
|
||||
</div>
|
||||
<div class="ui field">
|
||||
<button class="ui button" type="submit">搜索</button>
|
||||
|
||||
<a href="/finance/accounts" v-if="keyword.length > 0">[清除条件]</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<p class="comment" v-if="accounts.length == 0">暂时还没有用户账户。</p>
|
||||
<table class="ui table selectable celled" v-if="accounts.length > 0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>用户</th>
|
||||
<th class="three wide">余额</th>
|
||||
<th class="two op">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr v-for="account in accounts">
|
||||
<td>
|
||||
<a :href="'/finance/accounts/account?accountId=' + account.id"><user-link :v-user="account.user" :v-keyword="keyword"></user-link></a>
|
||||
</td>
|
||||
<td>
|
||||
{{account.total}}元
|
||||
</td>
|
||||
<td>
|
||||
<a :href="'/finance/accounts/account?accountId=' + account.id">详情</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div class="page" v-html="page"></div>
|
||||
44
EdgeAdmin/web/views/@default/finance/accounts/update.html
Normal file
44
EdgeAdmin/web/views/@default/finance/accounts/update.html
Normal file
@@ -0,0 +1,44 @@
|
||||
{$layout}
|
||||
{$template "menu"}
|
||||
|
||||
<form class="ui form" data-tea-action="$" data-tea-success="success">
|
||||
<csrf-token></csrf-token>
|
||||
<table class="ui table definition selectable">
|
||||
<tr>
|
||||
<td class="title">选择用户 *</td>
|
||||
<td>
|
||||
<finance-user-selector @change="changeUser"></finance-user-selector>
|
||||
<p class="comment">
|
||||
<span v-if="userAccount != null">余额{{userAccount.total}}元。</span>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>操作类型 *</td>
|
||||
<td>
|
||||
<select class="ui dropdown auto-width" name="eventType" v-model="eventType">
|
||||
<option v-for="eventType in eventTypes" :value="eventType.code">{{eventType.name}}</option>
|
||||
</select>
|
||||
<p class="comment">{{event.description}}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>操作金额 *</td>
|
||||
<td>
|
||||
<div class="ui input left right labeled">
|
||||
<span class="ui label green" v-if="event != null && event.isPositive">+</span>
|
||||
<span class="ui label red" v-if="event != null && !event.isPositive">-</span>
|
||||
<input type="text" name="delta" value="" style="width: 8em" maxlength="8"/>
|
||||
<span class="ui label">元</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>描述</td>
|
||||
<td>
|
||||
<textarea rows="3" name="description"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<submit-btn></submit-btn>
|
||||
</form>
|
||||
27
EdgeAdmin/web/views/@default/finance/accounts/update.js
Normal file
27
EdgeAdmin/web/views/@default/finance/accounts/update.js
Normal file
@@ -0,0 +1,27 @@
|
||||
Tea.context(function () {
|
||||
this.eventType = this.eventTypes[0].code
|
||||
this.event = this.eventTypes[0]
|
||||
|
||||
this.$delay(function () {
|
||||
this.$watch("eventType", function (eventType) {
|
||||
this.event = this.eventTypes.$find(function (k, v) {
|
||||
return v.code == eventType
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
this.success = NotifyReloadSuccess("操作成功")
|
||||
|
||||
this.userAccount = null
|
||||
this.changeUser = function (userId) {
|
||||
if (userId > 0) {
|
||||
this.$post(".userAccount")
|
||||
.params({userId: userId})
|
||||
.success(function (resp) {
|
||||
this.userAccount = resp.data.account
|
||||
})
|
||||
} else {
|
||||
this.userAccount = null
|
||||
}
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user