提交 7803ee9b 编写于 作者: W weizhiqiang

【ajax】修改ajax请求工具,删除冗余代码

上级 c3603bc0
...@@ -20,12 +20,8 @@ layui.config({ ...@@ -20,12 +20,8 @@ layui.config({
desc: $("#desc").val() desc: $("#desc").val()
}; };
AjaxPostUtil.request({url: flowableBasePath + "actbaseclass002", params: params, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "actbaseclass002", params: params, type: 'json', callback: function (json) {
if (json.returnCode == 0) { parent.layer.close(index);
parent.layer.close(index); parent.refreshCode = '0';
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
} }
return false; return false;
......
...@@ -27,12 +27,8 @@ layui.config({ ...@@ -27,12 +27,8 @@ layui.config({
desc: $("#desc").val() desc: $("#desc").val()
}; };
AjaxPostUtil.request({url: flowableBasePath + "actbaseclass005", params: params, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "actbaseclass005", params: params, type: 'json', callback: function (json) {
if (json.returnCode == 0) { parent.layer.close(index);
parent.layer.close(index); parent.refreshCode = '0';
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
} }
return false; return false;
......
...@@ -64,12 +64,8 @@ layui.config({ ...@@ -64,12 +64,8 @@ layui.config({
layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){ layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "actbaseclass003", params:{rowId: data.id}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "actbaseclass003", params:{rowId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); loadTable();
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
......
...@@ -23,18 +23,14 @@ layui.config({ ...@@ -23,18 +23,14 @@ layui.config({
//初始化左侧菜单用户组数据 //初始化左侧菜单用户组数据
function showLeft(){ function showLeft(){
AjaxPostUtil.request({url: flowableBasePath + "actgroup002", params: {}, type: 'json', method: "GET", callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "actgroup002", params: {}, type: 'json', method: "GET", callback: function (json) {
if (json.returnCode == 0) { var str = getDataUseHandlebars($('#userGroupTemplate').html(), json);
var str = getDataUseHandlebars($('#userGroupTemplate').html(), json); $("#setting").html(str);
$("#setting").html(str); if(json.rows.length > 0){
if(json.rows.length > 0){ clickId = json.rows[0].id;
clickId = json.rows[0].id; $("#setting").find("a[rowid='" + clickId + "']").addClass('selected');
$("#setting").find("a[rowid='" + clickId + "']").addClass('selected');
}
showList();//展示用户组对应的用户列表
initRightMenu();//初始化右键
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
} }
showList();//展示用户组对应的用户列表
initRightMenu();//初始化右键
}}); }});
} }
...@@ -65,11 +61,7 @@ layui.config({ ...@@ -65,11 +61,7 @@ layui.config({
if(!isNull(value)){ if(!isNull(value)){
if(html != value){ if(html != value){
AjaxPostUtil.request({url: flowableBasePath + "actgroup004", params: {rowId: clickId, groupName: value}, type: 'json', method: "POST", callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "actgroup004", params: {rowId: clickId, groupName: value}, type: 'json', method: "POST", callback: function (json) {
if (json.returnCode == 0) { obj.find("a[rowid='" + clickId + "']").html(value);
obj.find("a[rowid='" + clickId + "']").html(value);
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
} else { } else {
obj.find("a[rowid='" + clickId + "']").html(html); obj.find("a[rowid='" + clickId + "']").html(html);
...@@ -102,18 +94,14 @@ layui.config({ ...@@ -102,18 +94,14 @@ layui.config({
layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){ layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "actgroup005", params: {rowId: clickId}, type: 'json', method: "POST", callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "actgroup005", params: {rowId: clickId}, type: 'json', method: "POST", callback: function (json) {
if (json.returnCode == 0) { winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); $("#setting").find("a[rowid='" + clickId + "']").remove();
$("#setting").find("a[rowid='" + clickId + "']").remove(); var _obj = $("#setting").find("a[class='setting-a']");
var _obj = $("#setting").find("a[class='setting-a']"); if(_obj.length > 0){
if(_obj.length > 0){ _obj.eq(0).click();
_obj.eq(0).click();
} else {
clickId = "";
loadTable();
}
} else { } else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000}); clickId = "";
loadTable();
} }
}}); }});
}); });
...@@ -150,14 +138,10 @@ layui.config({ ...@@ -150,14 +138,10 @@ layui.config({
value = '新增用户组'; value = '新增用户组';
} }
AjaxPostUtil.request({url: flowableBasePath + "actgroup001", params: {groupName: value}, type: 'json', method: "POST", callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "actgroup001", params: {groupName: value}, type: 'json', method: "POST", callback: function (json) {
if (json.returnCode == 0) { clickId = json.bean.id;
clickId = json.bean.id; var str = '<a rowid="' + clickId + '" rowname="' + value + '" class="setting-a">' + value + '</a>';
var str = '<a rowid="' + clickId + '" rowname="' + value + '" class="setting-a">' + value + '</a>'; $("#setting").append(str);
$("#setting").append(str); $("#setting").find("a[rowid='" + clickId + "']").click();
$("#setting").find("a[rowid='" + clickId + "']").click();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
}); });
...@@ -217,11 +201,7 @@ layui.config({ ...@@ -217,11 +201,7 @@ layui.config({
userInfo += item.id + ','; userInfo += item.id + ',';
}) })
AjaxPostUtil.request({url: flowableBasePath + "actgroup003", params: {rowId: clickId, userId: userInfo}, type: 'json', callback: function(json) { AjaxPostUtil.request({url: flowableBasePath + "actgroup003", params: {rowId: clickId, userId: userInfo}, type: 'json', callback: function(json) {
if (json.returnCode == 0) { loadTable();
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
}); });
...@@ -233,12 +213,8 @@ layui.config({ ...@@ -233,12 +213,8 @@ layui.config({
layer.confirm(msg, { icon: 3, title: '一键移除所有用户' }, function (index) { layer.confirm(msg, { icon: 3, title: '一键移除所有用户' }, function (index) {
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "actgroup008", params: {rowId: clickId}, type: 'json', method: "POST", callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "actgroup008", params: {rowId: clickId}, type: 'json', method: "POST", callback: function (json) {
if (json.returnCode == 0) { winui.window.msg("移除成功", {icon: 1, time: 2000});
winui.window.msg("移除成功", {icon: 1, time: 2000}); loadTable();
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} else { } else {
...@@ -255,12 +231,8 @@ layui.config({ ...@@ -255,12 +231,8 @@ layui.config({
rowId: data.id rowId: data.id
}; };
AjaxPostUtil.request({url: flowableBasePath + "actgroup006", params: params, type: 'json', method: "POST", callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "actgroup006", params: params, type: 'json', method: "POST", callback: function (json) {
if (json.returnCode == 0) { winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); loadTable();
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
...@@ -268,11 +240,7 @@ layui.config({ ...@@ -268,11 +240,7 @@ layui.config({
// 同步人员数据 // 同步人员数据
$("body").on("click", "#syncData", function() { $("body").on("click", "#syncData", function() {
AjaxPostUtil.request({url: flowableBasePath + "activitimode015", params: {}, type: 'json', method: "POST", callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "activitimode015", params: {}, type: 'json', method: "POST", callback: function (json) {
if (json.returnCode == 0) { winui.window.msg("同步成功", {icon: 1, time: 2000});
winui.window.msg("同步成功", {icon: 1, time: 2000});
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
......
...@@ -112,21 +112,13 @@ layui.config({ ...@@ -112,21 +112,13 @@ layui.config({
var lis = []; var lis = [];
//以jQuery的Ajax请求为例,请求下一页数据(注意:page是从2开始返回) //以jQuery的Ajax请求为例,请求下一页数据(注意:page是从2开始返回)
AjaxPostUtil.request({url:flowableBasePath + "activitimode017", params:{processInstanceId: parent.processInstanceId}, type: 'json', callback: function (json) { AjaxPostUtil.request({url:flowableBasePath + "activitimode017", params:{processInstanceId: parent.processInstanceId}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { $.each(json.rows, function(index, bean) {
var jsonStr = "";//实体json对象 bean.showClass = 'date02';
$.each(json.rows, function(index, bean) { lis.push(getDataUseHandlebars(timeTreeApprovalHistory, {bean: bean}));
bean.showClass = 'date02'; });
jsonStr = { //执行下一页渲染,第二参数为:满足“加载更多”的条件,即后面仍有分页
bean: bean //pages为Ajax返回的总页数,只有当前页小于总页数的情况下,才会继续出现加载更多
}; next(lis.join(''), (page * 1000) < json.total);
lis.push(getDataUseHandlebars(timeTreeApprovalHistory, jsonStr));
});
//执行下一页渲染,第二参数为:满足“加载更多”的条件,即后面仍有分页
//pages为Ajax返回的总页数,只有当前页小于总页数的情况下,才会继续出现加载更多
next(lis.join(''), (page * 1000) < json.total);
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
} }
}); });
......
...@@ -86,12 +86,8 @@ layui.config({ ...@@ -86,12 +86,8 @@ layui.config({
layer.confirm(msg, { icon: 3, title: '删除模型' }, function (index) { layer.confirm(msg, { icon: 3, title: '删除模型' }, function (index) {
layer.close(index); layer.close(index);
AjaxPostUtil.request({url:flowableBasePath + "activitimode006", params:{rowId: data.id}, type: 'json', callback: function (json) { AjaxPostUtil.request({url:flowableBasePath + "activitimode006", params:{rowId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); loadTable();
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
...@@ -117,12 +113,8 @@ layui.config({ ...@@ -117,12 +113,8 @@ layui.config({
layer.confirm(msg, { icon: 3, title: '发布模型' }, function (index) { layer.confirm(msg, { icon: 3, title: '发布模型' }, function (index) {
layer.close(index); layer.close(index);
AjaxPostUtil.request({url:flowableBasePath + "activitimode003", params:{modelId: rowId}, type: 'json', callback: function (json) { AjaxPostUtil.request({url:flowableBasePath + "activitimode003", params:{modelId: rowId}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg("发布成功", {icon: 1, time: 2000});
winui.window.msg("发布成功", {icon: 1, time: 2000}); loadTable();
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
...@@ -134,12 +126,8 @@ layui.config({ ...@@ -134,12 +126,8 @@ layui.config({
layer.confirm(msg, { icon: 3, title: '版本升级' }, function (index) { layer.confirm(msg, { icon: 3, title: '版本升级' }, function (index) {
layer.close(index); layer.close(index);
AjaxPostUtil.request({url:flowableBasePath + "activitimode003", params:{modelId: rowId}, type: 'json', callback: function (json) { AjaxPostUtil.request({url:flowableBasePath + "activitimode003", params:{modelId: rowId}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg("升级成功", {icon: 1, time: 2000});
winui.window.msg("升级成功", {icon: 1, time: 2000}); loadTable();
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
...@@ -150,12 +138,8 @@ layui.config({ ...@@ -150,12 +138,8 @@ layui.config({
layer.confirm(msg, { icon: 3, title: '取消发布' }, function (index) { layer.confirm(msg, { icon: 3, title: '取消发布' }, function (index) {
layer.close(index); layer.close(index);
AjaxPostUtil.request({url:flowableBasePath + "activitimode007", params:{deploymentId: data.deploymentId}, type: 'json', callback: function (json) { AjaxPostUtil.request({url:flowableBasePath + "activitimode007", params:{deploymentId: data.deploymentId}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg("取消发布成功", {icon: 1, time: 2000});
winui.window.msg("取消发布成功", {icon: 1, time: 2000}); loadTable();
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
...@@ -165,12 +149,8 @@ layui.config({ ...@@ -165,12 +149,8 @@ layui.config({
layer.confirm('确认拷贝选中数据吗?', { icon: 3, title: '模型拷贝' }, function (index) { layer.confirm('确认拷贝选中数据吗?', { icon: 3, title: '模型拷贝' }, function (index) {
layer.close(index); layer.close(index);
AjaxPostUtil.request({url:flowableBasePath + "activitimode028", params:{modelId: data.id}, type: 'json', callback: function (json) { AjaxPostUtil.request({url:flowableBasePath + "activitimode028", params:{modelId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg("拷贝成功", {icon: 1, time: 2000});
winui.window.msg("拷贝成功", {icon: 1, time: 2000}); loadTable();
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
...@@ -183,19 +163,15 @@ layui.config({ ...@@ -183,19 +163,15 @@ layui.config({
//新增 //新增
$("body").on("click", "#addBean", function() { $("body").on("click", "#addBean", function() {
AjaxPostUtil.request({url:flowableBasePath + "activitimode001", params:{}, type: 'json', callback: function (json) { AjaxPostUtil.request({url:flowableBasePath + "activitimode001", params:{}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { _openNewWindows({
_openNewWindows({ url: "../../static/modeler.html?modelId=" + json.bean.id,
url: "../../static/modeler.html?modelId=" + json.bean.id, title: "绘制流程",
title: "绘制流程", pageId: "canveractivitimodel",
pageId: "canveractivitimodel", area: ['100vw', '100vh'],
area: ['100vw', '100vh'], callBack: function(refreshCode){
callBack: function(refreshCode){ winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000}); loadTable();
loadTable(); }});
}});
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
......
...@@ -183,12 +183,8 @@ layui.config({ ...@@ -183,12 +183,8 @@ layui.config({
} }
AjaxPostUtil.request({url:flowableBasePath + "actmodletype012", params: params, type: 'json', callback: function (json) { AjaxPostUtil.request({url:flowableBasePath + "actmodletype012", params: params, type: 'json', callback: function (json) {
if (json.returnCode == 0) { parent.layer.close(index);
parent.layer.close(index); parent.refreshCode = '0';
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
} }
return false; return false;
......
...@@ -158,12 +158,8 @@ layui.config({ ...@@ -158,12 +158,8 @@ layui.config({
} }
AjaxPostUtil.request({url:flowableBasePath + "actmodletype003", params: params, type: 'json', callback: function (json) { AjaxPostUtil.request({url:flowableBasePath + "actmodletype003", params: params, type: 'json', callback: function (json) {
if (json.returnCode == 0) { parent.layer.close(index);
parent.layer.close(index); parent.refreshCode = '0';
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
} }
return false; return false;
......
...@@ -23,18 +23,14 @@ layui.config({ ...@@ -23,18 +23,14 @@ layui.config({
function showLeft(){ function showLeft(){
var modleTypeTemplate = $('#modleTypeTemplate').html(); var modleTypeTemplate = $('#modleTypeTemplate').html();
AjaxPostUtil.request({url:flowableBasePath + "actmodletype002", params: {}, type: 'json', callback: function (json) { AjaxPostUtil.request({url:flowableBasePath + "actmodletype002", params: {}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { var str = getDataUseHandlebars(modleTypeTemplate, json);
var str = getDataUseHandlebars(modleTypeTemplate, json); $("#setting").html(str);
$("#setting").html(str); if(json.rows.length > 0){
if(json.rows.length > 0){ clickId = json.rows[0].id;
clickId = json.rows[0].id; $("#setting").find("a[rowid='" + clickId + "']").addClass('selected');
$("#setting").find("a[rowid='" + clickId + "']").addClass('selected');
}
showList();//展示申请类型对应的申请类型实体列表
initRightMenu();//初始化右键
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
} }
showList();//展示申请类型对应的申请类型实体列表
initRightMenu();//初始化右键
}}); }});
} }
...@@ -101,11 +97,7 @@ layui.config({ ...@@ -101,11 +97,7 @@ layui.config({
if(!isNull(value)){ if(!isNull(value)){
if(html != value){ if(html != value){
AjaxPostUtil.request({url:flowableBasePath + "actmodletype004", params: {rowId: clickId, title: value}, type: 'json', callback: function (json) { AjaxPostUtil.request({url:flowableBasePath + "actmodletype004", params: {rowId: clickId, title: value}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { obj.find("a[rowid='" + clickId + "']").find("span").html(value);
obj.find("a[rowid='" + clickId + "']").find("span").html(value);
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
} else { } else {
obj.find("a[rowid='" + clickId + "']").find("span").html(html); obj.find("a[rowid='" + clickId + "']").find("span").html(html);
...@@ -138,18 +130,14 @@ layui.config({ ...@@ -138,18 +130,14 @@ layui.config({
layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){ layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){
layer.close(index); layer.close(index);
AjaxPostUtil.request({url:flowableBasePath + "actmodletype005", params:{rowId: clickId}, type: 'json', callback: function (json) { AjaxPostUtil.request({url:flowableBasePath + "actmodletype005", params:{rowId: clickId}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); $("#setting").find("a[rowid='" + clickId + "']").remove();
$("#setting").find("a[rowid='" + clickId + "']").remove(); var _obj = $("#setting").find("a[class='setting-a']");
var _obj = $("#setting").find("a[class='setting-a']"); if(_obj.length > 0){
if(_obj.length > 0){ _obj.eq(0).click();
_obj.eq(0).click();
} else {
clickId = "";
loadTable();
}
} else { } else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000}); clickId = "";
loadTable();
} }
}}); }});
}); });
...@@ -161,13 +149,9 @@ layui.config({ ...@@ -161,13 +149,9 @@ layui.config({
layer.confirm(msg, { icon: 3, title: '上线申请类型实体' }, function (index) { layer.confirm(msg, { icon: 3, title: '上线申请类型实体' }, function (index) {
layer.close(index); layer.close(index);
AjaxPostUtil.request({url:flowableBasePath + "actmodletype015", params:{rowId: clickId}, type: 'json', callback: function (json) { AjaxPostUtil.request({url:flowableBasePath + "actmodletype015", params:{rowId: clickId}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { $("#setting").find("a[rowid='" + clickId + "']").find("div").remove();
$("#setting").find("a[rowid='" + clickId + "']").find("div").remove(); $("#setting").find("a[rowid='" + clickId + "']").find("span").after('<div class="up-state-point"></div>');
$("#setting").find("a[rowid='" + clickId + "']").find("span").after('<div class="up-state-point"></div>'); winui.window.msg("上线成功", {icon: 1, time: 2000});
winui.window.msg("上线成功", {icon: 1, time: 2000});
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
...@@ -178,13 +162,9 @@ layui.config({ ...@@ -178,13 +162,9 @@ layui.config({
layer.confirm(msg, { icon: 3, title: '下线申请类型实体' }, function (index) { layer.confirm(msg, { icon: 3, title: '下线申请类型实体' }, function (index) {
layer.close(index); layer.close(index);
AjaxPostUtil.request({url:flowableBasePath + "actmodletype016", params:{rowId: clickId}, type: 'json', callback: function (json) { AjaxPostUtil.request({url:flowableBasePath + "actmodletype016", params:{rowId: clickId}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { $("#setting").find("a[rowid='" + clickId + "']").find("div").remove();
$("#setting").find("a[rowid='" + clickId + "']").find("div").remove(); $("#setting").find("a[rowid='" + clickId + "']").find("span").after('<div class="down-state-point"></div>');
$("#setting").find("a[rowid='" + clickId + "']").find("span").after('<div class="down-state-point"></div>'); winui.window.msg("下线成功", {icon: 1, time: 2000});
winui.window.msg("下线成功", {icon: 1, time: 2000});
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
...@@ -192,28 +172,20 @@ layui.config({ ...@@ -192,28 +172,20 @@ layui.config({
//上移申请类型 //上移申请类型
function upMoveModleType(){ function upMoveModleType(){
AjaxPostUtil.request({url:flowableBasePath + "actmodletype017", params:{rowId: clickId}, type: 'json', callback: function (json) { AjaxPostUtil.request({url:flowableBasePath + "actmodletype017", params:{rowId: clickId}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg(systemLanguage["com.skyeye.moveUpOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
winui.window.msg(systemLanguage["com.skyeye.moveUpOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); var a = $("#setting").find("a[rowid='" + clickId + "']").prev();
var a = $("#setting").find("a[rowid='" + clickId + "']").prev(); $("#setting").find(a).remove();
$("#setting").find(a).remove(); $("#setting").find("a[rowid='" + clickId + "']").after(a);
$("#setting").find("a[rowid='" + clickId + "']").after(a);
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
} }
//下移申请类型 //下移申请类型
function downMoveModleType(){ function downMoveModleType(){
AjaxPostUtil.request({url:flowableBasePath + "actmodletype018", params:{rowId: clickId}, type: 'json', callback: function (json) { AjaxPostUtil.request({url:flowableBasePath + "actmodletype018", params:{rowId: clickId}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg(systemLanguage["com.skyeye.moveDownOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
winui.window.msg(systemLanguage["com.skyeye.moveDownOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); var a = $("#setting").find("a[rowid='" + clickId + "']").next();
var a = $("#setting").find("a[rowid='" + clickId + "']").next(); $("#setting").find(a).remove();
$("#setting").find(a).remove(); $("#setting").find("a[rowid='" + clickId + "']").before(a);
$("#setting").find("a[rowid='" + clickId + "']").before(a);
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
} }
...@@ -251,21 +223,19 @@ layui.config({ ...@@ -251,21 +223,19 @@ layui.config({
return; return;
} }
AjaxPostUtil.request({url:flowableBasePath + "actmodletype001", params: {title: value}, type: 'json', callback: function (json) { AjaxPostUtil.request({url:flowableBasePath + "actmodletype001", params: {title: value}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { obj.find("input").remove();
obj.find("input").remove(); clickId = json.bean.id;
clickId = json.bean.id; var str = '<a rowid="' + clickId + '" rowname="' + value + '" class="setting-a" title="' + value + '"><span>' + value + '</span><div class="new-state-point"></div></a>';
var str = '<a rowid="' + clickId + '" rowname="' + value + '" class="setting-a" title="' + value + '"><span>' + value + '</span><div class="new-state-point"></div></a>'; if($("#setting a").size() != 0){
if($("#setting a").size() != 0){ $(str).insertBefore($("#setting a").eq(0));
$(str).insertBefore($("#setting a").eq(0)); } else {
} else { obj.append(str);
obj.append(str);
}
$("#setting").find("a[rowid='" + clickId + "']").click();
} else {
obj.find("input").select();
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
} }
}}); $("#setting").find("a[rowid='" + clickId + "']").click();
}, errorCallback: function (json) {
obj.find("input").select();
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}});
}); });
}); });
...@@ -359,12 +329,8 @@ layui.config({ ...@@ -359,12 +329,8 @@ layui.config({
layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){ layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){
layer.close(index); layer.close(index);
AjaxPostUtil.request({url:flowableBasePath + "actmodletype006", params: {rowId: data.id}, type: 'json', callback: function (json) { AjaxPostUtil.request({url:flowableBasePath + "actmodletype006", params: {rowId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); loadTable();
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
...@@ -375,12 +341,8 @@ layui.config({ ...@@ -375,12 +341,8 @@ layui.config({
layer.confirm(msg, { icon: 3, title: '上线申请类型实体' }, function (index) { layer.confirm(msg, { icon: 3, title: '上线申请类型实体' }, function (index) {
layer.close(index); layer.close(index);
AjaxPostUtil.request({url:flowableBasePath + "actmodletype009", params:{rowId: data.id}, type: 'json', callback: function (json) { AjaxPostUtil.request({url:flowableBasePath + "actmodletype009", params:{rowId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg("上线成功", {icon: 1, time: 2000});
winui.window.msg("上线成功", {icon: 1, time: 2000}); loadTable();
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
...@@ -391,12 +353,8 @@ layui.config({ ...@@ -391,12 +353,8 @@ layui.config({
layer.confirm(msg, { icon: 3, title: '下线申请类型实体' }, function (index) { layer.confirm(msg, { icon: 3, title: '下线申请类型实体' }, function (index) {
layer.close(index); layer.close(index);
AjaxPostUtil.request({url:flowableBasePath + "actmodletype010", params:{rowId: data.id}, type: 'json', callback: function (json) { AjaxPostUtil.request({url:flowableBasePath + "actmodletype010", params:{rowId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg("下线成功", {icon: 1, time: 2000});
winui.window.msg("下线成功", {icon: 1, time: 2000}); loadTable();
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
......
...@@ -94,12 +94,8 @@ layui.config({ ...@@ -94,12 +94,8 @@ layui.config({
layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){ layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "assetarticles014", params: {rowId: data.id}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "assetarticles014", params: {rowId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); loadLiebiaoTable();
loadLiebiaoTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
......
...@@ -60,15 +60,11 @@ layui.config({ ...@@ -60,15 +60,11 @@ layui.config({
} else { } else {
//类型对应的用品不存在js对象中 //类型对应的用品不存在js对象中
AjaxPostUtil.request({url: flowableBasePath + "assetarticles018", params: {typeId: thisRowValue}, type: 'json', callback: function(json) { AjaxPostUtil.request({url: flowableBasePath + "assetarticles018", params: {typeId: thisRowValue}, type: 'json', callback: function(json) {
if(json.returnCode == 0) { assetArticles.push({
assetArticles.push({ id: thisRowValue,
id: thisRowValue, list: json.rows
list: json.rows });
}); resetAssetList(thisRowNum, json.rows); //重置选择行的用品列表
resetAssetList(thisRowNum, json.rows); //重置选择行的用品列表
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
} }
} }
...@@ -175,12 +171,8 @@ layui.config({ ...@@ -175,12 +171,8 @@ layui.config({
approvalId: approvalId, approvalId: approvalId,
}; };
AjaxPostUtil.request({url: flowableBasePath + "assetarticles029", params: params, type: 'json', callback: function(json) { AjaxPostUtil.request({url: flowableBasePath + "assetarticles029", params: params, type: 'json', callback: function(json) {
if(json.returnCode == 0) { parent.layer.close(index);
parent.layer.close(index); parent.refreshCode = '0';
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
} }
...@@ -243,19 +235,15 @@ layui.config({ ...@@ -243,19 +235,15 @@ layui.config({
} else { } else {
//类型对应的用品不存在js对象中 //类型对应的用品不存在js对象中
AjaxPostUtil.request({url: flowableBasePath + "assetarticles018", params: {typeId: thisRowValue}, type: 'json', callback: function(json) { AjaxPostUtil.request({url: flowableBasePath + "assetarticles018", params: {typeId: thisRowValue}, type: 'json', callback: function(json) {
if(json.returnCode == 0) { assetArticles.push({
assetArticles.push({ id: thisRowValue,
id: thisRowValue, list: json.rows
list: json.rows });
}); //重置选择行的用品列表
//重置选择行的用品列表 var sHtml = getDataUseHandlebars(selOption, json);
var sHtml = getDataUseHandlebars(selOption, json); $("#assetarId" + thisRowNum).html(sHtml); //重置商品列表下拉框
$("#assetarId" + thisRowNum).html(sHtml); //重置商品列表下拉框 $("#assetarId" + thisRowNum).val(item.articleId);
$("#assetarId" + thisRowNum).val(item.articleId); form.render('select');
form.render('select');
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}, async: false}); }, async: false});
} }
} }
......
...@@ -90,12 +90,8 @@ layui.config({ ...@@ -90,12 +90,8 @@ layui.config({
layer.confirm(msg, { icon: 3, title: '撤销操作' }, function (index) { layer.confirm(msg, { icon: 3, title: '撤销操作' }, function (index) {
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "assetarticles035", params: {processInstanceId: data.processInstanceId}, type: 'json', method: "PUT", callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "assetarticles035", params: {processInstanceId: data.processInstanceId}, type: 'json', method: "PUT", callback: function (json) {
if (json.returnCode == 0) { winui.window.msg("提交成功", {icon: 1, time: 2000});
winui.window.msg("提交成功", {icon: 1, time: 2000}); loadCaigouTable();
loadCaigouTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
...@@ -125,12 +121,8 @@ layui.config({ ...@@ -125,12 +121,8 @@ layui.config({
approvalId: approvalId approvalId: approvalId
}; };
AjaxPostUtil.request({url: flowableBasePath + "assetarticles027", params: params, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "assetarticles027", params: params, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg("提交成功", {icon: 1, time: 2000});
winui.window.msg("提交成功", {icon: 1, time: 2000}); loadCaigouTable();
loadCaigouTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
}); });
...@@ -142,12 +134,8 @@ layui.config({ ...@@ -142,12 +134,8 @@ layui.config({
layer.confirm(msg, { icon: 3, title: '作废操作' }, function (index) { layer.confirm(msg, { icon: 3, title: '作废操作' }, function (index) {
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "assetarticles031", params: {rowId: data.id}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "assetarticles031", params: {rowId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000}); loadCaigouTable();
loadCaigouTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
......
...@@ -18,12 +18,8 @@ layui.config({ ...@@ -18,12 +18,8 @@ layui.config({
typeName: $("#typeName").val() typeName: $("#typeName").val()
}; };
AjaxPostUtil.request({url: flowableBasePath + "assetarticles002", params: params, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "assetarticles002", params: params, type: 'json', callback: function (json) {
if (json.returnCode == 0) { parent.layer.close(index);
parent.layer.close(index); parent.refreshCode = '0';
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
} }
return false; return false;
......
...@@ -26,12 +26,8 @@ layui.config({ ...@@ -26,12 +26,8 @@ layui.config({
typeName: $("#typeName").val() typeName: $("#typeName").val()
}; };
AjaxPostUtil.request({url: flowableBasePath + "assetarticles007", params: params, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "assetarticles007", params: params, type: 'json', callback: function (json) {
if (json.returnCode == 0) { parent.layer.close(index);
parent.layer.close(index); parent.refreshCode = '0';
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
} }
return false; return false;
......
...@@ -89,12 +89,8 @@ layui.config({ ...@@ -89,12 +89,8 @@ layui.config({
layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){ layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "assetarticles003", params: {rowId: data.id}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "assetarticles003", params: {rowId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); loadTable();
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
...@@ -105,12 +101,8 @@ layui.config({ ...@@ -105,12 +101,8 @@ layui.config({
layer.confirm(msg, { icon: 3, title: '上线操作' }, function (index) { layer.confirm(msg, { icon: 3, title: '上线操作' }, function (index) {
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "assetarticles004", params: {rowId: data.id}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "assetarticles004", params: {rowId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg("上线成功", {icon: 1, time: 2000});
winui.window.msg("上线成功", {icon: 1, time: 2000}); loadTable();
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
...@@ -121,12 +113,8 @@ layui.config({ ...@@ -121,12 +113,8 @@ layui.config({
layer.confirm(msg, { icon: 3, title: '下线操作' }, function (index) { layer.confirm(msg, { icon: 3, title: '下线操作' }, function (index) {
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "assetarticles005", params: {rowId: data.id}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "assetarticles005", params: {rowId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg("下线成功", {icon: 1, time: 2000});
winui.window.msg("下线成功", {icon: 1, time: 2000}); loadTable();
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
...@@ -149,24 +137,16 @@ layui.config({ ...@@ -149,24 +137,16 @@ layui.config({
// 上移 // 上移
function upMove(data){ function upMove(data){
AjaxPostUtil.request({url: flowableBasePath + "assetarticles008", params: {rowId: data.id}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "assetarticles008", params: {rowId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg(systemLanguage["com.skyeye.moveUpOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
winui.window.msg(systemLanguage["com.skyeye.moveUpOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); loadTable();
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
} }
// 下移 // 下移
function downMove(data){ function downMove(data){
AjaxPostUtil.request({url: flowableBasePath + "assetarticles009", params: {rowId: data.id}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "assetarticles009", params: {rowId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg(systemLanguage["com.skyeye.moveDownOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
winui.window.msg(systemLanguage["com.skyeye.moveDownOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); loadTable();
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
} }
......
...@@ -150,12 +150,8 @@ layui.config({ ...@@ -150,12 +150,8 @@ layui.config({
approvalId: approvalId approvalId: approvalId
}; };
AjaxPostUtil.request({url: flowableBasePath + "assetarticles019", params: params, type: 'json', method: "POST", callback: function(json) { AjaxPostUtil.request({url: flowableBasePath + "assetarticles019", params: params, type: 'json', method: "POST", callback: function(json) {
if(json.returnCode == 0) { parent.layer.close(index);
parent.layer.close(index); parent.refreshCode = '0';
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
} }
......
...@@ -13,36 +13,32 @@ layui.config({ ...@@ -13,36 +13,32 @@ layui.config({
var useTemplate = $("#useTemplate").html(); var useTemplate = $("#useTemplate").html();
AjaxPostUtil.request({url: flowableBasePath + "assetarticles020", params: {rowId: parent.rowId}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "assetarticles020", params: {rowId: parent.rowId}, type: 'json', callback: function (json) {
if(json.returnCode == 0) { //状态
//状态 if(json.bean.state == '0'){
if(json.bean.state == '0'){ json.bean.stateName = "<span>" + json.bean.stateName + "</span>";
json.bean.stateName = "<span>" + json.bean.stateName + "</span>"; }else if(json.bean.state == '1'){
}else if(json.bean.state == '1'){ json.bean.stateName = "<span class='state-new'>" + json.bean.stateName + "</span>";
json.bean.stateName = "<span class='state-new'>" + json.bean.stateName + "</span>"; }else if(json.bean.state == '2'){
}else if(json.bean.state == '2'){ json.bean.stateName = "<span class='state-up'>" + json.bean.stateName + "</span>";
json.bean.stateName = "<span class='state-up'>" + json.bean.stateName + "</span>"; }else if(json.bean.state == '3'){
}else if(json.bean.state == '3'){ json.bean.stateName = "<span class='state-down'>" + json.bean.stateName + "</span>";
json.bean.stateName = "<span class='state-down'>" + json.bean.stateName + "</span>"; }else if(json.bean.state == '4'){
}else if(json.bean.state == '4'){ json.bean.stateName = "<span class='state-down'>" + json.bean.stateName + "</span>";
json.bean.stateName = "<span class='state-down'>" + json.bean.stateName + "</span>"; }else if(json.bean.state == '5'){
}else if(json.bean.state == '5'){ json.bean.stateName = "<span class='state-error'>" + json.bean.stateName + "</span>";
json.bean.stateName = "<span class='state-error'>" + json.bean.stateName + "</span>"; }
} //附件回显
//附件回显 var str = "暂无附件";
var str = "暂无附件"; if(json.bean.enclosureInfo.length != 0 && !isNull(json.bean.enclosureInfo)){
if(json.bean.enclosureInfo.length != 0 && !isNull(json.bean.enclosureInfo)){ str = "";
str = ""; $.each([].concat(json.bean.enclosureInfo), function(i, item){
$.each([].concat(json.bean.enclosureInfo), function(i, item){ str += '<a rowid="' + item.id + '" class="enclosureItem" rowpath="' + item.fileAddress + '" href="javascript:;" style="color:blue;">' + item.name + '</a><br>';
str += '<a rowid="' + item.id + '" class="enclosureItem" rowpath="' + item.fileAddress + '" href="javascript:;" style="color:blue;">' + item.name + '</a><br>'; });
}); }
} var _html = getDataUseHandlebars(useTemplate, json);//加载数据
var _html = getDataUseHandlebars(useTemplate, json);//加载数据 $("#showForm").html(_html);
$("#showForm").html(_html); $("#enclosureUploadBtn").html(str);
$("#enclosureUploadBtn").html(str); matchingLanguage();
matchingLanguage();
}else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
$("body").on("click", ".enclosureItem", function() { $("body").on("click", ".enclosureItem", function() {
......
...@@ -238,19 +238,15 @@ layui.config({ ...@@ -238,19 +238,15 @@ layui.config({
} else { } else {
//类型对应的用品不存在js对象中 //类型对应的用品不存在js对象中
AjaxPostUtil.request({url: flowableBasePath + "assetarticles018", params: {typeId: thisRowValue}, type: 'json', callback: function(json) { AjaxPostUtil.request({url: flowableBasePath + "assetarticles018", params: {typeId: thisRowValue}, type: 'json', callback: function(json) {
if(json.returnCode == 0) { assetArticles.push({
assetArticles.push({ id: thisRowValue,
id: thisRowValue, list: json.rows
list: json.rows });
}); //重置选择行的用品列表
//重置选择行的用品列表 var sHtml = getDataUseHandlebars(selOption, json);
var sHtml = getDataUseHandlebars(selOption, json); $("#assetarId" + thisRowNum).html(sHtml); //重置商品列表下拉框
$("#assetarId" + thisRowNum).html(sHtml); //重置商品列表下拉框 $("#assetarId" + thisRowNum).val(item.articleId);
$("#assetarId" + thisRowNum).val(item.articleId); form.render('select');
form.render('select');
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}, async: false}); }, async: false});
} }
} }
......
...@@ -28,12 +28,8 @@ layui.config({ ...@@ -28,12 +28,8 @@ layui.config({
fromName: $("#fromName").val() fromName: $("#fromName").val()
}; };
AjaxPostUtil.request({url: flowableBasePath + "assetfrom005", params: params, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "assetfrom005", params: params, type: 'json', callback: function (json) {
if (json.returnCode == 0) { parent.layer.close(index);
parent.layer.close(index); parent.refreshCode = '0';
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
} }
return false; return false;
......
...@@ -6,9 +6,7 @@ layui.config({ ...@@ -6,9 +6,7 @@ layui.config({
}).extend({ }).extend({
window: 'js/winui.window' window: 'js/winui.window'
}).define(['window', 'table', 'jquery', 'winui', 'form'], function (exports) { }).define(['window', 'table', 'jquery', 'winui', 'form'], function (exports) {
winui.renderColor(); winui.renderColor();
var $ = layui.$, var $ = layui.$,
form = layui.form, form = layui.form,
table = layui.table; table = layui.table;
...@@ -76,12 +74,8 @@ layui.config({ ...@@ -76,12 +74,8 @@ layui.config({
layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){ layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "assetfrom003", params:{rowId: data.id}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "assetfrom003", params:{rowId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); loadassetfromTable();
loadassetfromTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
...@@ -119,12 +113,8 @@ layui.config({ ...@@ -119,12 +113,8 @@ layui.config({
layer.confirm(msg, { icon: 3, title: '上线操作' }, function (index) { layer.confirm(msg, { icon: 3, title: '上线操作' }, function (index) {
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "assetfrom007", params:{rowId: data.id}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "assetfrom007", params:{rowId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg("上线成功", {icon: 1, time: 2000});
winui.window.msg("上线成功", {icon: 1, time: 2000}); loadassetfromTable();
loadassetfromTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
...@@ -135,12 +125,8 @@ layui.config({ ...@@ -135,12 +125,8 @@ layui.config({
layer.confirm(msg, { icon: 3, title: '下线操作' }, function (index) { layer.confirm(msg, { icon: 3, title: '下线操作' }, function (index) {
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "assetfrom008", params:{rowId: data.id}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "assetfrom008", params:{rowId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg("下线成功", {icon: 1, time: 2000});
winui.window.msg("下线成功", {icon: 1, time: 2000}); loadassetfromTable();
loadassetfromTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
...@@ -148,24 +134,16 @@ layui.config({ ...@@ -148,24 +134,16 @@ layui.config({
// 上移 // 上移
function assetfromtopOne(data){ function assetfromtopOne(data){
AjaxPostUtil.request({url: flowableBasePath + "assetfrom009", params:{rowId: data.id}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "assetfrom009", params:{rowId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg(systemLanguage["com.skyeye.moveUpOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
winui.window.msg(systemLanguage["com.skyeye.moveUpOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); loadassetfromTable();
loadassetfromTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
} }
// 下移 // 下移
function assetfromlowerOne(data){ function assetfromlowerOne(data){
AjaxPostUtil.request({url: flowableBasePath + "assetfrom010", params:{rowId: data.id}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "assetfrom010", params:{rowId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg(systemLanguage["com.skyeye.moveDownOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
winui.window.msg(systemLanguage["com.skyeye.moveDownOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); loadassetfromTable();
loadassetfromTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
} }
......
...@@ -30,27 +30,19 @@ layui.config({ ...@@ -30,27 +30,19 @@ layui.config({
//初始化资产类别 //初始化资产类别
function initTypeHtml() { function initTypeHtml() {
AjaxPostUtil.request({url: flowableBasePath + "assettype006", params: {}, type: 'json', callback: function(json) { AjaxPostUtil.request({url: flowableBasePath + "assettype006", params: {}, type: 'json', callback: function(json) {
if(json.returnCode == 0) { initFromHtml();
initFromHtml(); typeHtml = getDataUseHandlebars(selOption, json); //加载类别数据
typeHtml = getDataUseHandlebars(selOption, json); //加载类别数据 //渲染
//渲染 form.render();
form.render(); addRow();
addRow();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
} }
//初始化资产来源 //初始化资产来源
function initFromHtml() { function initFromHtml() {
AjaxPostUtil.request({url: flowableBasePath + "assetfrom006", params: {}, type: 'json', async:false, callback: function(json) { AjaxPostUtil.request({url: flowableBasePath + "assetfrom006", params: {}, type: 'json', async:false, callback: function(json) {
if(json.returnCode == 0) { fromHtml = getDataUseHandlebars(selOption, json); //加载资产来源数据
fromHtml = getDataUseHandlebars(selOption, json); //加载资产来源数据 matchingLanguage();
matchingLanguage(); form.render();
form.render();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
} }
...@@ -118,12 +110,8 @@ layui.config({ ...@@ -118,12 +110,8 @@ layui.config({
approvalId: approvalId approvalId: approvalId
}; };
AjaxPostUtil.request({url: flowableBasePath + "asset019", params: params, type: 'json', callback: function(json) { AjaxPostUtil.request({url: flowableBasePath + "asset019", params: params, type: 'json', callback: function(json) {
if(json.returnCode == 0) { parent.layer.close(index);
parent.layer.close(index); parent.refreshCode = '0';
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
} }
......
...@@ -13,36 +13,32 @@ layui.config({ ...@@ -13,36 +13,32 @@ layui.config({
var useTemplate = $("#useTemplate").html(); var useTemplate = $("#useTemplate").html();
AjaxPostUtil.request({url: flowableBasePath + "asset021", params:{rowId: parent.rowId}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "asset021", params:{rowId: parent.rowId}, type: 'json', callback: function (json) {
if(json.returnCode == 0) { //状态
//状态 if(json.bean.state == '0'){
if(json.bean.state == '0'){ json.bean.stateName = "<span>" + json.bean.stateName + "</span>";
json.bean.stateName = "<span>" + json.bean.stateName + "</span>"; }else if(json.bean.state == '1'){
}else if(json.bean.state == '1'){ json.bean.stateName = "<span class='state-new'>" + json.bean.stateName + "</span>";
json.bean.stateName = "<span class='state-new'>" + json.bean.stateName + "</span>"; }else if(json.bean.state == '2'){
}else if(json.bean.state == '2'){ json.bean.stateName = "<span class='state-up'>" + json.bean.stateName + "</span>";
json.bean.stateName = "<span class='state-up'>" + json.bean.stateName + "</span>"; }else if(json.bean.state == '3'){
}else if(json.bean.state == '3'){ json.bean.stateName = "<span class='state-down'>" + json.bean.stateName + "</span>";
json.bean.stateName = "<span class='state-down'>" + json.bean.stateName + "</span>"; }else if(json.bean.state == '4'){
}else if(json.bean.state == '4'){ json.bean.stateName = "<span class='state-down'>" + json.bean.stateName + "</span>";
json.bean.stateName = "<span class='state-down'>" + json.bean.stateName + "</span>"; }else if(json.bean.state == '5'){
}else if(json.bean.state == '5'){ json.bean.stateName = "<span class='state-error'>" + json.bean.stateName + "</span>";
json.bean.stateName = "<span class='state-error'>" + json.bean.stateName + "</span>"; }
} //附件回显
//附件回显 var str = "暂无附件";
var str = "暂无附件"; if(json.bean.enclosureInfo.length != 0 && !isNull(json.bean.enclosureInfo)){
if(json.bean.enclosureInfo.length != 0 && !isNull(json.bean.enclosureInfo)){ str = "";
str = ""; $.each([].concat(json.bean.enclosureInfo), function(i, item){
$.each([].concat(json.bean.enclosureInfo), function(i, item){ str += '<a rowid="' + item.id + '" class="enclosureItem" rowpath="' + item.fileAddress + '" href="javascript:;" style="color:blue;">' + item.name + '</a><br>';
str += '<a rowid="' + item.id + '" class="enclosureItem" rowpath="' + item.fileAddress + '" href="javascript:;" style="color:blue;">' + item.name + '</a><br>'; });
}); }
} var _html = getDataUseHandlebars(useTemplate, json);//加载数据
var _html = getDataUseHandlebars(useTemplate, json);//加载数据 $("#showForm").html(_html);
$("#showForm").html(_html); $("#enclosureUploadBtn").html(str);
$("#enclosureUploadBtn").html(str); matchingLanguage();
matchingLanguage();
}else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
$("body").on("click", ".enclosureItem", function() { $("body").on("click", ".enclosureItem", function() {
......
...@@ -21,51 +21,39 @@ layui.config({ ...@@ -21,51 +21,39 @@ layui.config({
var sTableData = ""; var sTableData = "";
AjaxPostUtil.request({url: flowableBasePath + "asset023", params: {rowId: parent.rowId}, type: 'json', callback: function(json) { AjaxPostUtil.request({url: flowableBasePath + "asset023", params: {rowId: parent.rowId}, type: 'json', callback: function(json) {
if(json.returnCode == 0) { $("#useTitle").html(json.bean.title);
$("#useTitle").html(json.bean.title); $("#useName").html(json.bean.userName);
$("#useName").html(json.bean.userName); $("#remark").val(json.bean.remark);
$("#remark").val(json.bean.remark); // 附件回显
// 附件回显 skyeyeEnclosure.initTypeISData({'enclosureUpload': json.bean.enclosureInfo});
skyeyeEnclosure.initTypeISData({'enclosureUpload': json.bean.enclosureInfo});
if(json.bean.state == '1'){
if(json.bean.state == '1'){ $(".typeTwo").removeClass("layui-hide");
$(".typeTwo").removeClass("layui-hide");
} else {
$(".typeOne").removeClass("layui-hide");
}
sTableData = json.bean.goods;
initTypeHtml();
matchingLanguage();
} else { } else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000}); $(".typeOne").removeClass("layui-hide");
} }
sTableData = json.bean.goods;
initTypeHtml();
matchingLanguage();
}}); }});
//初始化资产类别 //初始化资产类别
function initTypeHtml() { function initTypeHtml() {
AjaxPostUtil.request({url: flowableBasePath + "assettype006", params: {}, type: 'json', callback: function(json) { AjaxPostUtil.request({url: flowableBasePath + "assettype006", params: {}, type: 'json', callback: function(json) {
if(json.returnCode == 0) { initFromHtml();
initFromHtml(); typeHtml = getDataUseHandlebars(selOption, json); //加载类别数据
typeHtml = getDataUseHandlebars(selOption, json); //加载类别数据 //渲染
//渲染 form.render();
form.render(); //加载表格数据
//加载表格数据 initTableAssetList();
initTableAssetList();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
} }
//初始化资产来源 //初始化资产来源
function initFromHtml() { function initFromHtml() {
AjaxPostUtil.request({url: flowableBasePath + "assetfrom006", params: {}, type: 'json', async:false, callback: function(json) { AjaxPostUtil.request({url: flowableBasePath + "assetfrom006", params: {}, type: 'json', async:false, callback: function(json) {
if(json.returnCode == 0) { fromHtml = getDataUseHandlebars(selOption, json); //加载资产来源数据
fromHtml = getDataUseHandlebars(selOption, json); //加载资产来源数据 form.render();
form.render();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
} }
...@@ -148,12 +136,8 @@ layui.config({ ...@@ -148,12 +136,8 @@ layui.config({
approvalId: approvalId, approvalId: approvalId,
}; };
AjaxPostUtil.request({url: flowableBasePath + "asset024", params: params, type: 'json', callback: function(json) { AjaxPostUtil.request({url: flowableBasePath + "asset024", params: params, type: 'json', callback: function(json) {
if(json.returnCode == 0) { parent.layer.close(index);
parent.layer.close(index); parent.refreshCode = '0';
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
} }
......
...@@ -102,12 +102,8 @@ layui.config({ ...@@ -102,12 +102,8 @@ layui.config({
layer.confirm(msg, { icon: 3, title: '撤销操作' }, function (index) { layer.confirm(msg, { icon: 3, title: '撤销操作' }, function (index) {
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "asset037", params:{processInstanceId: data.processInstanceId}, type: 'json', method: "PUT", callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "asset037", params:{processInstanceId: data.processInstanceId}, type: 'json', method: "PUT", callback: function (json) {
if (json.returnCode == 0) { winui.window.msg("提交成功", {icon: 1, time: 2000});
winui.window.msg("提交成功", {icon: 1, time: 2000}); loadCaigouTable();
loadCaigouTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
...@@ -146,12 +142,8 @@ layui.config({ ...@@ -146,12 +142,8 @@ layui.config({
layer.confirm(msg, { icon: 3, title: '作废操作' }, function (index) { layer.confirm(msg, { icon: 3, title: '作废操作' }, function (index) {
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "asset022", params:{rowId: data.id}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "asset022", params:{rowId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000}); loadCaigouTable();
loadCaigouTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
......
...@@ -105,12 +105,8 @@ layui.config({ ...@@ -105,12 +105,8 @@ layui.config({
layer.confirm(msg, { icon: 3, title: '撤销操作' }, function (index) { layer.confirm(msg, { icon: 3, title: '撤销操作' }, function (index) {
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "asset038", params:{processInstanceId: data.processInstanceId}, type: 'json', method: "PUT", callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "asset038", params:{processInstanceId: data.processInstanceId}, type: 'json', method: "PUT", callback: function (json) {
if (json.returnCode == 0) { winui.window.msg("提交成功", {icon: 1, time: 2000});
winui.window.msg("提交成功", {icon: 1, time: 2000}); loadReturnTable();
loadReturnTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
...@@ -149,12 +145,8 @@ layui.config({ ...@@ -149,12 +145,8 @@ layui.config({
layer.confirm(msg, { icon: 3, title: '作废操作' }, function (index) { layer.confirm(msg, { icon: 3, title: '作废操作' }, function (index) {
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "asset030", params:{rowId: data.id}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "asset030", params:{rowId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000}); loadReturnTable();
loadReturnTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
...@@ -169,12 +161,8 @@ layui.config({ ...@@ -169,12 +161,8 @@ layui.config({
approvalId: approvalId approvalId: approvalId
}; };
AjaxPostUtil.request({url: flowableBasePath + "asset028", params: params, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "asset028", params: params, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg("提交成功", {icon: 1, time: 2000});
winui.window.msg("提交成功", {icon: 1, time: 2000}); loadReturnTable();
loadReturnTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
}); });
......
...@@ -76,12 +76,8 @@ layui.config({ ...@@ -76,12 +76,8 @@ layui.config({
layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){ layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "assettype003", params:{rowId: data.id}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "assettype003", params:{rowId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); loadassettypeTable();
loadassettypeTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
...@@ -119,12 +115,8 @@ layui.config({ ...@@ -119,12 +115,8 @@ layui.config({
layer.confirm(msg, { icon: 3, title: '上线操作' }, function (index) { layer.confirm(msg, { icon: 3, title: '上线操作' }, function (index) {
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "assettype007", params:{rowId: data.id}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "assettype007", params:{rowId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg("上线成功", {icon: 1, time: 2000});
winui.window.msg("上线成功", {icon: 1, time: 2000}); loadassettypeTable();
loadassettypeTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
...@@ -135,12 +127,8 @@ layui.config({ ...@@ -135,12 +127,8 @@ layui.config({
layer.confirm(msg, { icon: 3, title: '下线操作' }, function (index) { layer.confirm(msg, { icon: 3, title: '下线操作' }, function (index) {
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "assettype008", params:{rowId: data.id}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "assettype008", params:{rowId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg("下线成功", {icon: 1, time: 2000});
winui.window.msg("下线成功", {icon: 1, time: 2000}); loadassettypeTable();
loadassettypeTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
...@@ -148,24 +136,16 @@ layui.config({ ...@@ -148,24 +136,16 @@ layui.config({
// 上移 // 上移
function assettypetopOne(data){ function assettypetopOne(data){
AjaxPostUtil.request({url: flowableBasePath + "assettype009", params:{rowId: data.id}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "assettype009", params:{rowId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg(systemLanguage["com.skyeye.moveUpOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
winui.window.msg(systemLanguage["com.skyeye.moveUpOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); loadassettypeTable();
loadassettypeTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
} }
// 下移 // 下移
function assettypelowerOne(data){ function assettypelowerOne(data){
AjaxPostUtil.request({url: flowableBasePath + "assettype010", params:{rowId: data.id}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "assettype010", params:{rowId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg(systemLanguage["com.skyeye.moveDownOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
winui.window.msg(systemLanguage["com.skyeye.moveDownOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); loadassettypeTable();
loadassettypeTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
} }
......
...@@ -105,12 +105,8 @@ layui.config({ ...@@ -105,12 +105,8 @@ layui.config({
layer.confirm(msg, { icon: 3, title: '撤销操作' }, function (index) { layer.confirm(msg, { icon: 3, title: '撤销操作' }, function (index) {
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "asset036", params:{processInstanceId: data.processInstanceId}, type: 'json', method: "PUT", callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "asset036", params:{processInstanceId: data.processInstanceId}, type: 'json', method: "PUT", callback: function (json) {
if (json.returnCode == 0) { winui.window.msg("提交成功", {icon: 1, time: 2000});
winui.window.msg("提交成功", {icon: 1, time: 2000}); loadLingyongTable();
loadLingyongTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
...@@ -149,12 +145,8 @@ layui.config({ ...@@ -149,12 +145,8 @@ layui.config({
layer.confirm(msg, { icon: 3, title: '作废操作' }, function (index) { layer.confirm(msg, { icon: 3, title: '作废操作' }, function (index) {
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "asset016", params:{rowId: data.id}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "asset016", params:{rowId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000}); loadLingyongTable();
loadLingyongTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
...@@ -169,12 +161,8 @@ layui.config({ ...@@ -169,12 +161,8 @@ layui.config({
approvalId: approvalId approvalId: approvalId
}; };
AjaxPostUtil.request({url: flowableBasePath + "asset017", params: params, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "asset017", params: params, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg("提交成功", {icon: 1, time: 2000});
winui.window.msg("提交成功", {icon: 1, time: 2000}); loadLingyongTable();
loadLingyongTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
}); });
......
...@@ -6,9 +6,7 @@ layui.config({ ...@@ -6,9 +6,7 @@ layui.config({
}).extend({ }).extend({
window: 'js/winui.window' window: 'js/winui.window'
}).define(['window', 'table', 'jquery', 'winui', 'form', 'laydate'], function (exports) { }).define(['window', 'table', 'jquery', 'winui', 'form', 'laydate'], function (exports) {
winui.renderColor(); winui.renderColor();
var $ = layui.$, var $ = layui.$,
form = layui.form, form = layui.form,
laydate = layui.laydate, laydate = layui.laydate,
...@@ -111,12 +109,8 @@ layui.config({ ...@@ -111,12 +109,8 @@ layui.config({
layer.confirm(msg, { icon: 3, title: '维修会议室' }, function (index) { layer.confirm(msg, { icon: 3, title: '维修会议室' }, function (index) {
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "conferenceroom005", params: {rowId: data.id}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "conferenceroom005", params: {rowId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000}); loadTable();
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
...@@ -127,12 +121,8 @@ layui.config({ ...@@ -127,12 +121,8 @@ layui.config({
layer.confirm(msg, { icon: 3, title: '报废会议室' }, function (index) { layer.confirm(msg, { icon: 3, title: '报废会议室' }, function (index) {
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "conferenceroom006", params: {rowId: data.id}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "conferenceroom006", params: {rowId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000}); loadTable();
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
...@@ -143,12 +133,8 @@ layui.config({ ...@@ -143,12 +133,8 @@ layui.config({
layer.confirm(msg, { icon: 3, title: '恢复正常操作' }, function (index) { layer.confirm(msg, { icon: 3, title: '恢复正常操作' }, function (index) {
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "conferenceroom004", params: {rowId: data.id}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "conferenceroom004", params: {rowId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000}); loadTable();
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
...@@ -158,12 +144,8 @@ layui.config({ ...@@ -158,12 +144,8 @@ layui.config({
layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){ layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "conferenceroom003", params: {rowId: data.id}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "conferenceroom003", params: {rowId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); loadTable();
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
......
...@@ -96,12 +96,8 @@ layui.config({ ...@@ -96,12 +96,8 @@ layui.config({
processInstanceId: data.processInstanceId processInstanceId: data.processInstanceId
}; };
AjaxPostUtil.request({url: flowableBasePath + "conferenceroomreserve010", params: params, type: 'json', method: "PUT", callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "conferenceroomreserve010", params: params, type: 'json', method: "PUT", callback: function (json) {
if (json.returnCode == 0) { winui.window.msg("提交成功", {icon: 1, time: 2000});
winui.window.msg("提交成功", {icon: 1, time: 2000}); loadReserveTable();
loadReserveTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
...@@ -131,12 +127,8 @@ layui.config({ ...@@ -131,12 +127,8 @@ layui.config({
approvalId: approvalId approvalId: approvalId
}; };
AjaxPostUtil.request({url: flowableBasePath + "conferenceroomreserve006", params: params, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "conferenceroomreserve006", params: params, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg("提交成功", {icon: 1, time: 2000});
winui.window.msg("提交成功", {icon: 1, time: 2000}); loadReserveTable();
loadReserveTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
}); });
...@@ -148,12 +140,8 @@ layui.config({ ...@@ -148,12 +140,8 @@ layui.config({
layer.confirm(msg, { icon: 3, title: '申请作废操作' }, function (index) { layer.confirm(msg, { icon: 3, title: '申请作废操作' }, function (index) {
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "conferenceroomreserve007", params: {rowId: data.id}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "conferenceroomreserve007", params: {rowId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000}); loadReserveTable();
loadReserveTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
......
...@@ -127,12 +127,8 @@ layui.config({ ...@@ -127,12 +127,8 @@ layui.config({
borrowId: systemCommonUtil.tagEditorGetItemData('borrowId', borrowList) borrowId: systemCommonUtil.tagEditorGetItemData('borrowId', borrowList)
}; };
AjaxPostUtil.request({url: flowableBasePath + "licence005", params: params, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "licence005", params: params, type: 'json', callback: function (json) {
if (json.returnCode == 0) { parent.layer.close(index);
parent.layer.close(index); parent.refreshCode = '0';
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
} }
return false; return false;
......
...@@ -7,9 +7,7 @@ layui.config({ ...@@ -7,9 +7,7 @@ layui.config({
}).extend({ }).extend({
window: 'js/winui.window' window: 'js/winui.window'
}).define(['window', 'table', 'jquery', 'winui', 'form'], function (exports) { }).define(['window', 'table', 'jquery', 'winui', 'form'], function (exports) {
winui.renderColor(); winui.renderColor();
var $ = layui.$, var $ = layui.$,
form = layui.form, form = layui.form,
table = layui.table; table = layui.table;
...@@ -81,12 +79,8 @@ layui.config({ ...@@ -81,12 +79,8 @@ layui.config({
layer.confirm(msg, { icon: 3, title: '删除证照' }, function (index) { layer.confirm(msg, { icon: 3, title: '删除证照' }, function (index) {
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "licence003", params:{rowId: data.id}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "licence003", params:{rowId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); loadTable();
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
......
...@@ -29,16 +29,12 @@ layui.config({ ...@@ -29,16 +29,12 @@ layui.config({
// 初始化证照名称 // 初始化证照名称
function initLincenceNameHtml() { function initLincenceNameHtml() {
AjaxPostUtil.request({url: flowableBasePath + "licenceborrow008", params: {}, type: 'json', callback: function(json) { AjaxPostUtil.request({url: flowableBasePath + "licenceborrow008", params: {}, type: 'json', callback: function(json) {
if(json.returnCode == 0) { nameHtml = getDataUseHandlebars(selOption, json); //加载类别数据
nameHtml = getDataUseHandlebars(selOption, json); //加载类别数据 matchingLanguage();
matchingLanguage(); //渲染
//渲染 form.render();
form.render(); //初始化一行数据
//初始化一行数据 addRow();
addRow();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
} }
...@@ -90,12 +86,8 @@ layui.config({ ...@@ -90,12 +86,8 @@ layui.config({
approvalId: approvalId approvalId: approvalId
}; };
AjaxPostUtil.request({url: flowableBasePath + "licenceborrow002", params: params, type: 'json', callback: function(json) { AjaxPostUtil.request({url: flowableBasePath + "licenceborrow002", params: params, type: 'json', callback: function(json) {
if(json.returnCode == 0) { parent.layer.close(index);
parent.layer.close(index); parent.refreshCode = '0';
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
} }
......
...@@ -12,35 +12,31 @@ layui.config({ ...@@ -12,35 +12,31 @@ layui.config({
var useTemplate = $("#useTemplate").html(); var useTemplate = $("#useTemplate").html();
AjaxPostUtil.request({url: flowableBasePath + "licenceborrow003", params:{rowId: parent.rowId}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "licenceborrow003", params:{rowId: parent.rowId}, type: 'json', callback: function (json) {
if(json.returnCode == 0) { //状态
//状态 if(json.bean.state == '0'){
if(json.bean.state == '0'){ json.bean.stateName = "<span>" + json.bean.stateName + "</span>";
json.bean.stateName = "<span>" + json.bean.stateName + "</span>"; }else if(json.bean.state == '1'){
}else if(json.bean.state == '1'){ json.bean.stateName = "<span class='state-new'>" + json.bean.stateName + "</span>";
json.bean.stateName = "<span class='state-new'>" + json.bean.stateName + "</span>"; }else if(json.bean.state == '2'){
}else if(json.bean.state == '2'){ json.bean.stateName = "<span class='state-up'>" + json.bean.stateName + "</span>";
json.bean.stateName = "<span class='state-up'>" + json.bean.stateName + "</span>"; }else if(json.bean.state == '3'){
}else if(json.bean.state == '3'){ json.bean.stateName = "<span class='state-down'>" + json.bean.stateName + "</span>";
json.bean.stateName = "<span class='state-down'>" + json.bean.stateName + "</span>"; }else if(json.bean.state == '4'){
}else if(json.bean.state == '4'){ json.bean.stateName = "<span class='state-down'>" + json.bean.stateName + "</span>";
json.bean.stateName = "<span class='state-down'>" + json.bean.stateName + "</span>"; }else if(json.bean.state == '5'){
}else if(json.bean.state == '5'){ json.bean.stateName = "<span class='state-error'>" + json.bean.stateName + "</span>";
json.bean.stateName = "<span class='state-error'>" + json.bean.stateName + "</span>"; }
} //附件回显
//附件回显 var str = "";
var str = ""; if(json.bean.enclosureInfo.length != 0 && !isNull(json.bean.enclosureInfo)){
if(json.bean.enclosureInfo.length != 0 && !isNull(json.bean.enclosureInfo)){ $.each([].concat(json.bean.enclosureInfo), function(i, item){
$.each([].concat(json.bean.enclosureInfo), function(i, item){ str += '<a rowid="' + item.id + '" class="enclosureItem" rowpath="' + item.fileAddress + '" href="javascript:;" style="color:blue;">' + item.name + '</a><br>';
str += '<a rowid="' + item.id + '" class="enclosureItem" rowpath="' + item.fileAddress + '" href="javascript:;" style="color:blue;">' + item.name + '</a><br>'; });
}); }
} var _html = getDataUseHandlebars(useTemplate, json);//加载数据
var _html = getDataUseHandlebars(useTemplate, json);//加载数据 $("#showForm").html(_html);
$("#showForm").html(_html); $("#enclosureUploadBtn").html(str);
$("#enclosureUploadBtn").html(str); matchingLanguage();
matchingLanguage();
}else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
$("body").on("click", ".enclosureItem", function() { $("body").on("click", ".enclosureItem", function() {
......
...@@ -20,39 +20,31 @@ layui.config({ ...@@ -20,39 +20,31 @@ layui.config({
var sTableData = "" var sTableData = ""
AjaxPostUtil.request({url: flowableBasePath + "licenceborrow004", params: {rowId: parent.rowId}, type: 'json', callback: function(json) { AjaxPostUtil.request({url: flowableBasePath + "licenceborrow004", params: {rowId: parent.rowId}, type: 'json', callback: function(json) {
if(json.returnCode == 0) { $("#useTitle").html(json.bean.title);
$("#useTitle").html(json.bean.title); $("#useName").html(json.bean.userName);
$("#useName").html(json.bean.userName); $("#remark").val(json.bean.remark);
$("#remark").val(json.bean.remark); // 附件回显
// 附件回显 skyeyeEnclosure.initTypeISData({'enclosureUpload': json.bean.enclosureInfo});
skyeyeEnclosure.initTypeISData({'enclosureUpload': json.bean.enclosureInfo});
if(json.bean.state == '1'){
if(json.bean.state == '1'){ $(".typeTwo").removeClass("layui-hide");
$(".typeTwo").removeClass("layui-hide");
} else {
$(".typeOne").removeClass("layui-hide");
}
sTableData = json.bean.goods;
initLincenceNameHtml();
} else { } else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000}); $(".typeOne").removeClass("layui-hide");
} }
sTableData = json.bean.goods;
initLincenceNameHtml();
}}); }});
//初始化证照名称 //初始化证照名称
function initLincenceNameHtml() { function initLincenceNameHtml() {
AjaxPostUtil.request({url: flowableBasePath + "licenceborrow008", params: {}, type: 'json', callback: function(json) { AjaxPostUtil.request({url: flowableBasePath + "licenceborrow008", params: {}, type: 'json', callback: function(json) {
if(json.returnCode == 0) { nameHtml = getDataUseHandlebars(selOption, json); //加载名称数据
nameHtml = getDataUseHandlebars(selOption, json); //加载名称数据 matchingLanguage();
matchingLanguage(); //渲染
//渲染 form.render();
form.render(); //加载表格数据
//加载表格数据 initTableAssetList();
initTableAssetList();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
} }
...@@ -120,12 +112,8 @@ layui.config({ ...@@ -120,12 +112,8 @@ layui.config({
approvalId: approvalId, approvalId: approvalId,
}; };
AjaxPostUtil.request({url: flowableBasePath + "licenceborrow005", params: params, type: 'json', callback: function(json) { AjaxPostUtil.request({url: flowableBasePath + "licenceborrow005", params: params, type: 'json', callback: function(json) {
if(json.returnCode == 0) { parent.layer.close(index);
parent.layer.close(index); parent.refreshCode = '0';
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
} }
......
...@@ -93,12 +93,8 @@ layui.config({ ...@@ -93,12 +93,8 @@ layui.config({
layer.confirm(msg, { icon: 3, title: '撤销操作' }, function (index) { layer.confirm(msg, { icon: 3, title: '撤销操作' }, function (index) {
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "licenceborrow010", params:{processInstanceId: data.processInstanceId}, type: 'json', method: "PUT", callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "licenceborrow010", params:{processInstanceId: data.processInstanceId}, type: 'json', method: "PUT", callback: function (json) {
if (json.returnCode == 0) { winui.window.msg("提交成功", {icon: 1, time: 2000});
winui.window.msg("提交成功", {icon: 1, time: 2000}); loadBorrowTable();
loadBorrowTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
...@@ -128,12 +124,8 @@ layui.config({ ...@@ -128,12 +124,8 @@ layui.config({
approvalId: approvalId approvalId: approvalId
}; };
AjaxPostUtil.request({url: flowableBasePath + "licenceborrow006", params: params, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "licenceborrow006", params: params, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg("提交成功", {icon: 1, time: 2000});
winui.window.msg("提交成功", {icon: 1, time: 2000}); loadBorrowTable();
loadBorrowTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
}); });
...@@ -145,12 +137,8 @@ layui.config({ ...@@ -145,12 +137,8 @@ layui.config({
layer.confirm(msg, { icon: 3, title: '作废操作' }, function (index) { layer.confirm(msg, { icon: 3, title: '作废操作' }, function (index) {
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "licenceborrow007", params:{rowId: data.id}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "licenceborrow007", params:{rowId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000}); loadBorrowTable();
loadBorrowTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
......
...@@ -28,16 +28,12 @@ layui.config({ ...@@ -28,16 +28,12 @@ layui.config({
//初始化证照名称 //初始化证照名称
function initLicenceNameHtml() { function initLicenceNameHtml() {
AjaxPostUtil.request({url: flowableBasePath + "licencerevert008", params: {}, type: 'json', callback: function(json) { AjaxPostUtil.request({url: flowableBasePath + "licencerevert008", params: {}, type: 'json', callback: function(json) {
if(json.returnCode == 0) { nameHtml = getDataUseHandlebars(selOption, json); //加载类别数据
nameHtml = getDataUseHandlebars(selOption, json); //加载类别数据 matchingLanguage();
matchingLanguage(); //渲染
//渲染 form.render();
form.render(); //初始化一行数据
//初始化一行数据 addRow();
addRow();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
} }
...@@ -89,12 +85,8 @@ layui.config({ ...@@ -89,12 +85,8 @@ layui.config({
approvalId: approvalId approvalId: approvalId
}; };
AjaxPostUtil.request({url: flowableBasePath + "licencerevert002", params: params, type: 'json', callback: function(json) { AjaxPostUtil.request({url: flowableBasePath + "licencerevert002", params: params, type: 'json', callback: function(json) {
if(json.returnCode == 0) { parent.layer.close(index);
parent.layer.close(index); parent.refreshCode = '0';
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
} }
......
...@@ -12,35 +12,31 @@ layui.config({ ...@@ -12,35 +12,31 @@ layui.config({
var revertTemplate = $("#revertTemplate").html(); var revertTemplate = $("#revertTemplate").html();
AjaxPostUtil.request({url: flowableBasePath + "licencerevert003", params:{rowId: parent.rowId}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "licencerevert003", params:{rowId: parent.rowId}, type: 'json', callback: function (json) {
if(json.returnCode == 0) { //状态
//状态 if(json.bean.state == '0'){
if(json.bean.state == '0'){ json.bean.stateName = "<span>" + json.bean.stateName + "</span>";
json.bean.stateName = "<span>" + json.bean.stateName + "</span>"; }else if(json.bean.state == '1'){
}else if(json.bean.state == '1'){ json.bean.stateName = "<span class='state-new'>" + json.bean.stateName + "</span>";
json.bean.stateName = "<span class='state-new'>" + json.bean.stateName + "</span>"; }else if(json.bean.state == '2'){
}else if(json.bean.state == '2'){ json.bean.stateName = "<span class='state-up'>" + json.bean.stateName + "</span>";
json.bean.stateName = "<span class='state-up'>" + json.bean.stateName + "</span>"; }else if(json.bean.state == '3'){
}else if(json.bean.state == '3'){ json.bean.stateName = "<span class='state-down'>" + json.bean.stateName + "</span>";
json.bean.stateName = "<span class='state-down'>" + json.bean.stateName + "</span>"; }else if(json.bean.state == '4'){
}else if(json.bean.state == '4'){ json.bean.stateName = "<span class='state-down'>" + json.bean.stateName + "</span>";
json.bean.stateName = "<span class='state-down'>" + json.bean.stateName + "</span>"; }else if(json.bean.state == '5'){
}else if(json.bean.state == '5'){ json.bean.stateName = "<span class='state-error'>" + json.bean.stateName + "</span>";
json.bean.stateName = "<span class='state-error'>" + json.bean.stateName + "</span>"; }
} //附件回显
//附件回显 var str = "";
var str = ""; if(json.bean.enclosureInfo.length != 0 && !isNull(json.bean.enclosureInfo)){
if(json.bean.enclosureInfo.length != 0 && !isNull(json.bean.enclosureInfo)){ $.each([].concat(json.bean.enclosureInfo), function(i, item){
$.each([].concat(json.bean.enclosureInfo), function(i, item){ str += '<a rowid="' + item.id + '" class="enclosureItem" rowpath="' + item.fileAddress + '" href="javascript:;" style="color:blue;">' + item.name + '</a><br>';
str += '<a rowid="' + item.id + '" class="enclosureItem" rowpath="' + item.fileAddress + '" href="javascript:;" style="color:blue;">' + item.name + '</a><br>'; });
}); }
} var _html = getDataUseHandlebars(revertTemplate, json);//加载数据
var _html = getDataUseHandlebars(revertTemplate, json);//加载数据 $("#showForm").html(_html);
$("#showForm").html(_html); $("#enclosureUploadBtn").html(str);
$("#enclosureUploadBtn").html(str); matchingLanguage();
matchingLanguage();
}else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
$("body").on("click", ".enclosureItem", function() { $("body").on("click", ".enclosureItem", function() {
......
...@@ -20,38 +20,30 @@ layui.config({ ...@@ -20,38 +20,30 @@ layui.config({
var sTableData = "" var sTableData = ""
AjaxPostUtil.request({url: flowableBasePath + "licencerevert004", params: {rowId: parent.rowId}, type: 'json', callback: function(json) { AjaxPostUtil.request({url: flowableBasePath + "licencerevert004", params: {rowId: parent.rowId}, type: 'json', callback: function(json) {
if(json.returnCode == 0) { $("#revertTitle").html(json.bean.title);
$("#revertTitle").html(json.bean.title); $("#revertName").html(json.bean.userName);
$("#revertName").html(json.bean.userName); $("#remark").val(json.bean.remark);
$("#remark").val(json.bean.remark); // 附件回显
// 附件回显 skyeyeEnclosure.initTypeISData({'enclosureUpload': json.bean.enclosureInfo});
skyeyeEnclosure.initTypeISData({'enclosureUpload': json.bean.enclosureInfo});
if(json.bean.state == '1'){
if(json.bean.state == '1'){ $(".typeTwo").removeClass("layui-hide");
$(".typeTwo").removeClass("layui-hide");
} else {
$(".typeOne").removeClass("layui-hide");
}
sTableData = json.bean.goods;
initLicenceNameHtml();
} else { } else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000}); $(".typeOne").removeClass("layui-hide");
} }
sTableData = json.bean.goods;
initLicenceNameHtml();
}}); }});
//初始化证照名称 //初始化证照名称
function initLicenceNameHtml() { function initLicenceNameHtml() {
AjaxPostUtil.request({url: flowableBasePath + "licencerevert008", params: {}, type: 'json', callback: function(json) { AjaxPostUtil.request({url: flowableBasePath + "licencerevert008", params: {}, type: 'json', callback: function(json) {
if(json.returnCode == 0) { nameHtml = getDataUseHandlebars(selOption, json); //加载名称数据
nameHtml = getDataUseHandlebars(selOption, json); //加载名称数据 matchingLanguage();
matchingLanguage(); form.render();
form.render(); // 加载表格数据
// 加载表格数据 initTableAssetList();
initTableAssetList();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
} }
...@@ -118,12 +110,8 @@ layui.config({ ...@@ -118,12 +110,8 @@ layui.config({
approvalId: approvalId, approvalId: approvalId,
}; };
AjaxPostUtil.request({url: flowableBasePath + "licencerevert005", params: params, type: 'json', callback: function(json) { AjaxPostUtil.request({url: flowableBasePath + "licencerevert005", params: params, type: 'json', callback: function(json) {
if(json.returnCode == 0) { parent.layer.close(index);
parent.layer.close(index); parent.refreshCode = '0';
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
} }
......
...@@ -93,12 +93,8 @@ layui.config({ ...@@ -93,12 +93,8 @@ layui.config({
layer.confirm(msg, { icon: 3, title: '撤销操作' }, function (index) { layer.confirm(msg, { icon: 3, title: '撤销操作' }, function (index) {
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "licencerevert010", params:{processInstanceId: data.processInstanceId}, type: 'json', method: "PUT", callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "licencerevert010", params:{processInstanceId: data.processInstanceId}, type: 'json', method: "PUT", callback: function (json) {
if (json.returnCode == 0) { winui.window.msg("提交成功", {icon: 1, time: 2000});
winui.window.msg("提交成功", {icon: 1, time: 2000}); loadRevertTable();
loadRevertTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
...@@ -128,12 +124,8 @@ layui.config({ ...@@ -128,12 +124,8 @@ layui.config({
approvalId: approvalId approvalId: approvalId
}; };
AjaxPostUtil.request({url: flowableBasePath + "licencerevert006", params: params, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "licencerevert006", params: params, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg("提交成功", {icon: 1, time: 2000});
winui.window.msg("提交成功", {icon: 1, time: 2000}); loadRevertTable();
loadRevertTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
}); });
...@@ -145,12 +137,8 @@ layui.config({ ...@@ -145,12 +137,8 @@ layui.config({
layer.confirm(msg, { icon: 3, title: '作废操作' }, function (index) { layer.confirm(msg, { icon: 3, title: '作废操作' }, function (index) {
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "licencerevert007", params:{rowId: data.id}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "licencerevert007", params:{rowId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000}); loadRevertTable();
loadRevertTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
......
...@@ -84,12 +84,8 @@ layui.config({ ...@@ -84,12 +84,8 @@ layui.config({
return false; return false;
} }
AjaxPostUtil.request({url: flowableBasePath + "seal005", params: params, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "seal005", params: params, type: 'json', callback: function (json) {
if (json.returnCode == 0) { parent.layer.close(index);
parent.layer.close(index); parent.refreshCode = '0';
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
} }
return false; return false;
......
...@@ -80,12 +80,8 @@ layui.config({ ...@@ -80,12 +80,8 @@ layui.config({
layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){ layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "seal003", params:{rowId: data.id}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "seal003", params:{rowId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); loadTable();
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
......
...@@ -92,12 +92,8 @@ layui.config({ ...@@ -92,12 +92,8 @@ layui.config({
layer.confirm(msg, { icon: 3, title: '撤销操作'}, function (index) { layer.confirm(msg, { icon: 3, title: '撤销操作'}, function (index) {
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "sealborrow010", params:{processInstanceId: data.processInstanceId}, type: 'json', method: "PUT", callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "sealborrow010", params:{processInstanceId: data.processInstanceId}, type: 'json', method: "PUT", callback: function (json) {
if (json.returnCode == 0) { winui.window.msg("提交成功", {icon: 1, time: 2000});
winui.window.msg("提交成功", {icon: 1, time: 2000}); loadBorrowTable();
loadBorrowTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
...@@ -144,12 +140,8 @@ layui.config({ ...@@ -144,12 +140,8 @@ layui.config({
layer.confirm(msg, { icon: 3, title: '作废操作' }, function (index) { layer.confirm(msg, { icon: 3, title: '作废操作' }, function (index) {
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "sealborrow007", params:{rowId: data.id}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "sealborrow007", params:{rowId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000}); loadBorrowTable();
loadBorrowTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
......
...@@ -93,12 +93,8 @@ layui.config({ ...@@ -93,12 +93,8 @@ layui.config({
layer.confirm(msg, { icon: 3, title: '撤销操作' }, function (index) { layer.confirm(msg, { icon: 3, title: '撤销操作' }, function (index) {
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "sealrevert010", params:{processInstanceId: data.processInstanceId}, type: 'json', method: "PUT", callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "sealrevert010", params:{processInstanceId: data.processInstanceId}, type: 'json', method: "PUT", callback: function (json) {
if (json.returnCode == 0) { winui.window.msg("提交成功", {icon: 1, time: 2000});
winui.window.msg("提交成功", {icon: 1, time: 2000}); loadRevertTable();
loadRevertTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
...@@ -145,12 +141,8 @@ layui.config({ ...@@ -145,12 +141,8 @@ layui.config({
layer.confirm(msg, { icon: 3, title: '作废操作' }, function (index) { layer.confirm(msg, { icon: 3, title: '作废操作' }, function (index) {
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "sealrevert007", params:{rowId: data.id}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "sealrevert007", params:{rowId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000}); loadRevertTable();
loadRevertTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
......
...@@ -6,9 +6,7 @@ layui.config({ ...@@ -6,9 +6,7 @@ layui.config({
}).extend({ }).extend({
window: 'js/winui.window' window: 'js/winui.window'
}).define(['window', 'table', 'jquery', 'winui', 'form', 'laydate'], function (exports) { }).define(['window', 'table', 'jquery', 'winui', 'form', 'laydate'], function (exports) {
winui.renderColor(); winui.renderColor();
var $ = layui.$, var $ = layui.$,
form = layui.form, form = layui.form,
table = layui.table, table = layui.table,
...@@ -111,12 +109,8 @@ layui.config({ ...@@ -111,12 +109,8 @@ layui.config({
layer.confirm('确认维修该车辆吗?', {icon: 3, title: '维修操作'}, function (index) { layer.confirm('确认维修该车辆吗?', {icon: 3, title: '维修操作'}, function (index) {
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "vehicle005", params:{rowId: data.id}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "vehicle005", params:{rowId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000}); loadVehicleTable();
loadVehicleTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
...@@ -126,12 +120,8 @@ layui.config({ ...@@ -126,12 +120,8 @@ layui.config({
layer.confirm('确认报废该车辆吗?', { icon: 3, title: '报废操作' }, function (index) { layer.confirm('确认报废该车辆吗?', { icon: 3, title: '报废操作' }, function (index) {
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "vehicle006", params:{rowId: data.id}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "vehicle006", params:{rowId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000}); loadVehicleTable();
loadVehicleTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
...@@ -141,12 +131,8 @@ layui.config({ ...@@ -141,12 +131,8 @@ layui.config({
layer.confirm('确认对该车辆恢复正常吗?', { icon: 3, title: '恢复操作' }, function (index) { layer.confirm('确认对该车辆恢复正常吗?', { icon: 3, title: '恢复操作' }, function (index) {
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "vehicle004", params:{rowId: data.id}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "vehicle004", params:{rowId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000}); loadVehicleTable();
loadVehicleTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
...@@ -156,12 +142,8 @@ layui.config({ ...@@ -156,12 +142,8 @@ layui.config({
layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){ layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "vehicle003", params:{rowId: data.id}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "vehicle003", params:{rowId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); loadVehicleTable();
loadVehicleTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
......
...@@ -82,12 +82,8 @@ layui.config({ ...@@ -82,12 +82,8 @@ layui.config({
layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){ layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "accident003", params: {rowId: data.id}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "accident003", params: {rowId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); loadAccidentTable();
loadAccidentTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
......
...@@ -56,12 +56,8 @@ layui.config({ ...@@ -56,12 +56,8 @@ layui.config({
layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){ layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "coverage003", params:{rowId: data.id}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "coverage003", params:{rowId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); loadCoverageTable();
loadCoverageTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
......
...@@ -82,12 +82,8 @@ layui.config({ ...@@ -82,12 +82,8 @@ layui.config({
layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){ layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "inspection003", params: {rowId: data.id}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "inspection003", params: {rowId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); loadInspectionTable();
loadInspectionTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
......
...@@ -82,12 +82,8 @@ layui.config({ ...@@ -82,12 +82,8 @@ layui.config({
layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){ layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "insurance003", params: {rowId: data.id}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "insurance003", params: {rowId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); loadInsuranceTable();
loadInsuranceTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
......
...@@ -82,12 +82,8 @@ layui.config({ ...@@ -82,12 +82,8 @@ layui.config({
layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){ layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "maintenance003", params: {rowId: data.id}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "maintenance003", params: {rowId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); loadMaintenanceTable();
loadMaintenanceTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
......
...@@ -89,12 +89,8 @@ layui.config({ ...@@ -89,12 +89,8 @@ layui.config({
layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){ layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "oiling003", params: {rowId: data.id}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "oiling003", params: {rowId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); loadOilingTable();
loadOilingTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
......
...@@ -88,12 +88,8 @@ layui.config({ ...@@ -88,12 +88,8 @@ layui.config({
layer.confirm('确认撤销该用车申请吗?', {icon: 3, title: '撤销操作'}, function (index) { layer.confirm('确认撤销该用车申请吗?', {icon: 3, title: '撤销操作'}, function (index) {
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "vehicle022", params: {processInstanceId: data.processInstanceId}, type: 'json', method: "PUT", callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "vehicle022", params: {processInstanceId: data.processInstanceId}, type: 'json', method: "PUT", callback: function (json) {
if (json.returnCode == 0) { winui.window.msg("提交成功", {icon: 1, time: 2000});
winui.window.msg("提交成功", {icon: 1, time: 2000}); loadTable();
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
...@@ -108,12 +104,8 @@ layui.config({ ...@@ -108,12 +104,8 @@ layui.config({
approvalId: approvalId approvalId: approvalId
}; };
AjaxPostUtil.request({url: flowableBasePath + "vehicle017", params: params, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "vehicle017", params: params, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg("提交成功", {icon: 1, time: 2000});
winui.window.msg("提交成功", {icon: 1, time: 2000}); loadTable();
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
}); });
...@@ -124,12 +116,8 @@ layui.config({ ...@@ -124,12 +116,8 @@ layui.config({
layer.confirm('确认作废该条用车申请吗?', {icon: 3, title: '作废操作'}, function (index) { layer.confirm('确认作废该条用车申请吗?', {icon: 3, title: '作废操作'}, function (index) {
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "vehicle018", params: {rowId: data.id}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "vehicle018", params: {rowId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000}); loadTable();
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
......
...@@ -23,12 +23,8 @@ layui.config({ ...@@ -23,12 +23,8 @@ layui.config({
desc: $("#desc").val() desc: $("#desc").val()
}; };
AjaxPostUtil.request({url: flowableBasePath + "bossIntervieweeFrom002", params: params, type: 'json', method: "POST", callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "bossIntervieweeFrom002", params: params, type: 'json', method: "POST", callback: function (json) {
if (json.returnCode == 0) { parent.layer.close(index);
parent.layer.close(index); parent.refreshCode = '0';
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
} }
return false; return false;
......
...@@ -66,12 +66,8 @@ layui.config({ ...@@ -66,12 +66,8 @@ layui.config({
layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){ layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "bossIntervieweeFrom003", params:{id: data.id}, type: 'json', method: "DELETE", callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "bossIntervieweeFrom003", params:{id: data.id}, type: 'json', method: "DELETE", callback: function (json) {
if (json.returnCode == 0) { winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); loadTable();
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
......
...@@ -18,12 +18,8 @@ layui.config({ ...@@ -18,12 +18,8 @@ layui.config({
appealName: $("#appealName").val(), appealName: $("#appealName").val(),
}; };
AjaxPostUtil.request({url: flowableBasePath + "checkworkreason002", params: params, type: 'json', method: "POST", callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "checkworkreason002", params: params, type: 'json', method: "POST", callback: function (json) {
if (json.returnCode == 0) { parent.layer.close(index);
parent.layer.close(index); parent.refreshCode = '0';
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
} }
return false; return false;
......
...@@ -81,12 +81,8 @@ layui.config({ ...@@ -81,12 +81,8 @@ layui.config({
layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){ layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "checkworkreason003", params: {rowId: data.id}, type: 'json', method: "DELETE", callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "checkworkreason003", params: {rowId: data.id}, type: 'json', method: "DELETE", callback: function (json) {
if (json.returnCode == 0) { winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); loadTable();
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
...@@ -97,12 +93,8 @@ layui.config({ ...@@ -97,12 +93,8 @@ layui.config({
layer.confirm(msg, { icon: 3, title: '上线操作' }, function (index) { layer.confirm(msg, { icon: 3, title: '上线操作' }, function (index) {
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "checkworkreason004", params: {rowId: data.id}, type: 'json', method: "PUT", callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "checkworkreason004", params: {rowId: data.id}, type: 'json', method: "PUT", callback: function (json) {
if (json.returnCode == 0) { winui.window.msg("上线成功", {icon: 1, time: 2000});
winui.window.msg("上线成功", {icon: 1, time: 2000}); loadTable();
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
...@@ -113,12 +105,8 @@ layui.config({ ...@@ -113,12 +105,8 @@ layui.config({
layer.confirm(msg, { icon: 3, title: '下线操作' }, function (index) { layer.confirm(msg, { icon: 3, title: '下线操作' }, function (index) {
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "checkworkreason005", params: {rowId: data.id}, type: 'json', method: "PUT", callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "checkworkreason005", params: {rowId: data.id}, type: 'json', method: "PUT", callback: function (json) {
if (json.returnCode == 0) { winui.window.msg("下线成功", {icon: 1, time: 2000});
winui.window.msg("下线成功", {icon: 1, time: 2000}); loadTable();
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
...@@ -141,24 +129,16 @@ layui.config({ ...@@ -141,24 +129,16 @@ layui.config({
// 上移 // 上移
function upMove(data){ function upMove(data){
AjaxPostUtil.request({url: flowableBasePath + "checkworkreason008", params: {rowId: data.id}, type: 'json', method: "PUT", callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "checkworkreason008", params: {rowId: data.id}, type: 'json', method: "PUT", callback: function (json) {
if (json.returnCode == 0) { winui.window.msg(systemLanguage["com.skyeye.moveUpOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
winui.window.msg(systemLanguage["com.skyeye.moveUpOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); loadTable();
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
} }
// 下移 // 下移
function downMove(data){ function downMove(data){
AjaxPostUtil.request({url: flowableBasePath + "checkworkreason009", params: {rowId: data.id}, type: 'json', method: "PUT", callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "checkworkreason009", params: {rowId: data.id}, type: 'json', method: "PUT", callback: function (json) {
if (json.returnCode == 0) { winui.window.msg(systemLanguage["com.skyeye.moveDownOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
winui.window.msg(systemLanguage["com.skyeye.moveDownOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); loadTable();
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
} }
......
...@@ -148,12 +148,8 @@ layui.config({ ...@@ -148,12 +148,8 @@ layui.config({
weekDay: JSON.stringify(weekDay) weekDay: JSON.stringify(weekDay)
}; };
AjaxPostUtil.request({url: flowableBasePath + "checkworktime002", params: params, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "checkworktime002", params: params, type: 'json', callback: function (json) {
if (json.returnCode == 0) { parent.layer.close(index);
parent.layer.close(index); parent.refreshCode = '0';
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
} }
return false; return false;
......
...@@ -102,12 +102,8 @@ layui.config({ ...@@ -102,12 +102,8 @@ layui.config({
layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){ layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "checkworktime005", params: {rowId: data.id}, type: 'json', method: "DELETE", callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "checkworktime005", params: {rowId: data.id}, type: 'json', method: "DELETE", callback: function (json) {
if (json.returnCode == 0) { winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); loadTable();
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
......
...@@ -80,11 +80,9 @@ layui.config({ ...@@ -80,11 +80,9 @@ 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(); refreshTable();
} }
...@@ -96,14 +94,9 @@ layui.config({ ...@@ -96,14 +94,9 @@ layui.config({
var msg = obj ? '确认删除模板【' + obj.data.modelName + '】吗?' : '确认删除选中数据吗?'; var msg = obj ? '确认删除模板【' + obj.data.modelName + '】吗?' : '确认删除选中数据吗?';
layer.confirm(msg, { icon: 3, title: '删除模板' }, function (index) { layer.confirm(msg, { icon: 3, title: '删除模板' }, function (index) {
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: reqBasePath + "codemodel008", params:{rowId: data.id}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: reqBasePath + "codemodel008", params:{rowId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); loadTable();
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
......
...@@ -81,12 +81,8 @@ layui.config({ ...@@ -81,12 +81,8 @@ layui.config({
layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){ layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: reqBasePath + "codemodel003", params:{rowId: data.id}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: reqBasePath + "codemodel003", params:{rowId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); loadTable();
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
......
...@@ -70,12 +70,8 @@ layui.config({ ...@@ -70,12 +70,8 @@ layui.config({
layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){ layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: reqBasePath + "sysdevelopdoc015", params:{rowId: data.id}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: reqBasePath + "sysdevelopdoc015", params:{rowId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); loadTable();
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
...@@ -100,12 +96,8 @@ layui.config({ ...@@ -100,12 +96,8 @@ layui.config({
layer.confirm(msg, { icon: 3, title: '文档上线' }, function (index) { layer.confirm(msg, { icon: 3, title: '文档上线' }, function (index) {
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: reqBasePath + "sysdevelopdoc016", params:{rowId: data.id}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: reqBasePath + "sysdevelopdoc016", params:{rowId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg("上线成功", {icon: 1, time: 2000});
winui.window.msg("上线成功", {icon: 1, time: 2000}); loadTable();
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
...@@ -116,12 +108,8 @@ layui.config({ ...@@ -116,12 +108,8 @@ layui.config({
layer.confirm(msg, { icon: 3, title: '文档下线' }, function (index) { layer.confirm(msg, { icon: 3, title: '文档下线' }, function (index) {
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: reqBasePath + "sysdevelopdoc017", params:{rowId: data.id}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: reqBasePath + "sysdevelopdoc017", params:{rowId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg("下线成功", {icon: 1, time: 2000});
winui.window.msg("下线成功", {icon: 1, time: 2000}); loadTable();
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
......
...@@ -71,12 +71,8 @@ layui.config({ ...@@ -71,12 +71,8 @@ layui.config({
layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){ layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: reqBasePath + "sysdevelopdoc005", params:{rowId: data.id}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: reqBasePath + "sysdevelopdoc005", params:{rowId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); loadTable();
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
...@@ -87,12 +83,8 @@ layui.config({ ...@@ -87,12 +83,8 @@ layui.config({
layer.confirm(msg, { icon: 3, title: '目录上线' }, function (index) { layer.confirm(msg, { icon: 3, title: '目录上线' }, function (index) {
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: reqBasePath + "sysdevelopdoc007", params:{rowId: data.id}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: reqBasePath + "sysdevelopdoc007", params:{rowId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg("上线成功", {icon: 1, time: 2000});
winui.window.msg("上线成功", {icon: 1, time: 2000}); loadTable();
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
...@@ -103,12 +95,8 @@ layui.config({ ...@@ -103,12 +95,8 @@ layui.config({
layer.confirm(msg, { icon: 3, title: '目录下线' }, function (index) { layer.confirm(msg, { icon: 3, title: '目录下线' }, function (index) {
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: reqBasePath + "sysdevelopdoc008", params:{rowId: data.id}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: reqBasePath + "sysdevelopdoc008", params:{rowId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg("下线成功", {icon: 1, time: 2000});
winui.window.msg("下线成功", {icon: 1, time: 2000}); loadTable();
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
......
...@@ -72,12 +72,8 @@ layui.config({ ...@@ -72,12 +72,8 @@ layui.config({
layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){ layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: reqBasePath + "sysevemodel003", params:{id: data.id}, type: 'json', method: "DELETE", callback: function (json) { AjaxPostUtil.request({url: reqBasePath + "sysevemodel003", params:{id: data.id}, type: 'json', method: "DELETE", callback: function (json) {
if (json.returnCode == 0) { winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); loadTable();
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
......
...@@ -21,12 +21,8 @@ layui.config({ ...@@ -21,12 +21,8 @@ layui.config({
parentId: isNull($("#parentId").val()) ? "0" : $("#parentId").val() parentId: isNull($("#parentId").val()) ? "0" : $("#parentId").val()
}; };
AjaxPostUtil.request({url: reqBasePath + "sysevemodeltype002", params: params, type: 'json', method: "POST", callback: function (json) { AjaxPostUtil.request({url: reqBasePath + "sysevemodeltype002", params: params, type: 'json', method: "POST", callback: function (json) {
if (json.returnCode == 0) { parent.layer.close(index);
parent.layer.close(index); parent.refreshCode = '0';
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
} }
return false; return false;
......
...@@ -127,10 +127,6 @@ function loadUploadMethod(){ ...@@ -127,10 +127,6 @@ function loadUploadMethod(){
afterSendFile: function (data) { afterSendFile: function (data) {
//如果分块上传成功,则通知后台合并分块 //如果分块上传成功,则通知后台合并分块
AjaxPostUtil.request({url: reqBasePath + "sysenclosure008", params: {md5: md5, folderId: folderId, name: data.name, size: data.size}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: reqBasePath + "sysenclosure008", params: {md5: md5, folderId: folderId, name: data.name, size: data.size}, type: 'json', callback: function (json) {
if (json.returnCode == 0) {
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
} }
}); });
......
...@@ -58,8 +58,7 @@ layui.config({ ...@@ -58,8 +58,7 @@ layui.config({
}); });
form.render(); form.render();
$("body").on("click", "#formSearch", function() { $("body").on("click", "#formSearch", function() {
refreshTable(); refreshTable();
}); });
...@@ -108,12 +107,8 @@ layui.config({ ...@@ -108,12 +107,8 @@ layui.config({
layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){ layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "crmopportunityfrom005", params: {rowId: data.id}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "crmopportunityfrom005", params: {rowId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); loadTable();
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
...@@ -124,12 +119,8 @@ layui.config({ ...@@ -124,12 +119,8 @@ layui.config({
layer.confirm(msg, {icon: 3, title: '商机来源上线'}, function (index) { layer.confirm(msg, {icon: 3, title: '商机来源上线'}, function (index) {
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "crmopportunityfrom006", params: {rowId: data.id}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "crmopportunityfrom006", params: {rowId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg("上线成功", {icon: 1, time: 2000});
winui.window.msg("上线成功", {icon: 1, time: 2000}); loadTable();
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
...@@ -140,12 +131,8 @@ layui.config({ ...@@ -140,12 +131,8 @@ layui.config({
layer.confirm(msg, {icon: 3, title: '商机来源下线'}, function (index) { layer.confirm(msg, {icon: 3, title: '商机来源下线'}, function (index) {
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "crmopportunityfrom007", params: {rowId: data.id}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "crmopportunityfrom007", params: {rowId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg("下线成功", {icon: 1, time: 2000});
winui.window.msg("下线成功", {icon: 1, time: 2000}); loadTable();
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
......
...@@ -7,7 +7,6 @@ layui.config({ ...@@ -7,7 +7,6 @@ layui.config({
window: 'js/winui.window' window: 'js/winui.window'
}).define(['window', 'table', 'jquery', 'winui', 'form'], function (exports) { }).define(['window', 'table', 'jquery', 'winui', 'form'], function (exports) {
winui.renderColor(); winui.renderColor();
var $ = layui.$, var $ = layui.$,
form = layui.form, form = layui.form,
table = layui.table; table = layui.table;
...@@ -115,12 +114,8 @@ layui.config({ ...@@ -115,12 +114,8 @@ layui.config({
layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){ layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "customergroup005", params: {rowId: data.id}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "customergroup005", params: {rowId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); loadTable();
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
...@@ -130,12 +125,8 @@ layui.config({ ...@@ -130,12 +125,8 @@ layui.config({
layer.confirm('确认将选中数据上线吗?', {icon: 3, title: '上线操作'}, function (index) { layer.confirm('确认将选中数据上线吗?', {icon: 3, title: '上线操作'}, function (index) {
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "customergroup006", params: {rowId: data.id}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "customergroup006", params: {rowId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg("上线成功", {icon: 1, time: 2000});
winui.window.msg("上线成功", {icon: 1, time: 2000}); loadTable();
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
...@@ -145,12 +136,8 @@ layui.config({ ...@@ -145,12 +136,8 @@ layui.config({
layer.confirm('确认将选中数据下线吗?', {icon: 3, title: '下线操作'}, function (index) { layer.confirm('确认将选中数据下线吗?', {icon: 3, title: '下线操作'}, function (index) {
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "customergroup007", params: {rowId: data.id}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "customergroup007", params: {rowId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg("下线成功", {icon: 1, time: 2000});
winui.window.msg("下线成功", {icon: 1, time: 2000}); loadTable();
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
......
...@@ -121,12 +121,8 @@ layui.config({ ...@@ -121,12 +121,8 @@ layui.config({
layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){ layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "customer006", params: {rowId: data.id}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "customer006", params: {rowId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); loadTable();
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
......
...@@ -121,12 +121,8 @@ layui.config({ ...@@ -121,12 +121,8 @@ layui.config({
layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){ layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "customer006", params: {rowId: data.id}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "customer006", params: {rowId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); loadTable();
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
......
...@@ -108,12 +108,8 @@ layui.config({ ...@@ -108,12 +108,8 @@ layui.config({
layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){ layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "customertype005", params: {rowId: data.id}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "customertype005", params: {rowId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); loadTable();
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
...@@ -124,12 +120,8 @@ layui.config({ ...@@ -124,12 +120,8 @@ layui.config({
layer.confirm(msg, {icon: 3, title: '类型上线'}, function (index) { layer.confirm(msg, {icon: 3, title: '类型上线'}, function (index) {
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "customertype006", params: {rowId: data.id}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "customertype006", params: {rowId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg("上线成功", {icon: 1, time: 2000});
winui.window.msg("上线成功", {icon: 1, time: 2000}); loadTable();
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
...@@ -140,12 +132,8 @@ layui.config({ ...@@ -140,12 +132,8 @@ layui.config({
layer.confirm(msg, {icon: 3, title: '类型下线'}, function (index) { layer.confirm(msg, {icon: 3, title: '类型下线'}, function (index) {
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "customertype007", params: {rowId: data.id}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "customertype007", params: {rowId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg("下线成功", {icon: 1, time: 2000});
winui.window.msg("下线成功", {icon: 1, time: 2000}); loadTable();
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
......
...@@ -105,12 +105,8 @@ layui.config({ ...@@ -105,12 +105,8 @@ layui.config({
layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){ layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "documentary006", params: {rowId: data.id}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "documentary006", params: {rowId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); loadTable();
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
......
...@@ -108,12 +108,8 @@ layui.config({ ...@@ -108,12 +108,8 @@ layui.config({
layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){ layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "crmdocumentarytype005", params: {rowId: data.id}, type: 'json', method: "DELETE", callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "crmdocumentarytype005", params: {rowId: data.id}, type: 'json', method: "DELETE", callback: function (json) {
if (json.returnCode == 0) { winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); loadTable();
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
...@@ -124,12 +120,8 @@ layui.config({ ...@@ -124,12 +120,8 @@ layui.config({
layer.confirm(msg, {icon: 3, title: '类型上线'}, function (index) { layer.confirm(msg, {icon: 3, title: '类型上线'}, function (index) {
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "crmdocumentarytype006", params: {rowId: data.id}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "crmdocumentarytype006", params: {rowId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg("上线成功", {icon: 1, time: 2000});
winui.window.msg("上线成功", {icon: 1, time: 2000}); loadTable();
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
...@@ -140,12 +132,8 @@ layui.config({ ...@@ -140,12 +132,8 @@ layui.config({
layer.confirm(msg, {icon: 3, title: '类型下线'}, function (index) { layer.confirm(msg, {icon: 3, title: '类型下线'}, function (index) {
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "crmdocumentarytype007", params: {rowId: data.id}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "crmdocumentarytype007", params: {rowId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg("下线成功", {icon: 1, time: 2000});
winui.window.msg("下线成功", {icon: 1, time: 2000}); loadTable();
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
......
...@@ -118,10 +118,6 @@ function loadUploadMethod(){ ...@@ -118,10 +118,6 @@ function loadUploadMethod(){
afterSendFile: function (data) { afterSendFile: function (data) {
//如果分块上传成功,则通知后台合并分块 //如果分块上传成功,则通知后台合并分块
AjaxPostUtil.request({url: reqBasePath + "fileconsole007", params: {md5: md5, folderId: parent.folderId, name: data.name, size: data.size}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: reqBasePath + "fileconsole007", params: {md5: md5, folderId: parent.folderId, name: data.name, size: data.size}, type: 'json', callback: function (json) {
if (json.returnCode == 0) {
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
} }
}); });
......
...@@ -118,10 +118,6 @@ function loadUploadMethod(){ ...@@ -118,10 +118,6 @@ function loadUploadMethod(){
afterSendFile: function (data) { afterSendFile: function (data) {
//如果分块上传成功,则通知后台合并分块 //如果分块上传成功,则通知后台合并分块
AjaxPostUtil.request({url: reqBasePath + "fileconsole007", params: {md5: md5, folderId: parent.folderId, name: data.name, size: data.size}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: reqBasePath + "fileconsole007", params: {md5: md5, folderId: parent.folderId, name: data.name, size: data.size}, type: 'json', callback: function (json) {
if (json.returnCode == 0) {
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
} }
}); });
......
...@@ -47,12 +47,8 @@ layui.config({ ...@@ -47,12 +47,8 @@ layui.config({
layer.close(index); layer.close(index);
parent.refreshCode = '0'; parent.refreshCode = '0';
AjaxPostUtil.request({url: reqBasePath + "fileconsole015", params:{rowId: data.id}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: reqBasePath + "fileconsole015", params:{rowId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg("还原成功", {icon: 1, time: 2000});
winui.window.msg("还原成功", {icon: 1, time: 2000}); loadTable();
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
......
...@@ -54,12 +54,8 @@ layui.config({ ...@@ -54,12 +54,8 @@ layui.config({
layer.confirm("取消分享链接将失效,确定不分享了吗?", { icon: 3, title: '系统提示', btn: ['取消分享','我再想想'] }, function (index) { layer.confirm("取消分享链接将失效,确定不分享了吗?", { icon: 3, title: '系统提示', btn: ['取消分享','我再想想'] }, function (index) {
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: reqBasePath + "fileconsole018", params:{rowId: data.id}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: reqBasePath + "fileconsole018", params:{rowId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg("取消外链分享成功", {icon: 1, time: 2000});
winui.window.msg("取消外链分享成功", {icon: 1, time: 2000}); loadTable();
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
......
...@@ -29,12 +29,8 @@ layui.config({ ...@@ -29,12 +29,8 @@ layui.config({
secondTypeId: $("#secondTypeId").val() secondTypeId: $("#secondTypeId").val()
}; };
AjaxPostUtil.request({url: flowableBasePath + "dsformpage002", params: params, type: 'json', method: "POST", callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "dsformpage002", params: params, type: 'json', method: "POST", callback: function (json) {
if (json.returnCode == 0) { parent.layer.close(index);
parent.layer.close(index); parent.refreshCode = '0';
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
} }
return false; return false;
......
...@@ -86,12 +86,8 @@ layui.config({ ...@@ -86,12 +86,8 @@ layui.config({
layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){ layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "dsformpage005", params:{rowId: data.id}, type: 'json', method: "DELETE", callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "dsformpage005", params:{rowId: data.id}, type: 'json', method: "DELETE", callback: function (json) {
if (json.returnCode == 0) { winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); loadTable();
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
......
...@@ -69,12 +69,8 @@ layui.config({ ...@@ -69,12 +69,8 @@ layui.config({
layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){ layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "dsformpagetype003", params:{id: data.id}, type: 'json', method: "DELETE", callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "dsformpagetype003", params:{id: data.id}, type: 'json', method: "DELETE", callback: function (json) {
if (json.returnCode == 0) { winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); loadTable();
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
......
...@@ -113,12 +113,8 @@ layui.config({ ...@@ -113,12 +113,8 @@ layui.config({
layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){ layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "dsform003", params:{rowId: data.id}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "dsform003", params:{rowId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); loadTable();
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
......
...@@ -89,12 +89,8 @@ layui.config({ ...@@ -89,12 +89,8 @@ layui.config({
layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){ layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "dsformdisplaytemplate003", params:{rowId: data.id}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "dsformdisplaytemplate003", params:{rowId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); loadTable();
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
......
...@@ -61,12 +61,8 @@ layui.config({ ...@@ -61,12 +61,8 @@ layui.config({
layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){ layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "dsformlimitrequirement003", params:{rowId: data.id}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "dsformlimitrequirement003", params:{rowId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); loadTable();
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
......
...@@ -46,12 +46,8 @@ layui.config({ ...@@ -46,12 +46,8 @@ layui.config({
enclosureInfo: skyeyeEnclosure.getEnclosureIdsByBoxId('enclosureUpload') enclosureInfo: skyeyeEnclosure.getEnclosureIdsByBoxId('enclosureUpload')
}; };
AjaxPostUtil.request({url: reqBasePath + "sysstaffarchives005", params: params, type: 'json', callback: function (json) { AjaxPostUtil.request({url: reqBasePath + "sysstaffarchives005", params: params, type: 'json', callback: function (json) {
if (json.returnCode == 0) { parent.layer.close(index);
parent.layer.close(index); parent.refreshCode = '0';
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
} }
return false; return false;
......
...@@ -37,12 +37,8 @@ layui.config({ ...@@ -37,12 +37,8 @@ layui.config({
enclosureInfo: skyeyeEnclosure.getEnclosureIdsByBoxId('enclosureUpload') enclosureInfo: skyeyeEnclosure.getEnclosureIdsByBoxId('enclosureUpload')
}; };
AjaxPostUtil.request({url: reqBasePath + "sysstaffcertificate002", params: params, type: 'json', callback: function (json) { AjaxPostUtil.request({url: reqBasePath + "sysstaffcertificate002", params: params, type: 'json', callback: function (json) {
if (json.returnCode == 0) { parent.layer.close(index);
parent.layer.close(index); parent.refreshCode = '0';
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
} }
return false; return false;
......
...@@ -65,12 +65,8 @@ layui.config({ ...@@ -65,12 +65,8 @@ layui.config({
companyId: $("#companyId").val() companyId: $("#companyId").val()
}; };
AjaxPostUtil.request({url: reqBasePath + "sysstaffcontract002", params: params, type: 'json', method: "POST", callback: function (json) { AjaxPostUtil.request({url: reqBasePath + "sysstaffcontract002", params: params, type: 'json', method: "POST", callback: function (json) {
if (json.returnCode == 0) { parent.layer.close(index);
parent.layer.close(index); parent.refreshCode = '0';
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
} }
return false; return false;
......
...@@ -62,12 +62,8 @@ layui.config({ ...@@ -62,12 +62,8 @@ layui.config({
enclosureInfo: skyeyeEnclosure.getEnclosureIdsByBoxId('enclosureUpload') enclosureInfo: skyeyeEnclosure.getEnclosureIdsByBoxId('enclosureUpload')
}; };
AjaxPostUtil.request({url: reqBasePath + "sysstaffeducation002", params: params, type: 'json', callback: function (json) { AjaxPostUtil.request({url: reqBasePath + "sysstaffeducation002", params: params, type: 'json', callback: function (json) {
if (json.returnCode == 0) { parent.layer.close(index);
parent.layer.close(index); parent.refreshCode = '0';
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
} }
return false; return false;
......
...@@ -38,12 +38,8 @@ layui.config({ ...@@ -38,12 +38,8 @@ layui.config({
}; };
AjaxPostUtil.request({url: reqBasePath + "sysstafffamily002", params: params, type: 'json', callback: function (json) { AjaxPostUtil.request({url: reqBasePath + "sysstafffamily002", params: params, type: 'json', callback: function (json) {
if (json.returnCode == 0) { parent.layer.close(index);
parent.layer.close(index); parent.refreshCode = '0';
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
} }
return false; return false;
......
...@@ -52,12 +52,8 @@ layui.config({ ...@@ -52,12 +52,8 @@ layui.config({
}; };
AjaxPostUtil.request({url: reqBasePath + "sysstaffjobresume002", params: params, type: 'json', callback: function (json) { AjaxPostUtil.request({url: reqBasePath + "sysstaffjobresume002", params: params, type: 'json', callback: function (json) {
if (json.returnCode == 0) { parent.layer.close(index);
parent.layer.close(index); parent.refreshCode = '0';
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
} }
return false; return false;
......
...@@ -53,12 +53,8 @@ layui.config({ ...@@ -53,12 +53,8 @@ layui.config({
enclosureInfo: skyeyeEnclosure.getEnclosureIdsByBoxId('enclosureUpload') enclosureInfo: skyeyeEnclosure.getEnclosureIdsByBoxId('enclosureUpload')
}; };
AjaxPostUtil.request({url: reqBasePath + "sysstafflanguage002", params: params, type: 'json', callback: function (json) { AjaxPostUtil.request({url: reqBasePath + "sysstafflanguage002", params: params, type: 'json', callback: function (json) {
if (json.returnCode == 0) { parent.layer.close(index);
parent.layer.close(index); parent.refreshCode = '0';
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
} }
return false; return false;
......
...@@ -22,12 +22,8 @@ layui.config({ ...@@ -22,12 +22,8 @@ layui.config({
typeId: $("#typeId").val() typeId: $("#typeId").val()
}; };
AjaxPostUtil.request({url: reqBasePath + "sysstafflanguagelevel002", params: params, type: 'json', callback: function (json) { AjaxPostUtil.request({url: reqBasePath + "sysstafflanguagelevel002", params: params, type: 'json', callback: function (json) {
if (json.returnCode == 0) { parent.layer.close(index);
parent.layer.close(index); parent.refreshCode = '0';
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
} }
return false; return false;
......
...@@ -39,12 +39,8 @@ layui.config({ ...@@ -39,12 +39,8 @@ layui.config({
enclosureInfo: skyeyeEnclosure.getEnclosureIdsByBoxId('enclosureUpload') enclosureInfo: skyeyeEnclosure.getEnclosureIdsByBoxId('enclosureUpload')
}; };
AjaxPostUtil.request({url: reqBasePath + "sysstaffrewardpunish002", params: params, type: 'json', callback: function (json) { AjaxPostUtil.request({url: reqBasePath + "sysstaffrewardpunish002", params: params, type: 'json', callback: function (json) {
if (json.returnCode == 0) { parent.layer.close(index);
parent.layer.close(index); parent.refreshCode = '0';
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
} }
return false; return false;
......
...@@ -94,12 +94,8 @@ layui.config({ ...@@ -94,12 +94,8 @@ layui.config({
layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){ layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: reqBasePath + "emailsendmodel004", params: {id: data.id}, type: 'json', method: "DELETE", callback: function (json) { AjaxPostUtil.request({url: reqBasePath + "emailsendmodel004", params: {id: data.id}, type: 'json', method: "DELETE", callback: function (json) {
if (json.returnCode == 0) { winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); loadTable();
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
......
...@@ -88,12 +88,8 @@ layui.config({ ...@@ -88,12 +88,8 @@ layui.config({
layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){ layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "erpproduction005", params:{orderId: data.id}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "erpproduction005", params:{orderId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); loadTable();
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
......
...@@ -18,12 +18,8 @@ layui.config({ ...@@ -18,12 +18,8 @@ layui.config({
typeName: $("#typeName").val() typeName: $("#typeName").val()
}; };
AjaxPostUtil.request({url:flowableBasePath + "erpworkproceduretype002", params: params, type: 'json', callback: function (json) { AjaxPostUtil.request({url:flowableBasePath + "erpworkproceduretype002", params: params, type: 'json', callback: function (json) {
if (json.returnCode == 0) { parent.layer.close(index);
parent.layer.close(index); parent.refreshCode = '0';
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
} }
return false; return false;
......
...@@ -204,12 +204,8 @@ layui.config({ ...@@ -204,12 +204,8 @@ layui.config({
//工序信息 //工序信息
params.procedureJsonStr = JSON.stringify(procedureMationList); params.procedureJsonStr = JSON.stringify(procedureMationList);
AjaxPostUtil.request({url: flowableBasePath + "material003", params: params, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "material003", params: params, type: 'json', callback: function (json) {
if (json.returnCode == 0) { parent.layer.close(index);
parent.layer.close(index); parent.refreshCode = '0';
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
} }
return false; return false;
......
...@@ -132,12 +132,8 @@ layui.config({ ...@@ -132,12 +132,8 @@ layui.config({
layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){ layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "material006", params: {rowId: data.id}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "material006", params: {rowId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); loadTable();
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
...@@ -147,12 +143,8 @@ layui.config({ ...@@ -147,12 +143,8 @@ layui.config({
layer.confirm(systemLanguage["com.skyeye.disableOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.disableOperation"][languageType]}, function(index) { layer.confirm(systemLanguage["com.skyeye.disableOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.disableOperation"][languageType]}, function(index) {
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "material004", params: {rowId: data.id}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "material004", params: {rowId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg(systemLanguage["com.skyeye.disableOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
winui.window.msg(systemLanguage["com.skyeye.disableOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); loadTable();
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
...@@ -162,12 +154,8 @@ layui.config({ ...@@ -162,12 +154,8 @@ layui.config({
layer.confirm(systemLanguage["com.skyeye.enableOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.enableOperation"][languageType]}, function(index) { layer.confirm(systemLanguage["com.skyeye.enableOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.enableOperation"][languageType]}, function(index) {
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "material005", params: {rowId: data.id}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "material005", params: {rowId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg(systemLanguage["com.skyeye.enableOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
winui.window.msg(systemLanguage["com.skyeye.enableOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); loadTable();
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
......
...@@ -47,12 +47,8 @@ layui.config({ ...@@ -47,12 +47,8 @@ layui.config({
parentId: checkNodes[0].id parentId: checkNodes[0].id
}; };
AjaxPostUtil.request({url: flowableBasePath + "materialcategory002", params: params, type: 'json', method: "POST", callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "materialcategory002", params: params, type: 'json', method: "POST", callback: function (json) {
if (json.returnCode == 0) { parent.layer.close(index);
parent.layer.close(index); parent.refreshCode = '0';
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
} }
return false; return false;
......
...@@ -69,12 +69,8 @@ layui.config({ ...@@ -69,12 +69,8 @@ layui.config({
layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){ layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){
layer.close(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: {rowId: data.id}, type: 'json', method: "DELETE", callback: function (json) {
if (json.returnCode == 0) { winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); loadTable();
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
...@@ -97,24 +93,16 @@ layui.config({ ...@@ -97,24 +93,16 @@ layui.config({
// 上移 // 上移
function upMove(data){ 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: {rowId: data.id}, type: 'json', method: "PUT", callback: function (json) {
if (json.returnCode == 0) { winui.window.msg(systemLanguage["com.skyeye.moveUpOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
winui.window.msg(systemLanguage["com.skyeye.moveUpOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); loadTable();
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
} }
// 下移 // 下移
function downMove(data){ 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: {rowId: data.id}, type: 'json', method: "PUT", callback: function (json) {
if (json.returnCode == 0) { winui.window.msg(systemLanguage["com.skyeye.moveDownOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
winui.window.msg(systemLanguage["com.skyeye.moveDownOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); loadTable();
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
} }
......
...@@ -20,7 +20,6 @@ layui.config({ ...@@ -20,7 +20,6 @@ layui.config({
matchingLanguage(); matchingLanguage();
form.render(); form.render();
form.on('submit(formAddBean)', function (data) { form.on('submit(formAddBean)', function (data) {
if (winui.verifyForm(data.elem)) { if (winui.verifyForm(data.elem)) {
//获取填写副单位 //获取填写副单位
var rowTr = $("#useTable tr"); var rowTr = $("#useTable tr");
...@@ -40,12 +39,8 @@ layui.config({ ...@@ -40,12 +39,8 @@ layui.config({
unitNameStr: JSON.stringify(tableData) unitNameStr: JSON.stringify(tableData)
}; };
AjaxPostUtil.request({url: flowableBasePath + "materialunit002", params: params, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "materialunit002", params: params, type: 'json', callback: function (json) {
if (json.returnCode == 0) { parent.layer.close(index);
parent.layer.close(index); parent.refreshCode = '0';
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
} }
return false; return false;
......
...@@ -7,16 +7,13 @@ layui.config({ ...@@ -7,16 +7,13 @@ layui.config({
}).extend({ }).extend({
window: 'js/winui.window' window: 'js/winui.window'
}).define(['window', 'table', 'jquery', 'winui', 'form'], function (exports) { }).define(['window', 'table', 'jquery', 'winui', 'form'], function (exports) {
winui.renderColor(); winui.renderColor();
var $ = layui.$, var $ = layui.$,
form = layui.form, form = layui.form,
table = layui.table; table = layui.table;
authBtn('1569160351079'); authBtn('1569160351079');
table.render({ table.render({
id: 'messageTable', id: 'messageTable',
elem: '#messageTable', elem: '#messageTable',
...@@ -49,8 +46,7 @@ layui.config({ ...@@ -49,8 +46,7 @@ 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)) {
...@@ -78,12 +74,8 @@ layui.config({ ...@@ -78,12 +74,8 @@ layui.config({
layer.confirm(msg, { icon: 3, title: '删除计量单位' }, function (index) { layer.confirm(msg, { icon: 3, title: '删除计量单位' }, function (index) {
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "materialunit003", params: {rowId: data.id}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "materialunit003", params: {rowId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) { winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); loadTable();
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
}); });
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册