From d6b0a03c4e94eaf545dede35788445d5fc1002db Mon Sep 17 00:00:00 2001
From: weizhiqiang <598748873@qq.com>
Date: Thu, 2 May 2024 22:40:34 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9E=E5=AE=A2=E6=88=B7?=
=?UTF-8?q?=E5=9B=9E=E6=AC=BE=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../js/payment/crmPaymentCollectionList.js | 208 ++++++++++++++++++
.../tpl/payment/crmPaymentCollectionList.html | 25 +++
.../template/json/skyeyeClassEnum.json | 1 +
3 files changed, 234 insertions(+)
create mode 100644 crm/src/main/resources/template/js/payment/crmPaymentCollectionList.js
create mode 100644 crm/src/main/resources/template/tpl/payment/crmPaymentCollectionList.html
diff --git a/crm/src/main/resources/template/js/payment/crmPaymentCollectionList.js b/crm/src/main/resources/template/js/payment/crmPaymentCollectionList.js
new file mode 100644
index 000000000..5d1e77c57
--- /dev/null
+++ b/crm/src/main/resources/template/js/payment/crmPaymentCollectionList.js
@@ -0,0 +1,208 @@
+
+var objectKey = "";
+var objectId = "";
+
+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;
+ objectKey = GetUrlParam("objectKey");
+ objectId = GetUrlParam("objectId");
+ if (isNull(objectKey) || isNull(objectId)) {
+ winui.window.msg("请传入适用对象信息", {icon: 2, time: 2000});
+ return false;
+ }
+
+ var authPermission = teamObjectPermissionUtil.checkTeamBusinessAuthPermission(objectId, 'crmPaymentCollectionAuthEnum');
+
+ table.render({
+ id: 'messageTable',
+ elem: '#messageTable',
+ method: 'post',
+ url: sysMainMation.crmBasePath + 'queryPaymentCollectionList',
+ where: getTableParams(),
+ even: true,
+ page: true,
+ limits: getLimits(),
+ limit: getLimit(),
+ cols: [[
+ { title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' },
+ { field: 'oddNumber', title: '单据编号', align: 'center', width: 150, templet: function (d) {
+ return '' + d.title + '';
+ }},
+ { field: 'price', title: '回款金额(元)', width: 120 },
+ { field: 'collectionTime', title: '回款日期', align: 'center', width: 100 },
+ { field: 'processInstanceId', title: '流程ID', align: 'center', width: 100, templet: function (d) {
+ return '' + d.processInstanceId + '';
+ }},
+ { field: 'typeId', title: '回款方式', width: 120, templet: function (d) {
+ return sysDictDataUtil.getDictDataNameByCodeAndKey('PAYMENT_COLLECTION_TYPE', d.typeId);
+ }},
+ { field: 'state', title: '状态', width: 90, templet: function (d) {
+ return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("crmContractStateEnum", 'id', d.state, 'name');
+ }},
+ { field: 'createName', title: systemLanguage["com.skyeye.createName"][languageType], align: 'left', 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: 250, templet: function (d) {
+ var str = '';
+ if (d.editRow == 1) {
+ if (authPermission['submitToApproval']) {
+ str += '提交审批';
+ }
+ if (authPermission['edit']) {
+ str += '';
+ }
+ if (authPermission['delete']) {
+ str += '删除';
+ }
+ if (authPermission['invalid']) {
+ str += '作废';
+ }
+ }
+ if (d.editRow == 2 && d.state == 'inExamine') {
+ if (authPermission['revoke']) {
+ str += '撤销';
+ }
+ }
+ return str;
+ }}
+ ]],
+ done: function(json) {
+ matchingLanguage();
+ initTableSearchUtil.initAdvancedSearch(this, json.searchFilter, form, "请输入单据编号", function () {
+ table.reloadData("messageTable", {page: {curr: 1}, where: getTableParams()});
+ });
+ }
+ });
+
+ table.on('tool(messageTable)', function (obj) {
+ var data = obj.data;
+ var layEvent = obj.event;
+ if (layEvent === 'edit') { //编辑
+ edit(data);
+ } else if (layEvent === 'details'){ //详情
+ details(data);
+ } else if (layEvent === 'processDetails') { //流程详情
+ activitiUtil.activitiDetails(data);
+ } else if (layEvent === 'subApproval') { //提交审批
+ subApproval(data);
+ } else if (layEvent === 'del') { //删除
+ del(data);
+ } else if (layEvent === 'cancellation') { //作废
+ cancellation(data);
+ } else if (layEvent === 'revoke') { //撤销
+ revoke(data);
+ }
+ });
+
+ // 新增
+ $("body").on("click", "#addBean", function() {
+ parent._openNewWindows({
+ url: systemCommonUtil.getUrl('FP2024050200004&objectId=' + objectId + '&objectKey=' + objectKey, null),
+ title: systemLanguage["com.skyeye.addPageTitle"][languageType],
+ pageId: "crmContractAdd",
+ area: ['90vw', '90vh'],
+ callBack: function (refreshCode) {
+ winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
+ loadTable();
+ }});
+ });
+
+ // 编辑
+ function edit(data) {
+ parent._openNewWindows({
+ url: systemCommonUtil.getUrl('FP2024050200005&objectId=' + objectId + '&objectKey=' + objectKey + '&id=' + data.id, null),
+ title: systemLanguage["com.skyeye.editPageTitle"][languageType],
+ pageId: "crmContractEdit",
+ area: ['90vw', '90vh'],
+ callBack: function (refreshCode) {
+ winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
+ loadTable();
+ }});
+ }
+
+ // 详情
+ function details(data) {
+ parent._openNewWindows({
+ url: systemCommonUtil.getUrl('FP2024050200006&objectId=' + objectId + '&objectKey=' + objectKey + '&id=' + data.id, null),
+ title: systemLanguage["com.skyeye.detailsPageTitle"][languageType],
+ pageId: "crmContractDetails",
+ area: ['90vw', '90vh'],
+ callBack: function (refreshCode) {
+ }});
+ }
+
+ // 提交审批
+ function subApproval(data) {
+ layer.confirm(systemLanguage["com.skyeye.approvalOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.approvalOperation"][languageType]}, function (index) {
+ layer.close(index);
+ activitiUtil.startProcess(data.serviceClassName, null, function (approvalId) {
+ var params = {
+ id: data.id,
+ approvalId: approvalId
+ };
+ AjaxPostUtil.request({url: sysMainMation.crmBasePath + "submitPaymentCollectionToApproval", params: params, type: 'json', method: 'POST', callback: function (json) {
+ winui.window.msg("提交成功", {icon: 1, time: 2000});
+ loadTable();
+ }});
+ });
+ });
+ }
+
+ // 删除
+ function del(data, obj) {
+ layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function (index) {
+ layer.close(index);
+ AjaxPostUtil.request({url: sysMainMation.crmBasePath + "deletePaymentCollectionById", 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 cancellation(data, obj) {
+ var msg = '确认作废该条数据吗?';
+ layer.confirm(msg, { icon: 3, title: '作废操作' }, function (index) {
+ layer.close(index);
+ AjaxPostUtil.request({url: sysMainMation.crmBasePath + "invalidPaymentCollection", params: {id: data.id}, type: 'json', method: 'POST', callback: function (json) {
+ winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
+ loadTable();
+ }});
+ });
+ }
+
+ // 撤销
+ function revoke(data) {
+ var msg = '确认撤销该合同吗?';
+ layer.confirm(msg, { icon: 3, title: '撤销申请提交' }, function (index) {
+ layer.close(index);
+ AjaxPostUtil.request({url: sysMainMation.crmBasePath + "revokePaymentCollection", params: {processInstanceId: data.processInstanceId}, type: 'json', method: 'PUT', 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 getTableParams() {
+ return $.extend(true, {objectKey: objectKey, objectId: objectId}, initTableSearchUtil.getSearchValue("messageTable"));
+ }
+
+ exports('crmPaymentCollectionList', {});
+});
\ No newline at end of file
diff --git a/crm/src/main/resources/template/tpl/payment/crmPaymentCollectionList.html b/crm/src/main/resources/template/tpl/payment/crmPaymentCollectionList.html
new file mode 100644
index 000000000..80b75667a
--- /dev/null
+++ b/crm/src/main/resources/template/tpl/payment/crmPaymentCollectionList.html
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/web/src/main/resources/template/json/skyeyeClassEnum.json b/web/src/main/resources/template/json/skyeyeClassEnum.json
index 9666526cf..826a91a75 100644
--- a/web/src/main/resources/template/json/skyeyeClassEnum.json
+++ b/web/src/main/resources/template/json/skyeyeClassEnum.json
@@ -89,6 +89,7 @@
"crmOpportunityAuthEnum": {"name": "商机权限", "className": "skyeye-crm#com.skyeye.opportunity.classenum.CrmOpportunityAuthEnum", "pageUrl": "../../tpl/crmOpportunity/crmOpportunityList.html"},
"crmDocumentaryAuthEnum": {"name": "跟单权限", "className": "skyeye-crm#com.skyeye.documentary.classenum.CrmDocumentaryAuthEnum", "pageUrl": "../../tpl/documentary/crmDocumentaryList.html"},
"crmFollowUpAuthEnum": {"name": "回访权限", "className": "skyeye-crm#com.skyeye.follow.classenum.CrmFollowUpAuthEnum", "pageUrl": "../../tpl/follow/crmFollowList.html"},
+ "crmPaymentCollectionAuthEnum": {"name": "回款权限", "className": "skyeye-crm#com.skyeye.payment.classenum.CrmPaymentCollectionAuthEnum", "pageUrl": "../../tpl/payment/crmPaymentCollectionList.html"},
"accountSubjectType": {"name": "会计科目类型", "className": "skyeye-ifs#com.skyeye.subject.classenum.AccountSubjectType"},
"amountDirection": {"name": "余额方向", "className": "skyeye-ifs#com.skyeye.subject.classenum.AmountDirection"},
--
GitLab