From 2d797de95ff136cb9750db6e6c12acb701c7badb Mon Sep 17 00:00:00 2001 From: weizhiqiang <598748873@qq.com> Date: Sun, 5 May 2024 21:10:52 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20IFS=E6=96=B0=E5=A2=9E=E5=80=9F=E6=AC=BE?= =?UTF-8?q?=E5=8D=95=EF=BC=8C=E8=BF=98=E6=AC=BE=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../template/js/loan/loanBorrowList.js | 169 ++++++++++++++++++ .../template/js/loan/loanRepayList.js | 169 ++++++++++++++++++ .../template/tpl/loan/loanBorrowList.html | 45 +++++ .../template/tpl/loan/loanRepayList.html | 45 +++++ .../template/json/sysServiceMation.json | 2 + 5 files changed, 430 insertions(+) create mode 100644 ifs/src/main/resources/template/js/loan/loanBorrowList.js create mode 100644 ifs/src/main/resources/template/js/loan/loanRepayList.js create mode 100644 ifs/src/main/resources/template/tpl/loan/loanBorrowList.html create mode 100644 ifs/src/main/resources/template/tpl/loan/loanRepayList.html diff --git a/ifs/src/main/resources/template/js/loan/loanBorrowList.js b/ifs/src/main/resources/template/js/loan/loanBorrowList.js new file mode 100644 index 000000000..cc470ce71 --- /dev/null +++ b/ifs/src/main/resources/template/js/loan/loanBorrowList.js @@ -0,0 +1,169 @@ + +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 '' + d.oddNumber + ''; + }}, + { 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 '' + getNotUndefinedVal(d.processInstanceId) + ''; + }}, + { 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', {}); +}); diff --git a/ifs/src/main/resources/template/js/loan/loanRepayList.js b/ifs/src/main/resources/template/js/loan/loanRepayList.js new file mode 100644 index 000000000..108a5ee8e --- /dev/null +++ b/ifs/src/main/resources/template/js/loan/loanRepayList.js @@ -0,0 +1,169 @@ + +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 '' + d.oddNumber + ''; + }}, + { 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 '' + getNotUndefinedVal(d.processInstanceId) + ''; + }}, + { 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', {}); +}); diff --git a/ifs/src/main/resources/template/tpl/loan/loanBorrowList.html b/ifs/src/main/resources/template/tpl/loan/loanBorrowList.html new file mode 100644 index 000000000..23539c782 --- /dev/null +++ b/ifs/src/main/resources/template/tpl/loan/loanBorrowList.html @@ -0,0 +1,45 @@ + + +
+ +