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 ba0e3334b105829e4bb2f79e1f0a02b0027ac4c6..e48670a6004218bc2fb4d3f0834b519b4321ec8b 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 diff --git a/erp/src/main/resources/template/js/inventoryTaskList/complateInventoryChild.js b/erp/src/main/resources/template/js/inventoryTaskList/complateInventoryChild.js new file mode 100644 index 0000000000000000000000000000000000000000..927b8f3738a2ebce58edb23976804b5c534a311f --- /dev/null +++ b/erp/src/main/resources/template/js/inventoryTaskList/complateInventoryChild.js @@ -0,0 +1,44 @@ + +layui.config({ + base: basePath, + version: skyeyeVersion +}).extend({ + window: 'js/winui.window' +}).define(['window', 'jquery', 'winui', 'form', 'textool'], function (exports) { + winui.renderColor(); + var index = parent.layer.getFrameIndex(window.name); + var $ = layui.$, + textool = layui.textool, + form = layui.form; + var id = getNotUndefinedVal(GetUrlParam("id")); + + textool.init({ + eleId: 'barCode', + tools: ['copy', 'reset', 'clear'] + }); + + matchingLanguage(); + form.render(); + form.on('submit(getBean)', function (data) { + if (winui.verifyForm(data.elem)) { + let params = { + id: id, + realNumber: $("#realNumber").val(), + profitNum: $("#profitNum").val(), + lossNum: $("#lossNum").val(), + } + AjaxPostUtil.request({url: sysMainMation.erpBasePath + "complateInventoryChild", params: params, type: 'json', method: 'POST', callback: function (json) { + parent.layer.close(index); + parent.refreshCode = '0'; + }}); + } + return false; + }); + + $("body").on("click", "#cancle", function() { + parent.layer.close(index); + }); +}); + + + diff --git a/erp/src/main/resources/template/js/inventoryTaskList/inventoryTaskList.js b/erp/src/main/resources/template/js/inventoryTaskList/inventoryTaskList.js new file mode 100644 index 0000000000000000000000000000000000000000..49ce62fe556cb677316fc230796ecc18a2ac0873 --- /dev/null +++ b/erp/src/main/resources/template/js/inventoryTaskList/inventoryTaskList.js @@ -0,0 +1,162 @@ + +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["inventoryOrder"]["key"]; + authBtn('1718282987406');//新增 + + table.render({ + id: 'messageTable', + elem: '#messageTable', + method: 'post', + url: sysMainMation.erpBasePath + 'queryInventoryList', + where: getTableParams(), + even: true, + page: true, + limits: getLimits(), + limit: getLimit(), + cols: [[ + { title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers', rowspan: '2' }, + { field: 'oddNumber', title: '单号', width: 200, align: 'center', templet: function (d) { + return '' + d.oddNumber + ''; + }}, + { field: 'operTime', title: '单据日期', rowspan: '2', align: 'center', width: 140 }, + { field: 'inventoryNum', title: '已盘点数量', rowspan: '2', align: 'center', width: 140 }, + { field: 'allNum', 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: '状态', width: 90, align: 'center', templet: function (d) { + return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("flowableStateEnum", 'id', d.state, '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'} + ]], + 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('FP2024071800001', null), + title: systemLanguage["com.skyeye.addPageTitle"][languageType], + pageId: "inventoryTaskListAdd", + 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('FP2024071800002&id=' + data.id, null), + title: systemLanguage["com.skyeye.editPageTitle"][languageType], + pageId: "inventoryTaskListEdit", + 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('FP2024071800003&id=' + data.id, null), + title: systemLanguage["com.skyeye.detailsPageTitle"][languageType], + pageId: "inventoryTaskListDetails", + 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(serviceClassName, null, function (approvalId) { + var params = { + id: data.id, + approvalId: approvalId + }; + AjaxPostUtil.request({url: sysMainMation.erpBasePath + "submitInventoryToApproval", params: params, type: 'json', method: 'POST', callback: function (json) { + winui.window.msg("提交成功", {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 + "deleteInventory", params: {id: data.id}, type: 'json', method: "POST", callback: function (json) { + winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); + loadTable(); + }}); + }); + } + + // 撤销 + function revoke(data) { + layer.confirm('确认撤销该申请吗?', { icon: 3, title: '撤销操作' }, function (index) { + layer.close(index); + AjaxPostUtil.request({url: sysMainMation.erpBasePath + "revokeInventory", 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('inventoryTaskList', {}); +}); diff --git a/erp/src/main/resources/template/js/inventoryTaskList/myTaskInventoryList.js b/erp/src/main/resources/template/js/inventoryTaskList/myTaskInventoryList.js new file mode 100644 index 0000000000000000000000000000000000000000..73be27cd73e1bc6d7f84d627c7ad303d2e2bb875 --- /dev/null +++ b/erp/src/main/resources/template/js/inventoryTaskList/myTaskInventoryList.js @@ -0,0 +1,100 @@ + +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 + 'queryInventoryChildList', + where: getTableParams(), + even: true, + page: true, + limits: getLimits(), + limit: getLimit(), + cols: [[ + { title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers', rowspan: '2' }, + { field: 'oddNumber', title: '单号', width: 200, align: 'center', templet: function (d) { + return '' + d.oddNumber + ''; + }}, + // { field: 'operatorId', title: '产品', rowspan: '2', align: 'center', width: 140 }, + // { field: 'normsId', title: '规格', rowspan: '2', align: 'center', width: 140 }, + // { field: 'depotId', title: '仓库', rowspan: '2', align: 'center', width: 140 }, + + { field: 'materialId', title: '产品名称', align: 'left', width: 150, templet: function (d) { + return getNotUndefinedVal(d.materialMation?.name); + }}, + { field: 'normsId', title: '产品规格', align: 'left', width: 150, templet: function (d) { + return getNotUndefinedVal(d.normsMation?.name); + }}, + { field: 'depotId', title: "仓库", align: 'left', width: 150, templet: function (d) { + return getNotUndefinedVal(d.depotMation?.name); + }}, + + { field: 'planStartTime', title: '计划开始时间', rowspan: '2', align: 'center', width: 140 }, + { field: 'planEndTime', title: '计划结束时间', rowspan: '2', align: 'center', width: 140 }, + { field: 'lossNum', title: '盘亏数量', rowspan: '2', align: 'center', width: 140 }, + { field: 'realNumber', title: '实际盘点数量', rowspan: '2', align: 'center', width: 140 }, + { field: 'profitNum', title: '盘盈数量', rowspan: '2', align: 'center', width: 140 }, + { field: 'planNumber', title: '盘点总数量', rowspan: '2', align: 'center', width: 140 }, + { field: 'state', title: '状态', width: 90, align: 'center', templet: function (d) { + return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("flowableStateEnum", 'id', d.state, 'name'); + }}, + { field: 'type', title: '类型', width: 90, align: 'center', templet: function (d) { + return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("materialNormsCodeType", 'id', d.type, 'name'); + }}, + { field: 'unitPrice', title: '单价', rowspan: '2', align: 'center', width: 140 }, + { title: systemLanguage["com.skyeye.operation"][languageType], rowspan: '2', 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 === 'complete') { //删除 + complete(data); + } + }); + + // 完成 + function complete(data) { + _openNewWindows({ + url: "../../tpl/inventoryTaskList/complateInventoryChild.html?id=" + data.id, + title: "盘点完成", + pageId: "complateInventoryChild", + 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('inventoryTaskList', {}); +}); diff --git a/erp/src/main/resources/template/js/turnIocatorManage/batchAdd.js b/erp/src/main/resources/template/js/turnIocatorManage/batchAdd.js index a8c3f61d7bc0821dde43852d58d52661eb74cf85..fa95e55009a78bb0274a847c58569d058132e078 100644 --- a/erp/src/main/resources/template/js/turnIocatorManage/batchAdd.js +++ b/erp/src/main/resources/template/js/turnIocatorManage/batchAdd.js @@ -27,9 +27,8 @@ layui.config({ let params = { parentId: parentId, depotId: depotId, - // type: $("#type").val(), - type: $("#type input:radio:checked").val(), - number:$("#number").val(), + type: dataShowType.getData('type'), + number: $("#number").val(), } AjaxPostUtil.request({url: sysMainMation.erpBasePath + "batchGenerateDepotLevelVal", params: params, type: 'json', method: 'POST', callback: function (json) { parent.layer.close(index); diff --git a/erp/src/main/resources/template/js/turnIocatorManage/turnIocatorManage.js b/erp/src/main/resources/template/js/turnIocatorManage/turnIocatorManage.js index e39e84fbfd54cddb67d2a128f78432a373de235e..8c70a55a7cfe11a824633aeb6c97a62e51d21b6d 100644 --- a/erp/src/main/resources/template/js/turnIocatorManage/turnIocatorManage.js +++ b/erp/src/main/resources/template/js/turnIocatorManage/turnIocatorManage.js @@ -1,8 +1,3 @@ - -var rowId = ""; - -var parentNode = null; - layui.config({ base: basePath, version: skyeyeVersion @@ -78,7 +73,7 @@ layui.config({ ]], done: function (json) { matchingLanguage(); - initTableSearchUtil.initAdvancedSearch(this, json.searchFilter, form, "请输入编号", function () { + initTableSearchUtil.initAdvancedSearch($("#messageTable")[0], json.searchFilter, form, "请输入编号", function () { tableTree.reload("messageTable", {page: {curr: 1}, where: getTableParams()}); }); } diff --git a/erp/src/main/resources/template/js/warehousePersonnel/warehousePersonnel.js b/erp/src/main/resources/template/js/warehousePersonnel/warehousePersonnel.js new file mode 100644 index 0000000000000000000000000000000000000000..cb2f160ab54799b9189abbc3e19d41bc1372b1bf --- /dev/null +++ b/erp/src/main/resources/template/js/warehousePersonnel/warehousePersonnel.js @@ -0,0 +1,133 @@ +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; + authBtn('1721305232197'); + + loadWareshop(); + + form.render(); + var chooseWorkshopId = ""; + function loadWareshop() { + table.render({ + id: 'warehouseTable', + elem: '#warehouseTable', + method: 'get', + url: sysMainMation.erpBasePath + 'queryStaffBelongDepotList', + even: false, + page: false, + limits: getLimits(), + limit: getLimit(), + cols: [[ + { title: systemLanguage["com.skyeye.serialNumber"][languageType], fixed: 'left', type: 'numbers' }, + { field: 'name', title: '仓库', align: 'left', width: 150, templet: function (d) { + return '' + d.name + ''; + }} + ]], + done: function(json) { + matchingLanguage(); + depotId = ""; + loadStaff(""); + } + }); + table.on('tool(warehouseTable)', function (obj) { + var data = obj.data; + var layEvent = obj.event; + if (layEvent == 'select') { + depotId = data.id; + loadStaff(data.id); + } + }); + } + + function loadStaff(depotId) { + table.render({ + id: 'messageTable', + elem: '#messageTable', + method: 'post', + url: sysMainMation.erpBasePath + 'queryDepotStaffList', + where: {objectId: depotId}, + even: true, + page: true, + limits: getLimits(), + limit: getLimit(), + cols: [[ + { title: systemLanguage["com.skyeye.serialNumber"][languageType], fixed: 'left', type: 'numbers' }, + { field: 'jobNumber', title: '工号', align: 'left', width: 140, templet: function (d) { + return getNotUndefinedVal(d.staffMation?.jobNumber); + }}, + { field: 'userName', title: '姓名', width: 120, templet: function (d) { + return getNotUndefinedVal(d.staffMation?.userName); + }}, + { field: 'companyName', title: '企业', width: 150, templet: function (d) { + return getNotUndefinedVal(d.staffMation?.companyName); + }}, + { field: 'departmentName', title: '部门', width: 140, templet: function (d) { + return getNotUndefinedVal(d.staffMation?.departmentName); + }}, + { field: 'jobName', title: '职位', width: 140, templet: function (d) { + return getNotUndefinedVal(d.staffMation?.jobName); + }}, + { title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 150, toolbar: '#tableBar'} + ]], + done: function(json) { + matchingLanguage(); + } + }); + + table.on('tool(messageTable)', function (obj) { + var data = obj.data; + var layEvent = obj.event; + if (layEvent === 'delete') { // 删除 + delet(data); + } + }); + } + + // 删除 + 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 + "deleteDepotStaffById", params: {id: data.id}, type: 'json', method: "DELETE", callback: function (json) { + winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); + table.reloadData("messageTable", {page: {curr: 1}, where: {objectId: depotId}}) + }}); + }); + } + + // 添加 + $("body").on("click", "#addBean", function() { + if (isNull(depotId)) { + winui.window.msg('请先选择仓库信息.', {icon: 2, time: 2000}); + return false; + } + systemCommonUtil.userStaffCheckType = true; // // 人员选择类型,1.多选;其他。单选 + systemCommonUtil.checkStaffMation = []; // 选择时返回的对象 + systemCommonUtil.openSysAllUserStaffChoosePage(function (checkStaffMation) { + var list = new Array(); + console.log(checkStaffMation) + $.each(checkStaffMation, function (i, item) { + list.push(item.id); + }); + console.log(list) + var params = { + depotId: depotId, + staffId: JSON.stringify(list) + }; + AjaxPostUtil.request({url: sysMainMation.erpBasePath + "insertDepotStaff", params: params, type: 'json', method: "POST", callback: function (json) { + loadStaff(depotId); + }}); + }); + + }); + + exports('warehousePersonnel', {}); +}); diff --git a/erp/src/main/resources/template/tpl/inventoryTaskList/complateInventoryChild.html b/erp/src/main/resources/template/tpl/inventoryTaskList/complateInventoryChild.html new file mode 100644 index 0000000000000000000000000000000000000000..8a474c1d397ae75003cf37f1eb230fa14ace6a2a --- /dev/null +++ b/erp/src/main/resources/template/tpl/inventoryTaskList/complateInventoryChild.html @@ -0,0 +1,49 @@ + + + + + + + + +
+
+
+ 基本信息
+
+ +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+ +
+
+ + +
+
+
+
+ + + + + + \ No newline at end of file diff --git a/erp/src/main/resources/template/tpl/inventoryTaskList/inventoryTaskList.html b/erp/src/main/resources/template/tpl/inventoryTaskList/inventoryTaskList.html new file mode 100644 index 0000000000000000000000000000000000000000..9b89b17cab66a2d5a0bd7f1f02eb86e13394d896 --- /dev/null +++ b/erp/src/main/resources/template/tpl/inventoryTaskList/inventoryTaskList.html @@ -0,0 +1,43 @@ + + + + + + + + + +
+
+ + +
+
+
+
+ +
+ + + + + \ No newline at end of file diff --git a/erp/src/main/resources/template/tpl/inventoryTaskList/myTaskInventoryList.html b/erp/src/main/resources/template/tpl/inventoryTaskList/myTaskInventoryList.html new file mode 100644 index 0000000000000000000000000000000000000000..71f08d32c3f655ef378ee68e27138dfe668d8270 --- /dev/null +++ b/erp/src/main/resources/template/tpl/inventoryTaskList/myTaskInventoryList.html @@ -0,0 +1,29 @@ + + + + + + + + + +
+
+ +
+
+
+
+ +
+ + + + + \ No newline at end of file diff --git a/erp/src/main/resources/template/tpl/warehousePersonnel/warehousePersonnel.html b/erp/src/main/resources/template/tpl/warehousePersonnel/warehousePersonnel.html new file mode 100644 index 0000000000000000000000000000000000000000..46f2220d597cc115d6f3de0c4e5ad86b2df77e8f --- /dev/null +++ b/erp/src/main/resources/template/tpl/warehousePersonnel/warehousePersonnel.html @@ -0,0 +1,53 @@ + + + + + + + + + +
+
+
+
+
+
仓库
+
+
+
+
+
+ +
+
+
员工
+
+
+
+ +
+
+
+
+ + +
+
+
+
+
+
+
+ + + + + + \ 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 6551f66ff4764d0b5d7e6c59c1d7efe9a9a71160..013663c0bfe3109f37a8dcd9a3e498b218fef867 100644 --- a/web/src/main/resources/template/json/sysServiceMation.json +++ b/web/src/main/resources/template/json/sysServiceMation.json @@ -17,6 +17,7 @@ "allocationFormOrder": {"name": "调拨订单", "key": "com.skyeye.other.service.impl.AllocationServiceImpl"}, "depotOutOrder": {"name": "仓库出库单", "key": "com.skyeye.depot.service.impl.DepotOutServiceImpl"}, "depotPutOrder": {"name": "仓库入库单", "key": "com.skyeye.depot.service.impl.DepotPutServiceImpl"}, + "inventoryOrder": {"name": "盘点任务单", "key": "com.skyeye.inventory.service.impl.InventoryServiceImpl"}, "putAcceptanceWarehousing": {"name": "验收入库单", "key": "com.skyeye.machin.service.impl.ErpAcceptanceReceiptServiceImpl"}, "machinHeader": {"name": "加工单", "key": "com.skyeye.machin.service.impl.ErpMachinServiceImpl"},