2024-07-09 10:44:08 +08:00
|
|
|
|
<!DOCTYPE html>
|
|
|
|
|
|
<html lang="en">
|
|
|
|
|
|
<head>
|
|
|
|
|
|
<meta charset="UTF-8">
|
|
|
|
|
|
<title>付款账户信息</title>
|
|
|
|
|
|
<link rel="stylesheet" type="text/css" media="screen" href="../../css/bootstrap.min.css">
|
|
|
|
|
|
<link rel="stylesheet" type="text/css" media="screen" href="../../css/dataTables.bootstrap.min.css">
|
|
|
|
|
|
<link rel="stylesheet" type="text/css" media="screen" href="../../layui-v2.8.3/layui/css/layui.css">
|
|
|
|
|
|
<link rel="stylesheet" type="text/css" media="screen" href="../../css/work/publicStyles.css">
|
|
|
|
|
|
<style>
|
2025-01-06 13:07:32 +08:00
|
|
|
|
button {
|
2024-07-09 10:44:08 +08:00
|
|
|
|
border-radius: 7px !important;
|
|
|
|
|
|
}
|
2025-01-06 13:07:32 +08:00
|
|
|
|
|
|
|
|
|
|
#addBtn {
|
2024-07-09 10:44:08 +08:00
|
|
|
|
background-color: #f59a23 !important;
|
|
|
|
|
|
}
|
2025-01-06 13:07:32 +08:00
|
|
|
|
|
|
|
|
|
|
#exportBt {
|
2024-07-09 10:44:08 +08:00
|
|
|
|
background-color: #f2f2f2 !important;
|
|
|
|
|
|
color: #000000 !important;
|
|
|
|
|
|
border: 1px solid #ababab !important;
|
|
|
|
|
|
}
|
|
|
|
|
|
</style>
|
|
|
|
|
|
</head>
|
|
|
|
|
|
<body>
|
|
|
|
|
|
<div>
|
2025-01-06 13:07:32 +08:00
|
|
|
|
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
|
2024-07-09 10:44:08 +08:00
|
|
|
|
<header style="height: 100%">
|
|
|
|
|
|
<div align="left">
|
|
|
|
|
|
<table style="width: 100%">
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
<td>
|
|
|
|
|
|
<form class="form-inline layui-form" onsubmit="return false">
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
|
<div class="layui-inline">
|
|
|
|
|
|
<div class="layui-input-inline">
|
2025-01-06 13:07:32 +08:00
|
|
|
|
<input id="name" type="text" class="layui-input" style="width: 200px"
|
|
|
|
|
|
placeholder="请输入账户名称">
|
2024-07-09 10:44:08 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
2025-01-06 13:07:32 +08:00
|
|
|
|
<button id="searchBt" class="layui-btn" permission="sys:pay:query"
|
|
|
|
|
|
style="margin-top: -0.3%; margin-left: 15px;">
|
2024-07-09 10:44:08 +08:00
|
|
|
|
搜索
|
|
|
|
|
|
</button>
|
2025-01-06 13:07:32 +08:00
|
|
|
|
<button id="addBtn" class="layui-btn" onclick="addForm()" permission="sys:pay:add"
|
|
|
|
|
|
style="margin-top: -0.3%;">
|
2024-07-09 10:44:08 +08:00
|
|
|
|
添加
|
|
|
|
|
|
</button>
|
2025-01-06 13:07:32 +08:00
|
|
|
|
<button id="exportBt" class="layui-btn">
|
2024-07-09 10:44:08 +08:00
|
|
|
|
下载
|
|
|
|
|
|
</button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</form>
|
|
|
|
|
|
</td>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
</table>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</header>
|
|
|
|
|
|
|
|
|
|
|
|
<div style="margin-left: 15px;margin-right: 15px;">
|
|
|
|
|
|
<div class="widget-body">
|
|
|
|
|
|
<table id="demo" lay-filter="test" class="layui-table" lay-size="lg">
|
|
|
|
|
|
</table>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</body>
|
|
|
|
|
|
</html>
|
|
|
|
|
|
|
|
|
|
|
|
<script type="text/javascript" src="../../js/libs/jquery-3.6.0.min.js"></script>
|
|
|
|
|
|
<script type="text/javascript" src="../../js/jq.js"></script>
|
|
|
|
|
|
<script type="text/javascript" src="../../js/plugin/datatables/jquery.dataTables.min.js"></script>
|
|
|
|
|
|
<script type="text/javascript" src="../../js/plugin/datatables/dataTables.bootstrap.min.js"></script>
|
|
|
|
|
|
<script type="text/javascript" src="../../layui-v2.8.3/layui/layui.js"></script>
|
|
|
|
|
|
<script type="text/javascript" src="../../js/my/permission.js"></script>
|
|
|
|
|
|
<script type="text/javascript" src="../../js/publicJs.js"></script>
|
|
|
|
|
|
<script type="text/javascript" src="../../js/common_methon.js"></script>
|
|
|
|
|
|
|
|
|
|
|
|
<script type="text/html" id="toolsBar">
|
|
|
|
|
|
<a style="color: #009688;font-size: 16px;cursor:pointer;" onclick="openForm('{{d.id}}', '修改')">修改</a>
|
|
|
|
|
|
<span> | </span>
|
|
|
|
|
|
<a style="color: #009688;font-size: 16px;cursor:pointer;" onclick="del('{{d.id}}')">删除</a>
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
|
var pers = checkPermission();
|
|
|
|
|
|
|
|
|
|
|
|
var example;
|
|
|
|
|
|
var form;
|
|
|
|
|
|
var layuiForm;
|
|
|
|
|
|
layui.use(['form', 'laydate', 'upload'], function () {
|
|
|
|
|
|
table = layui.table;
|
|
|
|
|
|
form = layui.form; //只有执行了这一步,部分表单元素才会自动修饰成功
|
|
|
|
|
|
layuiForm = form;
|
|
|
|
|
|
form.render();
|
|
|
|
|
|
form.verify({});
|
|
|
|
|
|
|
|
|
|
|
|
table.render({
|
|
|
|
|
|
elem: '#demo'
|
|
|
|
|
|
, url: ctxPath + '/payAccountInfo/getList' //数据接口
|
|
|
|
|
|
, method: 'post' //方式默认是get
|
|
|
|
|
|
, toolbar: true //开启工具栏,此处显示默认图标,可以自定义模板,详见文档
|
2025-01-06 13:07:32 +08:00
|
|
|
|
, defaultToolbar: []
|
2024-07-09 10:44:08 +08:00
|
|
|
|
, where: {
|
2025-01-06 13:07:32 +08:00
|
|
|
|
name: $('#name').val()
|
2024-07-09 10:44:08 +08:00
|
|
|
|
} //post请求必须加where ,post请求需要的参数
|
|
|
|
|
|
, cellMinWidth: 80
|
|
|
|
|
|
, cols: [[ //表头
|
2025-01-06 13:07:32 +08:00
|
|
|
|
{field: 'number', width: 100, title: '序号', align: 'center', type: 'numbers'}
|
|
|
|
|
|
, {field: 'name', align: 'center', title: '付款账户名称'}
|
|
|
|
|
|
, {
|
|
|
|
|
|
field: 'accountNumber', align: 'center', title: '账号', templet: function (d) {
|
|
|
|
|
|
return maskAccountNumber(d.accountNumber);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
, {field: 'remarks', align: 'center', title: '备注'}
|
|
|
|
|
|
, {field: 'czyName', align: 'center', title: '操作人'}
|
2024-07-09 10:44:08 +08:00
|
|
|
|
, {field: 'czsj', align: 'center', title: '操作时间'}
|
2025-01-06 13:07:32 +08:00
|
|
|
|
, {fixed: 'right', title: '操作', width: 150, align: 'center', toolbar: '#toolsBar'}
|
2024-07-09 10:44:08 +08:00
|
|
|
|
]]
|
|
|
|
|
|
, id: 'menuTable'
|
|
|
|
|
|
, page: true //开启分页
|
|
|
|
|
|
, loading: true //数据加载中。。。
|
|
|
|
|
|
, limits: [5, 10, 20] //一页选择显示3,5或10条数据
|
|
|
|
|
|
, limit: 10 //一页显示5条数据
|
|
|
|
|
|
, response: {
|
|
|
|
|
|
statusCode: 200 //规定成功的状态码,默认:0
|
|
|
|
|
|
}, parseData: function (res) { //将原始数据解析成 table 组件所规定的数据,res为从url中get到的数据
|
|
|
|
|
|
let result;
|
|
|
|
|
|
if (res.data !== '' && res.data != null && res.data !== "null") {
|
|
|
|
|
|
if (this.page.curr) {
|
|
|
|
|
|
result = res.data.slice(this.limit * (this.page.curr - 1), this.limit * this.page.curr);
|
|
|
|
|
|
} else {
|
|
|
|
|
|
result = res.data.slice(0, this.limit);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
return {
|
|
|
|
|
|
"code": res.code, //解析接口状态
|
|
|
|
|
|
"msg": res.msg, //解析提示文本
|
|
|
|
|
|
"count": res.count, //解析数据长度
|
|
|
|
|
|
"data": result, //解析数据列表
|
|
|
|
|
|
};
|
|
|
|
|
|
},
|
|
|
|
|
|
toolbar: "#toolbar"
|
|
|
|
|
|
});
|
|
|
|
|
|
});
|
|
|
|
|
|
|
2025-01-06 13:07:32 +08:00
|
|
|
|
function addForm() {
|
|
|
|
|
|
openForm("", "新增");
|
2024-07-09 10:44:08 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 新增-修改功能
|
|
|
|
|
|
*/
|
2025-01-06 13:07:32 +08:00
|
|
|
|
function openForm(id, title) {
|
|
|
|
|
|
localStorage.setItem("id", id);
|
2024-07-09 10:44:08 +08:00
|
|
|
|
// layerOpenForm(title,"./addRole.html","80%","95%")
|
|
|
|
|
|
var index = layer.open({
|
|
|
|
|
|
title: [title, 'color:#3B70A1;background-color:#E8ECEB;font-size:20px'],
|
|
|
|
|
|
type: 2,
|
|
|
|
|
|
content: "./addPaymentAccount.html",
|
2025-01-06 13:07:32 +08:00
|
|
|
|
area: ["60%", "80%"],
|
2024-07-09 10:44:08 +08:00
|
|
|
|
maxmin: false,
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-01-06 13:07:32 +08:00
|
|
|
|
function del(id) {
|
2024-07-09 10:44:08 +08:00
|
|
|
|
layer.confirm('确定要删除吗?', {
|
2025-01-06 13:07:32 +08:00
|
|
|
|
btn: ['确定', '取消']
|
|
|
|
|
|
}, function () {
|
2024-07-09 10:44:08 +08:00
|
|
|
|
$.ajax({
|
2025-01-06 13:07:32 +08:00
|
|
|
|
type: 'delete',
|
|
|
|
|
|
url: ctxPath + '/payAccountInfo/' + id,
|
|
|
|
|
|
success: function (data) {
|
2024-07-09 10:44:08 +08:00
|
|
|
|
table.reload('menuTable');
|
|
|
|
|
|
layer.msg("删除成功");
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
layer.close(1);
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-01-06 13:07:32 +08:00
|
|
|
|
$("#searchBt").click(function () {
|
2024-07-09 10:44:08 +08:00
|
|
|
|
table.reload('menuTable', {
|
|
|
|
|
|
url: ctxPath + '/payAccountInfo/getList'
|
|
|
|
|
|
, method: 'post' //方式默认是get
|
|
|
|
|
|
, page: true
|
|
|
|
|
|
, where: {
|
2025-01-06 13:07:32 +08:00
|
|
|
|
name: $('#name').val()
|
2024-07-09 10:44:08 +08:00
|
|
|
|
} //设定异步数据接口的额外参数
|
|
|
|
|
|
});
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
$("#exportBt").click(function () {
|
|
|
|
|
|
var token = localStorage.getItem("token");
|
|
|
|
|
|
var loadingMsg = layer.msg('下载中,请稍候...', {icon: 16, scrollbar: false, time: 0});
|
2025-01-06 13:07:32 +08:00
|
|
|
|
var url = ctxPath + "/payAccountInfo/exp?name=" + $("#name").val().trim() + "&token=" + token;
|
2024-07-09 10:44:08 +08:00
|
|
|
|
var xhr = new XMLHttpRequest();
|
|
|
|
|
|
xhr.open("get", url, true);
|
|
|
|
|
|
xhr.responseType = "blob"; // 转换流
|
|
|
|
|
|
xhr.onload = function () {
|
|
|
|
|
|
layer.close(loadingMsg);
|
|
|
|
|
|
if (this.status === 200) {
|
|
|
|
|
|
var blob = this.response;
|
|
|
|
|
|
var a = document.createElement("a");
|
|
|
|
|
|
var url = window.URL.createObjectURL(blob);
|
|
|
|
|
|
a.href = url;
|
|
|
|
|
|
a.download = "付款账户信息.xlsx"; // 文件名
|
2025-01-06 13:07:32 +08:00
|
|
|
|
} else {
|
2024-07-09 10:44:08 +08:00
|
|
|
|
layer.msg('导出发生异常,请稍后重试', {icon: 16, scrollbar: false, time: 2000});
|
|
|
|
|
|
}
|
|
|
|
|
|
a.click()
|
|
|
|
|
|
window.URL.revokeObjectURL(url)
|
|
|
|
|
|
};
|
|
|
|
|
|
xhr.send();
|
|
|
|
|
|
});
|
|
|
|
|
|
</script>
|