对页面的按钮进行权限控制
This commit is contained in:
@@ -140,11 +140,14 @@
|
||||
},
|
||||
{title: '备注', field: 'remark', width: 100},
|
||||
{
|
||||
title: '操作', field: 'op', align: "center", width: 210, formatter: function (value, rec, index) {
|
||||
title: '操作', field: 'op', align: "center", width: 210,
|
||||
formatter: function (value, rec, index) {
|
||||
var str = '';
|
||||
str += '<img src="/js/easyui/themes/icons/list.png" style="cursor: pointer;" onclick="showAccountInOutList(\'' + index + '\');"/> <a onclick="showAccountInOutList(\'' + index + '\');" style="text-decoration:none;color:black;" href="javascript:void(0)">流水</a> ';
|
||||
str += '<img src="/js/easyui/themes/icons/pencil.png" style="cursor: pointer;" onclick="editAccount(\'' + index + '\');"/> <a onclick="editAccount(\'' + index + '\');" style="text-decoration:none;color:black;" href="javascript:void(0)">编辑</a> ';
|
||||
str += '<img src="/js/easyui/themes/icons/edit_remove.png" style="cursor: pointer;" onclick="deleteAccount(\'' + rec.id + '\');"/> <a onclick="deleteAccount(\'' + rec.id + '\');" style="text-decoration:none;color:black;" href="javascript:void(0)">删除</a> ';
|
||||
if(isShowOpFun()){
|
||||
str += '<img src="/js/easyui/themes/icons/edit_remove.png" style="cursor: pointer;" onclick="deleteAccount(\'' + rec.id + '\');"/> <a onclick="deleteAccount(\'' + rec.id + '\');" style="text-decoration:none;color:black;" href="javascript:void(0)">删除</a> ';
|
||||
}
|
||||
return str;
|
||||
}
|
||||
}
|
||||
@@ -181,6 +184,7 @@
|
||||
}
|
||||
});
|
||||
dgResize();
|
||||
toolbarStatus();
|
||||
showAccountDetails(1, initPageSize);
|
||||
}
|
||||
|
||||
@@ -464,6 +468,9 @@
|
||||
oldAccount = rowsdata.name;
|
||||
$('#accountDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui/themes/icons/pencil.png"/> 编辑结算账户');
|
||||
$(".window-mask").css({width: webW, height: webH});
|
||||
if(!isShowOpFun()){
|
||||
$("#saveAccount").hide();
|
||||
}
|
||||
accountID = rowsdata.id;
|
||||
url = '/account/update?id=' + rowsdata.id;
|
||||
}
|
||||
|
||||
@@ -166,7 +166,9 @@
|
||||
formatter: function (value, rec, index) {
|
||||
var str = '';
|
||||
str += '<img title="编辑" src="/js/easyui/themes/icons/pencil.png" style="cursor: pointer;" onclick="editDepot(\'' + index + '\');"/> ';
|
||||
str += '<img title="删除" src="/js/easyui/themes/icons/edit_remove.png" style="cursor: pointer;" onclick="deleteDepot(' + rec.id + ');"/>';
|
||||
if(isShowOpFun()) {
|
||||
str += '<img title="删除" src="/js/easyui/themes/icons/edit_remove.png" style="cursor: pointer;" onclick="deleteDepot(' + rec.id + ');"/>';
|
||||
}
|
||||
return str;
|
||||
}
|
||||
},
|
||||
@@ -222,6 +224,7 @@
|
||||
}
|
||||
});
|
||||
dgResize();
|
||||
toolbarStatus();
|
||||
showDepotDetails(1, initPageSize);
|
||||
}
|
||||
|
||||
@@ -503,6 +506,9 @@
|
||||
oldDepot = rowsdata.name;
|
||||
$('#depotDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui/themes/icons/pencil.png"/> 编辑仓库信息');
|
||||
$(".window-mask").css({width: webW, height: webH});
|
||||
if(!isShowOpFun()){
|
||||
$("#saveDepot").hide();
|
||||
}
|
||||
depotID = rowsdata.id;
|
||||
url = '/depot/update?id=' + rowsdata.id;
|
||||
}
|
||||
|
||||
@@ -163,10 +163,13 @@
|
||||
},
|
||||
{title: '图标', field: 'icon', width: 110},
|
||||
{
|
||||
title: '操作', field: 'op', align: "center", width: 130, formatter: function (value, rec, index) {
|
||||
title: '操作', field: 'op', align: "center", width: 130,
|
||||
formatter: function (value, rec, index) {
|
||||
var str = '';
|
||||
str += '<img src="/js/easyui/themes/icons/pencil.png" style="cursor: pointer;" onclick="editFunctions(\'' + index + '\');"/> <a onclick="editFunctions(\'' + index + '\');" style="text-decoration:none;color:black;" href="javascript:void(0)">编辑</a> ';
|
||||
str += '<img src="/js/easyui/themes/icons/edit_remove.png" style="cursor: pointer;" onclick="deleteFunctions(' + rec.id + ');"/> <a onclick="deleteFunctions(' + rec.id + ');" style="text-decoration:none;color:black;" href="javascript:void(0)">删除</a> ';
|
||||
if(isShowOpFun()) {
|
||||
str += '<img src="/js/easyui/themes/icons/edit_remove.png" style="cursor: pointer;" onclick="deleteFunctions(' + rec.id + ');"/> <a onclick="deleteFunctions(' + rec.id + ');" style="text-decoration:none;color:black;" href="javascript:void(0)">删除</a> ';
|
||||
}
|
||||
return str;
|
||||
}
|
||||
}
|
||||
@@ -195,6 +198,7 @@
|
||||
}
|
||||
});
|
||||
dgResize();
|
||||
toolbarStatus();
|
||||
showFunctionsDetails(1, initPageSize);
|
||||
}
|
||||
|
||||
@@ -408,6 +412,9 @@
|
||||
oldFunctions = rowsdata.name;
|
||||
$('#functionsDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui/themes/icons/pencil.png"/> 编辑功能信息');
|
||||
$(".window-mask").css({width: webW, height: webH});
|
||||
if(!isShowOpFun()){
|
||||
$("#saveFunctions").hide();
|
||||
}
|
||||
functionsID = rowsdata.id;
|
||||
//焦点在名称输入框==定焦在输入文字后面
|
||||
$("#Name").val("").focus().val(rowsdata.name);
|
||||
|
||||
@@ -126,10 +126,13 @@
|
||||
{title: '类型', field: 'type', width: 100, align: "center"},
|
||||
{title: '描述', field: 'remark', width: 200},
|
||||
{
|
||||
title: '操作', field: 'op', align: "center", width: 130, formatter: function (value, rec, index) {
|
||||
title: '操作', field: 'op', align: "center", width: 130,
|
||||
formatter: function (value, rec, index) {
|
||||
var str = '';
|
||||
str += '<img src="/js/easyui/themes/icons/pencil.png" style="cursor: pointer;" onclick="editInOutItem(\'' + index + '\');"/> <a onclick="editInOutItem(\'' + index + '\');" style="text-decoration:none;color:black;" href="javascript:void(0)">编辑</a> ';
|
||||
str += '<img src="/js/easyui/themes/icons/edit_remove.png" style="cursor: pointer;" onclick="deleteInOutItem(\'' + rec.id + '\');"/> <a onclick="deleteInOutItem(\'' + rec.id + '\');" style="text-decoration:none;color:black;" href="javascript:void(0)">删除</a> ';
|
||||
if(isShowOpFun()) {
|
||||
str += '<img src="/js/easyui/themes/icons/edit_remove.png" style="cursor: pointer;" onclick="deleteInOutItem(\'' + rec.id + '\');"/> <a onclick="deleteInOutItem(\'' + rec.id + '\');" style="text-decoration:none;color:black;" href="javascript:void(0)">删除</a> ';
|
||||
}
|
||||
return str;
|
||||
}
|
||||
}
|
||||
@@ -158,6 +161,7 @@
|
||||
}
|
||||
});
|
||||
dgResize();
|
||||
toolbarStatus();
|
||||
showInOutItemDetails(1, initPageSize);
|
||||
}
|
||||
|
||||
@@ -397,6 +401,9 @@
|
||||
oldInOutItem = rowsdata.name;
|
||||
$('#inOutItemDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui/themes/icons/pencil.png"/> 编辑收支项目');
|
||||
$(".window-mask").css({width: webW, height: webH});
|
||||
if(!isShowOpFun()){
|
||||
$("#saveInOutItem").hide();
|
||||
}
|
||||
$('#inOutItemFM').form('load', row);
|
||||
inOutItemID = rowsdata.id;
|
||||
url = '/inOutItem/update?id=' + rowsdata.id;
|
||||
|
||||
@@ -142,6 +142,7 @@
|
||||
}
|
||||
],
|
||||
});
|
||||
toolbarStatus();
|
||||
$('#tableData').prev('.datagrid-view2').find(".datagrid-body").append("<ul id='tt'><ul>");
|
||||
$('#tt').tree({
|
||||
url: '/organization/getOrganizationTree?id='+id,
|
||||
|
||||
@@ -121,10 +121,13 @@
|
||||
columns: [[
|
||||
{field: 'id', width: 35, align: "center", checkbox: true},
|
||||
{
|
||||
title: '操作', field: 'op', align: "center", width: 80, formatter: function (value, rec, index) {
|
||||
title: '操作', field: 'op', align: "center", width: 80,
|
||||
formatter: function (value, rec, index) {
|
||||
var str = '';
|
||||
str += '<img src="/js/easyui/themes/icons/pencil.png" style="cursor: pointer;" onclick="editRole(\'' + index + '\');"/> ';
|
||||
str += '<img src="/js/easyui/themes/icons/edit_remove.png" style="cursor: pointer;" onclick="deleteRole(' + rec.id + ');"/>';
|
||||
if(isShowOpFun()) {
|
||||
str += '<img src="/js/easyui/themes/icons/edit_remove.png" style="cursor: pointer;" onclick="deleteRole(' + rec.id + ');"/>';
|
||||
}
|
||||
return str;
|
||||
}
|
||||
},
|
||||
@@ -156,6 +159,7 @@
|
||||
}
|
||||
});
|
||||
dgResize();
|
||||
toolbarStatus();
|
||||
showRoleDetails(1, initPageSize);
|
||||
}
|
||||
|
||||
@@ -326,6 +330,9 @@
|
||||
oldName = rowsdata.name;
|
||||
$('#roleDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui/themes/icons/pencil.png"/> 编辑角色信息');
|
||||
$(".window-mask").css({width: webW, height: webH});
|
||||
if(!isShowOpFun()){
|
||||
$("#saveRole").hide();
|
||||
}
|
||||
roleID = rowsdata.id;
|
||||
url = '/role/update?id=' + rowsdata.id;
|
||||
}
|
||||
|
||||
@@ -201,20 +201,13 @@
|
||||
{field: 'depotheadId', hidden: true},
|
||||
{field: 'depotHeadType', hidden: true},
|
||||
{
|
||||
title: '操作', field: 'op', align: "center", width: 60, formatter: function (value, rec,index) {
|
||||
title: '操作', field: 'op', align: "center", width: 60,
|
||||
formatter: function (value, rec,index) {
|
||||
var str = '';
|
||||
/**
|
||||
* create by: qiankunpingtai
|
||||
* create time: 2019/3/21 11:23
|
||||
* website:https://qiankunpingtai.cn
|
||||
* description:
|
||||
* 对于每次拼接字符串作为参数传递
|
||||
* 再对字符串分解获取数据的方式,个人感觉效率不是很高,实现也不优雅
|
||||
* 在此使用传递index,然后根据index获取数据的方式替代
|
||||
*
|
||||
*/
|
||||
str += '<img title="编辑" src="/js/easyui/themes/icons/pencil.png" style="cursor: pointer;" onclick="editSerialNumber(\'' + index + '\');"/> ';
|
||||
str += '<img title="删除" src="/js/easyui/themes/icons/edit_remove.png" style="cursor: pointer;" onclick="deleteSerialNumber(' + rec.id + ');"/>';
|
||||
if(isShowOpFun()) {
|
||||
str += '<img title="删除" src="/js/easyui/themes/icons/edit_remove.png" style="cursor: pointer;" onclick="deleteSerialNumber(' + rec.id + ');"/>';
|
||||
}
|
||||
return str;
|
||||
}
|
||||
},
|
||||
@@ -271,6 +264,7 @@
|
||||
}
|
||||
});
|
||||
dgResize();
|
||||
toolbarStatus();
|
||||
showSerialNumberDetails(1, initPageSize);
|
||||
}
|
||||
//分页信息处理
|
||||
@@ -481,6 +475,9 @@
|
||||
$("#remark").textbox("setValue", rowsdata.remark);
|
||||
$('#serialNumberDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui/themes/icons/pencil.png"/> 编辑序列号信息');
|
||||
$(".window-mask").css({width: webW, height: webH});
|
||||
if(!isShowOpFun()){
|
||||
$("#saveSerialNumber").hide();
|
||||
}
|
||||
//选中基本资料tab
|
||||
$("#serialNumberFM #tt .tabs li").first().click();
|
||||
url = '/serialNumber/updateSerialNumber';
|
||||
|
||||
@@ -147,7 +147,9 @@
|
||||
formatter: function (value, rec, index) {
|
||||
var str = '';
|
||||
str += '<img src="/js/easyui/themes/icons/pencil.png" style="cursor: pointer;" onclick="editSystemConfig(\'' + index + '\');"/> ';
|
||||
str += '<img src="/js/easyui/themes/icons/edit_remove.png" style="cursor: pointer;" onclick="deleteSystemConfig(' + rec.id + ');"/>';
|
||||
if(isShowOpFun()) {
|
||||
str += '<img src="/js/easyui/themes/icons/edit_remove.png" style="cursor: pointer;" onclick="deleteSystemConfig(' + rec.id + ');"/>';
|
||||
}
|
||||
return str;
|
||||
}
|
||||
},
|
||||
@@ -200,6 +202,7 @@
|
||||
}
|
||||
});
|
||||
dgResize();
|
||||
toolbarStatus();
|
||||
showSystemConfigDetails(1, initPageSize);
|
||||
}
|
||||
|
||||
@@ -403,6 +406,9 @@
|
||||
oldCompanyName = res.companyName;
|
||||
$('#systemConfigDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui/themes/icons/pencil.png"/> 编辑系统配置信息');
|
||||
$(".window-mask").css({width: webW, height: webH});
|
||||
if(!isShowOpFun()){
|
||||
$("#saveSystemConfig").hide();
|
||||
}
|
||||
$('#systemConfigFM').form('load', row);
|
||||
systemConfigId = res.id;
|
||||
$("#depotFlag").attr("checked", res.depotFlag == '1' ? true : false);
|
||||
|
||||
@@ -114,7 +114,9 @@
|
||||
formatter: function (value, rec, index) {
|
||||
var str = '';
|
||||
str += '<img title="编辑" src="/js/easyui/themes/icons/pencil.png" style="cursor: pointer;" onclick="editUnit(\'' + index + '\');"/> ';
|
||||
str += '<img title="删除" src="/js/easyui/themes/icons/edit_remove.png" style="cursor: pointer;" onclick="deleteUnit(' + rec.id + ');"/>';
|
||||
if(isShowOpFun()) {
|
||||
str += '<img title="删除" src="/js/easyui/themes/icons/edit_remove.png" style="cursor: pointer;" onclick="deleteUnit(' + rec.id + ');"/>';
|
||||
}
|
||||
return str;
|
||||
}
|
||||
},
|
||||
@@ -144,6 +146,7 @@
|
||||
}
|
||||
});
|
||||
dgResize();
|
||||
toolbarStatus();
|
||||
showUnitDetails(1, initPageSize);
|
||||
}
|
||||
|
||||
@@ -385,6 +388,9 @@
|
||||
oldUnit = rowsdata.uname;
|
||||
$('#unitDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui/themes/icons/pencil.png"/> 编辑计量单位');
|
||||
$(".window-mask").css({width: webW, height: webH});
|
||||
if(!isShowOpFun()){
|
||||
$("#saveUnit").hide();
|
||||
}
|
||||
unitID = rowsdata.id;
|
||||
$("#basicName").textbox("setValue", rowsdata.basicUnit);
|
||||
$("#otherName").textbox("setValue", rowsdata.otherUnit);
|
||||
|
||||
@@ -172,16 +172,18 @@
|
||||
columns: [[
|
||||
{field: 'id', width: 35, align: "center", checkbox:true},
|
||||
{
|
||||
title: '操作', field: 'isystem', align: "center", width: 80, formatter: function (value, rec, index) {
|
||||
title: '操作', field: 'isystem', align: "center", width: 80,
|
||||
formatter: function (value, rec, index) {
|
||||
var str = '';
|
||||
if(rec.loginName != "jsh") {
|
||||
str += '<img src="/js/easyui/themes/icons/pencil.png" style="cursor: pointer;" onclick="editUser(\'' + index + '\');"/> ';
|
||||
}
|
||||
if (rec.id != rec.tenantId && rec.loginName != "admin") {
|
||||
str += '<img src="/js/easyui/themes/icons/edit_remove.png" style="cursor: pointer;" onclick="deleteUser(' + rec.id + ');"/>';
|
||||
}
|
||||
else {
|
||||
str += '';
|
||||
if(isShowOpFun()) {
|
||||
if (rec.id != rec.tenantId && rec.loginName != "admin") {
|
||||
str += '<img src="/js/easyui/themes/icons/edit_remove.png" style="cursor: pointer;" onclick="deleteUser(' + rec.id + ');"/>';
|
||||
} else {
|
||||
str += '';
|
||||
}
|
||||
}
|
||||
return str;
|
||||
}
|
||||
@@ -233,6 +235,7 @@
|
||||
}
|
||||
});
|
||||
dgResize();
|
||||
toolbarStatus();
|
||||
showUserDetails(1, initPageSize);
|
||||
}
|
||||
|
||||
@@ -469,6 +472,9 @@
|
||||
};
|
||||
$('#userDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui/themes/icons/pencil.png"/> 编辑用户信息');
|
||||
$(".window-mask").css({width: webW, height: webH});
|
||||
if(!isShowOpFun()){
|
||||
$("#saveusername").hide();
|
||||
}
|
||||
$('#usernameFM').form('load', row);
|
||||
userID = rowsdata.id;
|
||||
//焦点在名称输入框==定焦在输入文字后面
|
||||
|
||||
@@ -402,10 +402,13 @@
|
||||
columns: [[
|
||||
{field: 'id', width: 35, align: "center", checkbox: true},
|
||||
{
|
||||
title: '操作', field: 'op', align: "center", width: 60, formatter: function (value, rec, index) {
|
||||
title: '操作', field: 'op', align: "center", width: 60,
|
||||
formatter: function (value, rec, index) {
|
||||
var str = '';
|
||||
str += '<img title="编辑" src="/js/easyui/themes/icons/pencil.png" style="cursor: pointer;" onclick="editMaterial(\'' + index + '\');"/> ';
|
||||
str += '<img title="删除" src="/js/easyui/themes/icons/edit_remove.png" style="cursor: pointer;" onclick="deleteMaterial(' + rec.id + ');"/>';
|
||||
if(isShowOpFun()) {
|
||||
str += '<img title="删除" src="/js/easyui/themes/icons/edit_remove.png" style="cursor: pointer;" onclick="deleteMaterial(' + rec.id + ');"/>';
|
||||
}
|
||||
return str;
|
||||
}
|
||||
},
|
||||
@@ -508,6 +511,7 @@
|
||||
}
|
||||
});
|
||||
dgResize();
|
||||
toolbarStatus();
|
||||
showMaterialDetails(1, initPageSize);
|
||||
}
|
||||
|
||||
@@ -1262,6 +1266,9 @@
|
||||
oldManyUnit = rowsdata.unitId;
|
||||
$('#materialDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui/themes/icons/pencil.png"/> 编辑商品信息');
|
||||
$(".window-mask").css({width: webW, height: webH});
|
||||
if(!isShowOpFun()){
|
||||
$("#saveMaterial").hide();
|
||||
}
|
||||
materialID = rowsdata.id;
|
||||
//焦点在名称输入框==定焦在输入文字后面
|
||||
$("#Name").val("").focus().val(rowsdata.name);
|
||||
|
||||
@@ -109,6 +109,7 @@
|
||||
}
|
||||
],
|
||||
});
|
||||
toolbarStatus();
|
||||
$('#tableData').prev('.datagrid-view2').find(".datagrid-body").append("<ul id='tt'><ul>");
|
||||
$('#tt').tree({
|
||||
url: '/materialCategory/getMaterialCategoryTree?id='+id,
|
||||
|
||||
@@ -126,7 +126,9 @@
|
||||
title: '操作', field: 'op', align: "center", width: 130, formatter: function (value, rec, index) {
|
||||
var str = '';
|
||||
str += '<img src="/js/easyui/themes/icons/pencil.png" style="cursor: pointer;" onclick="editPerson(\'' + index + '\');"/> <a onclick="editPerson(\'' + index + '\');" style="text-decoration:none;color:black;" href="javascript:void(0)">编辑</a> ';
|
||||
str += '<img src="/js/easyui/themes/icons/edit_remove.png" style="cursor: pointer;" onclick="deletePerson(' + rec.id + ');"/> <a onclick="deletePerson(' + rec.id + ');" style="text-decoration:none;color:black;" href="javascript:void(0)">删除</a> ';
|
||||
if(isShowOpFun()) {
|
||||
str += '<img src="/js/easyui/themes/icons/edit_remove.png" style="cursor: pointer;" onclick="deletePerson(' + rec.id + ');"/> <a onclick="deletePerson(' + rec.id + ');" style="text-decoration:none;color:black;" href="javascript:void(0)">删除</a> ';
|
||||
}
|
||||
return str;
|
||||
}
|
||||
}
|
||||
@@ -155,6 +157,7 @@
|
||||
}
|
||||
});
|
||||
dgResize();
|
||||
toolbarStatus();
|
||||
showPersonDetails(1, initPageSize);
|
||||
}
|
||||
|
||||
@@ -383,6 +386,9 @@
|
||||
$("#Type").combobox("setValue", rowsdata.type);
|
||||
$('#personDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui/themes/icons/pencil.png"/> 编辑经手人信息');
|
||||
$(".window-mask").css({width: webW, height: webH});
|
||||
if(!isShowOpFun()){
|
||||
$("#savePerson").hide();
|
||||
}
|
||||
personID = rowsdata.id;
|
||||
url = '/person/update?id=' + rowsdata.id;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user