提交 c7e31656 编写于 作者: Skyeye云's avatar Skyeye云

【框架】前台请求工具修改,删除冗余代码

上级 f34850dc
...@@ -33,12 +33,8 @@ layui.config({ ...@@ -33,12 +33,8 @@ layui.config({
remark: $("#remark").val(), remark: $("#remark").val(),
}; };
AjaxPostUtil.request({url: reqBasePath + "writeDictDataMation", params: params, type: 'json', method: "POST", callback: function (json) { AjaxPostUtil.request({url: reqBasePath + "writeDictDataMation", 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;
......
...@@ -50,12 +50,8 @@ layui.config({ ...@@ -50,12 +50,8 @@ layui.config({
remark: $("#remark").val(), remark: $("#remark").val(),
}; };
AjaxPostUtil.request({url: reqBasePath + "writeDictDataMation", params: params, type: 'json', method: "POST", callback: function (json) { AjaxPostUtil.request({url: reqBasePath + "writeDictDataMation", 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;
......
...@@ -77,12 +77,8 @@ layui.config({ ...@@ -77,12 +77,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 + "deleteDictDataMationById", params: {id: data.id}, type: 'json', method: "DELETE", callback: function (json) { AjaxPostUtil.request({url: reqBasePath + "deleteDictDataMationById", 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});
}
}}); }});
}); });
} }
...@@ -96,12 +92,8 @@ layui.config({ ...@@ -96,12 +92,8 @@ layui.config({
pageId: "sysDictDataEdit", pageId: "sysDictDataEdit",
area: ['90vw', '90vh'], area: ['90vw', '90vh'],
callBack: function(refreshCode){ callBack: function(refreshCode){
if (refreshCode == '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 if (refreshCode == '-9999') {
winui.window.msg(systemLanguage["com.skyeye.operationFailed"][languageType], {icon: 2, time: 2000});
}
}}); }});
} }
...@@ -113,12 +105,8 @@ layui.config({ ...@@ -113,12 +105,8 @@ layui.config({
pageId: "sysDictDataAdd", pageId: "sysDictDataAdd",
area: ['90vw', '90vh'], area: ['90vw', '90vh'],
callBack: function(refreshCode){ callBack: function(refreshCode){
if (refreshCode == '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 if (refreshCode == '-9999') {
winui.window.msg(systemLanguage["com.skyeye.operationFailed"][languageType], {icon: 2, time: 2000});
}
}}); }});
}); });
......
...@@ -25,12 +25,8 @@ layui.config({ ...@@ -25,12 +25,8 @@ layui.config({
remark: $("#remark").val(), remark: $("#remark").val(),
}; };
AjaxPostUtil.request({url: reqBasePath + "writeDictTypeMation", params: params, type: 'json', method: "POST", callback: function (json) { AjaxPostUtil.request({url: reqBasePath + "writeDictTypeMation", 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;
......
...@@ -40,12 +40,8 @@ layui.config({ ...@@ -40,12 +40,8 @@ layui.config({
remark: $("#remark").val(), remark: $("#remark").val(),
}; };
AjaxPostUtil.request({url: reqBasePath + "writeDictTypeMation", params: params, type: 'json', method: "POST", callback: function (json) { AjaxPostUtil.request({url: reqBasePath + "writeDictTypeMation", 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: reqBasePath + "deleteDictTypeMationById", params: {id: data.id}, type: 'json', method: "DELETE", callback: function (json) { AjaxPostUtil.request({url: reqBasePath + "deleteDictTypeMationById", 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 +84,8 @@ layui.config({ ...@@ -88,12 +84,8 @@ layui.config({
pageId: "sysDictTypeEdit", pageId: "sysDictTypeEdit",
area: ['90vw', '90vh'], area: ['90vw', '90vh'],
callBack: function(refreshCode){ callBack: function(refreshCode){
if (refreshCode == '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 if (refreshCode == '-9999') {
winui.window.msg(systemLanguage["com.skyeye.operationFailed"][languageType], {icon: 2, time: 2000});
}
}}); }});
} }
...@@ -105,12 +97,8 @@ layui.config({ ...@@ -105,12 +97,8 @@ layui.config({
pageId: "sysDictTypeAdd", pageId: "sysDictTypeAdd",
area: ['90vw', '90vh'], area: ['90vw', '90vh'],
callBack: function(refreshCode){ callBack: function(refreshCode){
if (refreshCode == '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 if (refreshCode == '-9999') {
winui.window.msg(systemLanguage["com.skyeye.operationFailed"][languageType], {icon: 2, time: 2000});
}
}}); }});
}); });
......
...@@ -192,13 +192,9 @@ layui.config({ ...@@ -192,13 +192,9 @@ layui.config({
approvalId: approvalId approvalId: approvalId
}; };
AjaxPostUtil.request({url: flowableBasePath + "purchaseorder002", params: params, type: 'json', method: "POST", callback: function(json) { AjaxPostUtil.request({url: flowableBasePath + "purchaseorder002", params: params, type: 'json', method: "POST", callback: function(json) {
if(json.returnCode == 0) { dsFormUtil.savePageData("dsFormShow", json.bean.id);
dsFormUtil.savePageData("dsFormShow", json.bean.id); parent.layer.close(index);
parent.layer.close(index); parent.refreshCode = '0';
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
} }
...@@ -235,43 +231,39 @@ layui.config({ ...@@ -235,43 +231,39 @@ layui.config({
pageId: "erpProductionNoSuccessChoose", pageId: "erpProductionNoSuccessChoose",
area: ['90vw', '90vh'], area: ['90vw', '90vh'],
callBack: function(refreshCode){ callBack: function(refreshCode){
if (refreshCode == '0') { $("#productionOrder").val(productionMation.defaultNumber);
$("#productionOrder").val(productionMation.defaultNumber); //移除之前填写的所有行
//移除之前填写的所有行 var checkRow = $("#useTable input[type='checkbox'][name='tableCheckRow']");
var checkRow = $("#useTable input[type='checkbox'][name='tableCheckRow']"); $.each(checkRow, function(i, item) {
$.each(checkRow, function(i, item) { //删除allChooseProduct已选择的商品信息
//删除allChooseProduct已选择的商品信息 var trId = $(item).parent().parent().attr("trcusid");
var trId = $(item).parent().parent().attr("trcusid"); allChooseProduct[trId] = undefined;
allChooseProduct[trId] = undefined; //移除界面上的信息
//移除界面上的信息 $(item).parent().parent().remove();
$(item).parent().parent().remove(); });
}); $.each(productionMation.norms, function(i, item){
$.each(productionMation.norms, function(i, item){ addRow();
addRow(); //将规格所属的商品信息加入到对象中存储
//将规格所属的商品信息加入到对象中存储 allChooseProduct["tr" + (rowNum - 1)] = item.product;
allChooseProduct["tr" + (rowNum - 1)] = item.product; //单位回显
//单位回显 $("#unitId" + (rowNum - 1)).html(getDataUseHandlebars(selOption, {rows: item.product.unitList}));
$("#unitId" + (rowNum - 1)).html(getDataUseHandlebars(selOption, {rows: item.product.unitList})); $("#unitId" + (rowNum - 1)).val(item.normsId);
$("#unitId" + (rowNum - 1)).val(item.normsId); //商品回显
//商品回显 $("#materialId" + (rowNum - 1)).val(item.product.productName + "(" + item.product.productModel + ")");
$("#materialId" + (rowNum - 1)).val(item.product.productName + "(" + item.product.productModel + ")"); $("#currentTock" + (rowNum - 1)).html(item.currentTock);//库存回显
$("#currentTock" + (rowNum - 1)).html(item.currentTock);//库存回显 $("#rkNum" + (rowNum - 1)).val(item.needNum);
$("#rkNum" + (rowNum - 1)).val(item.needNum); $("#unitPrice" + (rowNum - 1)).val(item.unitPrice.toFixed(2));
$("#unitPrice" + (rowNum - 1)).val(item.unitPrice.toFixed(2)); $("#amountOfMoney" + (rowNum - 1)).val(item.allPrice.toFixed(2));
$("#amountOfMoney" + (rowNum - 1)).val(item.allPrice.toFixed(2)); $("#taxRate" + (rowNum - 1)).val(item.taxRate.toFixed(2));
$("#taxRate" + (rowNum - 1)).val(item.taxRate.toFixed(2)); $("#taxMoney" + (rowNum - 1)).val(item.taxMoney.toFixed(2));
$("#taxMoney" + (rowNum - 1)).val(item.taxMoney.toFixed(2)); $("#taxUnitPrice" + (rowNum - 1)).val(item.taxUnitPrice.toFixed(2));
$("#taxUnitPrice" + (rowNum - 1)).val(item.taxUnitPrice.toFixed(2)); $("#taxLastMoney" + (rowNum - 1)).val(item.taxLastMoney.toFixed(2));
$("#taxLastMoney" + (rowNum - 1)).val(item.taxLastMoney.toFixed(2)); });
}); //渲染
//渲染 form.render();
form.render();
//计算价格 //计算价格
calculatedTotalPrice(); calculatedTotalPrice();
} else if (refreshCode == '-9999') {
winui.window.msg(systemLanguage["com.skyeye.operationFailed"][languageType], {icon: 2, time: 2000});
}
}}); }});
}); });
......
...@@ -32,12 +32,8 @@ layui.config({ ...@@ -32,12 +32,8 @@ layui.config({
}; };
AjaxPostUtil.request({url: reqBasePath + "editSysRolePCAuth", params: params, type: 'json', method: "PUT", callback: function (json) { AjaxPostUtil.request({url: reqBasePath + "editSysRolePCAuth", params: params, type: 'json', method: "PUT", 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;
...@@ -48,57 +44,53 @@ layui.config({ ...@@ -48,57 +44,53 @@ layui.config({
var treeDoms = $("ul.fsTree"); var treeDoms = $("ul.fsTree");
AjaxPostUtil.request({url: reqBasePath + "sys016", params: {rowId: parent.rowId}, type: 'json', method: "GET", callback: function (json) { AjaxPostUtil.request({url: reqBasePath + "sys016", params: {rowId: parent.rowId}, type: 'json', method: "GET", callback: function (json) {
if (json.returnCode == 0) { $("#roleName").text(json.bean.roleName);
$("#roleName").text(json.bean.roleName); $("#roleDesc").text(json.bean.roleDesc);
$("#roleDesc").text(json.bean.roleDesc); checkeRows = json.rows;
checkeRows = json.rows; if(treeDoms.length > 0) {
if(treeDoms.length > 0) { $(treeDoms).each(function(i) {
$(treeDoms).each(function(i) { var treeId = $(this).attr("id");
var treeId = $(this).attr("id"); var funcNo = $(this).attr("funcNo");
var funcNo = $(this).attr("funcNo"); var url = $(this).attr("url");
var url = $(this).attr("url"); var tree = fsTree.render({
var tree = fsTree.render({ id: treeId,
id: treeId, funcNo: funcNo,
funcNo: funcNo, url: reqBasePath + url,
url: reqBasePath + url, getTree: getTree,
getTree: getTree, checkEnable: true,
checkEnable: true, loadEnable: false,
loadEnable: false, showLine: false,
showLine: false, showIcon: false,
showIcon: false, addDiyDom: addDiyDom,
addDiyDom: addDiyDom, fontCss: setFontCss
fontCss: setFontCss }, function(id){
}, function(id){ var zTreeObj = $.fn.zTree.getZTreeObj(id);
var zTreeObj = $.fn.zTree.getZTreeObj(id); var zTree = zTreeObj.getCheckedNodes(false);
var zTree = zTreeObj.getCheckedNodes(false); for (var i = 0; i < zTree.length; i++) {
for (var i = 0; i < zTree.length; i++) { for(var j = 0; j < checkeRows.length; j++){
for(var j = 0; j < checkeRows.length; j++){ if(zTree[i].id == checkeRows[j].menuId){
if(zTree[i].id == checkeRows[j].menuId){ zTreeObj.checkNode(zTree[i], true);
zTreeObj.checkNode(zTree[i], true);
}
} }
} }
var li_head = ' <li class="head"><a><div class="diy">所属系统</div><div class="diy">菜单权限</div><div class="diy">菜单类型</div></a></li>'; }
var rows = $("#" + treeId).find('li'); var li_head = ' <li class="head"><a><div class="diy">所属系统</div><div class="diy">菜单权限</div><div class="diy">菜单类型</div></a></li>';
if(rows.length > 0) { var rows = $("#" + treeId).find('li');
rows.eq(0).before(li_head) if(rows.length > 0) {
} else { rows.eq(0).before(li_head)
$("#" + treeId).append(li_head);
$("#" + treeId).append('<li ><div style="text-align: center;line-height: 30px;" >无符合条件数据</div></li>')
}
});
if(treeDoms.length == 1) {
trees[treeId] = tree;
} else { } else {
//深度拷贝对象 $("#" + treeId).append(li_head);
trees[treeId] = $.extend(true, {}, tree); $("#" + treeId).append('<li ><div style="text-align: center;line-height: 30px;" >无符合条件数据</div></li>')
} }
}); });
//绑定按钮事件 if(treeDoms.length == 1) {
fsCommon.buttonEvent("tree", getTree); trees[treeId] = tree;
} } else {
} else { //深度拷贝对象
winui.window.msg(json.returnMessage, {icon: 2, time: 2000}); trees[treeId] = $.extend(true, {}, tree);
}
});
//绑定按钮事件
fsCommon.buttonEvent("tree", getTree);
} }
}}); }});
......
...@@ -23,12 +23,8 @@ layui.config({ ...@@ -23,12 +23,8 @@ layui.config({
}; };
AjaxPostUtil.request({url: reqBasePath + "sys015", params: params, type: 'json', method: "POST", callback: function (json) { AjaxPostUtil.request({url: reqBasePath + "sys015", 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;
......
...@@ -49,12 +49,8 @@ layui.config({ ...@@ -49,12 +49,8 @@ layui.config({
}; };
AjaxPostUtil.request({url: reqBasePath + "sys039", params: params, type: 'json', callback: function (json) { AjaxPostUtil.request({url: reqBasePath + "sys039", 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,13 +12,9 @@ layui.config({ ...@@ -12,13 +12,9 @@ layui.config({
textool = layui.textool; textool = layui.textool;
AjaxPostUtil.request({url: reqBasePath + "sys016", params: {rowId: parent.rowId}, type: 'json', method: "GET", callback: function (json) { AjaxPostUtil.request({url: reqBasePath + "sys016", params: {rowId: parent.rowId}, type: 'json', method: "GET", callback: function (json) {
if (json.returnCode == 0) { $("#roleName").val(json.bean.roleName);
$("#roleName").val(json.bean.roleName); $("#roleDesc").val(json.bean.roleDesc);
$("#roleDesc").val(json.bean.roleDesc); textool.init({eleId: 'roleDesc', maxlength: 250});
textool.init({eleId: 'roleDesc', maxlength: 250});
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}}); }});
matchingLanguage(); matchingLanguage();
...@@ -32,12 +28,8 @@ layui.config({ ...@@ -32,12 +28,8 @@ layui.config({
}; };
AjaxPostUtil.request({url: reqBasePath + "sys017", params: params, type: 'json', method: "PUT", callback: function (json) { AjaxPostUtil.request({url: reqBasePath + "sys017", params: params, type: 'json', method: "PUT", 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;
......
...@@ -24,13 +24,13 @@ layui.config({ ...@@ -24,13 +24,13 @@ layui.config({
limits: getLimits(), limits: getLimits(),
limit: getLimit(), limit: getLimit(),
cols: [[ cols: [[
{ title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers'}, { title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' },
{ field: 'roleName', title: '角色名称', width: 120 }, { field: 'roleName', title: '角色名称', width: 120 },
{ field: 'roleDesc', title: '角色描述', width: 520 }, { field: 'roleDesc', title: '角色描述', width: 520 },
{ field: 'userNum', title: '使用用户数量', width: 150 }, { field: 'userNum', title: '使用用户数量', width: 150 },
{ field: 'parentName', title: '父角色', width: 150 }, { field: 'parentName', title: '父角色', width: 150 },
{ field: 'createTime', title: systemLanguage["com.skyeye.createTime"][languageType], align: 'center', width: 150 }, { field: 'createTime', title: systemLanguage["com.skyeye.createTime"][languageType], align: 'center', width: 150 },
{ title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 300, toolbar: '#tableBar'} { title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 300, toolbar: '#tableBar' }
]], ]],
done: function(){ done: function(){
matchingLanguage(); matchingLanguage();
...@@ -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: reqBasePath + "sys018", params: {rowId: data.id}, type: 'json', method: "DELETE", callback: function (json) { AjaxPostUtil.request({url: reqBasePath + "sys018", 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});
}
}}); }});
}); });
} }
...@@ -75,12 +71,8 @@ layui.config({ ...@@ -75,12 +71,8 @@ layui.config({
pageId: "syseveroleedit", pageId: "syseveroleedit",
area: ['90vw', '90vh'], area: ['90vw', '90vh'],
callBack: function(refreshCode){ callBack: function(refreshCode){
if (refreshCode == '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 if (refreshCode == '-9999') {
winui.window.msg(systemLanguage["com.skyeye.operationFailed"][languageType], {icon: 2, time: 2000});
}
}}); }});
} }
...@@ -92,8 +84,7 @@ layui.config({ ...@@ -92,8 +84,7 @@ layui.config({
title: "手机端菜单授权", title: "手机端菜单授权",
pageId: "syseveroleappmenu", pageId: "syseveroleappmenu",
area: ['90vw', '90vh'], area: ['90vw', '90vh'],
callBack: function(refreshCode){ callBack: function(refreshCode){}});
}});
} }
// PC端菜单授权 // PC端菜单授权
...@@ -104,8 +95,7 @@ layui.config({ ...@@ -104,8 +95,7 @@ layui.config({
title: "PC端菜单授权", title: "PC端菜单授权",
pageId: "sysEveRolePCMenu", pageId: "sysEveRolePCMenu",
area: ['90vw', '90vh'], area: ['90vw', '90vh'],
callBack: function(refreshCode){ callBack: function(refreshCode){}});
}});
} }
// 新增角色 // 新增角色
...@@ -116,19 +106,15 @@ layui.config({ ...@@ -116,19 +106,15 @@ layui.config({
pageId: "syseveroleadd", pageId: "syseveroleadd",
area: ['90vw', '90vh'], area: ['90vw', '90vh'],
callBack: function(refreshCode){ callBack: function(refreshCode){
if (refreshCode == '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 if (refreshCode == '-9999') {
winui.window.msg(systemLanguage["com.skyeye.operationFailed"][languageType], {icon: 2, time: 2000});
}
}}); }});
}); });
form.render(); form.render();
form.on('submit(formSearch)', function (data) { form.on('submit(formSearch)', function (data) {
if (winui.verifyForm(data.elem)) { if (winui.verifyForm(data.elem)) {
refreshTable(); table.reload("messageTable", {page: {curr: 1}, where: getTableParams()});
} }
return false; return false;
}); });
...@@ -141,10 +127,6 @@ layui.config({ ...@@ -141,10 +127,6 @@ layui.config({
function loadTable(){ function loadTable(){
table.reload("messageTable", {where: getTableParams()}); table.reload("messageTable", {where: getTableParams()});
} }
function refreshTable(){
table.reload("messageTable", {page: {curr: 1}, where: getTableParams()});
}
function getTableParams() { function getTableParams() {
return { return {
......
...@@ -162,9 +162,13 @@ function _openNewWindows(mation){ ...@@ -162,9 +162,13 @@ function _openNewWindows(mation){
zIndex: mation.zIndex, zIndex: mation.zIndex,
scrollbar: false, scrollbar: false,
closeBtn: mation.closeBtn, closeBtn: mation.closeBtn,
end: function(){ end: function() {
if(typeof(mation.callBack) == "function") { if(typeof(mation.callBack) == "function") {
mation.callBack(refreshCode); if (refreshCode == '0') {
mation.callBack(refreshCode);
} else if (refreshCode == '-9999') {
winui.window.msg(systemLanguage["com.skyeye.operationFailed"][languageType], {icon: 2, time: 2000});
}
} }
}, },
success: function(){ success: function(){
......
...@@ -63,20 +63,16 @@ var activitiUtil = { ...@@ -63,20 +63,16 @@ var activitiUtil = {
}; };
// 优先请求一次获取下个用户节点的信息,如果没有审批节点信息,则不加载审批人选项 // 优先请求一次获取下个用户节点的信息,如果没有审批节点信息,则不加载审批人选项
AjaxPostUtil.request({url: flowableBasePath + "activitiProcess001", params: params, type: 'json', callback: function(json) { AjaxPostUtil.request({url: flowableBasePath + "activitiProcess001", params: params, type: 'json', callback: function(json) {
if (json.returnCode == 0) { if(!isNull(json.bean)){
if(!isNull(json.bean)){ var approvalPersonChooseDom = '<div class="layui-form-item layui-col-xs12">' +
var approvalPersonChooseDom = '<div class="layui-form-item layui-col-xs12">' + '<label class="layui-form-label">下一个审批人<i class="red">*</i></label>' +
'<label class="layui-form-label">下一个审批人<i class="red">*</i></label>' + '<div class="layui-input-block">' +
'<div class="layui-input-block">' + '<input type="text" id="approvalPersonName" name="approvalPersonName" placeholder="请选择下一个审批人" win-verify="required" class="layui-input" readonly="readonly"/>' +
'<input type="text" id="approvalPersonName" name="approvalPersonName" placeholder="请选择下一个审批人" win-verify="required" class="layui-input" readonly="readonly"/>' + '<i class="fa fa-plus-circle input-icon chooseApprovalPersonBtn" style="top: 12px;"></i>' +
'<i class="fa fa-plus-circle input-icon chooseApprovalPersonBtn" style="top: 12px;"></i>' + '</div>' +
'</div>' + '</div>';
'</div>'; $("#" + appendDomId).append(approvalPersonChooseDom);
$("#" + appendDomId).append(approvalPersonChooseDom); activitiUtil.initApprovalPersonChooseBtnEvent();
activitiUtil.initApprovalPersonChooseBtnEvent();
}
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
} }
}, async: false}); }, async: false});
}, },
...@@ -100,12 +96,8 @@ var activitiUtil = { ...@@ -100,12 +96,8 @@ var activitiUtil = {
pageId: "approvalPersonChoose", pageId: "approvalPersonChoose",
area: ['90vw', '90vh'], area: ['90vw', '90vh'],
callBack: function(refreshCode){ callBack: function(refreshCode){
if (refreshCode == '0') { $("#approvalPersonName").val(activitiUtil.chooseApprovalPersonMation.jobNumber + "_" + activitiUtil.chooseApprovalPersonMation.userName);
$("#approvalPersonName").val(activitiUtil.chooseApprovalPersonMation.jobNumber + "_" + activitiUtil.chooseApprovalPersonMation.userName); $("#approvalPersonName").attr("chooseData", JSON.stringify(activitiUtil.chooseApprovalPersonMation));
$("#approvalPersonName").attr("chooseData", JSON.stringify(activitiUtil.chooseApprovalPersonMation));
} else if (refreshCode == '-9999') {
winui.window.msg(systemLanguage["com.skyeye.operationFailed"][languageType], {icon: 2, time: 2000});
}
} }
}); });
}, },
...@@ -136,12 +128,8 @@ var activitiUtil = { ...@@ -136,12 +128,8 @@ var activitiUtil = {
pageId: "startProcessPersonChooseBtn", pageId: "startProcessPersonChooseBtn",
area: ['90vw', '90vh'], area: ['90vw', '90vh'],
callBack: function(refreshCode){ callBack: function(refreshCode){
if (refreshCode == '0') { if (typeof callback === 'function') {
if (typeof callback === 'function') { callback(activitiUtil.chooseApprovalPersonMation.id);
callback(activitiUtil.chooseApprovalPersonMation.id);
}
} else if (refreshCode == '-9999') {
winui.window.msg(systemLanguage["com.skyeye.operationFailed"][languageType], {icon: 2, time: 2000});
} }
} }
}); });
...@@ -162,12 +150,8 @@ var activitiUtil = { ...@@ -162,12 +150,8 @@ var activitiUtil = {
userIds: JSON.stringify(["300b878c5c6744f2b48e6bc40beefd11", "0f17e3da88bc4e22841156388964e12e"]) userIds: JSON.stringify(["300b878c5c6744f2b48e6bc40beefd11", "0f17e3da88bc4e22841156388964e12e"])
}; };
AjaxPostUtil.request({url: flowableBasePath + "activitiProcess003", params: params, method: "POST", type: 'json', callback: function(json) { AjaxPostUtil.request({url: flowableBasePath + "activitiProcess003", params: params, method: "POST", type: 'json', callback: function(json) {
if(json.returnCode == 0) { if (typeof callback === 'function') {
if (typeof callback === 'function') { callback();
callback();
}
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
} }
}, async: false}); }, async: false});
}, },
...@@ -219,12 +203,8 @@ var activitiUtil = { ...@@ -219,12 +203,8 @@ var activitiUtil = {
principalUserId: userReturnList[0].id principalUserId: userReturnList[0].id
}; };
AjaxPostUtil.request({url: flowableBasePath + "activitiTask001", params: params, method: "POST", type: 'json', callback: function(json) { AjaxPostUtil.request({url: flowableBasePath + "activitiTask001", params: params, method: "POST", type: 'json', callback: function(json) {
if(json.returnCode == 0) { if (typeof callback === 'function') {
if (typeof callback === 'function') { callback();
callback();
}
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
} }
}, async: false}); }, async: false});
}); });
...@@ -242,12 +222,8 @@ var activitiUtil = { ...@@ -242,12 +222,8 @@ var activitiUtil = {
transferredPersonId: userReturnList[0].id transferredPersonId: userReturnList[0].id
}; };
AjaxPostUtil.request({url: flowableBasePath + "activitiTask002", params: params, method: "POST", type: 'json', callback: function(json) { AjaxPostUtil.request({url: flowableBasePath + "activitiTask002", params: params, method: "POST", type: 'json', callback: function(json) {
if(json.returnCode == 0) { if (typeof callback === 'function') {
if (typeof callback === 'function') { callback();
callback();
}
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
} }
}, async: false}); }, async: false});
}); });
...@@ -261,12 +237,8 @@ var activitiUtil = { ...@@ -261,12 +237,8 @@ var activitiUtil = {
pageId: "beforeAddSignTaskPage", pageId: "beforeAddSignTaskPage",
area: ['90vw', '90vh'], area: ['90vw', '90vh'],
callBack: function(refreshCode){ callBack: function(refreshCode){
if (refreshCode == '0') { if (typeof callback === 'function') {
if (typeof callback === 'function') { callback();
callback();
}
} else if (refreshCode == '-9999') {
winui.window.msg(systemLanguage["com.skyeye.operationFailed"][languageType], {icon: 2, time: 2000});
} }
} }
}); });
...@@ -280,12 +252,8 @@ var activitiUtil = { ...@@ -280,12 +252,8 @@ var activitiUtil = {
pageId: "afterAddSignTaskPage", pageId: "afterAddSignTaskPage",
area: ['90vw', '90vh'], area: ['90vw', '90vh'],
callBack: function(refreshCode){ callBack: function(refreshCode){
if (refreshCode == '0') { if (typeof callback === 'function') {
if (typeof callback === 'function') { callback();
callback();
}
} else if (refreshCode == '-9999') {
winui.window.msg(systemLanguage["com.skyeye.operationFailed"][languageType], {icon: 2, time: 2000});
} }
} }
}); });
...@@ -299,12 +267,8 @@ var activitiUtil = { ...@@ -299,12 +267,8 @@ var activitiUtil = {
pageId: "jointlySignPage", pageId: "jointlySignPage",
area: ['90vw', '90vh'], area: ['90vw', '90vh'],
callBack: function(refreshCode){ callBack: function(refreshCode){
if (refreshCode == '0') { if (typeof callback === 'function') {
if (typeof callback === 'function') { callback();
callback();
}
} else if (refreshCode == '-9999') {
winui.window.msg(systemLanguage["com.skyeye.operationFailed"][languageType], {icon: 2, time: 2000});
} }
} }
}); });
......
...@@ -9,12 +9,8 @@ var adminAssistantUtil = { ...@@ -9,12 +9,8 @@ var adminAssistantUtil = {
*/ */
queryAssetArticlesTypeUpStateList: function (callback){ queryAssetArticlesTypeUpStateList: function (callback){
AjaxPostUtil.request({url: flowableBasePath + "assetarticles010", params: {}, type: 'json', method: "GET", callback: function(json) { AjaxPostUtil.request({url: flowableBasePath + "assetarticles010", params: {}, type: 'json', method: "GET", callback: function(json) {
if(json.returnCode == 0) { if(typeof(callback) == "function") {
if(typeof(callback) == "function") { callback(json);
callback(json);
}
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
} }
}, async: false}); }, async: false});
}, },
...@@ -26,12 +22,8 @@ var adminAssistantUtil = { ...@@ -26,12 +22,8 @@ var adminAssistantUtil = {
*/ */
queryAllVehicleList: function (callback){ queryAllVehicleList: function (callback){
AjaxPostUtil.request({url: flowableBasePath + "vehicle010", params: {}, type: 'json', method: "GET", callback: function(json) { AjaxPostUtil.request({url: flowableBasePath + "vehicle010", params: {}, type: 'json', method: "GET", callback: function(json) {
if(json.returnCode == 0) { if(typeof(callback) == "function") {
if(typeof(callback) == "function") { callback(json);
callback(json);
}
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
} }
}, async: false}); }, async: false});
}, },
......
...@@ -12,8 +12,10 @@ var AjaxPostUtil = { ...@@ -12,8 +12,10 @@ var AjaxPostUtil = {
async: true, async: true,
// 返回的内容的类型,text,xml,json // 返回的内容的类型,text,xml,json
type: 'text', type: 'text',
// 回调函数 required // 接口调用成功时的回调函数 required
callback: function() {} callback: function() {},
// 接口调用失败时的回调函数
errorCallback: undefined
}, },
// 创建XMLHttpRequest对象 // 创建XMLHttpRequest对象
...@@ -63,6 +65,7 @@ var AjaxPostUtil = { ...@@ -63,6 +65,7 @@ var AjaxPostUtil = {
readystatechange: function(xmlhttp) { readystatechange: function(xmlhttp) {
// 获取返回值 // 获取返回值
var returnValue; var returnValue;
var ajaxObj = this;
if(xmlhttp.readyState == 4 && (xmlhttp.status == 200 || xmlhttp.status == 0)) { if(xmlhttp.readyState == 4 && (xmlhttp.status == 200 || xmlhttp.status == 0)) {
//移除请求遮罩层 //移除请求遮罩层
layui.$("body").find(".mask-req-str").remove(); layui.$("body").find(".mask-req-str").remove();
...@@ -95,20 +98,29 @@ var AjaxPostUtil = { ...@@ -95,20 +98,29 @@ var AjaxPostUtil = {
returnValue = xmlhttp.responseText; returnValue = xmlhttp.responseText;
break; break;
} }
if(returnValue) { ajaxObj.checkAndCallback(returnValue);
this.options.callback.call(this, returnValue);
} else {
this.options.callback.call(this);
}
}else if(xmlhttp.readyState == 4 && (xmlhttp.status == 404)) { }else if(xmlhttp.readyState == 4 && (xmlhttp.status == 404)) {
// 移除请求遮罩层 // 移除请求遮罩层
layui.$("body").find(".mask-req-str").remove(); layui.$("body").find(".mask-req-str").remove();
returnValue = eval('(' + '{"returnMessage":"接口请求:404","returnCode":-9999,"total":0,"rows":"","bean":""}' + ')'); returnValue = eval('(' + '{"returnMessage":"接口请求:404","returnCode":-9999,"total":0,"rows":"","bean":""}' + ')');
if(returnValue) { ajaxObj.checkAndCallback(returnValue);
}
},
checkAndCallback: function (returnValue) {
if (returnValue.returnCode == 0) {
if (returnValue) {
this.options.callback.call(this, returnValue); this.options.callback.call(this, returnValue);
} else { } else {
this.options.callback.call(this); this.options.callback.call(this);
} }
} else {
// 如果失败的回调函数为空,则默认给出失败的提示,不为空,则回调errorCallback函数
if (typeof (this.options.errorCallback) == "function") {
this.options.errorCallback(returnValue);
} else {
winui.window.msg(returnValue.returnMessage, {icon: 2, time: 2000});
}
} }
}, },
......
...@@ -15,12 +15,8 @@ var bossUtil = { ...@@ -15,12 +15,8 @@ var bossUtil = {
pageId: "bossIntervieweeFromListChoosePage", pageId: "bossIntervieweeFromListChoosePage",
area: ['90vw', '90vh'], area: ['90vw', '90vh'],
callBack: function(refreshCode){ callBack: function(refreshCode){
if (refreshCode == '0') { if(typeof(callback) == "function") {
if(typeof(callback) == "function") { callback(bossUtil.bossIntervieweeFromChooseMation);
callback(bossUtil.bossIntervieweeFromChooseMation);
}
} else if (refreshCode == '-9999') {
winui.window.msg(systemLanguage["com.skyeye.operationFailed"][languageType], {icon: 2, time: 2000});
} }
}}); }});
}, },
...@@ -97,12 +93,8 @@ var bossUtil = { ...@@ -97,12 +93,8 @@ var bossUtil = {
pageId: "myChargeBossIntervieweeListChoose", pageId: "myChargeBossIntervieweeListChoose",
area: ['90vw', '90vh'], area: ['90vw', '90vh'],
callBack: function(refreshCode){ callBack: function(refreshCode){
if (refreshCode == '0') { if(typeof(callback) == "function") {
if(typeof(callback) == "function") { callback(bossUtil.bossIntervieweeChooseMation);
callback(bossUtil.bossIntervieweeChooseMation);
}
} else if (refreshCode == '-9999') {
winui.window.msg(systemLanguage["com.skyeye.operationFailed"][languageType], {icon: 2, time: 2000});
} }
}}); }});
}, },
...@@ -120,12 +112,8 @@ var bossUtil = { ...@@ -120,12 +112,8 @@ var bossUtil = {
pageId: "bossPersonRequireMyChargeListChoose", pageId: "bossPersonRequireMyChargeListChoose",
area: ['90vw', '90vh'], area: ['90vw', '90vh'],
callBack: function(refreshCode){ callBack: function(refreshCode){
if (refreshCode == '0') { if(typeof(callback) == "function") {
if(typeof(callback) == "function") { callback(bossUtil.bossPersonRequireChooseMation);
callback(bossUtil.bossPersonRequireChooseMation);
}
} else if (refreshCode == '-9999') {
winui.window.msg(systemLanguage["com.skyeye.operationFailed"][languageType], {icon: 2, time: 2000});
} }
}}); }});
}, },
......
...@@ -10,12 +10,8 @@ var checkWorkUtil = { ...@@ -10,12 +10,8 @@ var checkWorkUtil = {
*/ */
getCurrentUserCheckWorkTimeList: function (callback){ getCurrentUserCheckWorkTimeList: function (callback){
AjaxPostUtil.request({url: flowableBasePath + "checkworktime007", params: {}, type: 'json', method: "GET", callback: function(json) { AjaxPostUtil.request({url: flowableBasePath + "checkworktime007", params: {}, type: 'json', method: "GET", callback: function(json) {
if(json.returnCode == 0) { if(typeof(callback) == "function") {
if(typeof(callback) == "function") { callback(json);
callback(json);
}
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
} }
}, async: false}); }, async: false});
}, },
......
...@@ -29,12 +29,8 @@ var dsFormUtil = { ...@@ -29,12 +29,8 @@ var dsFormUtil = {
pageId: "dsFormPageListChoose", pageId: "dsFormPageListChoose",
area: ['90vw', '90vh'], area: ['90vw', '90vh'],
callBack: function(refreshCode){ callBack: function(refreshCode){
if (refreshCode == '0') { if(typeof(callback) == "function") {
if(typeof(callback) == "function") { callback(dsFormUtil.dsFormChooseList);
callback(dsFormUtil.dsFormChooseList);
}
} else if (refreshCode == '-9999') {
winui.window.msg(systemLanguage["com.skyeye.operationFailed"][languageType], {icon: 2, time: 2000});
} }
}}); }});
}, },
...@@ -117,11 +113,7 @@ var dsFormUtil = { ...@@ -117,11 +113,7 @@ var dsFormUtil = {
dsFormObjectRelationId: isNull(dsFormObjectRelationId) ? "" : dsFormObjectRelationId dsFormObjectRelationId: isNull(dsFormObjectRelationId) ? "" : dsFormObjectRelationId
}; };
AjaxPostUtil.request({url: flowableBasePath + "dsFormObjectRelation006", params: params, method: "GET", type: 'json', callback: function(json) { AjaxPostUtil.request({url: flowableBasePath + "dsFormObjectRelation006", params: params, method: "GET", type: 'json', callback: function(json) {
if(json.returnCode == 0) { dsFormUtil.loadDsFormItem(showBoxId, json);
dsFormUtil.loadDsFormItem(showBoxId, json);
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}, async: false}); }, async: false});
}, },
...@@ -144,12 +136,8 @@ var dsFormUtil = { ...@@ -144,12 +136,8 @@ var dsFormUtil = {
item.context = getDataUseHandlebars(item.templateContent, obj); item.context = getDataUseHandlebars(item.templateContent, obj);
}else if(item.associatedDataTypes == 2){//接口 }else if(item.associatedDataTypes == 2){//接口
AjaxPostUtil.request({url: flowableBasePath + "dsformpage011", params:{interfa: item.aData}, type: 'json', callback: function(j){ AjaxPostUtil.request({url: flowableBasePath + "dsformpage011", params:{interfa: item.aData}, type: 'json', callback: function(j){
if(j.returnCode == 0){ var obj = JSON.parse(j.bean.aData);
var obj = JSON.parse(j.bean.aData); item.context = getDataUseHandlebars(item.templateContent, obj);
item.context = getDataUseHandlebars(item.templateContent, obj);
} else {
winui.window.msg(j.returnMessage, {icon: 2, time: 2000});
}
}, async: false}); }, async: false});
} }
var jsonStr = {bean: item}; var jsonStr = {bean: item};
...@@ -211,11 +199,6 @@ var dsFormUtil = { ...@@ -211,11 +199,6 @@ var dsFormUtil = {
objectId: objectId objectId: objectId
} }
AjaxPostUtil.request({url: flowableBasePath + "dsformpage014", params: params, type: 'json', method: "POST", callback: function(json) { AjaxPostUtil.request({url: flowableBasePath + "dsformpage014", params: params, type: 'json', method: "POST", callback: function(json) {
if(json.returnCode == 0) {
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}, async: false}); }, async: false});
}, },
...@@ -307,15 +290,11 @@ var dsFormUtil = { ...@@ -307,15 +290,11 @@ var dsFormUtil = {
*/ */
loadPageShowDetailsByObjectId: function(showBoxId, objectId){ loadPageShowDetailsByObjectId: function(showBoxId, objectId){
AjaxPostUtil.request({url: flowableBasePath + "dsformpage015", params: {objectId: objectId}, method: "GET", type: 'json', callback: function(json) { AjaxPostUtil.request({url: flowableBasePath + "dsformpage015", params: {objectId: objectId}, method: "GET", type: 'json', callback: function(json) {
if(json.returnCode == 0) { $.each(json.rows, function(j, bean) {
$.each(json.rows, function(j, bean) { var customBoxId = bean.id;
var customBoxId = bean.id; $("#" + showBoxId).append(getDataUseHandlebars(dsFormUtil.customDsFormBox, bean));
$("#" + showBoxId).append(getDataUseHandlebars(dsFormUtil.customDsFormBox, bean)); dsFormUtil.initSequenceDataDetails(customBoxId, bean.content);
dsFormUtil.initSequenceDataDetails(customBoxId, bean.content); });
});
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}, async: false}); }, async: false});
}, },
...@@ -351,11 +330,7 @@ var dsFormUtil = { ...@@ -351,11 +330,7 @@ var dsFormUtil = {
*/ */
loadPageToEditByObjectId: function(showBoxId, objectId) { loadPageToEditByObjectId: function(showBoxId, objectId) {
AjaxPostUtil.request({url: flowableBasePath + "dsformpage015", params: {objectId: objectId}, method: "GET", type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "dsformpage015", params: {objectId: objectId}, method: "GET", type: 'json', callback: function (json) {
if (json.returnCode == 0) { dsFormUtil.loadDsFormItem(showBoxId, json);
dsFormUtil.loadDsFormItem(showBoxId, json);
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}, async: false}); }, async: false});
}, },
...@@ -373,12 +348,8 @@ var dsFormUtil = { ...@@ -373,12 +348,8 @@ var dsFormUtil = {
pageId: "dsFormObjectRelationChooseByFirstTypeCodePage", pageId: "dsFormObjectRelationChooseByFirstTypeCodePage",
area: ['480px', '500px'], area: ['480px', '500px'],
callBack: function(refreshCode){ callBack: function(refreshCode){
if (refreshCode == '0') { if(typeof(callback) == "function") {
if(typeof(callback) == "function") { callback(dsFormUtil.dsFormObjectRelationChoose);
callback(dsFormUtil.dsFormObjectRelationChoose);
}
} else if (refreshCode == '-9999') {
winui.window.msg(systemLanguage["com.skyeye.operationFailed"][languageType], {icon: 2, time: 2000});
} }
}}); }});
}, },
......
...@@ -58,11 +58,7 @@ var erpOrderUtil = { ...@@ -58,11 +58,7 @@ var erpOrderUtil = {
// 1需要审核;2不需要审核 // 1需要审核;2不需要审核
var submitType = ""; var submitType = "";
AjaxPostUtil.request({url: flowableBasePath + "erpcommon004", params: {orderType: orderType}, method: "GET", type: 'json', callback: function(json) { AjaxPostUtil.request({url: flowableBasePath + "erpcommon004", params: {orderType: orderType}, method: "GET", type: 'json', callback: function(json) {
if(json.returnCode == 0) { submitType = json.bean.needExamine;
submitType = json.bean.needExamine;
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}, async: false}); }, async: false});
if(submitType == 1){ if(submitType == 1){
...@@ -104,15 +100,11 @@ var erpOrderUtil = { ...@@ -104,15 +100,11 @@ var erpOrderUtil = {
* @param orderType 单据类型 * @param orderType 单据类型
*/ */
deleteOrderMation: function (id, orderType, callback){ deleteOrderMation: function (id, orderType, callback){
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) {
AjaxPostUtil.request({url: flowableBasePath + "erpcommon005", params: {rowId: id, orderType: orderType}, method: "DELETE", type: 'json', callback: function(json) { AjaxPostUtil.request({url: flowableBasePath + "erpcommon005", params: {rowId: id, orderType: orderType}, method: "DELETE", 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}); if(typeof(callback) == "function") {
if(typeof(callback) == "function") { callback();
callback();
}
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
} }
}}); }});
}); });
...@@ -145,13 +137,9 @@ var erpOrderUtil = { ...@@ -145,13 +137,9 @@ var erpOrderUtil = {
approvalId: approvalId approvalId: approvalId
}; };
AjaxPostUtil.request({url: flowableBasePath + "erpcommon006", params: params, method: "PUT", type: 'json', callback: function(json) { AjaxPostUtil.request({url: flowableBasePath + "erpcommon006", params: params, method: "PUT", type: 'json', callback: function(json) {
if(json.returnCode == 0) { winui.window.msg("提交成功。", {icon: 1, time: 2000});
winui.window.msg("提交成功。", {icon: 1, time: 2000}); if(typeof(callback) == "function") {
if(typeof(callback) == "function") { callback();
callback();
}
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
} }
}}); }});
}, },
...@@ -169,13 +157,9 @@ var erpOrderUtil = { ...@@ -169,13 +157,9 @@ var erpOrderUtil = {
orderType: orderType orderType: orderType
}; };
AjaxPostUtil.request({url: flowableBasePath + "erpcommon003", params: params, type: 'json', method: "PUT", callback: function(json) { AjaxPostUtil.request({url: flowableBasePath + "erpcommon003", 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}); if(typeof(callback) == "function") {
if(typeof(callback) == "function") { callback();
callback();
}
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
} }
}}); }});
}); });
...@@ -212,12 +196,8 @@ var erpOrderUtil = { ...@@ -212,12 +196,8 @@ var erpOrderUtil = {
*/ */
getDepotList: function (callback){ getDepotList: function (callback){
AjaxPostUtil.request({url: flowableBasePath + "storehouse008", params: {}, type: 'json', method: "GET", callback: function(json) { AjaxPostUtil.request({url: flowableBasePath + "storehouse008", params: {}, type: 'json', method: "GET", callback: function(json) {
if(json.returnCode == 0) { if(typeof(callback) == "function") {
if(typeof(callback) == "function") { callback(json);
callback(json);
}
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
} }
}, async: false}); }, async: false});
}, },
...@@ -234,12 +214,8 @@ var erpOrderUtil = { ...@@ -234,12 +214,8 @@ var erpOrderUtil = {
pageId: "productlist", pageId: "productlist",
area: ['90vw', '90vh'], area: ['90vw', '90vh'],
callBack: function (refreshCode) { callBack: function (refreshCode) {
if (refreshCode == '0') { if (typeof (callback) == "function") {
if (typeof (callback) == "function") { callback(erpOrderUtil.chooseProductMation);
callback(erpOrderUtil.chooseProductMation);
}
} else if (refreshCode == '-9999') {
winui.window.msg(systemLanguage["com.skyeye.operationFailed"][languageType], {icon: 2, time: 2000});
} }
} }
}); });
......
...@@ -15,12 +15,8 @@ var mailUtil = { ...@@ -15,12 +15,8 @@ var mailUtil = {
pageId: "mailListChoose", pageId: "mailListChoose",
area: ['90vw', '90vh'], area: ['90vw', '90vh'],
callBack: function(refreshCode){ callBack: function(refreshCode){
if (refreshCode == '0') { if(typeof(callback) == "function") {
if(typeof(callback) == "function") { callback(mailUtil.mailChooseList);
callback(mailUtil.mailChooseList);
}
} else if (refreshCode == '-9999') {
winui.window.msg(systemLanguage["com.skyeye.operationFailed"][languageType], {icon: 2, time: 2000});
} }
}}); }});
} }
......
...@@ -9,12 +9,8 @@ var proUtil = { ...@@ -9,12 +9,8 @@ var proUtil = {
*/ */
queryMyProjectsList: function (callback){ queryMyProjectsList: function (callback){
AjaxPostUtil.request({url: flowableBasePath + "queryMyProjectsList", params: {}, type: 'json', method: "GET", callback: function(json) { AjaxPostUtil.request({url: flowableBasePath + "queryMyProjectsList", params: {}, type: 'json', method: "GET", callback: function(json) {
if(json.returnCode == 0) { if(typeof(callback) == "function") {
if(typeof(callback) == "function") { callback(json);
callback(json);
}
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
} }
}, async: false}); }, async: false});
}, },
......
...@@ -9,12 +9,8 @@ var schoolUtil = { ...@@ -9,12 +9,8 @@ var schoolUtil = {
*/ */
queryMyBelongSchoolList: function (callback) { queryMyBelongSchoolList: function (callback) {
AjaxPostUtil.request({url: schoolBasePath + "schoolmation008", params: {}, type: 'json', method: "POST", callback: function(json) { AjaxPostUtil.request({url: schoolBasePath + "schoolmation008", params: {}, type: 'json', method: "POST", callback: function(json) {
if (json.returnCode == 0) { if (typeof(callback) == "function") {
if (typeof(callback) == "function") { callback(json);
callback(json);
}
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
} }
}, async: false}); }, async: false});
}, },
......
...@@ -49,12 +49,8 @@ var shopUtil = { ...@@ -49,12 +49,8 @@ var shopUtil = {
*/ */
queryMealOrderNatureList: function (callback){ queryMealOrderNatureList: function (callback){
AjaxPostUtil.request({url: shopBasePath + "queryMealOrderNatureList", params: {enabled: 1}, type: 'json', method: "POST", callback: function(json) { AjaxPostUtil.request({url: shopBasePath + "queryMealOrderNatureList", params: {enabled: 1}, type: 'json', method: "POST", callback: function(json) {
if(json.returnCode == 0) { if(typeof(callback) == "function") {
if(typeof(callback) == "function") { callback(json);
callback(json);
}
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
} }
}, async: false}); }, async: false});
}, },
...@@ -66,12 +62,8 @@ var shopUtil = { ...@@ -66,12 +62,8 @@ var shopUtil = {
*/ */
queryRefundMealOrderReasonList: function (callback){ queryRefundMealOrderReasonList: function (callback){
AjaxPostUtil.request({url: shopBasePath + "queryUseingMealRefundOrderReasonList", params: {}, type: 'json', method: "GET", callback: function(json) { AjaxPostUtil.request({url: shopBasePath + "queryUseingMealRefundOrderReasonList", params: {}, type: 'json', method: "GET", callback: function(json) {
if(json.returnCode == 0) { if(typeof(callback) == "function") {
if(typeof(callback) == "function") { callback(json);
callback(json);
}
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
} }
}, async: false}); }, async: false});
}, },
...@@ -149,12 +141,8 @@ var shopUtil = { ...@@ -149,12 +141,8 @@ var shopUtil = {
*/ */
getShopAreaMation: function (callback){ getShopAreaMation: function (callback){
AjaxPostUtil.request({url: shopBasePath + "queryAreaList", params: {}, type: 'json', method: "GET", callback: function(json) { AjaxPostUtil.request({url: shopBasePath + "queryAreaList", params: {}, type: 'json', method: "GET", callback: function(json) {
if(json.returnCode == 0) { if(typeof(callback) == "function") {
if(typeof(callback) == "function") { callback(json);
callback(json);
}
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
} }
}, async: false}); }, async: false});
}, },
...@@ -166,12 +154,8 @@ var shopUtil = { ...@@ -166,12 +154,8 @@ var shopUtil = {
*/ */
queryStaffBelongAreaList: function (callback){ queryStaffBelongAreaList: function (callback){
AjaxPostUtil.request({url: shopBasePath + "storeStaff004", params: {}, type: 'json', method: "GET", callback: function(json) { AjaxPostUtil.request({url: shopBasePath + "storeStaff004", params: {}, type: 'json', method: "GET", callback: function(json) {
if(json.returnCode == 0) { if(typeof(callback) == "function") {
if(typeof(callback) == "function") { callback(json);
callback(json);
}
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
} }
}, async: false}); }, async: false});
}, },
...@@ -183,12 +167,8 @@ var shopUtil = { ...@@ -183,12 +167,8 @@ var shopUtil = {
*/ */
queryStaffBelongStoreList: function (callback){ queryStaffBelongStoreList: function (callback){
AjaxPostUtil.request({url: shopBasePath + "storeStaff005", params: {}, type: 'json', method: "GET", callback: function(json) { AjaxPostUtil.request({url: shopBasePath + "storeStaff005", params: {}, type: 'json', method: "GET", callback: function(json) {
if(json.returnCode == 0) { if(typeof(callback) == "function") {
if(typeof(callback) == "function") { callback(json);
callback(json);
}
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
} }
}, async: false}); }, async: false});
}, },
...@@ -204,12 +184,8 @@ var shopUtil = { ...@@ -204,12 +184,8 @@ var shopUtil = {
return []; return [];
} }
AjaxPostUtil.request({url: shopBasePath + "queryStoreList", params: {areaId: areaId}, type: 'json', method: "GET", callback: function(json) { AjaxPostUtil.request({url: shopBasePath + "queryStoreList", params: {areaId: areaId}, type: 'json', method: "GET", callback: function(json) {
if(json.returnCode == 0) { if(typeof(callback) == "function") {
if(typeof(callback) == "function") { callback(json);
callback(json);
}
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
} }
}, async: false}); }, async: false});
}, },
...@@ -225,12 +201,8 @@ var shopUtil = { ...@@ -225,12 +201,8 @@ var shopUtil = {
page: 1 page: 1
}; };
AjaxPostUtil.request({url: shopBasePath + "store001", params: params, type: 'json', method: "POST", callback: function(json) { AjaxPostUtil.request({url: shopBasePath + "store001", params: params, type: 'json', method: "POST", callback: function(json) {
if(json.returnCode == 0) { if(typeof(callback) == "function") {
if(typeof(callback) == "function") { callback(json);
callback(json);
}
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
} }
}, async: false}); }, async: false});
}, },
...@@ -248,12 +220,8 @@ var shopUtil = { ...@@ -248,12 +220,8 @@ var shopUtil = {
pageId: "storeStaffChoose", pageId: "storeStaffChoose",
area: ['90vw', '90vh'], area: ['90vw', '90vh'],
callBack: function(refreshCode){ callBack: function(refreshCode){
if (refreshCode == '0') { if(typeof(callback) == "function") {
if(typeof(callback) == "function") { callback(shopUtil.staffMation);
callback(shopUtil.staffMation);
}
} else if (refreshCode == '-9999') {
winui.window.msg(systemLanguage["com.skyeye.operationFailed"][languageType], {icon: 2, time: 2000});
} }
}}); }});
}, },
......
...@@ -56,14 +56,10 @@ var skyeyeEnclosure = { ...@@ -56,14 +56,10 @@ var skyeyeEnclosure = {
pageId: "enclosureuploadpage", pageId: "enclosureuploadpage",
area: ['420px', '420px'], area: ['420px', '420px'],
callBack: function(refreshCode){ callBack: function(refreshCode){
if (refreshCode == '0') { // 重新加载dom对象
// 重新加载dom对象 skyeyeEnclosure.loadEnclosureHTML(id, btnId, 1);
skyeyeEnclosure.loadEnclosureHTML(id, btnId, 1); if(typeof(callback) == "function") {
if(typeof(callback) == "function") { callback(skyeyeEnclosure.getJSONEnclosureListByBoxId(id));
callback(skyeyeEnclosure.getJSONEnclosureListByBoxId(id));
}
} else if (refreshCode == '-9999') {
winui.window.msg(systemLanguage["com.skyeye.operationFailed"][languageType], {icon: 2, time: 2000});
} }
}}); }});
}); });
......
...@@ -19,12 +19,8 @@ var sysCustomerUtil = { ...@@ -19,12 +19,8 @@ var sysCustomerUtil = {
pageId: "customerChoose", pageId: "customerChoose",
area: ['90vw', '90vh'], area: ['90vw', '90vh'],
callBack: function(refreshCode) { callBack: function(refreshCode) {
if (refreshCode == '0') { if(typeof(callback) == "function") {
if(typeof(callback) == "function") { callback(sysCustomerUtil.customerMation);
callback(sysCustomerUtil.customerMation);
}
} else if (refreshCode == '-9999') {
winui.window.msg(systemLanguage["com.skyeye.operationFailed"][languageType], {icon: 2, time: 2000});
} }
}}); }});
}, },
...@@ -36,12 +32,8 @@ var sysCustomerUtil = { ...@@ -36,12 +32,8 @@ var sysCustomerUtil = {
*/ */
queryCustomerOpportunityFromIsUpList: function (callback){ queryCustomerOpportunityFromIsUpList: function (callback){
AjaxPostUtil.request({url: flowableBasePath + "crmopportunityfrom008", params: {}, type: 'json', method: "GET", callback: function(json) { AjaxPostUtil.request({url: flowableBasePath + "crmopportunityfrom008", params: {}, type: 'json', method: "GET", callback: function(json) {
if(json.returnCode == 0) { if(typeof(callback) == "function") {
if(typeof(callback) == "function") { callback(json);
callback(json);
}
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
} }
}, async: false}); }, async: false});
}, },
...@@ -53,12 +45,8 @@ var sysCustomerUtil = { ...@@ -53,12 +45,8 @@ var sysCustomerUtil = {
*/ */
queryCustomerTypeIsUpList: function (callback){ queryCustomerTypeIsUpList: function (callback){
AjaxPostUtil.request({url: flowableBasePath + "customertype008", params: {}, type: 'json', method: "GET", callback: function(json) { AjaxPostUtil.request({url: flowableBasePath + "customertype008", params: {}, type: 'json', method: "GET", callback: function(json) {
if(json.returnCode == 0) { if(typeof(callback) == "function") {
if(typeof(callback) == "function") { callback(json);
callback(json);
}
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
} }
}, async: false}); }, async: false});
}, },
...@@ -70,12 +58,8 @@ var sysCustomerUtil = { ...@@ -70,12 +58,8 @@ var sysCustomerUtil = {
*/ */
queryCustomerFromIsUpList: function (callback){ queryCustomerFromIsUpList: function (callback){
AjaxPostUtil.request({url: flowableBasePath + "crmcustomerfrom008", params: {}, type: 'json', method: "GET", callback: function(json) { AjaxPostUtil.request({url: flowableBasePath + "crmcustomerfrom008", params: {}, type: 'json', method: "GET", callback: function(json) {
if(json.returnCode == 0) { if(typeof(callback) == "function") {
if(typeof(callback) == "function") { callback(json);
callback(json);
}
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
} }
}, async: false}); }, async: false});
}, },
...@@ -87,12 +71,8 @@ var sysCustomerUtil = { ...@@ -87,12 +71,8 @@ var sysCustomerUtil = {
*/ */
queryCrmDocumentaryTypeIsUpList: function (callback){ queryCrmDocumentaryTypeIsUpList: function (callback){
AjaxPostUtil.request({url: flowableBasePath + "crmdocumentarytype008", params: {}, type: 'json', method: "GET", callback: function(json) { AjaxPostUtil.request({url: flowableBasePath + "crmdocumentarytype008", params: {}, type: 'json', method: "GET", callback: function(json) {
if(json.returnCode == 0) { if(typeof(callback) == "function") {
if(typeof(callback) == "function") { callback(json);
callback(json);
}
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
} }
}, async: false}); }, async: false});
}, },
...@@ -104,12 +84,8 @@ var sysCustomerUtil = { ...@@ -104,12 +84,8 @@ var sysCustomerUtil = {
*/ */
queryCrmCustomerIndustryIsUpList: function (callback){ queryCrmCustomerIndustryIsUpList: function (callback){
AjaxPostUtil.request({url: flowableBasePath + "crmcustomerindustry008", params: {}, type: 'json', method: "GET", callback: function(json) { AjaxPostUtil.request({url: flowableBasePath + "crmcustomerindustry008", params: {}, type: 'json', method: "GET", callback: function(json) {
if(json.returnCode == 0) { if(typeof(callback) == "function") {
if(typeof(callback) == "function") { callback(json);
callback(json);
}
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
} }
}, async: false}); }, async: false});
}, },
......
...@@ -13,12 +13,8 @@ var sysDictDataUtil = { ...@@ -13,12 +13,8 @@ var sysDictDataUtil = {
status: status status: status
}; };
AjaxPostUtil.request({url: reqBasePath + "queryDictTypeListByStatus", params: params, type: 'json', method: "GET", callback: function(json) { AjaxPostUtil.request({url: reqBasePath + "queryDictTypeListByStatus", params: params, type: 'json', method: "GET", callback: function(json) {
if (json.returnCode == 0) { if (typeof(callback) == "function") {
if (typeof(callback) == "function") { callback(json);
callback(json);
}
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
} }
}, async: false}); }, async: false});
}, },
...@@ -34,19 +30,15 @@ var sysDictDataUtil = { ...@@ -34,19 +30,15 @@ var sysDictDataUtil = {
dictTypeCode: dictTypeCode dictTypeCode: dictTypeCode
}; };
AjaxPostUtil.request({url: reqBasePath + "queryDictDataListByDictTypeCode", params: params, type: 'json', method: "GET", callback: function(json) { AjaxPostUtil.request({url: reqBasePath + "queryDictDataListByDictTypeCode", params: params, type: 'json', method: "GET", callback: function(json) {
if (json.returnCode == 0) { if (showType == 'select') {
if (showType == 'select') { $("#" + showBoxId).html(getDataUseHandlebars(getFileContent('tpl/template/select-option.tpl'), json));
$("#" + showBoxId).html(getDataUseHandlebars(getFileContent('tpl/template/select-option.tpl'), json)); if (!isNull(defaultId)) {
if (!isNull(defaultId)) { $("#" + showBoxId).val(defaultId);
$("#" + showBoxId).val(defaultId);
}
form.render('select');
}
if (typeof (callback) == "function") {
callback(json);
} }
} else { form.render('select');
winui.window.msg(json.returnMessage, {icon: 2, time: 2000}); }
if (typeof (callback) == "function") {
callback(json);
} }
}, async: false}); }, async: false});
}, },
......
...@@ -14,12 +14,8 @@ var sysIfsUtil = { ...@@ -14,12 +14,8 @@ var sysIfsUtil = {
pageId: "ifsAccountSubjectListChoose", pageId: "ifsAccountSubjectListChoose",
area: ['90vw', '90vh'], area: ['90vw', '90vh'],
callBack: function (refreshCode) { callBack: function (refreshCode) {
if (refreshCode == '0') { if (typeof (callback) == "function") {
if (typeof (callback) == "function") { callback(sysIfsUtil.chooseAccountSubjectMation);
callback(sysIfsUtil.chooseAccountSubjectMation);
}
} else if (refreshCode == '-9999') {
winui.window.msg(systemLanguage["com.skyeye.operationFailed"][languageType], {icon: 2, time: 2000});
} }
} }
}); });
...@@ -38,12 +34,8 @@ var sysIfsUtil = { ...@@ -38,12 +34,8 @@ var sysIfsUtil = {
pageId: "ifsVoucherListChoose", pageId: "ifsVoucherListChoose",
area: ['90vw', '90vh'], area: ['90vw', '90vh'],
callBack: function (refreshCode) { callBack: function (refreshCode) {
if (refreshCode == '0') { if (typeof (callback) == "function") {
if (typeof (callback) == "function") { callback(sysIfsUtil.chooseVoucherMation);
callback(sysIfsUtil.chooseVoucherMation);
}
} else if (refreshCode == '-9999') {
winui.window.msg(systemLanguage["com.skyeye.operationFailed"][languageType], {icon: 2, time: 2000});
} }
} }
}); });
...@@ -62,12 +54,8 @@ var sysIfsUtil = { ...@@ -62,12 +54,8 @@ var sysIfsUtil = {
pageId: "ifsSetOfBooksListChoose", pageId: "ifsSetOfBooksListChoose",
area: ['90vw', '90vh'], area: ['90vw', '90vh'],
callBack: function (refreshCode) { callBack: function (refreshCode) {
if (refreshCode == '0') { if (typeof (callback) == "function") {
if (typeof (callback) == "function") { callback(sysIfsUtil.ifsSetOfBooksMation);
callback(sysIfsUtil.ifsSetOfBooksMation);
}
} else if (refreshCode == '-9999') {
winui.window.msg(systemLanguage["com.skyeye.operationFailed"][languageType], {icon: 2, time: 2000});
} }
} }
}); });
......
...@@ -18,12 +18,8 @@ var sysMemberUtil = { ...@@ -18,12 +18,8 @@ var sysMemberUtil = {
pageId: "memberSearchChoose", pageId: "memberSearchChoose",
area: ['90vw', '90vh'], area: ['90vw', '90vh'],
callBack: function (refreshCode) { callBack: function (refreshCode) {
if (refreshCode == '0') { if (typeof (callback) == "function") {
if (typeof (callback) == "function") { callback(sysMemberUtil.memberMation);
callback(sysMemberUtil.memberMation);
}
} else if (refreshCode == '-9999') {
winui.window.msg(systemLanguage["com.skyeye.operationFailed"][languageType], {icon: 2, time: 2000});
} }
} }
}); });
......
...@@ -18,12 +18,8 @@ var sysSupplierUtil = { ...@@ -18,12 +18,8 @@ var sysSupplierUtil = {
pageId: "supplierChoosePage", pageId: "supplierChoosePage",
area: ['90vw', '90vh'], area: ['90vw', '90vh'],
callBack: function (refreshCode) { callBack: function (refreshCode) {
if (refreshCode == '0') { if (typeof (callback) == "function") {
if (typeof (callback) == "function") { callback(sysSupplierUtil.supplierMation);
callback(sysSupplierUtil.supplierMation);
}
} else if (refreshCode == '-9999') {
winui.window.msg(systemLanguage["com.skyeye.operationFailed"][languageType], {icon: 2, time: 2000});
} }
} }
}); });
......
...@@ -8,12 +8,8 @@ var systemCommonUtil = { ...@@ -8,12 +8,8 @@ var systemCommonUtil = {
*/ */
getSysAccountListByType: function (callback){ getSysAccountListByType: function (callback){
AjaxPostUtil.request({url: flowableBasePath + "account009", params: {}, type: 'json', method: "GET", callback: function(json) { AjaxPostUtil.request({url: flowableBasePath + "account009", params: {}, type: 'json', method: "GET", callback: function(json) {
if(json.returnCode == 0) { if(typeof(callback) == "function") {
if(typeof(callback) == "function") { callback(json);
callback(json);
}
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
} }
}, async: false}); }, async: false});
}, },
...@@ -24,11 +20,7 @@ var systemCommonUtil = { ...@@ -24,11 +20,7 @@ var systemCommonUtil = {
judgeCurrentUserRegularWorker: function () { judgeCurrentUserRegularWorker: function () {
var result = false; var result = false;
AjaxPostUtil.request({url: flowableBasePath + "judgeCurrentUserRegularWorker", params: {}, type: 'json', method: "GET", callback: function(json) { AjaxPostUtil.request({url: flowableBasePath + "judgeCurrentUserRegularWorker", params: {}, type: 'json', method: "GET", callback: function(json) {
if(json.returnCode == 0) { result = json.bean.canApply;
result = json.bean.canApply;
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}, async: false}); }, async: false});
return result; return result;
}, },
...@@ -39,11 +31,7 @@ var systemCommonUtil = { ...@@ -39,11 +31,7 @@ var systemCommonUtil = {
judgeCurrentUserQuit: function () { judgeCurrentUserQuit: function () {
var result = false; var result = false;
AjaxPostUtil.request({url: flowableBasePath + "judgeCurrentUserQuit", params: {}, type: 'json', method: "GET", callback: function(json) { AjaxPostUtil.request({url: flowableBasePath + "judgeCurrentUserQuit", params: {}, type: 'json', method: "GET", callback: function(json) {
if(json.returnCode == 0) { result = json.bean.canApply;
result = json.bean.canApply;
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}, async: false}); }, async: false});
return result; return result;
}, },
...@@ -55,12 +43,8 @@ var systemCommonUtil = { ...@@ -55,12 +43,8 @@ var systemCommonUtil = {
*/ */
queryDepartmentListByCurrentUserBelong: function (callback){ queryDepartmentListByCurrentUserBelong: function (callback){
AjaxPostUtil.request({url: reqBasePath + "queryDepartmentListByCurrentUserBelong", params: {}, type: 'json', method: "GET", callback: function(json) { AjaxPostUtil.request({url: reqBasePath + "queryDepartmentListByCurrentUserBelong", params: {}, type: 'json', method: "GET", callback: function(json) {
if(json.returnCode == 0) { if(typeof(callback) == "function") {
if(typeof(callback) == "function") { callback(json);
callback(json);
}
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
} }
}, async: false}); }, async: false});
}, },
...@@ -72,12 +56,8 @@ var systemCommonUtil = { ...@@ -72,12 +56,8 @@ var systemCommonUtil = {
*/ */
queryJobListByDepartmentId: function (departmentId, callback){ queryJobListByDepartmentId: function (departmentId, callback){
AjaxPostUtil.request({url: reqBasePath + "companyjob007", params: {departmentId: departmentId}, type: 'json', method: "GET", callback: function(json) { AjaxPostUtil.request({url: reqBasePath + "companyjob007", params: {departmentId: departmentId}, type: 'json', method: "GET", callback: function(json) {
if(json.returnCode == 0) { if(typeof(callback) == "function") {
if(typeof(callback) == "function") { callback(json);
callback(json);
}
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
} }
}, async: false}); }, async: false});
}, },
...@@ -90,16 +70,14 @@ var systemCommonUtil = { ...@@ -90,16 +70,14 @@ var systemCommonUtil = {
*/ */
getSysCurrentLoginUserMation: function (callback, errorCallback){ getSysCurrentLoginUserMation: function (callback, errorCallback){
AjaxPostUtil.request({url: reqBasePath + "login002", params: {}, type: 'json', method: "POST", callback: function(json) { AjaxPostUtil.request({url: reqBasePath + "login002", params: {}, type: 'json', method: "POST", callback: function(json) {
if(json.returnCode == 0) { if(typeof(callback) == "function") {
if(typeof(callback) == "function") { callback(json);
callback(json); }
} }, errorCallback: function (json) {
if(typeof(errorCallback) == "function") {
errorCallback();
} else { } else {
if(typeof(errorCallback) == "function") { winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
errorCallback();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
} }
}, async: false}); }, async: false});
}, },
...@@ -111,12 +89,8 @@ var systemCommonUtil = { ...@@ -111,12 +89,8 @@ var systemCommonUtil = {
*/ */
getSysCompanyList: function (callback){ getSysCompanyList: function (callback){
AjaxPostUtil.request({url: reqBasePath + "companymation008", params: {}, type: 'json', method: "GET", callback: function(json) { AjaxPostUtil.request({url: reqBasePath + "companymation008", params: {}, type: 'json', method: "GET", callback: function(json) {
if(json.returnCode == 0) { if(typeof(callback) == "function") {
if(typeof(callback) == "function") { callback(json);
callback(json);
}
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
} }
}, async: false}); }, async: false});
}, },
...@@ -129,12 +103,8 @@ var systemCommonUtil = { ...@@ -129,12 +103,8 @@ var systemCommonUtil = {
*/ */
getSysInoutitemListByType: function (type, callback){ getSysInoutitemListByType: function (type, callback){
AjaxPostUtil.request({url: flowableBasePath + "inoutitem007", params: {type: type}, type: 'json', method: "GET", callback: function(json) { AjaxPostUtil.request({url: flowableBasePath + "inoutitem007", params: {type: type}, type: 'json', method: "GET", callback: function(json) {
if(json.returnCode == 0) { if(typeof(callback) == "function") {
if(typeof(callback) == "function") { callback(json);
callback(json);
}
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
} }
}, async: false}); }, async: false});
}, },
...@@ -216,12 +186,8 @@ var systemCommonUtil = { ...@@ -216,12 +186,8 @@ var systemCommonUtil = {
pageId: "sysuserselpage", pageId: "sysuserselpage",
area: ['90vw', '90vh'], area: ['90vw', '90vh'],
callBack: function (refreshCode) { callBack: function (refreshCode) {
if (refreshCode == '0') { if (typeof (callback) == "function") {
if (typeof (callback) == "function") { callback(systemCommonUtil.userReturnList);
callback(systemCommonUtil.userReturnList);
}
} else if (refreshCode == '-9999') {
winui.window.msg(systemLanguage["com.skyeye.operationFailed"][languageType], {icon: 2, time: 2000});
} }
} }
}); });
...@@ -241,12 +207,8 @@ var systemCommonUtil = { ...@@ -241,12 +207,8 @@ var systemCommonUtil = {
pageId: "sysuserselpage", pageId: "sysuserselpage",
area: ['90vw', '90vh'], area: ['90vw', '90vh'],
callBack: function (refreshCode) { callBack: function (refreshCode) {
if (refreshCode == '0') { if (typeof (callback) == "function") {
if (typeof (callback) == "function") { callback(systemCommonUtil.checkStaffMation);
callback(systemCommonUtil.checkStaffMation);
}
} else if (refreshCode == '-9999') {
winui.window.msg(systemLanguage["com.skyeye.operationFailed"][languageType], {icon: 2, time: 2000});
} }
} }
}); });
...@@ -265,12 +227,8 @@ var systemCommonUtil = { ...@@ -265,12 +227,8 @@ var systemCommonUtil = {
pageId: "sysEveIconListChoose", pageId: "sysEveIconListChoose",
area: ['90vw', '90vh'], area: ['90vw', '90vh'],
callBack: function(refreshCode){ callBack: function(refreshCode){
if (refreshCode == '0') { if(typeof(callback) == "function") {
if(typeof(callback) == "function") { callback(systemCommonUtil.sysIconChooseClass);
callback(systemCommonUtil.sysIconChooseClass);
}
} else if (refreshCode == '-9999') {
winui.window.msg(systemLanguage["com.skyeye.operationFailed"][languageType], {icon: 2, time: 2000});
} }
}}); }});
}, },
...@@ -402,12 +360,8 @@ var systemCommonUtil = { ...@@ -402,12 +360,8 @@ var systemCommonUtil = {
*/ */
queryExplainMationByType: function (type, callback) { queryExplainMationByType: function (type, callback) {
AjaxPostUtil.request({url: reqBasePath + "queryExExplainMationToShow", params: {type: type}, type: 'json', method: "GET", callback: function(json) { AjaxPostUtil.request({url: reqBasePath + "queryExExplainMationToShow", params: {type: type}, type: 'json', method: "GET", callback: function(json) {
if (json.returnCode == 0) { if(typeof(callback) == "function") {
if(typeof(callback) == "function") { callback(json);
callback(json);
}
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
} }
}, async: false}); }, async: false});
}, },
......
...@@ -34,12 +34,8 @@ var systemModelUtil = { ...@@ -34,12 +34,8 @@ var systemModelUtil = {
*/ */
getSysEveModelTypeDataByPId: function (parentId, callback){ getSysEveModelTypeDataByPId: function (parentId, callback){
AjaxPostUtil.request({url: reqBasePath + "sysevemodeltype006", params: {parentId: parentId}, type: 'json', method: "GET", callback: function (json) { AjaxPostUtil.request({url: reqBasePath + "sysevemodeltype006", params: {parentId: parentId}, type: 'json', method: "GET", callback: function (json) {
if (json.returnCode == 0) { if(typeof(callback) == "function") {
if(typeof(callback) == "function") { callback(json);
callback(json);
}
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
} }
}, async: false}); }, async: false});
}, },
...@@ -56,12 +52,8 @@ var systemModelUtil = { ...@@ -56,12 +52,8 @@ var systemModelUtil = {
pageId: "sysEveModelChoose", pageId: "sysEveModelChoose",
area: ['90vw', '90vh'], area: ['90vw', '90vh'],
callBack: function(refreshCode){ callBack: function(refreshCode){
if (refreshCode == '0') { if(typeof(callback) == "function") {
if(typeof(callback) == "function") { callback(systemModelUtil.chooseSysModel);
callback(systemModelUtil.chooseSysModel);
}
} else if (refreshCode == '-9999') {
winui.window.msg(systemLanguage["com.skyeye.operationFailed"][languageType], {icon: 2, time: 2000});
} }
}}); }});
}, },
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册