diff --git a/erp/src/main/resources/template/js/purchaseRequest/purchaseRequestList.js b/erp/src/main/resources/template/js/purchaseRequest/purchaseRequestList.js new file mode 100644 index 0000000000000000000000000000000000000000..b7fbca26dceac5f79d12a950c10483aaef16624c --- /dev/null +++ b/erp/src/main/resources/template/js/purchaseRequest/purchaseRequestList.js @@ -0,0 +1,166 @@ + +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["purchaseRequest"]["key"]; + authBtn('1716519960380');//新增 + + table.render({ + id: 'messageTable', + elem: '#messageTable', + method: 'post', + url: sysMainMation.erpBasePath + 'queryPurchaseRequestList', + where: getTableParams(), + even: true, + page: true, + limits: getLimits(), + limit: getLimit(), + cols: [[ + { title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' }, + { field: 'oddNumber', title: '单号', width: 200, align: 'center', templet: function (d) { + return '' + d.oddNumber + ''; + }}, + { field: 'processInstanceId', title: '流程ID', width: 100, templet: function (d) { + return '' + getNotUndefinedVal(d.processInstanceId) + ''; + }}, + { field: 'title', title: '单据主题', align: 'left', width: 120 }, + { field: 'fromTypeId', title: '单据来源', width: 90, templet: function (d) { + return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("PurchaseRequestFromType", 'id', d.fromTypeId, 'name'); + }}, + { field: 'totalPrice', title: '合计金额', align: 'left', width: 120 }, + { field: 'operTime', title: '单据日期', align: 'center', width: 140 }, + { field: 'inquiryState', title: '询价状态', width: 90, templet: function (d) { + return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("PurchaseRequestInquiryState", 'id', d.inquiryState, 'name'); + }}, + { field: 'state', title: '状态', width: 90, templet: function (d) { + return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("PurchaseRequestStateEnum", '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 () { + table.reloadData("messageTable", {page: {curr: 1}, where: getTableParams()}); + }); + } + }); + + table.on('tool(messageTable)', function (obj) { + var data = obj.data; + var layEvent = obj.event; + if (layEvent === 'delete') { //删除 + delet(data); + } else if (layEvent === 'details') { //详情 + details(data); + } else if (layEvent === 'edit') { //编辑 + edit(data); + } else if (layEvent === 'subApproval') { //提交审核 + subApproval(data); + } else if (layEvent === 'processDetails') { // 工作流流程详情查看 + activitiUtil.activitiDetails(data); + } else if (layEvent === 'revoke') { //撤销 + revoke(data); + } + }); + + // 添加 + $("body").on("click", "#addBean", function() { + _openNewWindows({ + url: systemCommonUtil.getUrl('FP2024052400001', null), + title: systemLanguage["com.skyeye.addPageTitle"][languageType], + pageId: "purchaseRequestAdd", + area: ['90vw', '90vh'], + callBack: function (refreshCode) { + winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000}); + loadTable(); + }}); + }); + + // 删除 + function delet(data) { + layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function (index) { + layer.close(index); + AjaxPostUtil.request({url: sysMainMation.erpBasePath + "deletePurchaseRequest", 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 edit(data) { + _openNewWindows({ + url: systemCommonUtil.getUrl('FP2024052400002&id=' + data.id, null), + title: systemLanguage["com.skyeye.editPageTitle"][languageType], + pageId: "purchaseRequestEdit", + 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('FP2024052400003&id=' + data.id, null), + title: systemLanguage["com.skyeye.detailsPageTitle"][languageType], + pageId: "purchaseRequestDetails", + area: ['90vw', '90vh'], + callBack: function (refreshCode) { + }}); + } + + // 撤销 + function revoke(data) { + layer.confirm('确认撤销该申请吗?', { icon: 3, title: '撤销操作' }, function (index) { + layer.close(index); + AjaxPostUtil.request({url: sysMainMation.erpBasePath + "revokePurchaseRequest", params: {processInstanceId: data.processInstanceId}, type: 'json', method: "PUT", callback: function (json) { + winui.window.msg("提交成功", {icon: 1, time: 2000}); + loadTable(); + }}); + }); + } + + // 提交审批 + 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(serviceClassName, null, function (approvalId) { + var params = { + id: data.id, + approvalId: approvalId + }; + AjaxPostUtil.request({url: sysMainMation.erpBasePath + "submitPurchaseRequestToApproval", params: params, type: 'json', method: "POST", 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, {}, initTableSearchUtil.getSearchValue("messageTable")); + } + + exports('purchaseRequestList', {}); +}); diff --git a/erp/src/main/resources/template/tpl/purchaseRequest/purchaseRequestList.html b/erp/src/main/resources/template/tpl/purchaseRequest/purchaseRequestList.html new file mode 100644 index 0000000000000000000000000000000000000000..fa975144978d3df4309e9afa0ddd7f491df73b09 --- /dev/null +++ b/erp/src/main/resources/template/tpl/purchaseRequest/purchaseRequestList.html @@ -0,0 +1,48 @@ + + + + + + + + + +
+
+ + +
+
+
+
+ +
+ + + + + \ No newline at end of file diff --git a/web/src/main/resources/bootstrap.yml b/web/src/main/resources/bootstrap.yml index 71d0c0d53b73f9237104b99dd3d9db1b25cb2941..b5bd3942852949e2d5dc856463d7d6041a95deeb 100644 --- a/web/src/main/resources/bootstrap.yml +++ b/web/src/main/resources/bootstrap.yml @@ -10,9 +10,9 @@ spring: cloud: nacos: discovery: - server-addr: localhost:9000 # 配置服务注册nacos地址 + server-addr: 172.18.92.40:9000 # 配置服务注册nacos地址 config: # 指定nacos server的地址 - server-addr: localhost:9000 + server-addr: 172.18.92.40:9000 file-extension: yml namespace: dev \ 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 e0fce964f400aeec69a0d2ffdb2520436af501cf..56d2508d1f153603a050ea4c6b193f6dccd1f925 100644 --- a/web/src/main/resources/template/json/skyeyeClassEnum.json +++ b/web/src/main/resources/template/json/skyeyeClassEnum.json @@ -176,6 +176,10 @@ "className": "skyeye-wall#com.skyeye.certification.classenum.StateEnum", "filterKey": "id", "filterValue": "3,4" - } + }, + "PurchaseRequestChildInquiry": {"name": "ERP-申请单子单据明细是否询价", "className": "skyeye-erp#com.skyeye.request.classenum.PurchaseRequestChildInquiry"}, + "PurchaseRequestFromType": {"name": "ERP-采购申请单来源单据", "className": "skyeye-erp#com.skyeye.request.classenum.PurchaseRequestFromType"}, + "PurchaseRequestInquiryState": {"name": "ERP-采购申请单询价状态", "className": "skyeye-erp#com.skyeye.request.classenum.PurchaseRequestInquiryState"}, + "PurchaseRequestStateEnum": {"name": "ERP-采购申请状态", "className": "skyeye-erp#com.skyeye.request.classenum.PurchaseRequestStateEnum"} } \ No newline at end of file diff --git a/web/src/main/resources/template/json/sysServiceMation.json b/web/src/main/resources/template/json/sysServiceMation.json index e95e939dfd9986a56d052c7e566cf2987c845ca8..810addb8313e701ec816886679bb2a97981c7975 100644 --- a/web/src/main/resources/template/json/sysServiceMation.json +++ b/web/src/main/resources/template/json/sysServiceMation.json @@ -7,6 +7,7 @@ "outIsPurchaseReturns": {"name": "采购退货单申请", "key": "com.skyeye.purchase.service.impl.PurchaseReturnsServiceImpl"}, "putIsPurchase": {"name": "采购入库单申请", "key": "com.skyeye.purchase.service.impl.PurchasePutServiceImpl"}, "purchaseOrder": {"name": "采购订单申请", "key": "com.skyeye.purchase.service.impl.PurchaseOrderServiceImpl"}, + "purchaseRequest": {"name": "采购申请", "key": "com.skyeye.request.service.impl.PurchaseRequestServiceImpl"}, "putIsOthers": {"name": "其他入库单申请", "key": "com.skyeye.other.service.impl.OtherWareHousServiceImpl"}, "outIsOthers": {"name": "其他出库单申请", "key": "com.skyeye.other.service.impl.OtherOutLetsServiceImpl"}, "splitListOrder": {"name": "拆分订单", "key": "com.skyeye.other.service.impl.SplitListServiceImpl"},