From e6bf35567fb380785634c0e1682486728ff35c98 Mon Sep 17 00:00:00 2001 From: weizhiqiang <598748873@qq.com> Date: Sun, 2 Oct 2022 10:38:30 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=9F=E4=BA=A7=E8=AE=A1=E5=88=92=E5=8D=95?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../js/erpProduction/erpProductionEdit.js | 1 - .../erpProductionNoSuccessChoose.js | 125 +++++++++--------- .../erpProductionNoSuccessChooseProcedure.js | 105 +++++++-------- .../erpProduction/erpProductionDetail.html | 10 +- 4 files changed, 114 insertions(+), 127 deletions(-) diff --git a/erp-produce/src/main/resources/template/js/erpProduction/erpProductionEdit.js b/erp-produce/src/main/resources/template/js/erpProduction/erpProductionEdit.js index 0c2283dc2..109f60519 100644 --- a/erp-produce/src/main/resources/template/js/erpProduction/erpProductionEdit.js +++ b/erp-produce/src/main/resources/template/js/erpProduction/erpProductionEdit.js @@ -40,7 +40,6 @@ layui.config({ textool.init({eleId: 'remark', maxlength: 200}); - //回显数据 AjaxPostUtil.request({url: flowableBasePath + "erpproduction003", params: {id: parent.rowId}, type: 'json', method: "GET", callback: function (json) { // 商品信息 erpOrderUtil.chooseProductMation = { diff --git a/erp-produce/src/main/resources/template/js/erpProduction/erpProductionNoSuccessChoose.js b/erp-produce/src/main/resources/template/js/erpProduction/erpProductionNoSuccessChoose.js index ba69e8414..e09b43839 100644 --- a/erp-produce/src/main/resources/template/js/erpProduction/erpProductionNoSuccessChoose.js +++ b/erp-produce/src/main/resources/template/js/erpProduction/erpProductionNoSuccessChoose.js @@ -6,10 +6,8 @@ layui.config({ }).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; @@ -18,69 +16,66 @@ layui.config({ var s = '生产计划单选择规则:1.单选,双击指定行数据即可选中;2.已审批通过的未完成的生产计划单。如没有查到要选择的单据,请检查单据信息是否满足当前规则。'; $("#showInfo").html(s); - initTable(); - function initTable(){ - table.render({ - id: 'messageTable', - elem: '#messageTable', - method: 'post', - url: flowableBasePath + 'erpproduction009', - where: getTableParams(), - even: true, - page: false, - cols: [[ - { type: 'radio'}, - { title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' }, - { field: 'defaultNumber', title: '生产单号', align: 'center', width: 200, templet: function (d) { - return '' + d.defaultNumber + ''; - }}, - { field: 'salesOrderNum', width: 200, title: '关联销售单', align: 'center'}, - { field: 'materialName', width: 150, title: '商品名称'}, - { field: 'materialModel', width: 150, title: '商品型号'}, - { field: 'number', width: 80, title: '计划数量'}, - { field: 'planStartDate', width: 140, align: 'center', title: '计划开始时间'}, - { field: 'planComplateDate', width: 140, align: 'center', title: '计划结束时间'} - ]], - done: function(res, 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 = res.rows[chooseIndex]; - - //根据生产计划单id获取该单据下的所有外购商品以及剩余数量 - //chooseType:根据生产计划单选择工序时,采购订单需要回显外购一种类型的商品 - AjaxPostUtil.request({url: flowableBasePath + "erpproduction010", params: {orderId: obj.id, chooseType: "1"}, type: 'json', callback: function(json) { - obj.norms = [].concat(json.rows); - parent.productionMation = obj; + table.render({ + id: 'messageTable', + elem: '#messageTable', + method: 'post', + url: flowableBasePath + 'erpproduction009', + where: getTableParams(), + even: true, + page: false, + cols: [[ + { type: 'radio'}, + { title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' }, + { field: 'defaultNumber', title: '生产单号', align: 'center', width: 200, templet: function (d) { + return '' + d.defaultNumber + ''; + }}, + { field: 'salesOrderNum', width: 200, title: '关联销售单', align: 'center'}, + { field: 'materialName', width: 150, title: '商品名称'}, + { field: 'materialModel', width: 150, title: '商品型号'}, + { field: 'number', width: 80, title: '计划数量'}, + { field: 'planStartDate', width: 140, align: 'center', title: '计划开始时间'}, + { field: 'planComplateDate', width: 140, align: 'center', title: '计划结束时间'} + ]], + done: function(res, 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 = res.rows[chooseIndex]; - 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(); - }) - } - }); - - table.on('tool(messageTable)', function (obj) { - var data = obj.data; - var layEvent = obj.event; - if (layEvent === 'details') { //详情 - details(data); - } - }); - - form.render(); - } - - //详情 + //根据生产计划单id获取该单据下的所有外购商品以及剩余数量 + //chooseType:根据生产计划单选择工序时,采购订单需要回显外购一种类型的商品 + AjaxPostUtil.request({url: flowableBasePath + "erpproduction010", params: {orderId: obj.id, chooseType: "1"}, type: 'json', callback: function(json) { + obj.norms = [].concat(json.rows); + parent.productionMation = 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(); + }) + } + }); + + table.on('tool(messageTable)', function (obj) { + var data = obj.data; + var layEvent = obj.event; + if (layEvent === 'details') { //详情 + details(data); + } + }); + + form.render(); + + // 详情 function details(data) { rowId = data.id; _openNewWindows({ @@ -92,9 +87,7 @@ layui.config({ }}); } - form.on('submit(formSearch)', function (data) { - if (winui.verifyForm(data.elem)) { refreshTable(); } diff --git a/erp-produce/src/main/resources/template/js/erpProduction/erpProductionNoSuccessChooseProcedure.js b/erp-produce/src/main/resources/template/js/erpProduction/erpProductionNoSuccessChooseProcedure.js index cf262a031..c809f8f06 100644 --- a/erp-produce/src/main/resources/template/js/erpProduction/erpProductionNoSuccessChooseProcedure.js +++ b/erp-produce/src/main/resources/template/js/erpProduction/erpProductionNoSuccessChooseProcedure.js @@ -6,10 +6,8 @@ layui.config({ }).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; @@ -20,59 +18,56 @@ layui.config({ var chooseMation = {}; - initTable(); - function initTable(){ - table.render({ - id: 'messageTable', - elem: '#messageTable', - method: 'post', - url: flowableBasePath + 'erpproduction009', - where: getTableParams(), - even: true, - page: false, - cols: [[ - { type: 'radio'}, - { title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' }, - { field: 'defaultNumber', title: '生产单号', align: 'center', width: 200, templet: function (d) { - return '' + d.defaultNumber + ''; - }}, - { field: 'salesOrderNum', width: 200, title: '关联销售单', align: 'center'}, - { field: 'materialName', width: 150, title: '商品名称'}, - { field: 'materialModel', width: 150, title: '商品型号'}, - { field: 'number', width: 80, title: '计划数量'}, - { field: 'planStartDate', width: 140, align: 'center', title: '计划开始时间'}, - { field: 'planComplateDate', width: 140, align: 'center', title: '计划结束时间'} - ]], - done: function(res, curr, count){ - matchingLanguage(); - $('#messageTable').next().find('.layui-table-body').find("table" ).find("tbody").children("tr").on('click',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 = res.rows[chooseIndex]; - chooseMation = obj; - }); - - $('#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(); - }) - } - }); - - table.on('tool(messageTable)', function (obj) { - var data = obj.data; - var layEvent = obj.event; - if (layEvent === 'details') { //详情 - details(data); - } - }); - - form.render(); - } - + table.render({ + id: 'messageTable', + elem: '#messageTable', + method: 'post', + url: flowableBasePath + 'erpproduction009', + where: getTableParams(), + even: true, + page: false, + cols: [[ + { type: 'radio'}, + { title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' }, + { field: 'defaultNumber', title: '生产单号', align: 'center', width: 200, templet: function (d) { + return '' + d.defaultNumber + ''; + }}, + { field: 'salesOrderNum', width: 200, title: '关联销售单', align: 'center'}, + { field: 'materialName', width: 150, title: '商品名称'}, + { field: 'materialModel', width: 150, title: '商品型号'}, + { field: 'number', width: 80, title: '计划数量'}, + { field: 'planStartDate', width: 140, align: 'center', title: '计划开始时间'}, + { field: 'planComplateDate', width: 140, align: 'center', title: '计划结束时间'} + ]], + done: function(res, curr, count){ + matchingLanguage(); + $('#messageTable').next().find('.layui-table-body').find("table" ).find("tbody").children("tr").on('click',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 = res.rows[chooseIndex]; + chooseMation = obj; + }); + + $('#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(); + }) + } + }); + + table.on('tool(messageTable)', function (obj) { + var data = obj.data; + var layEvent = obj.event; + if (layEvent === 'details') { //详情 + details(data); + } + }); + + form.render(); + // 详情 function details(data) { rowId = data.id; diff --git a/erp-produce/src/main/resources/template/tpl/erpProduction/erpProductionDetail.html b/erp-produce/src/main/resources/template/tpl/erpProduction/erpProductionDetail.html index bc5e44d85..7ce4925c3 100644 --- a/erp-produce/src/main/resources/template/tpl/erpProduction/erpProductionDetail.html +++ b/erp-produce/src/main/resources/template/tpl/erpProduction/erpProductionDetail.html @@ -163,11 +163,11 @@
{{#each childList}} -