|
@@ -2,6 +2,7 @@
|
|
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
|
|
<head>
|
|
<head>
|
|
|
<th:block th:include="include :: header('用户结余列表')" />
|
|
<th:block th:include="include :: header('用户结余列表')" />
|
|
|
|
|
+ <th:block th:include="include :: bootstrap-editable-css" />
|
|
|
</head>
|
|
</head>
|
|
|
<body class="gray-bg">
|
|
<body class="gray-bg">
|
|
|
<div class="container-div">
|
|
<div class="container-div">
|
|
@@ -13,23 +14,31 @@
|
|
|
<li>
|
|
<li>
|
|
|
<label>用户ID:</label>
|
|
<label>用户ID:</label>
|
|
|
<input type="text" name="userId"/>
|
|
<input type="text" name="userId"/>
|
|
|
|
|
+ <select name="incomeType" th:with="users=${@user.getUserList()}">
|
|
|
|
|
+ <option value="">所有</option>
|
|
|
|
|
+ <option th:each="user : ${users}" th:text="${user.userName}" th:value="${user.userId}"></option>
|
|
|
|
|
+ </select>
|
|
|
</li>
|
|
</li>
|
|
|
<li>
|
|
<li>
|
|
|
<label>期初数:</label>
|
|
<label>期初数:</label>
|
|
|
- <input type="text" name="openingBalance"/>
|
|
|
|
|
- </li>
|
|
|
|
|
- <li>
|
|
|
|
|
- <label>收入:</label>
|
|
|
|
|
- <input type="text" name="income"/>
|
|
|
|
|
- </li>
|
|
|
|
|
- <li>
|
|
|
|
|
- <label>支出:</label>
|
|
|
|
|
- <input type="text" name="payment"/>
|
|
|
|
|
- </li>
|
|
|
|
|
- <li>
|
|
|
|
|
- <label>期末数:</label>
|
|
|
|
|
- <input type="text" name="closingBalance"/>
|
|
|
|
|
|
|
+ <input type="text" name="duration"/>
|
|
|
</li>
|
|
</li>
|
|
|
|
|
+<!-- <li>-->
|
|
|
|
|
+<!-- <label>期初数:</label>-->
|
|
|
|
|
+<!-- <input type="text" name="openingBalance"/>-->
|
|
|
|
|
+<!-- </li>-->
|
|
|
|
|
+<!-- <li>-->
|
|
|
|
|
+<!-- <label>收入:</label>-->
|
|
|
|
|
+<!-- <input type="text" name="income"/>-->
|
|
|
|
|
+<!-- </li>-->
|
|
|
|
|
+<!-- <li>-->
|
|
|
|
|
+<!-- <label>支出:</label>-->
|
|
|
|
|
+<!-- <input type="text" name="payment"/>-->
|
|
|
|
|
+<!-- </li>-->
|
|
|
|
|
+<!-- <li>-->
|
|
|
|
|
+<!-- <label>期末数:</label>-->
|
|
|
|
|
+<!-- <input type="text" name="closingBalance"/>-->
|
|
|
|
|
+<!-- </li>-->
|
|
|
<li>
|
|
<li>
|
|
|
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
|
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
|
|
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
|
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
|
@@ -40,15 +49,15 @@
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="btn-group-sm" id="toolbar" role="group">
|
|
<div class="btn-group-sm" id="toolbar" role="group">
|
|
|
- <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="business:balance:add">
|
|
|
|
|
- <i class="fa fa-plus"></i> 添加
|
|
|
|
|
- </a>
|
|
|
|
|
- <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="business:balance:edit">
|
|
|
|
|
- <i class="fa fa-edit"></i> 修改
|
|
|
|
|
- </a>
|
|
|
|
|
- <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="business:balance:remove">
|
|
|
|
|
- <i class="fa fa-remove"></i> 删除
|
|
|
|
|
- </a>
|
|
|
|
|
|
|
+<!-- <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="business:balance:add">-->
|
|
|
|
|
+<!-- <i class="fa fa-plus"></i> 添加-->
|
|
|
|
|
+<!-- </a>-->
|
|
|
|
|
+<!-- <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="business:balance:edit">-->
|
|
|
|
|
+<!-- <i class="fa fa-edit"></i> 修改-->
|
|
|
|
|
+<!-- </a>-->
|
|
|
|
|
+<!-- <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="business:balance:remove">-->
|
|
|
|
|
+<!-- <i class="fa fa-remove"></i> 删除-->
|
|
|
|
|
+<!-- </a>-->
|
|
|
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="business:balance:export">
|
|
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="business:balance:export">
|
|
|
<i class="fa fa-download"></i> 导出
|
|
<i class="fa fa-download"></i> 导出
|
|
|
</a>
|
|
</a>
|
|
@@ -56,9 +65,11 @@
|
|
|
<div class="col-sm-12 select-table table-striped">
|
|
<div class="col-sm-12 select-table table-striped">
|
|
|
<table id="bootstrap-table"></table>
|
|
<table id="bootstrap-table"></table>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<th:block th:include="include :: footer" />
|
|
<th:block th:include="include :: footer" />
|
|
|
|
|
+ <th:block th:include="include :: bootstrap-table-editable-js" />
|
|
|
<script th:inline="javascript">
|
|
<script th:inline="javascript">
|
|
|
var editFlag = [[${@permission.hasPermi('business:balance:edit')}]];
|
|
var editFlag = [[${@permission.hasPermi('business:balance:edit')}]];
|
|
|
var removeFlag = [[${@permission.hasPermi('business:balance:remove')}]];
|
|
var removeFlag = [[${@permission.hasPermi('business:balance:remove')}]];
|
|
@@ -72,6 +83,7 @@
|
|
|
removeUrl: prefix + "/remove",
|
|
removeUrl: prefix + "/remove",
|
|
|
exportUrl: prefix + "/export",
|
|
exportUrl: prefix + "/export",
|
|
|
modalName: "用户结余",
|
|
modalName: "用户结余",
|
|
|
|
|
+ onEditableSave: onEditableSave,
|
|
|
columns: [{
|
|
columns: [{
|
|
|
checkbox: true
|
|
checkbox: true
|
|
|
},
|
|
},
|
|
@@ -82,7 +94,12 @@
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
field: 'userId',
|
|
field: 'userId',
|
|
|
- title: '用户ID'
|
|
|
|
|
|
|
+ title: '用户ID',
|
|
|
|
|
+ visible: false
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ field: 'userName',
|
|
|
|
|
+ title: '用户名称'
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
field: 'duration',
|
|
field: 'duration',
|
|
@@ -90,7 +107,20 @@
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
field: 'openingBalance',
|
|
field: 'openingBalance',
|
|
|
- title: '期初数'
|
|
|
|
|
|
|
+ title: '期初数',
|
|
|
|
|
+ editable : {
|
|
|
|
|
+ type : 'text',
|
|
|
|
|
+ title : '期初数',
|
|
|
|
|
+ emptytext : "0",
|
|
|
|
|
+ validate : function(value) {
|
|
|
|
|
+ if (value.length == 0) {
|
|
|
|
|
+ return '期初数不能为空';
|
|
|
|
|
+ }
|
|
|
|
|
+ if (!$.common.isCurrency(value)) {
|
|
|
|
|
+ return '期初数应为正的金额';
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
field: 'income',
|
|
field: 'income',
|
|
@@ -103,20 +133,29 @@
|
|
|
{
|
|
{
|
|
|
field: 'closingBalance',
|
|
field: 'closingBalance',
|
|
|
title: '期末数'
|
|
title: '期末数'
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- title: '操作',
|
|
|
|
|
- align: 'center',
|
|
|
|
|
- formatter: function(value, row, index) {
|
|
|
|
|
- var actions = [];
|
|
|
|
|
- actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.balanceId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
|
|
|
|
- actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.balanceId + '\')"><i class="fa fa-remove"></i>删除</a>');
|
|
|
|
|
- return actions.join('');
|
|
|
|
|
- }
|
|
|
|
|
- }]
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+ // {
|
|
|
|
|
+ // title: '操作',
|
|
|
|
|
+ // align: 'center',
|
|
|
|
|
+ // formatter: function(value, row, index) {
|
|
|
|
|
+ // var actions = [];
|
|
|
|
|
+ // actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="adjustOpening(\'' + row.balanceId + '\',' + row.openingBalance + ')"><i class="fa fa-edit"></i>编辑期初数</a> ');
|
|
|
|
|
+ // actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.balanceId + '\')"><i class="fa fa-remove"></i>删除</a>');
|
|
|
|
|
+ // return actions.join('');
|
|
|
|
|
+ // }
|
|
|
|
|
+ // }
|
|
|
|
|
+ ]
|
|
|
};
|
|
};
|
|
|
$.table.init(options);
|
|
$.table.init(options);
|
|
|
});
|
|
});
|
|
|
|
|
+
|
|
|
|
|
+ function onEditableSave (field, row, rowIndex, oldValue, $el) {
|
|
|
|
|
+ $.operate.post(prefix + "/adjustOpening", {"balanceId": row.balanceId, "openingBalance": row.openingBalance}, refreshTable);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ function refreshTable() {
|
|
|
|
|
+ $.table.refresh();
|
|
|
|
|
+ }
|
|
|
</script>
|
|
</script>
|
|
|
</body>
|
|
</body>
|
|
|
</html>
|
|
</html>
|