From bc1b775f7abed46c50cfdf39a1f240914422f57e Mon Sep 17 00:00:00 2001 From: "huangcaiyun." <14141603+huangcaiyunyun@user.noreply.gitee.com> Date: Sat, 27 Jul 2024 10:16:33 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E8=BD=A6=E9=97=B4=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E8=BD=AC=E5=B7=A5=E5=BA=8F=E9=AA=8C=E6=94=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../machiningWarehouseList.js | 206 ++++++++++++++++++ .../machiningWarehouseCheck.js | 50 +++++ .../js/workshopTasks/workshopTasksList.js | 51 +++-- .../machiningWarehouseList.html | 44 ++++ .../machiningProcessCheck.html | 29 +++ .../tpl/workshopTasks/workshopTasksList.html | 69 +++--- 6 files changed, 395 insertions(+), 54 deletions(-) create mode 100644 erp-produce/src/main/resources/template/js/machiningWarehouse/machiningWarehouseList.js create mode 100644 erp-produce/src/main/resources/template/js/processAcceptance/machiningWarehouseCheck.js create mode 100644 erp-produce/src/main/resources/template/tpl/machiningWarehouse/machiningWarehouseList.html create mode 100644 erp-produce/src/main/resources/template/tpl/processAcceptance/machiningProcessCheck.html diff --git a/erp-produce/src/main/resources/template/js/machiningWarehouse/machiningWarehouseList.js b/erp-produce/src/main/resources/template/js/machiningWarehouse/machiningWarehouseList.js new file mode 100644 index 000000000..b8d1943ba --- /dev/null +++ b/erp-produce/src/main/resources/template/js/machiningWarehouse/machiningWarehouseList.js @@ -0,0 +1,206 @@ + +var rowId = ""; + +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["wholeOut"]["key"]; + + // 新增 + authBtn('1720835673573'); + + table.render({ + id: 'messageTable', + elem: '#messageTable', + method: 'post', + url: sysMainMation.erpBasePath + 'queryWholeOrderOutList', + where: getTableParams(), + even: true, + page: true, + limits: getLimits(), + limit: getLimit(), + cols: [[ + { title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers', rowspan: '2' }, + { field: 'oddNumber', title: '单号', rowspan: '2', width: 200, align: 'center', templet: function (d) { + var str = '' + d.oddNumber + ''; + if (!isNull(d.fromId)) { + str += '[转]'; + } + return str; + }}, + { field: 'operTime', title: '单据日期', rowspan: '2', align: 'center', width: 140 }, + { colspan: '2', title: '来源单据信息', align: 'center' }, + { field: 'holderMation', title: '供应商', rowspan: '2', align: 'center', width: 150, templet: function (d) { + return getNotUndefinedVal(d.holderMation?.name); + }}, + { field: 'totalPrice', title: '总金额', rowspan: '2', align: 'center', width: 140 }, + { field: 'processInstanceId', title: '流程ID', rowspan: '2', width: 100, templet: function (d) { + return '' + getNotUndefinedVal(d.processInstanceId) + ''; + }}, + { field: 'state', title: '状态', rowspan: '2', width: 90, templet: function (d) { + return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("erpOrderStateEnum", 'id', d.state, 'name'); + }}, + { field: 'otherState', title: '到货状态', rowspan: '2', width: 150, templet: function (d) { + return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("orderArrivalState", 'id', d.otherState, 'name'); + }}, + { field: 'qualityInspection', title: '质检状态', rowspan: '2', width: 150, templet: function (d) { + return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("orderQualityInspectionType", 'id', d.qualityInspection, 'name'); + }}, + { field: 'createName', title: systemLanguage["com.skyeye.createName"][languageType], rowspan: '2', width: 120 }, + { field: 'createTime', title: systemLanguage["com.skyeye.createTime"][languageType], rowspan: '2', align: 'center', width: 150 }, + { field: 'lastUpdateName', title: systemLanguage["com.skyeye.lastUpdateName"][languageType], rowspan: '2', align: 'left', width: 120 }, + { field: 'lastUpdateTime', title: systemLanguage["com.skyeye.lastUpdateTime"][languageType], rowspan: '2', align: 'center', width: 150 }, + { title: systemLanguage["com.skyeye.operation"][languageType], rowspan: '2', fixed: 'right', align: 'center', width: 200, toolbar: '#tableBar'} + ], [ + { field: 'fromTypeId', title: '来源类型', width: 150, templet: function (d) { + return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("wholeOrderOutFromType", 'id', d.fromTypeId, 'name'); + }}, + { field: 'fromId', title: '单据编号', width: 200, templet: function (d) { + return getNotUndefinedVal(d.fromMation?.oddNumber); + }} + ]], + 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') { //删除 + erpOrderUtil.deleteOrderMation(data.id, serviceClassName, function() { + loadTable(); + }); + } else if (layEvent === 'details') { //详情 + details(data); + } else if (layEvent === 'edit') { //编辑 + edit(data); + } else if (layEvent === 'subApproval') { //提交审核 + erpOrderUtil.submitOrderMation(data.id, serviceClassName, function() { + loadTable(); + }); + } else if (layEvent === 'processDetails') { // 工作流流程详情查看 + activitiUtil.activitiDetails(data); + } else if (layEvent === 'revoke') { //撤销 + erpOrderUtil.revokeOrderMation(data.processInstanceId, serviceClassName, function() { + loadTable(); + }); + }else if (layEvent === 'wholeOutToPut') { //转采购入库单 + wholeOutToPut(data); + } else if (layEvent === 'wholeOutToArrival') { //转到货单 + wholeOutToArrival(data); + }else if (layEvent === 'wholeOutToReturn') { //转采购退货单 + wholeOutToReturn(data); + } + }); + + // 转采购入库 + function wholeOutToPut(data) { + _openNewWindows({ + url: "../../tpl/wholeOut/wholeOutToPut.html?id=" + data.id, + title: "转采购入库", + pageId: "wholeOutToPut", + area: ['90vw', '90vh'], + callBack: function (refreshCode) { + winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000}); + loadTable(); + }}); + } + //转到货单 + function wholeOutToArrival(data){ + _openNewWindows({ + url: "../../tpl/wholeOut/wholeOutToArrival.html?id=" + data.id, + title: '转到货单', + pageId: "wholeOutToArrival", + area: ['90vw', '90vh'], + callBack: function (refreshCode) { + winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000}); + loadTable(); + }}); + } + + //转采购退货 + function wholeOutToReturn(data){ + _openNewWindows({ + url: "../../tpl/wholeOut/wholeOutToReturn.html?id=" + data.id, + title: '转采购退货', + pageId: "wholeOutToReturn", + area: ['90vw', '90vh'], + callBack: function (refreshCode) { + winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000}); + loadTable(); + }}); + } + + // 新增 + $("body").on("click", "#addBean", function() { + _openNewWindows({ + url: systemCommonUtil.getUrl('FP2024071300002', null), + title: systemLanguage["com.skyeye.addPageTitle"][languageType], + pageId: "wholeOutAdd", + 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('FP2024071300003&id=' + data.id, null), + title: systemLanguage["com.skyeye.editPageTitle"][languageType], + pageId: "wholeOutEdit", + 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('FP2024071300004&id=' + data.id, null), + title: systemLanguage["com.skyeye.detailsPageTitle"][languageType], + pageId: "wholeOutDetail", + area: ['90vw', '90vh'], + callBack: function (refreshCode) { + }}); + } + + // 删除 + 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.erpBasePath + "erpcommon005", params: {id: data.id}, type: 'json', method: 'DELETE', callback: function (json) { + winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {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('wholeOutList', {}); +}); diff --git a/erp-produce/src/main/resources/template/js/processAcceptance/machiningWarehouseCheck.js b/erp-produce/src/main/resources/template/js/processAcceptance/machiningWarehouseCheck.js new file mode 100644 index 000000000..9a094fcbe --- /dev/null +++ b/erp-produce/src/main/resources/template/js/processAcceptance/machiningWarehouseCheck.js @@ -0,0 +1,50 @@ + +// 以下两个参数开启团队权限时有值 只是复制过来了 +var objectId = '', objectKey = ''; +// 根据以下两个参数判断:工作流的判断是否要根据serviceClassName的判断 +var serviceClassName; + +layui.config({ + base: basePath, + version: skyeyeVersion +}).extend({ + window: 'js/winui.window' +}).define(['window', 'table', 'jquery'], function (exports) { + winui.renderColor(); + var index = parent.layer.getFrameIndex(window.name); + var $ = layui.$; + var id = GetUrlParam("id"); + + // 工序验收 + // 工序验收的【编辑布局】 + dsFormUtil.initEditPageForStatic('content', 'FP2024071500001', {}, { + savePreParams: function (params) { + }, + saveData: function (params) { + // 保存数据 + AjaxPostUtil.request({url: sysMainMation.erpBasePath + "writeMachinProcedureAccept", params: params, type: 'json', method: "POST", callback: function(json) { + parent.layer.close(index); + parent.refreshCode = '0'; + }}); + }, + // loadComponentCallback: function () { + // $("div[controlType='supplier']").remove(); + // $("div[controlType='purchaseDeliveryFromType']").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(".qualityInspection").prop('disabled', true); + // $("div[controlType='simpleTable']").find(".taxLastinspectionRatio").prop('disabled', true); + // + // } + }); + +}); \ No newline at end of file diff --git a/erp-produce/src/main/resources/template/js/workshopTasks/workshopTasksList.js b/erp-produce/src/main/resources/template/js/workshopTasks/workshopTasksList.js index 07d74f42b..e1730d322 100644 --- a/erp-produce/src/main/resources/template/js/workshopTasks/workshopTasksList.js +++ b/erp-produce/src/main/resources/template/js/workshopTasks/workshopTasksList.js @@ -38,15 +38,9 @@ layui.config({ limits: getLimits(), limit: getLimit(), cols: [[ - // {field: 'processInstanceId', title: '流程ID', width: 100, templet: function (d) { - // return '' + getNotUndefinedVal(d.processInstanceId) + ''; - // }}, { title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' }, - { field: 'machinProcedureId', title: '车间ID',width: 280, templet: function (d) { - return '' + getNotUndefinedVal(d.machinProcedureId) + ''; - }}, - { field: 'processInstanceId', title: '流程ID', width: 280, templet: function (d) { - return '' + getNotUndefinedVal(d.id) + ''; + { field: 'id', title: '车间任务ID',width: 280, templet: function (d) { + return '' + getNotUndefinedVal(d.id) + ''; }}, { field: 'state', title: '状态', width: 90, templet: function (d) { return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("machinProcedureFarmState", 'id', d.state, 'name'); @@ -64,20 +58,10 @@ layui.config({ { field: 'actualEndTime', title: '实际结束时间', align: 'center', width: 140, templet: function (d) { return getNotUndefinedVal(d.machinProcedureMation?.actualEndTime); }}, - // {field: 'operTime', title: '单据日期', align: 'center', width: 140, templet: function (d) { - // return getNotUndefinedVal(d.departmentMation?.createTime); - // }}, { field: 'createTime', title: '创建时间', align: 'center', width: 140, templet: function (d) { return getNotUndefinedVal(d.machinMation?.createTime); }}, - // {field: 'otherState', title: '出库状态', rowspan: '2', width: 90, templet: function (d) { - // return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("outLetState", 'id', d.otherState, '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], rowspan: '2', fixed: 'right', align: 'center', width: 200, toolbar: '#tableBar' } ]], done: function (json) { @@ -96,13 +80,16 @@ layui.config({ receive(data); } else if (layEvent === 'antiReception') { //反接收 antiReception(data); + }else if (layEvent === 'details') { //详情 + details(data); + }else if (layEvent === 'processCheck') { //转工序验收 + processCheck(data); } }); // 接收 function receive(data) { layer.confirm('确认要接收该车间任务吗?', { icon: 3, title: '接收任务操作' }, function (index) { - activitiUtil.startProcess(data.serviceClassName, null, function (approvalId) { var params = { id: data.id, }; @@ -110,13 +97,11 @@ layui.config({ winui.window.msg("接收成功", {icon: 1, time: 2000}); loadTable(); }}); - }); }); } function antiReception(data) { layer.confirm('确认要反接收该车间任务吗?', { icon: 3, title: '反接收任务操作' }, function (index) { - activitiUtil.startProcess(data.serviceClassName, null, function (approvalId) { var params = { id: data.id, }; @@ -124,10 +109,32 @@ layui.config({ winui.window.msg("反接收成功", {icon: 1, time: 2000}); loadTable(); }}); - }); }); } + // 详情 + function details(data) { + _openNewWindows({ + url: systemCommonUtil.getUrl('FP2024072600001&id=' + data.id, null), + title: systemLanguage["com.skyeye.detailsPageTitle"][languageType], + pageId: "workTaskDetail", + area: ['90vw', '90vh'], + callBack: function (refreshCode) { + }}); + } + + //工序验收 + function processCheck(data){ + _openNewWindows({ + url: "../../tpl/processAcceptance/machiningProcessCheck.html?id=" + data.id, + title: '工序验收', + pageId: "machiningProcessCheck", + area: ['90vw', '90vh'], + callBack: function (refreshCode) { + winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000}); + loadTable(); + }}); + } form.render(); $("body").on("click", "#reloadTable", function() { diff --git a/erp-produce/src/main/resources/template/tpl/machiningWarehouse/machiningWarehouseList.html b/erp-produce/src/main/resources/template/tpl/machiningWarehouse/machiningWarehouseList.html new file mode 100644 index 000000000..7755bf0fc --- /dev/null +++ b/erp-produce/src/main/resources/template/tpl/machiningWarehouse/machiningWarehouseList.html @@ -0,0 +1,44 @@ + + +
+ +