From 563814fe32e7622109debe3a8dfad3125bb59996 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: Sat, 20 Jul 2024 17:22:57 +0800 Subject: [PATCH] =?UTF-8?q?update=EF=BC=9A=E7=94=98=E7=89=B9=E5=9B=BE?= =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../departmentMachiningList.js | 2 +- .../js/departmentMachining/machiningGantt.js | 73 +++---------------- 2 files changed, 11 insertions(+), 64 deletions(-) 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 e48670a60..fbe173baa 100644 --- a/erp-produce/src/main/resources/template/js/departmentMachining/departmentMachiningList.js +++ b/erp-produce/src/main/resources/template/js/departmentMachining/departmentMachiningList.js @@ -1,4 +1,3 @@ - var rowId = ""; layui.config({ @@ -134,6 +133,7 @@ layui.config({ loadTable(); }}); } + //转补料单 function processingToSupplementMaterials(data){ _openNewWindows({ diff --git a/erp-produce/src/main/resources/template/js/departmentMachining/machiningGantt.js b/erp-produce/src/main/resources/template/js/departmentMachining/machiningGantt.js index d78bff589..513281b23 100644 --- a/erp-produce/src/main/resources/template/js/departmentMachining/machiningGantt.js +++ b/erp-produce/src/main/resources/template/js/departmentMachining/machiningGantt.js @@ -12,32 +12,17 @@ layui.config({ // 根据id查询加工单信息 AjaxPostUtil.request({url: sysMainMation.erpBasePath + "queryMachinForGanttById", params: {id: id}, type: 'json', method: 'GET', callback: function (json) { - console.log(json) - matchingLanguage(); - form.render(); - renderPanel(); - // render(); - - gantt.clearAll(); //清空缓存 - let nodeList = json.bean.node; - if (isNull(nodeList) || nodeList.length == 0) { - return; - } - $.each(nodeList, function (i, item) { - item.start_date = new Date(item.start_date); - item.end_date = new Date(item.end_date); - }); - let linkList = json.bean.link; - if (isNull(linkList) || linkList.length == 0) { - linkList = []; - } - // 解析 - gantt.parse({ - data: nodeList, - links: linkList - }); + matchingLanguage(); + form.render(); + renderPanel(); - }}); + gantt.clearAll(); //清空缓存 + // 解析 + gantt.parse({ + data: json.bean.node, + links: json.bean.link + }); + }}); function renderPanel() { document.getElementById('device_load').style.cssText = 'height:' + ($(window).height() - 140) + 'px'; @@ -124,45 +109,7 @@ layui.config({ }; gantt.init("device_load"); - gantt.i18n.setLocale("cn"); //使用中文 - // function render() { - // let milestoneId = $("#milestoneId").val(); - // if (isNull(milestoneId)) { - // winui.window.msg("请选择产品", {icon: 2, time: 2000}); - // return false; - // } - // let params = { - // id: objectId, - // // objectKey: objectKey, - // // holderId: milestoneId, - // // type: $("#type .plan-select").attr("data-type") - // }; - // var tem = getInPoingArr(milestoneList, "id", milestoneId, null); - // gantt.config.start_date = new Date(tem.startTime); - // gantt.config.end_date = new Date(tem.endTime); - // console.log(999) - // AjaxPostUtil.request({url: sysMainMation.erpBasePath + "queryMachinForGanttById", params: params, type: 'json', method: 'GET', callback: function (json) { - // gantt.clearAll(); //清空缓存 - // let nodeList = json.bean.node; - // if (isNull(nodeList) || nodeList.length == 0) { - // return; - // } - // $.each(nodeList, function (i, item) { - // item.start_date = new Date(item.start_date); - // item.end_date = new Date(item.end_date); - // }); - // let linkList = json.bean.link; - // if (isNull(linkList) || linkList.length == 0) { - // linkList = []; - // } - // // 解析 - // gantt.parse({ - // data: nodeList, - // links: linkList - // }); - // }}); - // } $("body").on("click", ".type-btn", function (e) { $(this).parent().find('.type-btn').removeClass("plan-select"); -- GitLab