diff --git a/erp-produce/src/main/resources/template/js/erpMachin/erpMachinList.js b/erp-produce/src/main/resources/template/js/erpMachin/erpMachinList.js index 16c1417f7cc119d23275bb2b196e53df546624be..981caed2d143bc94c5be719490bffca189d8e573 100644 --- a/erp-produce/src/main/resources/template/js/erpMachin/erpMachinList.js +++ b/erp-produce/src/main/resources/template/js/erpMachin/erpMachinList.js @@ -24,31 +24,39 @@ layui.config({ 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' }, + { 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'); }}, - { colspan: '3', title: '加工信息', align: 'center' }, + { 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: 200, toolbar: '#tableBar'} + { title: systemLanguage["com.skyeye.operation"][languageType], rowspan: '2', fixed: 'right', align: 'center', width: 300, 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 } + { 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(); @@ -69,6 +77,12 @@ layui.config({ 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') { //撤销 @@ -76,6 +90,44 @@ layui.config({ } }); + // 转领料单 + 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({ diff --git a/erp-produce/src/main/resources/template/js/erpMachin/processingToMaterialRequisition.js b/erp-produce/src/main/resources/template/js/erpMachin/processingToMaterialRequisition.js new file mode 100644 index 0000000000000000000000000000000000000000..55deabd0f9b8082a6f50b11430c70d7149523e02 --- /dev/null +++ b/erp-produce/src/main/resources/template/js/erpMachin/processingToMaterialRequisition.js @@ -0,0 +1,47 @@ + +// 以下两个参数开启团队权限时有值 +var objectId = '', objectKey = ''; +// 根据以下两个参数判断:工作流的判断是否要根据serviceClassName的判断 +var serviceClassName; + +layui.config({ + base: basePath, + version: skyeyeVersion +}).extend({ + window: 'js/winui.window' +}).define(['window', 'table', 'jquery'], function (exports) { + winui.renderColor(); + var index = parent.layer.getFrameIndex(window.name); + var $ = layui.$; + var id = GetUrlParam("id"); + + // 加工单转领料单 + 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) { + }, + saveData: function (params) { + // 保存数据 + AjaxPostUtil.request({url: sysMainMation.erpBasePath + "insertMachinToPickRequest", params: params, type: 'json', method: "POST", callback: function(json) { + parent.layer.close(index); + parent.refreshCode = '0'; + }}); + + }, + 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); + + } + }); + }}); + +}); \ No newline at end of file diff --git a/erp-produce/src/main/resources/template/js/erpMachin/processingToReturnMaterials.js b/erp-produce/src/main/resources/template/js/erpMachin/processingToReturnMaterials.js new file mode 100644 index 0000000000000000000000000000000000000000..b29ef51225395d60e933f3914242b9577858b8e0 --- /dev/null +++ b/erp-produce/src/main/resources/template/js/erpMachin/processingToReturnMaterials.js @@ -0,0 +1,47 @@ + +// 以下两个参数开启团队权限时有值 +var objectId = '', objectKey = ''; +// 根据以下两个参数判断:工作流的判断是否要根据serviceClassName的判断 +var serviceClassName; + +layui.config({ + base: basePath, + version: skyeyeVersion +}).extend({ + window: 'js/winui.window' +}).define(['window', 'table', 'jquery'], function (exports) { + winui.renderColor(); + var index = parent.layer.getFrameIndex(window.name); + var $ = layui.$; + var id = GetUrlParam("id"); + + // 加工单转退料单 + 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) { + }, + saveData: function (params) { + // 保存数据 + AjaxPostUtil.request({url: sysMainMation.erpBasePath + "insertMachinToPickReturn", params: params, type: 'json', method: "POST", callback: function(json) { + parent.layer.close(index); + parent.refreshCode = '0'; + }}); + + }, + 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); + + } + }); + }}); + +}); \ No newline at end of file diff --git a/erp-produce/src/main/resources/template/js/erpMachin/processingToSupplementMaterials.js b/erp-produce/src/main/resources/template/js/erpMachin/processingToSupplementMaterials.js new file mode 100644 index 0000000000000000000000000000000000000000..1d3f3436ef0e56e55e95244133c17437950f0019 --- /dev/null +++ b/erp-produce/src/main/resources/template/js/erpMachin/processingToSupplementMaterials.js @@ -0,0 +1,47 @@ + +// 以下两个参数开启团队权限时有值 +var objectId = '', objectKey = ''; +// 根据以下两个参数判断:工作流的判断是否要根据serviceClassName的判断 +var serviceClassName; + +layui.config({ + base: basePath, + version: skyeyeVersion +}).extend({ + window: 'js/winui.window' +}).define(['window', 'table', 'jquery'], function (exports) { + winui.renderColor(); + var index = parent.layer.getFrameIndex(window.name); + var $ = layui.$; + var id = GetUrlParam("id"); + + // 加工单转补料单 + 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) { + }, + saveData: function (params) { + // 保存数据 + AjaxPostUtil.request({url: sysMainMation.erpBasePath + "insertMachinToPickPatch", params: params, type: 'json', method: "POST", callback: function(json) { + parent.layer.close(index); + parent.refreshCode = '0'; + }}); + + }, + 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); + + } + }); + }}); + +}); \ 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 index db6c74cc5d7c914f219a61a3c90297d07282edc0..3a0598f8cb1a8b2cd2ee35359800d44646d3f282 100644 --- a/erp-produce/src/main/resources/template/tpl/erpMachin/erpMachinList.html +++ b/erp-produce/src/main/resources/template/tpl/erpMachin/erpMachinList.html @@ -33,6 +33,17 @@ 撤销 {{# } }} {{# } }} + {{# if (d.state == 'pass') { }} + {{# if (auth('1721379823318')) { }} + 转领料单 + {{# } }} + {{# if (auth('1721379731773')) { }} + 转补料单 + {{# } }} + {{# if (auth('1721379845821')) { }} + 转退料单 + {{# } }} + {{# } }} diff --git a/erp-produce/src/main/resources/template/tpl/erpMachin/processingToMaterialRequisition.html b/erp-produce/src/main/resources/template/tpl/erpMachin/processingToMaterialRequisition.html new file mode 100644 index 0000000000000000000000000000000000000000..df8ce0b1aee60a81ab1dfd2034f8b9041d5d10ff --- /dev/null +++ b/erp-produce/src/main/resources/template/tpl/erpMachin/processingToMaterialRequisition.html @@ -0,0 +1,29 @@ + + + + + + + + + +
+
+
+
+
+ + ` + +
+
+
+
+ + + + + + \ 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/erpMachin/processingToReturnMaterials.html new file mode 100644 index 0000000000000000000000000000000000000000..afc656f8d3df4895e11711c7036299533738728f --- /dev/null +++ b/erp-produce/src/main/resources/template/tpl/erpMachin/processingToReturnMaterials.html @@ -0,0 +1,29 @@ + + + + + + + + + +
+
+
+
+
+ + ` + +
+
+
+
+ + + + + + \ 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/erpMachin/processingToSupplementMaterials.html new file mode 100644 index 0000000000000000000000000000000000000000..b51ba5413f81b9271f3dfdd92ad039bcf81b5b98 --- /dev/null +++ b/erp-produce/src/main/resources/template/tpl/erpMachin/processingToSupplementMaterials.html @@ -0,0 +1,29 @@ + + + + + + + + + +
+
+
+
+
+ + ` + +
+
+
+
+ + + + + + \ No newline at end of file