diff --git a/erp-produce/src/main/resources/template/js/departmentMachining/departmentMachiningList.js b/erp-produce/src/main/resources/template/js/departmentMachining/departmentMachiningList.js index 5c153986848ce047ed5e6202d03c37d1ef60aff1..6d114e73682185423145e7fe697f60dd04daed10 100644 --- a/erp-produce/src/main/resources/template/js/departmentMachining/departmentMachiningList.js +++ b/erp-produce/src/main/resources/template/js/departmentMachining/departmentMachiningList.js @@ -36,9 +36,6 @@ layui.config({ return str; }}, { colspan: '2', title: '来源单据信息', align: 'center' }, - { field: 'departmentMation', title: '部门', rowspan: '2', align: 'left', width: 200, templet: function (d) { - return getNotUndefinedVal(d.departmentMation?.name); - }}, { field: 'processInstanceId', title: '流程ID', rowspan: '2', width: 280, templet: function (d) { return '' + getNotUndefinedVal(d.processInstanceId) + ''; }}, @@ -48,11 +45,14 @@ layui.config({ { field: 'pickState', rowspan: '2', title: '领料状态', align: 'left', width: 80, templet: function (d) { return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("machinPickStateEnum", 'id', d.pickState, 'name'); }}, + { field: 'departmentMation', title: '加工部门', rowspan: '2', align: 'left', width: 200, templet: function (d) { + return getNotUndefinedVal(d.departmentMation?.name); + }}, { field: 'createName', title: systemLanguage["com.skyeye.createName"][languageType], rowspan: '2',width: 180 }, { field: 'createTime', title: systemLanguage["com.skyeye.createTime"][languageType], align: 'center', rowspan: '2',width: 150 }, { field: 'lastUpdateName', title: systemLanguage["com.skyeye.lastUpdateName"][languageType], align: 'left', rowspan: '2',width: 180 }, { field: 'lastUpdateTime', title: systemLanguage["com.skyeye.lastUpdateTime"][languageType], align: 'center', rowspan: '2',width: 150 }, - { title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', rowspan: '2',width: 240, toolbar: '#tableBar'} + { title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', rowspan: '2',width: 300, toolbar: '#tableBar'} ],[ { field: 'fromTypeId', title: '来源类型', rowspan: '2',width: 150, templet: function (d) { return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("machinFromType", 'id', d.fromTypeId, 'name'); @@ -86,6 +86,12 @@ layui.config({ revoke(data); } else if (layEvent === 'gantt') { //甘特图 gantt(data); + }else if (layEvent === 'processingToMaterialRequisition') { //转领料单 + processingToMaterialRequisition(data); + } else if (layEvent === 'processingToSupplementMaterials') { //转补料单 + processingToSupplementMaterials(data); + } else if (layEvent === 'processingToReturnMaterials') { //转退料单 + processingToReturnMaterials(data); } }); @@ -116,6 +122,44 @@ layui.config({ }}); } + // 转领料单 + function processingToMaterialRequisition(data) { + _openNewWindows({ + url: "../../tpl/departmentMachining/processingToMaterialRequisition.html?id=" + data.id, + title: "转领料单", + pageId: "processingToMaterialRequisition", + area: ['90vw', '90vh'], + callBack: function (refreshCode) { + winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000}); + loadTable(); + }}); + } + //转补料单 + function processingToSupplementMaterials(data){ + _openNewWindows({ + url: "../../tpl/departmentMachining/processingToSupplementMaterials.html?id=" + data.id, + title: '转补料单', + pageId: "processingToSupplementMaterials", + area: ['90vw', '90vh'], + callBack: function (refreshCode) { + winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000}); + loadTable(); + }}); + } + + //转退料单 + function processingToReturnMaterials(data){ + _openNewWindows({ + url: "../../tpl/departmentMachining/processingToReturnMaterials.html?id=" + data.id, + title: '转退料单', + pageId: "processingToReturnMaterials", + area: ['90vw', '90vh'], + callBack: function (refreshCode) { + winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000}); + loadTable(); + }}); + } + // 编辑 function edit(data) { _openNewWindows({ diff --git a/erp-produce/src/main/resources/template/js/erpMachin/processingToMaterialRequisition.js b/erp-produce/src/main/resources/template/js/departmentMachining/processingToMaterialRequisition.js similarity index 79% rename from erp-produce/src/main/resources/template/js/erpMachin/processingToMaterialRequisition.js rename to erp-produce/src/main/resources/template/js/departmentMachining/processingToMaterialRequisition.js index 55deabd0f9b8082a6f50b11430c70d7149523e02..7b682d69c8d393fe6303643fb47cc3ba2b828c36 100644 --- a/erp-produce/src/main/resources/template/js/erpMachin/processingToMaterialRequisition.js +++ b/erp-produce/src/main/resources/template/js/departmentMachining/processingToMaterialRequisition.js @@ -18,7 +18,6 @@ layui.config({ // 加工单转领料单 AjaxPostUtil.request({url: sysMainMation.erpBasePath + "queryMachinTransRequestById", params: {id: id}, type: 'json', method: 'GET', callback: function (json) { let data = json.bean; - // data.pickChildList =data.machinChildList // 领料单的【编辑布局】 dsFormUtil.initEditPageForStatic('content', 'FP2023100500002', data, { savePreParams: function (params) { @@ -32,14 +31,9 @@ layui.config({ }, loadComponentCallback: function () { - // $("select[attrkey='departmentId']").prop('disabled', true); $("div[controlType='pickFromType']").remove(); }, tableAddRowCallback: function (tableId) { - // $("#addRow" + tableId).remove(); - // $("div[controlType='simpleTable']").find(".chooseProductBtn").prop('disabled', true); - // $("div[controlType='simpleTable']").find(".normsId").prop('disabled', true); - } }); }}); diff --git a/erp-produce/src/main/resources/template/js/erpMachin/processingToReturnMaterials.js b/erp-produce/src/main/resources/template/js/departmentMachining/processingToReturnMaterials.js similarity index 79% rename from erp-produce/src/main/resources/template/js/erpMachin/processingToReturnMaterials.js rename to erp-produce/src/main/resources/template/js/departmentMachining/processingToReturnMaterials.js index b29ef51225395d60e933f3914242b9577858b8e0..d9d82f5473d6fd4c46bcaf4cd630d08b7ccbeac3 100644 --- a/erp-produce/src/main/resources/template/js/erpMachin/processingToReturnMaterials.js +++ b/erp-produce/src/main/resources/template/js/departmentMachining/processingToReturnMaterials.js @@ -18,7 +18,6 @@ layui.config({ // 加工单转退料单 AjaxPostUtil.request({url: sysMainMation.erpBasePath + "queryMachinTransReturnById", params: {id: id}, type: 'json', method: 'GET', callback: function (json) { let data = json.bean; - // data.pickChildList =data.machinChildList // 退料单的【编辑布局】 dsFormUtil.initEditPageForStatic('content', 'FP2023100600006', data, { savePreParams: function (params) { @@ -32,13 +31,9 @@ layui.config({ }, loadComponentCallback: function () { - // $("select[attrkey='departmentId']").prop('disabled', true); $("div[controlType='pickFromType']").remove(); }, tableAddRowCallback: function (tableId) { - // $("#addRow" + tableId).remove(); - // $("div[controlType='simpleTable']").find(".chooseProductBtn").prop('disabled', true); - // $("div[controlType='simpleTable']").find(".normsId").prop('disabled', true); } }); diff --git a/erp-produce/src/main/resources/template/js/erpMachin/processingToSupplementMaterials.js b/erp-produce/src/main/resources/template/js/departmentMachining/processingToSupplementMaterials.js similarity index 79% rename from erp-produce/src/main/resources/template/js/erpMachin/processingToSupplementMaterials.js rename to erp-produce/src/main/resources/template/js/departmentMachining/processingToSupplementMaterials.js index 1d3f3436ef0e56e55e95244133c17437950f0019..dfca17fa63a90b412941dffb6a7a015e16dffbe5 100644 --- a/erp-produce/src/main/resources/template/js/erpMachin/processingToSupplementMaterials.js +++ b/erp-produce/src/main/resources/template/js/departmentMachining/processingToSupplementMaterials.js @@ -18,7 +18,6 @@ layui.config({ // 加工单转补料单 AjaxPostUtil.request({url: sysMainMation.erpBasePath + "queryMachinTransRequestById", params: {id: id}, type: 'json', method: 'GET', callback: function (json) { let data = json.bean; - // data.pickChildList =data.machinChildList // 领料的【编辑布局】 dsFormUtil.initEditPageForStatic('content', 'FP2023100600002', data, { savePreParams: function (params) { @@ -32,13 +31,9 @@ layui.config({ }, loadComponentCallback: function () { - // $("select[attrkey='departmentId']").prop('disabled', true); $("div[controlType='pickFromType']").remove(); }, tableAddRowCallback: function (tableId) { - // $("#addRow" + tableId).remove(); - // $("div[controlType='simpleTable']").find(".chooseProductBtn").prop('disabled', true); - // $("div[controlType='simpleTable']").find(".normsId").prop('disabled', true); } }); diff --git a/erp-produce/src/main/resources/template/js/erpMachin/erpDepartMachinList.js b/erp-produce/src/main/resources/template/js/erpMachin/erpDepartMachinList.js deleted file mode 100644 index 4fa2f514722d1de684cdc81fcf75333ebce8ac10..0000000000000000000000000000000000000000 --- a/erp-produce/src/main/resources/template/js/erpMachin/erpDepartMachinList.js +++ /dev/null @@ -1,106 +0,0 @@ - -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; - - table.render({ - id: 'messageTable', - elem: '#messageTable', - method: 'post', - url: sysMainMation.erpBasePath + 'erpmachin009', - where: getTableParams(), - even: true, - page: true, - limits: getLimits(), - limit: getLimit(), - cols: [[ - { title: systemLanguage["com.skyeye.serialNumber"][languageType], rowspan: '2', type: 'numbers' }, - { field: 'oddNumber', rowspan: '2', title: '单据编号', align: 'center', width: 180, templet: function (d) { - return '' + d.oddNumber + ''; - }}, - { field: 'productionMation', rowspan: '2', title: '生产计划单', align: 'center', width: 200, templet: function (d) {return isNull(d.productionMation) ? '' : d.productionMation.oddNumber}}, - { colspan: '3', title: '加工成品信息', align: 'center' }, - { field: 'state', rowspan: '2', title: '状态', width: 90, templet: function (d) { - return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("machinStateEnum", 'id', d.state, 'name'); - }}, - { field: 'pickState', rowspan: '2', title: '领料状态', align: 'left', width: 80, templet: function (d) { - return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("machinPickStateEnum", 'id', d.pickState, 'name'); - }}, - { colspan: '3', title: '加工信息', align: 'center' }, - { field: 'createName', rowspan: '2', title: systemLanguage["com.skyeye.createName"][languageType], width: 120 }, - { field: 'createTime', rowspan: '2', title: systemLanguage["com.skyeye.createTime"][languageType], align: 'center', width: 150 }, - { field: 'lastUpdateName', rowspan: '2', title: systemLanguage["com.skyeye.lastUpdateName"][languageType], align: 'left', width: 120 }, - { field: 'lastUpdateTime', rowspan: '2', 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'} - ], [ - { field: 'materialMation', title: '名称', align: 'left', width: 120, templet: function (d) {return isNull(d.materialMation) ? '' : d.materialMation.name}}, - { field: 'normsMation', title: '规格', align: 'left', width: 200, templet: function (d) {return isNull(d.normsMation) ? '' : d.normsMation.name}}, - { field: 'needNum', title: '加工数量', align: 'center', width: 80 }, - { field: 'departmentMation', title: '加工部门', align: 'left', width: 100, templet: function (d) {return isNull(d.departmentMation) ? '' : d.departmentMation.name}}, - { field: 'startTime', title: '开始时间', align: 'center', width: 150 }, - { field: 'endTime', title: '结束时间', align: 'center', width: 150 } - ]], - 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 === 'details') { // 详情 - details(data); - } else if (layEvent === 'machinAccept') { //工序验收 - machinAccept(data); - } - }); - - // 详情 - function details(data) { - _openNewWindows({ - url: systemCommonUtil.getUrl('FP2023100300003&id=' + data.id, null), - title: systemLanguage["com.skyeye.detailsPageTitle"][languageType], - pageId: "erpMachinDetails", - area: ['90vw', '90vh'], - callBack: function (refreshCode) { - }}); - } - - // 工序验收 - function machinAccept(data) { - _openNewWindows({ - url: "../../tpl/erpMachin/machinAccept.html?id=" + data.id, - title: '工序验收', - pageId: "machinAccept", - 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() { - loadTable(); - }); - - function loadTable() { - table.reloadData("messageTable", {where: getTableParams()}); - } - - function getTableParams(){ - return $.extend(true, {}, initTableSearchUtil.getSearchValue("messageTable")); - } - - exports('erpDepartMachinList', {}); -}); diff --git a/erp-produce/src/main/resources/template/js/erpMachin/erpMachinAcceptance.js b/erp-produce/src/main/resources/template/js/erpMachin/erpMachinAcceptance.js deleted file mode 100644 index d5e307652c69e3bcbab769ac441fda39ef5d45cd..0000000000000000000000000000000000000000 --- a/erp-produce/src/main/resources/template/js/erpMachin/erpMachinAcceptance.js +++ /dev/null @@ -1,92 +0,0 @@ - -layui.config({ - base: basePath, - version: skyeyeVersion -}).extend({ - window: 'js/winui.window' -}).define(['window', 'jquery', 'winui', 'form'], function (exports) { - winui.renderColor(); - var index = parent.layer.getFrameIndex(window.name); - var $ = layui.$, - form = layui.form; - var selOption = getFileContent('tpl/template/select-option.tpl'); - // 提交类型,1.工序验收;2.生成验收单 - var subType = GetUrlParam("subType"); - var id = GetUrlParam("id"); - var needNum = parseInt(GetUrlParam("needNum")); - $("#acceptNum").val(needNum); - $("#quantityNum").val(needNum); - - if(subType == 1){ - $("#depotIdBox").remove(); - } else { - erpOrderUtil.getDepotList(function (json){ - // 加载仓库数据 - $("#depotId").html(getDataUseHandlebars(selOption, json)); - form.render('select'); - }); - } - - $("body").on("input", "#acceptNum", function() { - calcNum(1); - }); - $("body").on("change", "#acceptNum", function() { - calcNum(1); - }); - - $("body").on("input", "#belowNum", function() { - calcNum(2); - }); - $("body").on("change", "#belowNum", function() { - calcNum(2); - }); - - function calcNum(type){ - var changeNum = 0; - if(type == 1){ - changeNum = parseInt(isNull($("#acceptNum").val()) ? "0" : $("#acceptNum").val()); - $("#belowNum").val(needNum - changeNum); - } else { - changeNum = parseInt(isNull($("#belowNum").val()) ? "0" : $("#belowNum").val()); - $("#acceptNum").val(needNum - changeNum); - } - } - - matchingLanguage(); - form.render(); - form.on('submit(formAddBean)', function (data) { - if (winui.verifyForm(data.elem)) { - if (parseInt(isNull($("#quantityNum").val()) ? "0" : $("#quantityNum").val()) < 0) { - winui.window.msg('合格数量不能小于0.', {icon: 2, time: 2000}); - return false; - } - if (parseInt(isNull($("#belowNum").val()) ? "0" : $("#belowNum").val()) < 0) { - winui.window.msg('不合格数量不能小于0.', {icon: 2, time: 2000}); - return false; - } - - if (parseInt($("#belowNum").val()) + parseInt($("#quantityNum").val()) != needNum) { - winui.window.msg('合格数量以及不合格数量总和与总量不匹配.', {icon: 2, time: 2000}); - return false; - } - - var params = { - childId: id, - acceptNum: $("#acceptNum").val(), - belowNum: $("#belowNum").val(), - depotId: (subType == 1) ? "" : $("#depotId").val() - }; - AjaxPostUtil.request({url: sysMainMation.erpBasePath + "erpmachin012", params: params, type: 'json', callback: function (json) { - parent.layer.close(index); - parent.refreshCode = '0'; - }}); - } - return false; - }); - - // 取消 - $("body").on("click", "#cancle", function() { - parent.layer.close(index); - }); - -}); \ No newline at end of file diff --git a/erp-produce/src/main/resources/template/js/erpMachin/erpMachinList.js b/erp-produce/src/main/resources/template/js/erpMachin/erpMachinList.js deleted file mode 100644 index 981caed2d143bc94c5be719490bffca189d8e573..0000000000000000000000000000000000000000 --- a/erp-produce/src/main/resources/template/js/erpMachin/erpMachinList.js +++ /dev/null @@ -1,220 +0,0 @@ - -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; - - authBtn('1720796297124');// 新增 - - table.render({ - id: 'messageTable', - elem: '#messageTable', - method: 'post', - // 获取列表 - url: sysMainMation.erpBasePath + 'erpmachin001', - 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; - }}, - { colspan: '2', title: '来源单据信息', align: 'center' }, - { field: 'processInstanceId', rowspan: '2', title: '流程ID', width: 100, templet: function (d) { - return '' + getNotUndefinedVal(d.processInstanceId) + ''; - }}, - { field: 'state', rowspan: '2', title: '状态', width: 90, templet: function (d) { - return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("machinStateEnum", 'id', d.state, 'name'); - }}, - { field: 'pickState', rowspan: '2', title: '领料状态', width: 90, templet: function (d) { - return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("machinPickStateEnum", 'id', d.pickState, 'name'); - }}, - { field: 'departmentMation', title: '加工部门', rowspan: '2', align: 'left', width: 200, templet: function (d) { - return getNotUndefinedVal(d.departmentMation?.name); - }}, - { field: 'createName', rowspan: '2', title: systemLanguage["com.skyeye.createName"][languageType], width: 120 }, - { field: 'createTime', rowspan: '2', title: systemLanguage["com.skyeye.createTime"][languageType], align: 'center', width: 150 }, - { field: 'lastUpdateName', rowspan: '2', title: systemLanguage["com.skyeye.lastUpdateName"][languageType], align: 'left', width: 120 }, - { field: 'lastUpdateTime', rowspan: '2', title: systemLanguage["com.skyeye.lastUpdateTime"][languageType], align: 'center', width: 150 }, - { title: systemLanguage["com.skyeye.operation"][languageType], rowspan: '2', fixed: 'right', align: 'center', width: 300, toolbar: '#tableBar'} - ], [ - { field: 'fromTypeId', title: '来源类型', width: 150, templet: function (d) { - return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("machinFromType", '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') { // 删除 - del(data); - } else if (layEvent === 'details') { // 详情 - details(data); - } else if (layEvent === 'edit') { // 编辑 - edit(data); - } else if (layEvent === 'subApproval') { // 提交审核 - subApproval(data); - }else if (layEvent === 'processingToMaterialRequisition') { //转领料单 - processingToMaterialRequisition(data); - } else if (layEvent === 'processingToSupplementMaterials') { //转补料单 - processingToSupplementMaterials(data); - } else if (layEvent === 'processingToReturnMaterials') { //转退料单 - processingToReturnMaterials(data); - } else if (layEvent === 'processDetails') { // 工作流流程详情查看 - activitiUtil.activitiDetails(data); - } else if (layEvent === 'revoke') { //撤销 - revoke(data); - } - }); - - // 转领料单 - function processingToMaterialRequisition(data) { - _openNewWindows({ - url: "../../tpl/erpMachin/processingToMaterialRequisition.html?id=" + data.id, - title: "转领料单", - pageId: "processingToMaterialRequisition", - area: ['90vw', '90vh'], - callBack: function (refreshCode) { - winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000}); - loadTable(); - }}); - } - //转补料单 - function processingToSupplementMaterials(data){ - _openNewWindows({ - url: "../../tpl/erpMachin/processingToSupplementMaterials.html?id=" + data.id, - title: '转补料单', - pageId: "processingToSupplementMaterials", - area: ['90vw', '90vh'], - callBack: function (refreshCode) { - winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000}); - loadTable(); - }}); - } - - //转退料单 - function processingToReturnMaterials(data){ - _openNewWindows({ - url: "../../tpl/erpMachin/processingToReturnMaterials.html?id=" + data.id, - title: '转退料单', - pageId: "processingToReturnMaterials", - 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('FP2023100300001', null), - title: systemLanguage["com.skyeye.addPageTitle"][languageType], - pageId: "erpMachinAdd", - 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('FP2023100300002&id=' + data.id, null), - title: systemLanguage["com.skyeye.editPageTitle"][languageType], - pageId: "erpMachinEdit", - 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('FP2023100300003&id=' + data.id, null), - title: systemLanguage["com.skyeye.detailsPageTitle"][languageType], - pageId: "erpMachinDetails", - area: ['90vw', '90vh'], - callBack: function (refreshCode) { - }}); - } - - // 删除 - function del(data) { - layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function (index) { - AjaxPostUtil.request({url: sysMainMation.erpBasePath + "deleteMachinById", 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 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 + "erpmachin007", 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 + "revokeMachin", 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, {}, initTableSearchUtil.getSearchValue("messageTable")); - } - - exports('erpMachinList', {}); -}); diff --git a/erp-produce/src/main/resources/template/js/erpMachin/erpMachinStateIsPassNoComplateChoose.js b/erp-produce/src/main/resources/template/js/erpMachin/erpMachinStateIsPassNoComplateChoose.js deleted file mode 100644 index 1cb7ec3a08766b5ce36d811f3d5f5fb2219beb96..0000000000000000000000000000000000000000 --- a/erp-produce/src/main/resources/template/js/erpMachin/erpMachinStateIsPassNoComplateChoose.js +++ /dev/null @@ -1,114 +0,0 @@ - -layui.config({ - base: basePath, - version: skyeyeVersion -}).extend({ - window: 'js/winui.window' -}).define(['window', 'table', 'jquery', 'winui', 'form'], function (exports) { - winui.renderColor(); - var index = parent.layer.getFrameIndex(window.name); - var $ = layui.$, - form = layui.form, - table = layui.table; - - table.render({ - id: 'messageTable', - elem: '#messageTable', - method: 'post', - url: sysMainMation.erpBasePath + 'erpmachin010', - where: getTableParams(), - even: true, - page: true, - limits: getLimits(), - limit: getLimit(), - cols: [[ - { type: 'radio', rowspan: '2'}, - { title: systemLanguage["com.skyeye.serialNumber"][languageType], rowspan: '2', type: 'numbers' }, - { field: 'oddNumber', rowspan: '2', title: '单据编号', align: 'center', width: 180, templet: function (d) { - return '' + d.oddNumber + ''; - }}, - { field: 'productionMation', rowspan: '2', title: '生产计划单', align: 'center', width: 200, templet: function (d) {return isNull(d.productionMation) ? '' : d.productionMation.oddNumber}}, - { colspan: '3', title: '加工成品信息', align: 'center' }, - { field: 'state', rowspan: '2', title: '状态', width: 90, templet: function (d) { - return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("machinStateEnum", 'id', d.state, 'name'); - }}, - { field: 'pickState', rowspan: '2', title: '领料状态', align: 'left', width: 80, templet: function (d) { - return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("machinPickStateEnum", 'id', d.pickState, 'name'); - }}, - { colspan: '3', title: '加工信息', align: 'center' }, - { field: 'createName', rowspan: '2', title: systemLanguage["com.skyeye.createName"][languageType], width: 120 }, - { field: 'createTime', rowspan: '2', title: systemLanguage["com.skyeye.createTime"][languageType], align: 'center', width: 150 }, - { field: 'lastUpdateName', rowspan: '2', title: systemLanguage["com.skyeye.lastUpdateName"][languageType], align: 'left', width: 120 }, - { field: 'lastUpdateTime', rowspan: '2', title: systemLanguage["com.skyeye.lastUpdateTime"][languageType], align: 'center', width: 150 }, - - ], [ - { field: 'materialMation', title: '名称', align: 'left', width: 120, templet: function (d) {return isNull(d.materialMation) ? '' : d.materialMation.name}}, - { field: 'normsMation', title: '规格', align: 'left', width: 200, templet: function (d) {return isNull(d.normsMation) ? '' : d.normsMation.name}}, - { field: 'needNum', title: '加工数量', align: 'center', width: 80 }, - { field: 'departmentMation', title: '加工部门', align: 'left', width: 100, templet: function (d) {return isNull(d.departmentMation) ? '' : d.departmentMation.name}}, - { field: 'startTime', title: '开始时间', align: 'center', width: 150 }, - { field: 'endTime', title: '结束时间', align: 'center', width: 150 } - ]], - done: function(json, curr, count){ - matchingLanguage(); - $('#messageTable').next().find('.layui-table-body').find("table" ).find("tbody").children("tr").on('dblclick',function(){ - var dubClick = $('#messageTable').next().find('.layui-table-body').find("table").find("tbody").find(".layui-table-hover"); - dubClick.find("input[type='radio']").prop("checked", true); - form.render(); - var chooseIndex = JSON.stringify(dubClick.data('index')); - var obj = json.rows[chooseIndex]; - - // 根据id获取加工单信息 - AjaxPostUtil.request({url: sysMainMation.erpBasePath + "queryMachinById", params: {id: obj.id}, type: 'json', method: 'GET', callback: function(json) { - parent.machinMation = obj; - parent.refreshCode = '0'; - parent.layer.close(index); - }}); - }); - - $('#messageTable').next().find('.layui-table-body').find("table" ).find("tbody").children("tr").on('click',function(){ - var click = $('#messageTable').next().find('.layui-table-body').find("table").find("tbody").find(".layui-table-hover"); - click.find("input[type='radio']").prop("checked", true); - form.render(); - }) - - 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 === 'details') { // 详情 - details(data); - } - }); - - // 详情 - function details(data) { - _openNewWindows({ - url: systemCommonUtil.getUrl('FP2023100300003&id=' + data.id, null), - title: systemLanguage["com.skyeye.detailsPageTitle"][languageType], - pageId: "erpMachinDetails", - area: ['90vw', '90vh'], - callBack: function (refreshCode) { - }}); - } - - form.render(); - $("body").on("click", "#reloadTable", function() { - loadTable(); - }); - - function loadTable() { - table.reloadData("messageTable", {where: getTableParams()}); - } - - function getTableParams() { - return $.extend(true, {}, initTableSearchUtil.getSearchValue("messageTable")); - } - - exports('erpMachinStateIsPassNoComplateChoose', {}); -}); \ No newline at end of file diff --git a/erp-produce/src/main/resources/template/js/erpMachin/machinAccept.js b/erp-produce/src/main/resources/template/js/erpMachin/machinAccept.js deleted file mode 100644 index f3e50fc1c8515fe524ed81225313c792853c089d..0000000000000000000000000000000000000000 --- a/erp-produce/src/main/resources/template/js/erpMachin/machinAccept.js +++ /dev/null @@ -1,53 +0,0 @@ - -layui.config({ - base: basePath, - version: skyeyeVersion -}).extend({ - window: 'js/winui.window' -}).define(['window', 'jquery', 'winui', 'form'], function (exports) { - winui.renderColor(); - var index = parent.layer.getFrameIndex(window.name); - var $ = layui.$, - form = layui.form; - - var id = GetUrlParam("id"); - var machinMation; - - loadData(); - function loadData() { - var loadAcceptanceBtn = false; - AjaxPostUtil.request({url: sysMainMation.erpBasePath + "queryMachinById", params: {id: id}, type: 'json', method: 'GET', callback: function (json) { - machinMation = json.bean; - $.each(json.bean.machinChildList, function(i, item) { - item.unitPrice = parseFloat(item.unitPrice).toFixed(2); - item.quantityNum = item.acceptNum - item.belowNum; - item.stateName = skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("machinChildStateEnum", 'id', item.state, 'name'); - if (item.state == 'waitForCheckig' && !loadAcceptanceBtn) { - loadAcceptanceBtn = true; - if (i == (json.bean.machinChildList.length - 1)) { - item.operator = ''; - } else { - item.operator = ''; - } - } - }); - $("#showForm").html(getDataUseHandlebars($("#useTemplate").html(), json)); - }}); -} - - // 工序验收 - $("body").on("click", ".acceptance", function() { - var id = $(this).attr('rowId'); - var subType = $(this).attr('subType'); - _openNewWindows({ - url: "../../tpl/erpMachin/erpMachinAcceptance.html?id=" + id + '&subType=' + subType + '&needNum=' + machinMation.needNum, - title: '工序验收', - pageId: "acceptance", - area: ['90vw', '90vh'], - callBack: function (refreshCode) { - winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000}); - loadData(); - }}); - }); - -}); \ No newline at end of file diff --git a/erp-produce/src/main/resources/template/tpl/departmentMachining/departmentMachiningList.html b/erp-produce/src/main/resources/template/tpl/departmentMachining/departmentMachiningList.html index 464677d9cab7ea0bc5e71377206b7c881975fceb..fef71cfb521cc482afda503102a856df8026e9fa 100644 --- a/erp-produce/src/main/resources/template/tpl/departmentMachining/departmentMachiningList.html +++ b/erp-produce/src/main/resources/template/tpl/departmentMachining/departmentMachiningList.html @@ -35,6 +35,17 @@ 撤销 {{# } }} {{# } }} + {{# if (d.state == 'pass') { }} + {{# if (auth('1721442458082')) { }} + 转领料单 + {{# } }} + {{# if (auth('1721442482395')) { }} + 转补料单 + {{# } }} + {{# if (auth('1721442499305')) { }} + 转退料单 + {{# } }} + {{# } }} 甘特图 diff --git a/erp-produce/src/main/resources/template/tpl/erpMachin/processingToMaterialRequisition.html b/erp-produce/src/main/resources/template/tpl/departmentMachining/processingToMaterialRequisition.html similarity index 91% rename from erp-produce/src/main/resources/template/tpl/erpMachin/processingToMaterialRequisition.html rename to erp-produce/src/main/resources/template/tpl/departmentMachining/processingToMaterialRequisition.html index df8ce0b1aee60a81ab1dfd2034f8b9041d5d10ff..27b39dfabcb382960d192f76eaf289de2f51d925 100644 --- a/erp-produce/src/main/resources/template/tpl/erpMachin/processingToMaterialRequisition.html +++ b/erp-produce/src/main/resources/template/tpl/departmentMachining/processingToMaterialRequisition.html @@ -23,7 +23,7 @@ \ No newline at end of file diff --git a/erp-produce/src/main/resources/template/tpl/erpMachin/processingToReturnMaterials.html b/erp-produce/src/main/resources/template/tpl/departmentMachining/processingToReturnMaterials.html similarity index 91% rename from erp-produce/src/main/resources/template/tpl/erpMachin/processingToReturnMaterials.html rename to erp-produce/src/main/resources/template/tpl/departmentMachining/processingToReturnMaterials.html index afc656f8d3df4895e11711c7036299533738728f..a4bfbb11ae940802efe47313a67b38d1a81e02b9 100644 --- a/erp-produce/src/main/resources/template/tpl/erpMachin/processingToReturnMaterials.html +++ b/erp-produce/src/main/resources/template/tpl/departmentMachining/processingToReturnMaterials.html @@ -23,7 +23,7 @@ \ No newline at end of file diff --git a/erp-produce/src/main/resources/template/tpl/erpMachin/processingToSupplementMaterials.html b/erp-produce/src/main/resources/template/tpl/departmentMachining/processingToSupplementMaterials.html similarity index 91% rename from erp-produce/src/main/resources/template/tpl/erpMachin/processingToSupplementMaterials.html rename to erp-produce/src/main/resources/template/tpl/departmentMachining/processingToSupplementMaterials.html index b51ba5413f81b9271f3dfdd92ad039bcf81b5b98..356fafb0233158b82e9ba26dba45c4960c809a65 100644 --- a/erp-produce/src/main/resources/template/tpl/erpMachin/processingToSupplementMaterials.html +++ b/erp-produce/src/main/resources/template/tpl/departmentMachining/processingToSupplementMaterials.html @@ -23,7 +23,7 @@ \ No newline at end of file diff --git a/erp-produce/src/main/resources/template/tpl/erpMachin/erpDepartMachinList.html b/erp-produce/src/main/resources/template/tpl/erpMachin/erpDepartMachinList.html deleted file mode 100644 index 175d1b54aae7f579521942bb50b49953be481927..0000000000000000000000000000000000000000 --- a/erp-produce/src/main/resources/template/tpl/erpMachin/erpDepartMachinList.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - -
该数据仅展示已经由上级审批通过的部门加工单信息。
- -
-
- -
-
-
-
- - -
- - - - - \ No newline at end of file diff --git a/erp-produce/src/main/resources/template/tpl/erpMachin/erpMachinAcceptance.html b/erp-produce/src/main/resources/template/tpl/erpMachin/erpMachinAcceptance.html deleted file mode 100644 index 19208c6bbb5016709503f2ec708d293745a485f0..0000000000000000000000000000000000000000 --- a/erp-produce/src/main/resources/template/tpl/erpMachin/erpMachinAcceptance.html +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - -
-
-
- 工序验收
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
-
- - -
-
-
-
- - - - - - \ No newline at end of file diff --git a/erp-produce/src/main/resources/template/tpl/erpMachin/erpMachinList.html b/erp-produce/src/main/resources/template/tpl/erpMachin/erpMachinList.html deleted file mode 100644 index 3a0598f8cb1a8b2cd2ee35359800d44646d3f282..0000000000000000000000000000000000000000 --- a/erp-produce/src/main/resources/template/tpl/erpMachin/erpMachinList.html +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - -
-
- - -
-
-
-
- - -
- - - - - \ No newline at end of file diff --git a/erp-produce/src/main/resources/template/tpl/erpMachin/erpMachinStateIsPassNoComplateChoose.html b/erp-produce/src/main/resources/template/tpl/erpMachin/erpMachinStateIsPassNoComplateChoose.html deleted file mode 100644 index e1b0cfe2209631ea498e91d59b0727cf17978f29..0000000000000000000000000000000000000000 --- a/erp-produce/src/main/resources/template/tpl/erpMachin/erpMachinStateIsPassNoComplateChoose.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - -
加工单选择规则:1.单选,双击指定行数据即可选中;2.已审批通过的未完成的加工单。如没有查到要选择的单据,请检查单据信息是否满足当前规则。
-
-
- -
-
-
-
-
- - - - - \ No newline at end of file diff --git a/erp-produce/src/main/resources/template/tpl/erpMachin/machinAccept.html b/erp-produce/src/main/resources/template/tpl/erpMachin/machinAccept.html deleted file mode 100644 index 182f099a3a5a90e43d3f64921bea3d47e19125a5..0000000000000000000000000000000000000000 --- a/erp-produce/src/main/resources/template/tpl/erpMachin/machinAccept.html +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - - - - -
-
- -
-
-
- -
-
-
-
-
- - - - - - - - - \ No newline at end of file