feat(finance): 添加付款账户信息功能
- 新增付款账户信息页面和相关功能 - 添加账户号字段和显示逻辑 - 实现账户号部分隐藏显示 - 更新数据库表结构和映射文件
This commit is contained in:
parent
b9a814d3be
commit
9ee24dd5f5
|
|
@ -11,4 +11,9 @@ public class PayAccountInfoBean {
|
|||
String czyName;//操作人名称
|
||||
String czsj;//操作时间
|
||||
|
||||
/**
|
||||
* 账号
|
||||
*/
|
||||
String accountNumber;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,12 +2,12 @@ server.port=2002
|
|||
#????·??
|
||||
server.servlet.context-path=/yncw
|
||||
#mysql?????????
|
||||
#spring.datasource.url=jdbc:mysql://192.168.0.14:1103/yncw1?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true
|
||||
#spring.datasource.username=root
|
||||
#spring.datasource.password=dszadmin@ynreal14!
|
||||
spring.datasource.url=jdbc:mysql://127.0.0.1:3306/yncw_real?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true
|
||||
spring.datasource.username=mroot
|
||||
spring.datasource.password=bonus@admin123
|
||||
spring.datasource.url=jdbc:mysql://192.168.0.14:1103/yncw1?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true
|
||||
spring.datasource.username=root
|
||||
spring.datasource.password=dszadmin@ynreal14!
|
||||
#spring.datasource.url=jdbc:mysql://127.0.0.1:3306/yncw_real?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true
|
||||
#spring.datasource.username=mroot
|
||||
#spring.datasource.password=bonus@admin123
|
||||
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
|
||||
spring.datasource.max-idle=10
|
||||
spring.datasource.max-wait=60000
|
||||
|
|
@ -21,9 +21,13 @@ mybatis.type-aliases-package=com.bonus.boot.manager.*.entity
|
|||
# ?????????????????????
|
||||
mybatis.configuration.map-underscore-to-camel-case=true
|
||||
#redis config
|
||||
spring.redis.host=127.0.0.1
|
||||
spring.redis.port=6379
|
||||
spring.redis.password=
|
||||
#spring.redis.host=127.0.0.1
|
||||
#spring.redis.port=6379
|
||||
#spring.redis.password=
|
||||
|
||||
spring.redis.host=192.168.0.14
|
||||
spring.redis.port=2001
|
||||
spring.redis.password=Dszbns@Redis123!
|
||||
# ???
|
||||
logging.config=classpath:logback-boot.xml
|
||||
log.level.root=info
|
||||
|
|
|
|||
|
|
@ -10,13 +10,13 @@
|
|||
|
||||
<update id="update">
|
||||
update ca_bm_pay_account_info
|
||||
set name = #{name},remark = #{remarks},oper_user = #{czy},oper_time = now()
|
||||
set name = #{name},remark = #{remarks},oper_user = #{czy},oper_time = now(), account_number = #{accountNumber}
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="deletePayAccountInfo">
|
||||
update ca_bm_pay_account_info
|
||||
set is_active = '0',oper_user = #{czy},oper_time = now()
|
||||
set is_active = '0',oper_user = #{czy},oper_time = now(), account_number = #{accountNumber}
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
|
|
@ -33,6 +33,7 @@
|
|||
select
|
||||
cbpai.id,
|
||||
cbpai.name,
|
||||
cbpai.account_number as accountNumber,
|
||||
cbpai.remark as remarks,
|
||||
su.username as czyName,
|
||||
cbpai.oper_time as czsj
|
||||
|
|
@ -45,7 +46,7 @@
|
|||
order by cbpai.oper_time desc
|
||||
</select>
|
||||
<select id="getById" resultType="com.bonus.boot.manager.ca.bm.entity.PayAccountInfoBean">
|
||||
select id,name,remark as remarks
|
||||
select id,name,remark as remarks, account_number as accountNumber
|
||||
from ca_bm_pay_account_info
|
||||
where is_active = '1' and id = #{id}
|
||||
</select>
|
||||
|
|
|
|||
|
|
@ -64,3 +64,18 @@ function saveAs(blob, filename) {
|
|||
window.URL.revokeObjectURL(link.href)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 数据格式化
|
||||
* @param accountNumber 账号
|
||||
* @returns {*|string} 格式化后的账号
|
||||
*/
|
||||
function maskAccountNumber(accountNumber) {
|
||||
if (!accountNumber) return '';
|
||||
const startLength = 3; // 显示前几位
|
||||
const endLength = 3; // 显示后几位
|
||||
const maskLength = accountNumber.length - startLength - endLength;
|
||||
if (maskLength <= 0) return accountNumber; // 如果需要隐藏的部分小于等于0,则直接返回原账号
|
||||
const maskedPart = '*'.repeat(maskLength);
|
||||
return accountNumber.substring(0, startLength) + maskedPart + accountNumber.substring(accountNumber.length - endLength);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@
|
|||
</div>
|
||||
<div class="layui-input-inline"style="float: left;width: 49.5%;margin-top: 2%;margin-left: 18%" id="upper-gysmc">
|
||||
<label class="layui-form-label" style="width: 35%"><i class="tip-required" style="color: red;font-size: 20px">*</i> 供应商名称:</label>
|
||||
<select lay-filter="provider-name" name="gysmc" id="gysmc" lay-verify="required|gysmc">
|
||||
<select lay-filter="provider-name" name="gysmc" id="gysmc" lay-verify="required|gysmc" lay-search="">
|
||||
<option value="">请选择</option>
|
||||
</select>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -25,6 +25,13 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-input-inline"style="float: left;width: 50%;margin-top: 2%;margin-left: 20%" >
|
||||
<label class="layui-form-label" style="width: 30%">账号:</label>
|
||||
<div class="layui-input-block">
|
||||
<input style="width: 85%" type="text" name="accountNumber" id="accountNumber" maxlength="50" lay-verify="required" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-input-inline"style="float: left;width: 50%;margin-top: 2%;margin-left: 20%">
|
||||
<label class="layui-form-label" style="width: 30%">备注:</label>
|
||||
<div class="layui-input-block">
|
||||
|
|
@ -65,6 +72,7 @@
|
|||
async : false,
|
||||
success : function(data) {
|
||||
$("#name").val(data.name);
|
||||
$("#accountNumber").val(data.accountNumber);
|
||||
$("#remarks").val(data.remarks);
|
||||
}
|
||||
});
|
||||
|
|
@ -84,6 +92,7 @@
|
|||
}
|
||||
|
||||
formdata.name = $("#name").val();
|
||||
formdata.accountNumber = $("#accountNumber").val();
|
||||
formdata.remarks = $("#remarks").val();
|
||||
$.ajax({
|
||||
type : 'post',
|
||||
|
|
|
|||
|
|
@ -8,13 +8,15 @@
|
|||
<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>
|
||||
button{
|
||||
button {
|
||||
border-radius: 7px !important;
|
||||
}
|
||||
#addBtn{
|
||||
|
||||
#addBtn {
|
||||
background-color: #f59a23 !important;
|
||||
}
|
||||
#exportBt{
|
||||
|
||||
#exportBt {
|
||||
background-color: #f2f2f2 !important;
|
||||
color: #000000 !important;
|
||||
border: 1px solid #ababab !important;
|
||||
|
|
@ -23,7 +25,7 @@
|
|||
</head>
|
||||
<body>
|
||||
<div>
|
||||
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12" >
|
||||
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
|
||||
<header style="height: 100%">
|
||||
<div align="left">
|
||||
<table style="width: 100%">
|
||||
|
|
@ -33,16 +35,19 @@
|
|||
<div class="form-group">
|
||||
<div class="layui-inline">
|
||||
<div class="layui-input-inline">
|
||||
<input id="name" type="text" class="layui-input" style="width: 200px" placeholder="请输入账户名称">
|
||||
<input id="name" type="text" class="layui-input" style="width: 200px"
|
||||
placeholder="请输入账户名称">
|
||||
</div>
|
||||
</div>
|
||||
<button id="searchBt" class="layui-btn" permission="sys:pay:query" style="margin-top: -0.3%; margin-left: 15px;">
|
||||
<button id="searchBt" class="layui-btn" permission="sys:pay:query"
|
||||
style="margin-top: -0.3%; margin-left: 15px;">
|
||||
搜索
|
||||
</button>
|
||||
<button id="addBtn" class="layui-btn" onclick="addForm()" permission="sys:pay:add" style="margin-top: -0.3%;">
|
||||
<button id="addBtn" class="layui-btn" onclick="addForm()" permission="sys:pay:add"
|
||||
style="margin-top: -0.3%;">
|
||||
添加
|
||||
</button>
|
||||
<button id="exportBt" class="layui-btn" >
|
||||
<button id="exportBt" class="layui-btn">
|
||||
下载
|
||||
</button>
|
||||
</div>
|
||||
|
|
@ -97,18 +102,23 @@
|
|||
, url: ctxPath + '/payAccountInfo/getList' //数据接口
|
||||
, method: 'post' //方式默认是get
|
||||
, toolbar: true //开启工具栏,此处显示默认图标,可以自定义模板,详见文档
|
||||
,defaultToolbar: []
|
||||
, defaultToolbar: []
|
||||
, where: {
|
||||
name :$('#name').val()
|
||||
name: $('#name').val()
|
||||
} //post请求必须加where ,post请求需要的参数
|
||||
, cellMinWidth: 80
|
||||
, cols: [[ //表头
|
||||
{field: 'number', width:100,title: '序号', align: 'center', type: 'numbers'}
|
||||
, {field: 'name',align: 'center', title: '付款账户名称'}
|
||||
, {field: 'remarks',align: 'center', title: '备注'}
|
||||
, {field: 'czyName',align: 'center', title: '操作人'}
|
||||
{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: '操作人'}
|
||||
, {field: 'czsj', align: 'center', title: '操作时间'}
|
||||
, {fixed: 'right',title: '操作', width: 150,align: 'center', toolbar: '#toolsBar'}
|
||||
, {fixed: 'right', title: '操作', width: 150, align: 'center', toolbar: '#toolsBar'}
|
||||
]]
|
||||
, id: 'menuTable'
|
||||
, page: true //开启分页
|
||||
|
|
@ -137,34 +147,34 @@
|
|||
});
|
||||
});
|
||||
|
||||
function addForm(){
|
||||
openForm("","新增");
|
||||
function addForm() {
|
||||
openForm("", "新增");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增-修改功能
|
||||
*/
|
||||
function openForm(id,title){
|
||||
localStorage.setItem("id",id);
|
||||
function openForm(id, title) {
|
||||
localStorage.setItem("id", id);
|
||||
// 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",
|
||||
area: ["60%","80%"],
|
||||
area: ["60%", "80%"],
|
||||
maxmin: false,
|
||||
});
|
||||
}
|
||||
|
||||
function del(id){
|
||||
function del(id) {
|
||||
layer.confirm('确定要删除吗?', {
|
||||
btn : [ '确定', '取消' ]
|
||||
}, function() {
|
||||
btn: ['确定', '取消']
|
||||
}, function () {
|
||||
$.ajax({
|
||||
type : 'delete',
|
||||
url : ctxPath + '/payAccountInfo/'+id,
|
||||
success : function(data) {
|
||||
type: 'delete',
|
||||
url: ctxPath + '/payAccountInfo/' + id,
|
||||
success: function (data) {
|
||||
table.reload('menuTable');
|
||||
layer.msg("删除成功");
|
||||
}
|
||||
|
|
@ -174,13 +184,13 @@
|
|||
});
|
||||
}
|
||||
|
||||
$("#searchBt").click(function(){
|
||||
$("#searchBt").click(function () {
|
||||
table.reload('menuTable', {
|
||||
url: ctxPath + '/payAccountInfo/getList'
|
||||
, method: 'post' //方式默认是get
|
||||
, page: true
|
||||
, where: {
|
||||
name :$('#name').val()
|
||||
name: $('#name').val()
|
||||
} //设定异步数据接口的额外参数
|
||||
});
|
||||
});
|
||||
|
|
@ -188,7 +198,7 @@
|
|||
$("#exportBt").click(function () {
|
||||
var token = localStorage.getItem("token");
|
||||
var loadingMsg = layer.msg('下载中,请稍候...', {icon: 16, scrollbar: false, time: 0});
|
||||
var url = ctxPath + "/payAccountInfo/exp?name=" + $("#name").val().trim()+ "&token=" + token;
|
||||
var url = ctxPath + "/payAccountInfo/exp?name=" + $("#name").val().trim() + "&token=" + token;
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open("get", url, true);
|
||||
xhr.responseType = "blob"; // 转换流
|
||||
|
|
@ -200,7 +210,7 @@
|
|||
var url = window.URL.createObjectURL(blob);
|
||||
a.href = url;
|
||||
a.download = "付款账户信息.xlsx"; // 文件名
|
||||
}else {
|
||||
} else {
|
||||
layer.msg('导出发生异常,请稍后重试', {icon: 16, scrollbar: false, time: 2000});
|
||||
}
|
||||
a.click()
|
||||
|
|
|
|||
Loading…
Reference in New Issue