提交 cfa51928 编写于 作者: doc_wei's avatar doc_wei

ERP商品类型整改完成,支持分页查询树状表格

上级 9039cd81
......@@ -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';
}});
......
......@@ -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';
}});
......
......@@ -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', {});
......
......@@ -5,37 +5,18 @@
<title></title>
<link href="../../assets/lib/layui/css/layui.css" rel="stylesheet" />
<link href="../../assets/lib/winui/css/winui.css" rel="stylesheet" />
<style type="text/css">
.layui-table-view .layui-table th, .layui-table-view .layui-table td{
display: inline-block;
}
</style>
</head>
<body>
<div class="txtcenter" style="margin:0 auto;padding-top:10px;">
<form class="layui-form layui-form-pane" action="" autocomplete="off">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">名称</label>
<div class="layui-input-inline">
<input type="text" id="name" name="name" placeholder="请输入类型名称" class="layui-input" />
</div>
<button type="reset" class="layui-btn layui-btn-primary list-form-search"><language showName="com.skyeye.reset"></language></button>
<button class="layui-btn list-form-search" lay-submit lay-filter="formSearch"><language showName="com.skyeye.search2"></language></button>
</div>
</div>
</form>
</div>
<div class="winui-toolbar">
<div class="winui-tool">
<button id="reloadTable" class="winui-toolbtn"><i class="fa fa-refresh" aria-hidden="true"></i><language showName="com.skyeye.refreshDataBtn"></language></button>
<button id="addBean" class="winui-toolbtn" auth="1568558491168"><i class="fa fa-plus" aria-hidden="true"></i><language showName="com.skyeye.addBtn"></language></button>
<button id="reloadTable" class="winui-toolbtn search-table-btn-right"><i class="fa fa-refresh" aria-hidden="true"></i><language showName="com.skyeye.refreshDataBtn"></language></button>
<button id="addBean" class="winui-toolbtn search-table-btn-right" auth="1568558491168"><i class="fa fa-plus" aria-hidden="true"></i><language showName="com.skyeye.addBtn"></language></button>
</div>
</div>
<div style="margin:auto 10px;">
<table id="messageTable" lay-filter="messageTable"></table>
<script type="text/html" id="tableBar">
{{# if(auth('1568558823143')){ }}
{{# if(auth('1568558491168')){ }}
<a class="layui-btn layui-btn-xs layui-btn-normal" lay-event="edit"><language showName="com.skyeye.editBtn"></language></a>
{{# } }}
{{# if(auth('1568558794203')){ }}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册