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

桌面管理代码整改,新增ERP仓库桌面

上级 bb3fa754
...@@ -18,19 +18,19 @@ layui.config({ ...@@ -18,19 +18,19 @@ layui.config({
desktopName: $("#desktopName").val(), desktopName: $("#desktopName").val(),
desktopCnName: $("#desktopCnName").val() desktopCnName: $("#desktopCnName").val()
}; };
AjaxPostUtil.request({url:reqBasePath + "desktop002", params:params, type: 'json', callback: function(json){ AjaxPostUtil.request({url: reqBasePath + "desktop002", params: params, type: 'json', callback: function(json) {
if(json.returnCode == 0){ if(json.returnCode == 0){
parent.layer.close(index); parent.layer.close(index);
parent.refreshCode = '0'; parent.refreshCode = '0';
}else{ }else{
winui.window.msg(json.returnMessage, {icon: 2,time: 2000}); winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
} }
}}); }});
} }
return false; return false;
}); });
$("body").on("click", "#cancle", function(){ $("body").on("click", "#cancle", function() {
parent.layer.close(index); parent.layer.close(index);
}); });
}); });
......
...@@ -15,7 +15,7 @@ layui.config({ ...@@ -15,7 +15,7 @@ layui.config({
url: reqBasePath + "desktop006", url: reqBasePath + "desktop006",
params: {rowId:parent.rowId}, params: {rowId:parent.rowId},
pagination: false, pagination: false,
template: getFileContent('tpl/sysevedesktop/sysevedesktopeditTemplate.tpl'), template: $("#beanTemplate").html(),
ajaxSendAfter:function(json){ ajaxSendAfter:function(json){
matchingLanguage(); matchingLanguage();
form.on('submit(formEditBean)', function (data) { form.on('submit(formEditBean)', function (data) {
......
...@@ -18,7 +18,7 @@ layui.config({ ...@@ -18,7 +18,7 @@ layui.config({
elem: '#messageTable', elem: '#messageTable',
method: 'post', method: 'post',
url: reqBasePath + 'desktop001', url: reqBasePath + 'desktop001',
where: {desktopName:$("#desktopName").val()}, where: getTableParams(),
even: true, even: true,
page: true, page: true,
limits: getLimits(), limits: getLimits(),
...@@ -37,8 +37,10 @@ layui.config({ ...@@ -37,8 +37,10 @@ layui.config({
return "<span class='state-new'>新建</span>"; return "<span class='state-new'>新建</span>";
} }
}}, }},
{ field: 'createName', title: systemLanguage["com.skyeye.createName"][languageType], align: 'left', width: 120 }, { field: 'createName', title: systemLanguage["com.skyeye.createName"][languageType], width: 120 },
{ field: 'createTime', title: systemLanguage["com.skyeye.createTime"][languageType], align: 'center', width: 140 }, { 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: 357, toolbar: '#tableBar'} { title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 357, toolbar: '#tableBar'}
]], ]],
done: function(){ done: function(){
...@@ -69,9 +71,9 @@ layui.config({ ...@@ -69,9 +71,9 @@ layui.config({
//添加 //添加
$("body").on("click", "#addBean", function(){ $("body").on("click", "#addBean", function(){
_openNewWindows({ _openNewWindows({
url: "../../tpl/sysevedesktop/sysevedesktopadd.html?", url: "../../tpl/sysEveDesktop/sysEveDesktopAdd.html",
title: "新增桌面名称", title: systemLanguage["com.skyeye.addPageTitle"][languageType],
pageId: "sysevedesktopadd", pageId: "sysEveDesktopAdd",
area: ['90vw', '90vh'], area: ['90vw', '90vh'],
callBack: function(refreshCode){ callBack: function(refreshCode){
if (refreshCode == '0') { if (refreshCode == '0') {
...@@ -150,9 +152,9 @@ layui.config({ ...@@ -150,9 +152,9 @@ layui.config({
function edit(data){ function edit(data){
rowId = data.id; rowId = data.id;
_openNewWindows({ _openNewWindows({
url: "../../tpl/sysevedesktop/sysevedesktopedit.html", url: "../../tpl/sysEveDesktop/sysEveDesktopEdit.html",
title: "编辑名称", title: systemLanguage["com.skyeye.editPageTitle"][languageType],
pageId: "sysevedesktopedit", pageId: "sysEveDesktopEdit",
area: ['90vw', '90vh'], area: ['90vw', '90vh'],
callBack: function(refreshCode){ callBack: function(refreshCode){
if (refreshCode == '0') { if (refreshCode == '0') {
...@@ -197,18 +199,20 @@ layui.config({ ...@@ -197,18 +199,20 @@ layui.config({
form.render(); form.render();
form.on('submit(formSearch)', function (data) { form.on('submit(formSearch)', function (data) {
if (winui.verifyForm(data.elem)) { if (winui.verifyForm(data.elem)) {
refreshTable(); table.reload("messageTable", {page: {curr: 1}, where: getTableParams()});
} }
return false; return false;
}); });
function loadTable(){ function loadTable(){
table.reload("messageTable", {where:{desktopName:$("#desktopName").val()}}); table.reload("messageTable", {where: getTableParams()});
} }
function refreshTable(){ function getTableParams() {
table.reload("messageTable", {page: {curr: 1}, where:{desktopName:$("#desktopName").val()}}); return {
} desktopName: $("#desktopName").val()
};
exports('sysevedesktoplist', {}); }
exports('sysEveDesktopList', {});
}); });
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<div style="margin:0 auto;padding:20px;"> <div style="margin:0 auto;padding:20px;">
<form class="layui-form" action="" id="showForm" autocomplete="off"> <form class="layui-form" action="" id="showForm" autocomplete="off">
<div class="layui-form-item layui-col-xs12"> <div class="layui-form-item layui-col-xs12">
<span class="hr-title">桌面信息</span><hr> <span class="hr-title">基本信息</span><hr>
</div> </div>
<div class="layui-form-item layui-col-xs12"> <div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">中文名称<i class="red">*</i></label> <label class="layui-form-label">中文名称<i class="red">*</i></label>
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
<script src="../../assets/lib/layui/layui.js"></script> <script src="../../assets/lib/layui/layui.js"></script>
<script src="../../assets/lib/layui/custom.js"></script> <script src="../../assets/lib/layui/custom.js"></script>
<script type="text/javascript"> <script type="text/javascript">
layui.config({base: '../../js/sysevedesktop/'}).use('sysevedesktopadd'); layui.config({base: '../../js/sysEveDesktop/'}).use('sysEveDesktopAdd');
</script> </script>
</body> </body>
</html> </html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<link href="../../assets/lib/layui/css/layui.css" rel="stylesheet" />
<link href="../../assets/lib/winui/css/winui.css" rel="stylesheet" />
</head>
<body>
<div style="padding:20px; margin:0 auto;">
<form class="layui-form" action="" id="showForm">
</form>
</div>
<script type="text/x-handlebars-template" id="beanTemplate">
{{#bean}}
<div class="layui-form-item layui-col-xs12">
<span class="hr-title">基本信息</span><hr>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">中文名称<i class="red">*</i></label>
<div class="layui-input-block">
<input type="text" id="desktopName" name="desktopName" win-verify="required" placeholder="请输入桌面名称" class="layui-input" value="{{desktopName}}"/>
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">英文名称<i class="red">*</i></label>
<div class="layui-input-block">
<input type="text" id="desktopCnName" name="desktopCnName" win-verify="required" placeholder="请输入英文名称" class="layui-input" value="{{desktopCnName}}"/>
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<div class="layui-input-block">
<button class="winui-btn" id="cancle"><language showName="com.skyeye.cancel"></language></button>
<button class="winui-btn" lay-submit lay-filter="formEditBean"><language showName="com.skyeye.save"></language></button>
</div>
</div>
{{/bean}}
</script>
<script src="../../assets/lib/layui/layui.js"></script>
<script src="../../assets/lib/layui/custom.js"></script>
<script type="text/javascript">
layui.config({base: '../../js/sysEveDesktop/'}).use('sysEveDesktopEdit');
</script>
</body>
</html>
\ No newline at end of file
...@@ -30,19 +30,9 @@ ...@@ -30,19 +30,9 @@
<div style="margin:auto 10px;"> <div style="margin:auto 10px;">
<table id="messageTable" lay-filter="messageTable"></table> <table id="messageTable" lay-filter="messageTable"></table>
<script type="text/html" id="tableBar"> <script type="text/html" id="tableBar">
{{# if(d.state == 3){ }} {{# if(d.state == 2 && auth('1563780674866')){ }}
{{# if(auth('1563780689514')){ }}
<a class="layui-btn layui-btn-xs layui-btn-normal" lay-event="edit"><language showName="com.skyeye.editBtn"></language></a>
{{# } }}
{{# if(auth('1563780661048')){ }}
<a class="layui-btn layui-btn-xs" lay-event="up">上线</a>
{{# } }}
{{# if(d.allNum == 0 && auth('1563780647628')){ }}
<a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="delet"><language showName="com.skyeye.deleteBtn"></language></a>
{{# } }}
{{# }else if(d.state == 2 && auth('1563780674866')){ }}
<a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="down">下线</a> <a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="down">下线</a>
{{# }else if(d.state == 1){ }} {{# }else if(d.state == 1 || d.state == 3){ }}
{{# if(auth('1563780689514')){ }} {{# if(auth('1563780689514')){ }}
<a class="layui-btn layui-btn-xs layui-btn-normal" lay-event="edit"><language showName="com.skyeye.editBtn"></language></a> <a class="layui-btn layui-btn-xs layui-btn-normal" lay-event="edit"><language showName="com.skyeye.editBtn"></language></a>
{{# } }} {{# } }}
...@@ -67,7 +57,7 @@ ...@@ -67,7 +57,7 @@
<script src="../../assets/lib/layui/layui.js"></script> <script src="../../assets/lib/layui/layui.js"></script>
<script src="../../assets/lib/layui/custom.js"></script> <script src="../../assets/lib/layui/custom.js"></script>
<script type="text/javascript"> <script type="text/javascript">
layui.config({base: '../../js/sysevedesktop/'}).use('sysevedesktoplist'); layui.config({base: '../../js/sysEveDesktop/'}).use('sysEveDesktopList');
</script> </script>
</body> </body>
</html> </html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<link href="../../assets/lib/layui/css/layui.css" rel="stylesheet" />
<link href="../../assets/lib/winui/css/winui.css" rel="stylesheet" />
</head>
<body>
<div style="padding:20px; margin:0 auto;">
<form class="layui-form" action="" id="showForm">
</form>
</div>
<script src="../../assets/lib/layui/layui.js"></script>
<script src="../../assets/lib/layui/custom.js"></script>
<script type="text/javascript">
layui.config({base: '../../js/sysevedesktop/'}).use('sysevedesktopedit');
</script>
</body>
</html>
\ No newline at end of file
{{#bean}}
<div class="layui-form-item layui-col-xs12">
<span class="hr-title">桌面信息</span><hr>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">中文名称<i class="red">*</i></label>
<div class="layui-input-block">
<input type="text" id="desktopName" name="desktopName" win-verify="required" placeholder="请输入桌面名称" class="layui-input" value="{{desktopName}}"/>
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">英文名称<i class="red">*</i></label>
<div class="layui-input-block">
<input type="text" id="desktopCnName" name="desktopCnName" win-verify="required" placeholder="请输入英文名称" class="layui-input" value="{{desktopCnName}}"/>
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<div class="layui-input-block">
<button class="winui-btn" id="cancle"><language showName="com.skyeye.cancel"></language></button>
<button class="winui-btn" lay-submit lay-filter="formEditBean"><language showName="com.skyeye.save"></language></button>
</div>
</div>
{{/bean}}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册