From bea337644d63470f7c895b633aef5c568cae7b86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?LAPTOP-NDCM9L6Q=5C=E7=8E=8B=E4=B8=BD=E9=9B=85?= <1970384016@qq.com> Date: Tue, 16 Jul 2024 10:50:47 +0800 Subject: [PATCH] =?UTF-8?q?update=E2=80=9C=EF=BC=9A=E8=BD=AC=E7=94=9F?= =?UTF-8?q?=E4=BA=A7=E8=AE=A1=E5=88=92=E7=9A=84=E6=95=B0=E6=8D=AE=E5=9B=9E?= =?UTF-8?q?=E6=98=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../erpPreProductionPlanList.js | 28 +++++--- .../preProductionTurnToProduction.js | 27 ++++--- .../js/erpProduction/erpProductionList.js | 27 ++++--- .../template/js/wholeOut/wholeOutList.js | 72 +++++++++---------- .../template/tpl/wholeOut/wholeOutList.html | 8 +-- .../js/salesOrder/salesOrderToReturns.js | 3 +- .../tpl/salesOrder/salesOrderList.html | 19 +---- 7 files changed, 90 insertions(+), 94 deletions(-) diff --git a/erp-produce/src/main/resources/template/js/erpPreProductionPlan/erpPreProductionPlanList.js b/erp-produce/src/main/resources/template/js/erpPreProductionPlan/erpPreProductionPlanList.js index a9a16ba79..b07d0b107 100644 --- a/erp-produce/src/main/resources/template/js/erpPreProductionPlan/erpPreProductionPlanList.js +++ b/erp-produce/src/main/resources/template/js/erpPreProductionPlan/erpPreProductionPlanList.js @@ -28,23 +28,29 @@ layui.config({ limit: getLimit(), cols: [[ { title: systemLanguage["com.skyeye.serialNumber"][languageType], rowspan: '2', type: 'numbers' }, - { field: 'oddNumber', title: '单号', align: 'center', rowspan: '2', width: 200, templet: function (d) { - return '' + d.oddNumber + ''; - }}, - { field: 'processInstanceId', title: '流程ID', width: 280, templet: function (d) { - return '' + getNotUndefinedVal(d.processInstanceId) + ''; + { field: 'oddNumber', title: '单号', rowspan: '2', align: 'left', width: 220, templet: function (d) { + var str = '' + d.oddNumber + ''; + if (!isNull(d.fromId)) { + str += '[转]'; + } + return str; }}, { colspan: '2', title: '来源单据信息', align: 'center' }, { field: 'operTime', width: 150, title: '单据日期', rowspan: '2',align: 'center'}, - { field: 'name', title: '产品名称', align: 'left',rowspan: '2',width: 150, templet: function (d) {return isNull(d.materialMation) ? '' : d.materialMation.name}}, - { field: '---', width: 150, align: 'center', rowspan: '2',title: '规格'}, - { field: '---', width: 150, align: 'center', rowspan: '2',title: '交货日期'}, - { field: '---', width: 150, align: 'center', rowspan: '2',title: '数量'}, - + { field: 'processInstanceId', title: '流程ID', rowspan: '2',width: 280, templet: function (d) { + return '' + getNotUndefinedVal(d.processInstanceId) + ''; + }}, + { field: 'state', title: '状态', rowspan: '2', width: 90, templet: function (d) { + return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("erpOrderStateEnum", 'id', d.state, 'name'); + }}, + { field: 'createName', title: systemLanguage["com.skyeye.createName"][languageType], align: 'left', rowspan: '2',width: 120 }, + { 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: 120 }, + { field: 'lastUpdateTime', title: '最后修改时间', align: 'center', rowspan: '2',width: 150}, { title: systemLanguage["com.skyeye.operation"][languageType], rowspan: '2', fixed: 'right', align: 'center', width: 200, toolbar: '#tableBar' } ],[ { field: 'fromTypeId', title: '来源类型', rowspan: '2',width: 150, templet: function (d) { - return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("sealOutLetFromType", 'id', d.fromTypeId, 'name'); + return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("productionPlanFromType", 'id', d.fromTypeId, 'name'); }}, { field: 'fromId', title: '单据编号', rowspan: '2',width: 200, templet: function (d) { return getNotUndefinedVal(d.fromMation?.oddNumber); diff --git a/erp-produce/src/main/resources/template/js/erpPreProductionPlan/preProductionTurnToProduction.js b/erp-produce/src/main/resources/template/js/erpPreProductionPlan/preProductionTurnToProduction.js index 8e4014325..02de1f5e6 100644 --- a/erp-produce/src/main/resources/template/js/erpPreProductionPlan/preProductionTurnToProduction.js +++ b/erp-produce/src/main/resources/template/js/erpPreProductionPlan/preProductionTurnToProduction.js @@ -18,11 +18,10 @@ layui.config({ // 预生产计划 转 生产计划 AjaxPostUtil.request({url: sysMainMation.erpBasePath + "queryProductionPlanTransById", params: {id: id}, type: 'json', method: 'GET', callback: function (json) { let data = json.bean; - console.log(5555,data) + // 因为要调生产计划的编辑布局,所以把预生产计划里的productionPlanChildList给到生产计划里的productionChildList + data.productionChildList = data.productionPlanChildList // 生产计划的【编辑布局】 dsFormUtil.initEditPageForStatic('content', 'FP2023092200002', data, { - savePreParams: function (params) { - }, saveData: function (params) { // 保存数据 AjaxPostUtil.request({url: sysMainMation.erpBasePath + "insertProductionPlanToProduction", params: params, type: 'json', method: "POST", callback: function(json) { @@ -31,18 +30,18 @@ layui.config({ }}); }, + // 移除来源单据 + loadComponentCallback: function () { + $("div[controlType='productionFromType']").remove(); + }, + // 新增行的回调函数 - // tableAddRowCallback: function (tableId) { - // $("#addRow" + tableId).remove(); - // $("div[controlType='simpleTable']").find(".chooseProductBtn").prop('disabled', true); - // $("div[controlType='simpleTable']").find(".unitPrice").prop('disabled', true); - // $("div[controlType='simpleTable']").find(".amountOfMoney").prop('disabled', true); - // $("div[controlType='simpleTable']").find(".taxRate").prop('disabled', true); - // $("div[controlType='simpleTable']").find(".taxMoney").prop('disabled', true); - // $("div[controlType='simpleTable']").find(".taxUnitPrice").prop('disabled', true); - // $("div[controlType='simpleTable']").find(".taxLastMoney").prop('disabled', true); - // $("div[controlType='simpleTable']").find(".specifications").prop('disabled', true); - // } + 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/erpProduction/erpProductionList.js b/erp-produce/src/main/resources/template/js/erpProduction/erpProductionList.js index 1e6c07eec..426343d4b 100644 --- a/erp-produce/src/main/resources/template/js/erpProduction/erpProductionList.js +++ b/erp-produce/src/main/resources/template/js/erpProduction/erpProductionList.js @@ -27,22 +27,29 @@ layui.config({ limit: getLimit(), cols: [[ { title: systemLanguage["com.skyeye.serialNumber"][languageType], rowspan: '2', type: 'numbers' }, - { field: 'oddNumber', title: '单号', align: 'center', rowspan: '2', width: 200, templet: function (d) { - return '' + d.oddNumber + ''; - }}, - { field: 'processInstanceId', title: '流程ID', width: 280, templet: function (d) { - return '' + getNotUndefinedVal(d.processInstanceId) + ''; + { field: 'oddNumber', title: '单号', rowspan: '2', align: 'left', width: 220, templet: function (d) { + var str = '' + d.oddNumber + ''; + if (!isNull(d.fromId)) { + str += '[转]'; + } + return str; }}, { colspan: '2', title: '来源单据信息', align: 'center' }, { field: 'operTime', width: 150, title: '单据日期', rowspan: '2',align: 'center'}, - { field: 'name', title: '产品名称', align: 'left',rowspan: '2',width: 150, templet: function (d) {return isNull(d.materialMation) ? '' : d.materialMation.name}}, - { field: 'salesOrderNum', width: 100, title: '生产类型', rowspan: '2',align: 'center', templet: function (d) {return isNull(d.sealOrderMation) ? '' : d.sealOrderMation.oddNumber}}, - { field: 'name', title: 'bom方案', align: 'left',rowspan: '2',width: 150, templet: function (d) {return isNull(d.materialMation) ? '' : d.materialMation.name}}, - { field: '---', width: 150, align: 'center', rowspan: '2',title: '交货日期'}, + { field: 'processInstanceId', title: '流程ID', rowspan: '2',width: 280, templet: function (d) { + return '' + getNotUndefinedVal(d.processInstanceId) + ''; + }}, + { field: 'state', title: '状态', rowspan: '2', width: 90, templet: function (d) { + return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("erpOrderStateEnum", 'id', d.state, 'name'); + }}, + { field: 'createName', title: systemLanguage["com.skyeye.createName"][languageType], align: 'left', rowspan: '2',width: 120 }, + { 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: 120 }, + { field: 'lastUpdateTime', title: '最后修改时间', align: 'center', rowspan: '2',width: 150}, { title: systemLanguage["com.skyeye.operation"][languageType], rowspan: '2', fixed: 'right', align: 'center', width: 200, toolbar: '#tableBar' } ],[ { field: 'fromTypeId', title: '来源类型', rowspan: '2',width: 150, templet: function (d) { - return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("sealOutLetFromType", 'id', d.fromTypeId, 'name'); + return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("productionFromType", 'id', d.fromTypeId, 'name'); }}, { field: 'fromId', title: '单据编号', rowspan: '2',width: 200, templet: function (d) { return getNotUndefinedVal(d.fromMation?.oddNumber); diff --git a/erp-produce/src/main/resources/template/js/wholeOut/wholeOutList.js b/erp-produce/src/main/resources/template/js/wholeOut/wholeOutList.js index 815a7f058..6988a4040 100644 --- a/erp-produce/src/main/resources/template/js/wholeOut/wholeOutList.js +++ b/erp-produce/src/main/resources/template/js/wholeOut/wholeOutList.js @@ -110,44 +110,44 @@ layui.config({ }}); } - // // 删除 - // function del(data, obj) { - // layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function (index) { - // layer.close(index); - // AjaxPostUtil.request({url: sysMainMation.erpBasePath + "deleteProductionById", 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 del(data, obj) { + layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function (index) { + layer.close(index); + AjaxPostUtil.request({url: sysMainMation.erpBasePath + "erpcommon005", params: {id: data.id}, type: 'json', method: 'DELETE', callback: function (json) { + winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); + loadTable(); + }}); + }); + } - // // 提交审批 - // 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 + "erpproduction007", params: params, type: 'json', method: 'POST', callback: function (json) { - // winui.window.msg("提交成功", {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 + "erpcommon006", params: params, type: 'json', method: 'POST', callback: function (json) { + winui.window.msg("提交成功", {icon: 1, time: 2000}); + loadTable(); + }}); + }); + }); + } - // // 撤销 - // function revoke(data) { - // layer.confirm('确认撤销该申请吗?', { icon: 3, title: '撤销操作' }, function (index) { - // layer.close(index); - // AjaxPostUtil.request({url: sysMainMation.erpBasePath + "revokeProduction", params: {processInstanceId: data.processInstanceId}, type: 'json', method: "PUT", callback: function (json) { - // winui.window.msg("提交成功", {icon: 1, time: 2000}); - // loadTable(); - // }}); - // }); - // } + // 撤销 + function revoke(data) { + layer.confirm('确认撤销该申请吗?', { icon: 3, title: '撤销操作' }, function (index) { + layer.close(index); + AjaxPostUtil.request({url: sysMainMation.erpBasePath + "erpcommon003", params: {processInstanceId: data.processInstanceId}, type: 'json', method: "PUT", callback: function (json) { + winui.window.msg("提交成功", {icon: 1, time: 2000}); + loadTable(); + }}); + }); + } form.render(); $("body").on("click", "#reloadTable", function() { diff --git a/erp-produce/src/main/resources/template/tpl/wholeOut/wholeOutList.html b/erp-produce/src/main/resources/template/tpl/wholeOut/wholeOutList.html index b7006d00c..cd1beaebe 100644 --- a/erp-produce/src/main/resources/template/tpl/wholeOut/wholeOutList.html +++ b/erp-produce/src/main/resources/template/tpl/wholeOut/wholeOutList.html @@ -17,19 +17,19 @@
-- GitLab