提交 2d797de9 编写于 作者: doc_wei's avatar doc_wei

feat: IFS新增借款单,还款单

上级 7fbd5de8
layui.config({
base: basePath,
version: skyeyeVersion
}).extend({
window: 'js/winui.window'
}).define(['window', 'table', 'jquery', 'winui', 'form'], function (exports) {
winui.renderColor();
var $ = layui.$,
form = layui.form,
table = layui.table;
var serviceClassName = sysServiceMation["loanBorrowService"]["key"];
authBtn('1714910702062');//新增
table.render({
id: 'messageTable',
elem: '#messageTable',
method: 'post',
url: sysMainMation.ifsBasePath + 'queryLoanBorrowList',
where: getTableParams(),
even: true,
page: true,
limits: getLimits(),
limit: getLimit(),
cols: [[
{ title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' },
{ field: 'oddNumber', title: '单据编号', align: 'left', width: 200, templet: function (d) {
return '<a lay-event="details" class="notice-title-click">' + d.oddNumber + '</a>';
}},
{ field: 'payTypeId', title: '付款方式', align: 'left', width: 120, templet: function (d) {
return sysDictDataUtil.getDictDataNameByCodeAndKey("IFS_PAY_TYPE", d.payTypeId);
}},
{ field: 'price', title: '借款金额', align: 'left', width: 100 },
{ field: 'collectionName', title: '收款人全称', align: 'left', width: 150 },
{ field: 'collectionCode', title: '收款账号', align: 'left', width: 120 },
{ field: 'openingBank', title: '开户行', align: 'center', width: 120 },
{ field: 'processInstanceId', title: '流程ID', width: 100, templet: function (d) {
return '<a lay-event="processDetails" class="notice-title-click">' + getNotUndefinedVal(d.processInstanceId) + '</a>';
}},
{ field: 'state', title: '状态', align: 'left', width: 80, templet: function (d) {
return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("flowableStateEnum", 'id', d.state, 'name');
}},
{ field: 'createName', title: systemLanguage["com.skyeye.createName"][languageType], width: 120 },
{ field: 'createTime', title: systemLanguage["com.skyeye.createTime"][languageType], align: 'center', width: 150 },
{ field: 'lastUpdateName', title: systemLanguage["com.skyeye.lastUpdateName"][languageType], align: 'left', width: 120 },
{ field: 'lastUpdateTime', title: systemLanguage["com.skyeye.lastUpdateTime"][languageType], align: 'center', width: 150 },
{ title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 200, toolbar: '#tableBar' }
]],
done: function(json) {
matchingLanguage();
initTableSearchUtil.initAdvancedSearch(this, json.searchFilter, form, "请输入单据编号", function () {
refreshTable();
});
}
});
table.on('tool(messageTable)', function (obj) {
var data = obj.data;
var layEvent = obj.event;
if (layEvent === 'delete') { //删除
deleteIncome(data);
} else if (layEvent === 'details') { //详情
details(data);
} else if (layEvent === 'edit') { //编辑
edit(data);
} else if (layEvent === 'subExamine') { //提交审核
subExamine(data);
} else if (layEvent === 'processDetails') {//采购流程详情
activitiUtil.activitiDetails(data);
} else if (layEvent === 'revoke') { //撤销
revorke(data);
}
});
// 添加
$("body").on("click", "#addBean", function() {
_openNewWindows({
url: systemCommonUtil.getUrl('FP2024050500005', null),
title: systemLanguage["com.skyeye.addPageTitle"][languageType],
pageId: "loanBorrowAdd",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
loadTable();
}});
});
// 编辑
function edit(data) {
_openNewWindows({
url: systemCommonUtil.getUrl('FP2024050500006&id=' + data.id, null),
title: systemLanguage["com.skyeye.editPageTitle"][languageType],
pageId: "loanBorrowEdit",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
loadTable();
}});
}
// 详情
function details(data) {
_openNewWindows({
url: systemCommonUtil.getUrl('FP2024050500007&id=' + data.id, null),
title: systemLanguage["com.skyeye.detailsPageTitle"][languageType],
pageId: "loanBorrowInfo",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
}});
}
// 删除
function deleteIncome(data) {
layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function (index) {
AjaxPostUtil.request({url: sysMainMation.ifsBasePath + "deleteLoanBorrowById", params: {id: data.id}, type: 'json', method: "DELETE", callback: function (json) {
winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
loadTable();
}});
});
}
// 撤销申请
function revorke(data) {
layer.confirm('确认撤销该申请吗?', { icon: 3, title: '撤销操作' }, function (index) {
layer.close(index);
AjaxPostUtil.request({url: sysMainMation.ifsBasePath + "revokeLoanBorrow", params: {processInstanceId: data.processInstanceId}, type: 'json', method: "PUT", callback: function (json) {
winui.window.msg("提交成功", {icon: 1, time: 2000});
loadTable();
}});
});
}
// 提交数据
function subExamine(data){
layer.confirm(systemLanguage["com.skyeye.approvalOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.approvalOperation"][languageType]}, function (index) {
layer.close(index);
activitiUtil.startProcess(serviceClassName, null, function (approvalId) {
var params = {
id: data.id,
approvalId: approvalId
};
AjaxPostUtil.request({url: sysMainMation.ifsBasePath + "submitLoanBorrowToApproval", params: params, type: 'json', callback: function (json) {
winui.window.msg("提交成功", {icon: 1, time: 2000});
loadTable();
}});
});
});
}
form.render();
$("body").on("click", "#reloadTable", function() {
loadTable();
});
function loadTable() {
table.reloadData("messageTable", {where: getTableParams()});
}
function refreshTable() {
table.reloadData("messageTable", {page: {curr: 1}, where: getTableParams()});
}
function getTableParams() {
return $.extend(true, {}, initTableSearchUtil.getSearchValue("messageTable"));
}
exports('loanBorrowList', {});
});
layui.config({
base: basePath,
version: skyeyeVersion
}).extend({
window: 'js/winui.window'
}).define(['window', 'table', 'jquery', 'winui', 'form'], function (exports) {
winui.renderColor();
var $ = layui.$,
form = layui.form,
table = layui.table;
var serviceClassName = sysServiceMation["loanRepayService"]["key"];
authBtn('1714910816333');//新增
table.render({
id: 'messageTable',
elem: '#messageTable',
method: 'post',
url: sysMainMation.ifsBasePath + 'queryLoanRepayList',
where: getTableParams(),
even: true,
page: true,
limits: getLimits(),
limit: getLimit(),
cols: [[
{ title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' },
{ field: 'oddNumber', title: '单据编号', align: 'left', width: 200, templet: function (d) {
return '<a lay-event="details" class="notice-title-click">' + d.oddNumber + '</a>';
}},
{ field: 'payTypeId', title: '付款方式', align: 'left', width: 120, templet: function (d) {
return sysDictDataUtil.getDictDataNameByCodeAndKey("IFS_PAY_TYPE", d.payTypeId);
}},
{ field: 'price', title: '还款金额', align: 'left', width: 100 },
{ field: 'collectionName', title: '收款人全称', align: 'left', width: 150 },
{ field: 'collectionCode', title: '收款账号', align: 'left', width: 120 },
{ field: 'openingBank', title: '开户行', align: 'center', width: 120 },
{ field: 'processInstanceId', title: '流程ID', width: 100, templet: function (d) {
return '<a lay-event="processDetails" class="notice-title-click">' + getNotUndefinedVal(d.processInstanceId) + '</a>';
}},
{ field: 'state', title: '状态', align: 'left', width: 80, templet: function (d) {
return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("flowableStateEnum", 'id', d.state, 'name');
}},
{ field: 'createName', title: systemLanguage["com.skyeye.createName"][languageType], width: 120 },
{ field: 'createTime', title: systemLanguage["com.skyeye.createTime"][languageType], align: 'center', width: 150 },
{ field: 'lastUpdateName', title: systemLanguage["com.skyeye.lastUpdateName"][languageType], align: 'left', width: 120 },
{ field: 'lastUpdateTime', title: systemLanguage["com.skyeye.lastUpdateTime"][languageType], align: 'center', width: 150 },
{ title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 200, toolbar: '#tableBar' }
]],
done: function(json) {
matchingLanguage();
initTableSearchUtil.initAdvancedSearch(this, json.searchFilter, form, "请输入单据编号", function () {
refreshTable();
});
}
});
table.on('tool(messageTable)', function (obj) {
var data = obj.data;
var layEvent = obj.event;
if (layEvent === 'delete') { //删除
deleteIncome(data);
} else if (layEvent === 'details') { //详情
details(data);
} else if (layEvent === 'edit') { //编辑
edit(data);
} else if (layEvent === 'subExamine') { //提交审核
subExamine(data);
} else if (layEvent === 'processDetails') {//采购流程详情
activitiUtil.activitiDetails(data);
} else if (layEvent === 'revoke') { //撤销
revorke(data);
}
});
// 添加
$("body").on("click", "#addBean", function() {
_openNewWindows({
url: systemCommonUtil.getUrl('FP2024050500008', null),
title: systemLanguage["com.skyeye.addPageTitle"][languageType],
pageId: "loanRepayAdd",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
loadTable();
}});
});
// 编辑
function edit(data) {
_openNewWindows({
url: systemCommonUtil.getUrl('FP2024050500009&id=' + data.id, null),
title: systemLanguage["com.skyeye.editPageTitle"][languageType],
pageId: "loanRepayEdit",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
loadTable();
}});
}
// 详情
function details(data) {
_openNewWindows({
url: systemCommonUtil.getUrl('FP2024050500010&id=' + data.id, null),
title: systemLanguage["com.skyeye.detailsPageTitle"][languageType],
pageId: "loanRepayInfo",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
}});
}
// 删除
function deleteIncome(data) {
layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function (index) {
AjaxPostUtil.request({url: sysMainMation.ifsBasePath + "deleteLoanRepayById", params: {id: data.id}, type: 'json', method: "DELETE", callback: function (json) {
winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
loadTable();
}});
});
}
// 撤销申请
function revorke(data) {
layer.confirm('确认撤销该申请吗?', { icon: 3, title: '撤销操作' }, function (index) {
layer.close(index);
AjaxPostUtil.request({url: sysMainMation.ifsBasePath + "revokeLoanRepay", params: {processInstanceId: data.processInstanceId}, type: 'json', method: "PUT", callback: function (json) {
winui.window.msg("提交成功", {icon: 1, time: 2000});
loadTable();
}});
});
}
// 提交数据
function subExamine(data){
layer.confirm(systemLanguage["com.skyeye.approvalOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.approvalOperation"][languageType]}, function (index) {
layer.close(index);
activitiUtil.startProcess(serviceClassName, null, function (approvalId) {
var params = {
id: data.id,
approvalId: approvalId
};
AjaxPostUtil.request({url: sysMainMation.ifsBasePath + "submitLoanRepayToApproval", params: params, type: 'json', callback: function (json) {
winui.window.msg("提交成功", {icon: 1, time: 2000});
loadTable();
}});
});
});
}
form.render();
$("body").on("click", "#reloadTable", function() {
loadTable();
});
function loadTable() {
table.reloadData("messageTable", {where: getTableParams()});
}
function refreshTable() {
table.reloadData("messageTable", {page: {curr: 1}, where: getTableParams()});
}
function getTableParams() {
return $.extend(true, {}, initTableSearchUtil.getSearchValue("messageTable"));
}
exports('loanRepayList', {});
});
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<link href="../../assets/lib/layui/css/layui.css" rel="stylesheet" />
<link href="../../assets/lib/winui/css/winui.css" rel="stylesheet" />
</head>
<body>
<div class="winui-toolbar">
<div class="winui-tool">
<button id="reloadTable" class="winui-toolbtn search-table-btn-right"><i class="fa fa-refresh" aria-hidden="true"></i><language showName="com.skyeye.refreshDataBtn"></language></button>
<button id="addBean" class="winui-toolbtn search-table-btn-right" auth="1714910702062"><i class="fa fa-plus" aria-hidden="true"></i><language showName="com.skyeye.addBtn"></language></button>
</div>
</div>
<div style="margin: auto 10px;">
<table id="messageTable" lay-filter="messageTable"></table>
</div>
<script type="text/html" id="tableBar">
{{# if (d.editRow == '1') { }}
{{# if (auth('1714910725373')) { }}
<a class="layui-btn layui-btn-xs" lay-event="subExamine">提交审批</a>
{{# } }}
{{# if (auth('1714910714820')) { }}
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="delete"><language showName="com.skyeye.deleteBtn"></language></a>
{{# } }}
{{# if (auth('1714910702062')) { }}
<a class="layui-btn layui-btn-xs" lay-event="edit"><language showName="com.skyeye.editBtn"></language></a>
{{# } }}
{{# } }}
{{# if (d.editRow == '2') { }}
{{# if (auth('1714910733052')) { }}
<a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="revoke">撤销</a>
{{# } }}
{{# } }}
</script>
<script src="../../assets/lib/layui/layui.js"></script>
<script src="../../assets/lib/layui/custom.js"></script>
<script type="text/javascript">
layui.config({base: '../../js/loan/'}).use('loanBorrowList');
</script>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<link href="../../assets/lib/layui/css/layui.css" rel="stylesheet" />
<link href="../../assets/lib/winui/css/winui.css" rel="stylesheet" />
</head>
<body>
<div class="winui-toolbar">
<div class="winui-tool">
<button id="reloadTable" class="winui-toolbtn search-table-btn-right"><i class="fa fa-refresh" aria-hidden="true"></i><language showName="com.skyeye.refreshDataBtn"></language></button>
<button id="addBean" class="winui-toolbtn search-table-btn-right" auth="1714910816333"><i class="fa fa-plus" aria-hidden="true"></i><language showName="com.skyeye.addBtn"></language></button>
</div>
</div>
<div style="margin: auto 10px;">
<table id="messageTable" lay-filter="messageTable"></table>
</div>
<script type="text/html" id="tableBar">
{{# if (d.editRow == '1') { }}
{{# if (auth('1714910833787')) { }}
<a class="layui-btn layui-btn-xs" lay-event="subExamine">提交审批</a>
{{# } }}
{{# if (auth('1714910825479')) { }}
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="delete"><language showName="com.skyeye.deleteBtn"></language></a>
{{# } }}
{{# if (auth('1714910816333')) { }}
<a class="layui-btn layui-btn-xs" lay-event="edit"><language showName="com.skyeye.editBtn"></language></a>
{{# } }}
{{# } }}
{{# if (d.editRow == '2') { }}
{{# if (auth('1714910841416')) { }}
<a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="revoke">撤销</a>
{{# } }}
{{# } }}
</script>
<script src="../../assets/lib/layui/layui.js"></script>
<script src="../../assets/lib/layui/custom.js"></script>
<script type="text/javascript">
layui.config({base: '../../js/loan/'}).use('loanRepayList');
</script>
</body>
</html>
\ No newline at end of file
......@@ -53,6 +53,8 @@
"incomeOrder": {"name": "财务明细账", "key": "com.skyeye.order.service.impl.IncomeOrderServiceImpl"},
"reimbursement": {"name": "报销订单", "key": "com.skyeye.reimbursement.service.impl.ReimbursementServiceImpl"},
"loanBorrowService": {"name": "借款单", "key": "com.skyeye.loan.service.impl.LoanBorrowServiceImpl"},
"loanRepayService": {"name": "还款单", "key": "com.skyeye.loan.service.impl.LoanRepayServiceImpl"},
"bossPersonRequire": {"name": "人员需求申请", "key": "com.skyeye.personrequire.service.impl.PersonRequireServiceImpl"},
"bossInterviewRegularWorker": {"name": "转正申请", "key": "com.skyeye.regularworker.service.impl.RegularWorkerServiceImpl"},
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册