From cfa51928258ae7e3628a3887ca377ff06ce70081 Mon Sep 17 00:00:00 2001 From: weizhiqiang <598748873@qq.com> Date: Sun, 30 Oct 2022 20:13:00 +0800 Subject: [PATCH] =?UTF-8?q?ERP=E5=95=86=E5=93=81=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E6=95=B4=E6=94=B9=E5=AE=8C=E6=88=90=EF=BC=8C=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E5=88=86=E9=A1=B5=E6=9F=A5=E8=AF=A2=E6=A0=91=E7=8A=B6=E8=A1=A8?= =?UTF-8?q?=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../materialCategory/materialCategoryAdd.js | 3 +- .../materialCategory/materialCategoryEdit.js | 9 +++-- .../materialCategory/materialCategoryList.js | 39 ++++++++++--------- .../materialCategoryList.html | 25 ++---------- 4 files changed, 29 insertions(+), 47 deletions(-) diff --git a/erp/src/main/resources/template/js/materialCategory/materialCategoryAdd.js b/erp/src/main/resources/template/js/materialCategory/materialCategoryAdd.js index ebc0d29ff..1d9db1d90 100644 --- a/erp/src/main/resources/template/js/materialCategory/materialCategoryAdd.js +++ b/erp/src/main/resources/template/js/materialCategory/materialCategoryAdd.js @@ -17,7 +17,6 @@ layui.config({ textool.init({eleId: 'remark', maxlength: 200}); - //加载树信息 fsTree.render({ id: "materialCategoryType", url: flowableBasePath + "materialcategory008", @@ -46,7 +45,7 @@ layui.config({ remark: $("#remark").val(), parentId: checkNodes[0].id }; - AjaxPostUtil.request({url: flowableBasePath + "materialcategory002", params: params, type: 'json', method: "POST", callback: function (json) { + AjaxPostUtil.request({url: flowableBasePath + "writeMaterialCategoryMation", params: params, type: 'json', method: "POST", callback: function (json) { parent.layer.close(index); parent.refreshCode = '0'; }}); diff --git a/erp/src/main/resources/template/js/materialCategory/materialCategoryEdit.js b/erp/src/main/resources/template/js/materialCategory/materialCategoryEdit.js index 8f933e085..8966fbf19 100644 --- a/erp/src/main/resources/template/js/materialCategory/materialCategoryEdit.js +++ b/erp/src/main/resources/template/js/materialCategory/materialCategoryEdit.js @@ -14,7 +14,7 @@ layui.config({ showGrid({ id: "showForm", url: flowableBasePath + "materialcategory004", - params: {rowId: parent.rowId}, + params: {id: parent.rowId}, pagination: false, method: "GET", template: $("#beanTemplate").html(), @@ -27,11 +27,12 @@ layui.config({ form.on('submit(formEditBean)', function (data) { if (winui.verifyForm(data.elem)) { var params = { - rowId: parent.rowId, + id: parent.rowId, name: $("#typeName").val(), - remark: $("#remark").val() + remark: $("#remark").val(), + parentId: json.bean.parentId }; - AjaxPostUtil.request({url: flowableBasePath + "materialcategory005", params: params, type: 'json', method: "PUT", callback: function (json) { + AjaxPostUtil.request({url: flowableBasePath + "writeMaterialCategoryMation", params: params, type: 'json', method: "POST", callback: function (json) { parent.layer.close(index); parent.refreshCode = '0'; }}); diff --git a/erp/src/main/resources/template/js/materialCategory/materialCategoryList.js b/erp/src/main/resources/template/js/materialCategory/materialCategoryList.js index 7cc9f3f9c..85961aa37 100644 --- a/erp/src/main/resources/template/js/materialCategory/materialCategoryList.js +++ b/erp/src/main/resources/template/js/materialCategory/materialCategoryList.js @@ -19,19 +19,30 @@ layui.config({ method: 'post', url: flowableBasePath + 'materialcategory001', where: getTableParams(), + even: true, + page: true, + limits: getLimits(), + limit: getLimit(), cols: [[ { title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' }, - { field: 'name', title: '名称', align: 'left', width: 360 }, - { field: 'orderBy', title: systemLanguage["com.skyeye.serialNumber"][languageType], align: 'center', width: 80 }, + { field: 'name', title: '名称', align: 'left', width: 200 }, + { field: 'sort', title: systemLanguage["com.skyeye.serialNumber"][languageType], align: 'center', width: 80 }, { field: 'remark', title: '备注', align: 'left', width: 200 }, - { title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 250, toolbar: '#tableBar'} + { field: 'createName', title: systemLanguage["com.skyeye.createName"][languageType], width: 120 }, + { field: 'createTime', title: systemLanguage["com.skyeye.createTime"][languageType], align: 'center', width: 150 }, + { field: 'lastUpdateName', title: systemLanguage["com.skyeye.lastUpdateName"][languageType], align: 'left', width: 120 }, + { field: 'lastUpdateTime', title: systemLanguage["com.skyeye.lastUpdateTime"][languageType], align: 'center', width: 150 }, + { title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 200, toolbar: '#tableBar' } ]], done: function(json) { matchingLanguage(); + initTableSearchUtil.initAdvancedSearch($("#messageTable")[0], json.searchFilter, form, "请输入名称", function () { + tableTree.reload("messageTable", {page: {curr: 1}, where: getTableParams()}); + }); } }, { keyId: 'id', - keyPid: 'pId', + keyPid: 'parentId', title: 'name', }); @@ -66,14 +77,14 @@ layui.config({ 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: flowableBasePath + "materialcategory003", params: {rowId: data.id}, type: 'json', method: "DELETE", callback: function (json) { + AjaxPostUtil.request({url: flowableBasePath + "materialcategory003", 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 edit(data) { rowId = data.id; _openNewWindows({ @@ -90,7 +101,7 @@ layui.config({ // 上移 function upMove(data) { - AjaxPostUtil.request({url: flowableBasePath + "materialcategory006", params: {rowId: data.id}, type: 'json', method: "PUT", callback: function (json) { + AjaxPostUtil.request({url: flowableBasePath + "materialcategory006", params: {id: data.id}, type: 'json', method: "PUT", callback: function (json) { winui.window.msg(systemLanguage["com.skyeye.moveUpOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); loadTable(); }}); @@ -98,21 +109,13 @@ layui.config({ // 下移 function downMove(data) { - AjaxPostUtil.request({url: flowableBasePath + "materialcategory007", params: {rowId: data.id}, type: 'json', method: "PUT", callback: function (json) { + AjaxPostUtil.request({url: flowableBasePath + "materialcategory007", params: {id: data.id}, type: 'json', method: "PUT", callback: function (json) { winui.window.msg(systemLanguage["com.skyeye.moveDownOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); loadTable(); }}); } form.render(); - form.on('submit(formSearch)', function (data) { - if (winui.verifyForm(data.elem)) { - loadTable(); - } - return false; - }); - - // 刷新数据 $("body").on("click", "#reloadTable", function() { loadTable(); }); @@ -122,9 +125,7 @@ layui.config({ } function getTableParams() { - return { - name: $("#name").val() - }; + return $.extend(true, {}, initTableSearchUtil.getSearchValue("messageTable")); } exports('materialCategoryList', {}); diff --git a/erp/src/main/resources/template/tpl/materialCategory/materialCategoryList.html b/erp/src/main/resources/template/tpl/materialCategory/materialCategoryList.html index 1d8f77dc9..18940494d 100644 --- a/erp/src/main/resources/template/tpl/materialCategory/materialCategoryList.html +++ b/erp/src/main/resources/template/tpl/materialCategory/materialCategoryList.html @@ -5,37 +5,18 @@