From 90cda5daf524b72d63fe0ba08233506cbce80c78 Mon Sep 17 00:00:00 2001 From: "LAPTOP-UV1MNL38\\18023" <1802330370@qq.com> Date: Thu, 18 Jul 2024 09:30:33 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E7=94=9F=E4=BA=A7=E8=AE=A1=E5=88=92?= =?UTF-8?q?=E8=BD=AC=E6=95=B4=E5=8D=95=E5=A7=94=E5=A4=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wholeOut/productionPlanToOutsourcing.js | 27 ++++---- .../template/js/wholeOut/wholeOutList.js | 61 +++++-------------- .../template/json/sysServiceMation.json | 1 + 3 files changed, 27 insertions(+), 62 deletions(-) diff --git a/erp-produce/src/main/resources/template/js/wholeOut/productionPlanToOutsourcing.js b/erp-produce/src/main/resources/template/js/wholeOut/productionPlanToOutsourcing.js index a08976932..13a1b1d91 100644 --- a/erp-produce/src/main/resources/template/js/wholeOut/productionPlanToOutsourcing.js +++ b/erp-produce/src/main/resources/template/js/wholeOut/productionPlanToOutsourcing.js @@ -14,39 +14,34 @@ layui.config({ var index = parent.layer.getFrameIndex(window.name); var $ = layui.$; var id = GetUrlParam("id"); + var serviceClassName = sysServiceMation["materialReceiptForm"]["key"]; // 生产计划转整单委外 - AjaxPostUtil.request({url: sysMainMation.erpBasePath + "queryPatchOutLetTransById", params: {id: id}, type: 'json', method: 'GET', callback: function (json) { + AjaxPostUtil.request({url: sysMainMation.erpBasePath + "queryProductionTransWholeById", params: {id: id}, type: 'json', method: 'GET', callback: function (json) { let data = json.bean; - // 仓库出库的【编辑布局】 - dsFormUtil.initEditPageForStatic('content', 'FP2024070100006', data, { + data.erpOrderItemList=data.productionChildList + $.each(data.erpOrderItemList, function(index, item){ + item.unitPrice=item.normsMation.estimatePurchasePrice + item.taxRate=0 + }); + // 整单委外单的【编辑布局】 + dsFormUtil.initEditPageForStatic('content', 'FP2024071300003', data, { savePreParams: function (params) { - params.farmId=data.farmId - params.departmentId=data.departmentId - params.salesman=data.salesman }, saveData: function (params) { // 保存数据 - AjaxPostUtil.request({url: sysMainMation.erpBasePath + "insertPatchOutLetToTurnDepot", params: params, type: 'json', method: "POST", callback: function(json) { + AjaxPostUtil.request({url: sysMainMation.erpBasePath + "insertProductionToWhole", params: params, type: 'json', method: "POST", callback: function(json) { parent.layer.close(index); parent.refreshCode = '0'; }}); }, loadComponentCallback: function () { - $("div[controlType='correspondentAllEnter']").remove(); - $("div[controlType='depotOutFromType']").remove(); + $("div[controlType='wholeOrderOutFromType']").remove(); }, tableAddRowCallback: function (tableId) { $("#addRow" + tableId).remove(); - $("div[controlType='simpleTable']").find(".unitPrice").prop('disabled', true); - $("div[controlType='simpleTable']").find(".amountOfMoney").prop('disabled', true); - $("div[controlType='simpleTable']").find(".taxRate").prop('disabled', true); - $("div[controlType='simpleTable']").find(".taxMoney").prop('disabled', true); - $("div[controlType='simpleTable']").find(".taxUnitPrice").prop('disabled', true); - $("div[controlType='simpleTable']").find(".taxLastMoney").prop('disabled', true); $("div[controlType='simpleTable']").find(".chooseProductBtn").prop('disabled', true); $("div[controlType='simpleTable']").find(".normsId").prop('disabled', true); - $("div[controlType='simpleTable']").find(".warehouse").prop('disabled', true); } }); }}); diff --git a/erp-produce/src/main/resources/template/js/wholeOut/wholeOutList.js b/erp-produce/src/main/resources/template/js/wholeOut/wholeOutList.js index f7dd956d3..522c533ef 100644 --- a/erp-produce/src/main/resources/template/js/wholeOut/wholeOutList.js +++ b/erp-produce/src/main/resources/template/js/wholeOut/wholeOutList.js @@ -11,6 +11,7 @@ layui.config({ var $ = layui.$, form = layui.form, table = layui.table; + var serviceClassName = sysServiceMation["wholeOut"]["key"]; // 新增 authBtn('1720835673573'); @@ -34,16 +35,6 @@ layui.config({ } return str; }}, - // { field: 'department', width: 150, title: '部门', align: 'center'}, - // // { field: 'farmId', width: 150, title: '车间', align: 'center'}, - // - // { field: 'farmId', title: '车间', align: 'left', width: 150, templet: function (d) { - // if (!isNull(d.farmMation)) { - // return d.farmMation.name; - // } - // return ''; - // }}, - // { field: 'operTime', width: 150, title: '单据日期', align: 'center'}, { field: 'totalPrice', title: '合计金额', rowspan: '2', align: 'center', width: 120 }, { field: 'holderMation', title: '客户', rowspan: '2', align: 'center', width: 150, templet: function (d) { @@ -71,17 +62,23 @@ layui.config({ var data = obj.data; var layEvent = obj.event; if (layEvent === 'delete') { //删除 - del(data, obj); - } else if (layEvent === 'edit') { //编辑 - edit(data); + erpOrderUtil.deleteOrderMation(data.id, serviceClassName, function() { + loadTable(); + }); } else if (layEvent === 'details') { //详情 details(data); + } else if (layEvent === 'edit') { //编辑 + edit(data); } else if (layEvent === 'subApproval') { //提交审核 - subApproval(data); + erpOrderUtil.submitOrderMation(data.id, serviceClassName, function() { + loadTable(); + }); } else if (layEvent === 'processDetails') { // 工作流流程详情查看 activitiUtil.activitiDetails(data); } else if (layEvent === 'revoke') { //撤销 - revoke(data); + erpOrderUtil.revokeOrderMation(data.processInstanceId, serviceClassName, function() { + loadTable(); + }); } }); @@ -90,7 +87,7 @@ layui.config({ _openNewWindows({ url: systemCommonUtil.getUrl('FP2024071300002', null), title: systemLanguage["com.skyeye.addPageTitle"][languageType], - pageId: "erpProductionAdd", + pageId: "wholeOutAdd", area: ['90vw', '90vh'], callBack: function (refreshCode) { winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000}); @@ -103,7 +100,7 @@ layui.config({ _openNewWindows({ url: systemCommonUtil.getUrl('FP2024071300003&id=' + data.id, null), title: systemLanguage["com.skyeye.editPageTitle"][languageType], - pageId: "erpProductionEdit", + pageId: "wholeOutEdit", area: ['90vw', '90vh'], callBack: function (refreshCode) { winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000}); @@ -116,7 +113,7 @@ layui.config({ _openNewWindows({ url: systemCommonUtil.getUrl('FP2024071300004&id=' + data.id, null), title: systemLanguage["com.skyeye.detailsPageTitle"][languageType], - pageId: "erpProductionDetail", + pageId: "wholeOutDetail", area: ['90vw', '90vh'], callBack: function (refreshCode) { }}); @@ -133,34 +130,6 @@ layui.config({ }); } - // 提交审批 - 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.erpBasePath + "erpcommon006", params: params, type: 'json', method: 'POST', callback: function (json) { - winui.window.msg("提交成功", {icon: 1, time: 2000}); - loadTable(); - }}); - }); - }); - } - - // 撤销 - function revoke(data) { - layer.confirm('确认撤销该申请吗?', { icon: 3, title: '撤销操作' }, function (index) { - layer.close(index); - AjaxPostUtil.request({url: sysMainMation.erpBasePath + "erpcommon003", 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(); diff --git a/web/src/main/resources/template/json/sysServiceMation.json b/web/src/main/resources/template/json/sysServiceMation.json index 3e30310e6..6551f66ff 100644 --- a/web/src/main/resources/template/json/sysServiceMation.json +++ b/web/src/main/resources/template/json/sysServiceMation.json @@ -30,6 +30,7 @@ "returnMaterialPutList": {"name": "退料入库单", "key": "com.skyeye.pick.service.impl.ReturnPutServiceImpl"}, "materialReceiptForm": {"name": "物料接收单", "key": "com.skyeye.pickconfirm.service.impl.ConfirmPutServiceImpl"}, "materialReturnOrder": {"name": "物料退货单", "key": "com.skyeye.pickconfirm.service.impl.ConfirmReturnServiceImpl"}, + "wholeOut": {"name": "整单委外单", "key": "com.skyeye.whole.service.impl.WholeOrderOutServiceImpl"}, "proworkLoad": {"name": "项目工作量审核", "key": "com.skyeye.service.impl.ProWorkloadServiceImpl"}, "proTask": {"name": "项目任务审核", "key": "com.skyeye.service.impl.ProTaskServiceImpl"}, -- GitLab