对页面的按钮进行权限控制
This commit is contained in:
@@ -222,6 +222,31 @@
|
|||||||
return btnEnableList;
|
return btnEnableList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 判断datagrid是否显示操作列
|
||||||
|
* @returns {boolean}
|
||||||
|
*/
|
||||||
|
function isShowOpFun() {
|
||||||
|
var btnStr = getBtnStr();
|
||||||
|
var isShowOp = false;
|
||||||
|
if(btnStr && btnStr.indexOf(1)>-1){
|
||||||
|
isShowOp = true; //显示
|
||||||
|
}
|
||||||
|
return isShowOp;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工具栏显示与否
|
||||||
|
*/
|
||||||
|
function toolbarStatus() {
|
||||||
|
var btnStr = getBtnStr();
|
||||||
|
if(btnStr && btnStr.indexOf(1)>-1) {
|
||||||
|
$(".datagrid-toolbar").show();
|
||||||
|
} else {
|
||||||
|
$(".datagrid-toolbar").remove();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* js获取当前时间, 格式“yyyy-MM-dd HH:MM:SS”
|
* js获取当前时间, 格式“yyyy-MM-dd HH:MM:SS”
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ function initSelectInfo(lei) {
|
|||||||
//按钮权限列表
|
//按钮权限列表
|
||||||
else if (lei == 3) {
|
else if (lei == 3) {
|
||||||
var btnStr = userBusinessList[0].btnStr;
|
var btnStr = userBusinessList[0].btnStr;
|
||||||
if (btnStr != null) {
|
if (btnStr != null && btnStr !="") {
|
||||||
var btnObj = JSON.parse(btnStr);
|
var btnObj = JSON.parse(btnStr);
|
||||||
for (var j = 0; j < btnObj.length; j++) {
|
for (var j = 0; j < btnObj.length; j++) {
|
||||||
btnStrList.push(btnObj[j]);
|
btnStrList.push(btnObj[j]);
|
||||||
|
|||||||
@@ -233,8 +233,10 @@
|
|||||||
var str = '';
|
var str = '';
|
||||||
var orgId = rec.organId ? rec.organId : 0;
|
var orgId = rec.organId ? rec.organId : 0;
|
||||||
str += '<img title="查看" src="/js/easyui/themes/icons/list.png" style="cursor: pointer;" onclick="showAccountHead(\'' + index + '\');"/> ';
|
str += '<img title="查看" src="/js/easyui/themes/icons/list.png" style="cursor: pointer;" onclick="showAccountHead(\'' + index + '\');"/> ';
|
||||||
str += '<img title="编辑" src="/js/easyui/themes/icons/pencil.png" style="cursor: pointer;" onclick="editAccountHead(\'' + index + '\');"/> ';
|
if(isShowOpFun()) {
|
||||||
str += '<img title="删除" src="/js/easyui/themes/icons/edit_remove.png" style="cursor: pointer;" onclick="deleteAccountHead('+ rec.id +',' + orgId +',' + rec.totalprice + ');"/>';
|
str += '<img title="编辑" src="/js/easyui/themes/icons/pencil.png" style="cursor: pointer;" onclick="editAccountHead(\'' + index + '\');"/> ';
|
||||||
|
str += '<img title="删除" src="/js/easyui/themes/icons/edit_remove.png" style="cursor: pointer;" onclick="deleteAccountHead(' + rec.id + ',' + orgId + ',' + rec.totalprice + ');"/>';
|
||||||
|
}
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -273,6 +275,7 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
dgResize();
|
dgResize();
|
||||||
|
toolbarStatus();
|
||||||
}
|
}
|
||||||
|
|
||||||
//初始化表格数据-明细列表-编辑状态
|
//初始化表格数据-明细列表-编辑状态
|
||||||
|
|||||||
@@ -61,7 +61,9 @@
|
|||||||
formatter:function(value,rec,index) {
|
formatter:function(value,rec,index) {
|
||||||
var str = '';
|
var str = '';
|
||||||
str += '<img title="编辑" src="/js/easyui/themes/icons/pencil.png" style="cursor: pointer;" onclick="editSupplier(\'' + index + '\');"/> ';
|
str += '<img title="编辑" src="/js/easyui/themes/icons/pencil.png" style="cursor: pointer;" onclick="editSupplier(\'' + index + '\');"/> ';
|
||||||
str += '<img title="删除" src="/js/easyui/themes/icons/edit_remove.png" style="cursor: pointer;" onclick="deleteSupplier(\'' + rec.id + '\');"/>';
|
if(isShowOpFun()) {
|
||||||
|
str += '<img title="删除" src="/js/easyui/themes/icons/edit_remove.png" style="cursor: pointer;" onclick="deleteSupplier(\'' + rec.id + '\');"/>';
|
||||||
|
}
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -137,6 +139,7 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
dgResize();
|
dgResize();
|
||||||
|
toolbarStatus();
|
||||||
showSupplierDetails(1,initPageSize);
|
showSupplierDetails(1,initPageSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -582,6 +585,9 @@
|
|||||||
oldSupplier = res.supplier;
|
oldSupplier = res.supplier;
|
||||||
$('#supplierDlg').dialog('open').dialog('setTitle','<img src="/js/easyui/themes/icons/pencil.png"/> 编辑'+listType +"信息");
|
$('#supplierDlg').dialog('open').dialog('setTitle','<img src="/js/easyui/themes/icons/pencil.png"/> 编辑'+listType +"信息");
|
||||||
$(".window-mask").css({ width: webW ,height: webH});
|
$(".window-mask").css({ width: webW ,height: webH});
|
||||||
|
if(!isShowOpFun()){
|
||||||
|
$("#saveSupplier").hide();
|
||||||
|
}
|
||||||
$('#supplierFM').form('load',row);
|
$('#supplierFM').form('load',row);
|
||||||
supplierID = sId;
|
supplierID = sId;
|
||||||
//焦点在名称输入框==定焦在输入文字后面
|
//焦点在名称输入框==定焦在输入文字后面
|
||||||
|
|||||||
@@ -448,14 +448,16 @@
|
|||||||
pageList: initPageNum,
|
pageList: initPageNum,
|
||||||
columns:[[
|
columns:[[
|
||||||
{ field: 'id',width:35,align:"center",checkbox:true},
|
{ field: 'id',width:35,align:"center",checkbox:true},
|
||||||
{ title: '操作',field: 'op',align:"center",width:opWidth,
|
{ title: '操作',field: 'op',align:"center", width:opWidth,
|
||||||
formatter:function(value,rec,index) {
|
formatter:function(value,rec,index) {
|
||||||
var str = '';
|
var str = '';
|
||||||
var orgId = rec.organId? rec.organId:0;
|
var orgId = rec.organId? rec.organId:0;
|
||||||
str += '<img title="查看" src="/js/easyui/themes/icons/list.png" style="cursor: pointer;" onclick="showDepotHead(\'' + index + '\');"/> ';
|
str += '<img title="查看" src="/js/easyui/themes/icons/list.png" style="cursor: pointer;" onclick="showDepotHead(\'' + index + '\');"/> ';
|
||||||
str += '<img title="编辑" src="/js/easyui/themes/icons/pencil.png" style="cursor: pointer;" onclick="editDepotHead(\'' + index + '\');"/> ';
|
if(isShowOpFun()){
|
||||||
str += '<img title="删除" src="/js/easyui/themes/icons/edit_remove.png" style="cursor: pointer;" onclick="deleteDepotHead('+ rec.id +',' + orgId +',' + rec.totalPrice+',' + rec.status + ');"/>';
|
str += '<img title="编辑" src="/js/easyui/themes/icons/pencil.png" style="cursor: pointer;" onclick="editDepotHead(\'' + index + '\');"/> ';
|
||||||
if(isShowSkip) {
|
str += '<img title="删除" src="/js/easyui/themes/icons/edit_remove.png" style="cursor: pointer;" onclick="deleteDepotHead('+ rec.id +',' + orgId +',' + rec.totalPrice+',' + rec.status + ');"/>';
|
||||||
|
}
|
||||||
|
if(isShowSkip) {
|
||||||
str += ' <img title="' + opTitle + '" src="/js/easyui/themes/icons/redo.png" style="cursor: pointer;" onclick="skipDepotHead(\'' + index + '\');"/>';
|
str += ' <img title="' + opTitle + '" src="/js/easyui/themes/icons/redo.png" style="cursor: pointer;" onclick="skipDepotHead(\'' + index + '\');"/>';
|
||||||
}
|
}
|
||||||
return str;
|
return str;
|
||||||
@@ -507,6 +509,7 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
dgResize();
|
dgResize();
|
||||||
|
toolbarStatus();
|
||||||
}
|
}
|
||||||
//查找库存的方法
|
//查找库存的方法
|
||||||
function findStockNumById(depotId, meId, monthTime, body, input, ratio, type){
|
function findStockNumById(depotId, meId, monthTime, body, input, ratio, type){
|
||||||
|
|||||||
@@ -140,11 +140,14 @@
|
|||||||
},
|
},
|
||||||
{title: '备注', field: 'remark', width: 100},
|
{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 = '';
|
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/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/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;
|
return str;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -181,6 +184,7 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
dgResize();
|
dgResize();
|
||||||
|
toolbarStatus();
|
||||||
showAccountDetails(1, initPageSize);
|
showAccountDetails(1, initPageSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -464,6 +468,9 @@
|
|||||||
oldAccount = rowsdata.name;
|
oldAccount = rowsdata.name;
|
||||||
$('#accountDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui/themes/icons/pencil.png"/> 编辑结算账户');
|
$('#accountDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui/themes/icons/pencil.png"/> 编辑结算账户');
|
||||||
$(".window-mask").css({width: webW, height: webH});
|
$(".window-mask").css({width: webW, height: webH});
|
||||||
|
if(!isShowOpFun()){
|
||||||
|
$("#saveAccount").hide();
|
||||||
|
}
|
||||||
accountID = rowsdata.id;
|
accountID = rowsdata.id;
|
||||||
url = '/account/update?id=' + rowsdata.id;
|
url = '/account/update?id=' + rowsdata.id;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -166,7 +166,9 @@
|
|||||||
formatter: function (value, rec, index) {
|
formatter: function (value, rec, index) {
|
||||||
var str = '';
|
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/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;
|
return str;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -222,6 +224,7 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
dgResize();
|
dgResize();
|
||||||
|
toolbarStatus();
|
||||||
showDepotDetails(1, initPageSize);
|
showDepotDetails(1, initPageSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -503,6 +506,9 @@
|
|||||||
oldDepot = rowsdata.name;
|
oldDepot = rowsdata.name;
|
||||||
$('#depotDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui/themes/icons/pencil.png"/> 编辑仓库信息');
|
$('#depotDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui/themes/icons/pencil.png"/> 编辑仓库信息');
|
||||||
$(".window-mask").css({width: webW, height: webH});
|
$(".window-mask").css({width: webW, height: webH});
|
||||||
|
if(!isShowOpFun()){
|
||||||
|
$("#saveDepot").hide();
|
||||||
|
}
|
||||||
depotID = rowsdata.id;
|
depotID = rowsdata.id;
|
||||||
url = '/depot/update?id=' + rowsdata.id;
|
url = '/depot/update?id=' + rowsdata.id;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -163,10 +163,13 @@
|
|||||||
},
|
},
|
||||||
{title: '图标', field: 'icon', width: 110},
|
{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 = '';
|
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/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;
|
return str;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -195,6 +198,7 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
dgResize();
|
dgResize();
|
||||||
|
toolbarStatus();
|
||||||
showFunctionsDetails(1, initPageSize);
|
showFunctionsDetails(1, initPageSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -408,6 +412,9 @@
|
|||||||
oldFunctions = rowsdata.name;
|
oldFunctions = rowsdata.name;
|
||||||
$('#functionsDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui/themes/icons/pencil.png"/> 编辑功能信息');
|
$('#functionsDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui/themes/icons/pencil.png"/> 编辑功能信息');
|
||||||
$(".window-mask").css({width: webW, height: webH});
|
$(".window-mask").css({width: webW, height: webH});
|
||||||
|
if(!isShowOpFun()){
|
||||||
|
$("#saveFunctions").hide();
|
||||||
|
}
|
||||||
functionsID = rowsdata.id;
|
functionsID = rowsdata.id;
|
||||||
//焦点在名称输入框==定焦在输入文字后面
|
//焦点在名称输入框==定焦在输入文字后面
|
||||||
$("#Name").val("").focus().val(rowsdata.name);
|
$("#Name").val("").focus().val(rowsdata.name);
|
||||||
|
|||||||
@@ -126,10 +126,13 @@
|
|||||||
{title: '类型', field: 'type', width: 100, align: "center"},
|
{title: '类型', field: 'type', width: 100, align: "center"},
|
||||||
{title: '描述', field: 'remark', width: 200},
|
{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 = '';
|
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/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;
|
return str;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -158,6 +161,7 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
dgResize();
|
dgResize();
|
||||||
|
toolbarStatus();
|
||||||
showInOutItemDetails(1, initPageSize);
|
showInOutItemDetails(1, initPageSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -397,6 +401,9 @@
|
|||||||
oldInOutItem = rowsdata.name;
|
oldInOutItem = rowsdata.name;
|
||||||
$('#inOutItemDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui/themes/icons/pencil.png"/> 编辑收支项目');
|
$('#inOutItemDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui/themes/icons/pencil.png"/> 编辑收支项目');
|
||||||
$(".window-mask").css({width: webW, height: webH});
|
$(".window-mask").css({width: webW, height: webH});
|
||||||
|
if(!isShowOpFun()){
|
||||||
|
$("#saveInOutItem").hide();
|
||||||
|
}
|
||||||
$('#inOutItemFM').form('load', row);
|
$('#inOutItemFM').form('load', row);
|
||||||
inOutItemID = rowsdata.id;
|
inOutItemID = rowsdata.id;
|
||||||
url = '/inOutItem/update?id=' + 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>");
|
$('#tableData').prev('.datagrid-view2').find(".datagrid-body").append("<ul id='tt'><ul>");
|
||||||
$('#tt').tree({
|
$('#tt').tree({
|
||||||
url: '/organization/getOrganizationTree?id='+id,
|
url: '/organization/getOrganizationTree?id='+id,
|
||||||
|
|||||||
@@ -121,10 +121,13 @@
|
|||||||
columns: [[
|
columns: [[
|
||||||
{field: 'id', width: 35, align: "center", checkbox: true},
|
{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 = '';
|
var str = '';
|
||||||
str += '<img src="/js/easyui/themes/icons/pencil.png" style="cursor: pointer;" onclick="editRole(\'' + index + '\');"/> ';
|
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;
|
return str;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -156,6 +159,7 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
dgResize();
|
dgResize();
|
||||||
|
toolbarStatus();
|
||||||
showRoleDetails(1, initPageSize);
|
showRoleDetails(1, initPageSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -326,6 +330,9 @@
|
|||||||
oldName = rowsdata.name;
|
oldName = rowsdata.name;
|
||||||
$('#roleDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui/themes/icons/pencil.png"/> 编辑角色信息');
|
$('#roleDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui/themes/icons/pencil.png"/> 编辑角色信息');
|
||||||
$(".window-mask").css({width: webW, height: webH});
|
$(".window-mask").css({width: webW, height: webH});
|
||||||
|
if(!isShowOpFun()){
|
||||||
|
$("#saveRole").hide();
|
||||||
|
}
|
||||||
roleID = rowsdata.id;
|
roleID = rowsdata.id;
|
||||||
url = '/role/update?id=' + rowsdata.id;
|
url = '/role/update?id=' + rowsdata.id;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -201,20 +201,13 @@
|
|||||||
{field: 'depotheadId', hidden: true},
|
{field: 'depotheadId', hidden: true},
|
||||||
{field: 'depotHeadType', 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 = '';
|
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/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;
|
return str;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -271,6 +264,7 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
dgResize();
|
dgResize();
|
||||||
|
toolbarStatus();
|
||||||
showSerialNumberDetails(1, initPageSize);
|
showSerialNumberDetails(1, initPageSize);
|
||||||
}
|
}
|
||||||
//分页信息处理
|
//分页信息处理
|
||||||
@@ -481,6 +475,9 @@
|
|||||||
$("#remark").textbox("setValue", rowsdata.remark);
|
$("#remark").textbox("setValue", rowsdata.remark);
|
||||||
$('#serialNumberDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui/themes/icons/pencil.png"/> 编辑序列号信息');
|
$('#serialNumberDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui/themes/icons/pencil.png"/> 编辑序列号信息');
|
||||||
$(".window-mask").css({width: webW, height: webH});
|
$(".window-mask").css({width: webW, height: webH});
|
||||||
|
if(!isShowOpFun()){
|
||||||
|
$("#saveSerialNumber").hide();
|
||||||
|
}
|
||||||
//选中基本资料tab
|
//选中基本资料tab
|
||||||
$("#serialNumberFM #tt .tabs li").first().click();
|
$("#serialNumberFM #tt .tabs li").first().click();
|
||||||
url = '/serialNumber/updateSerialNumber';
|
url = '/serialNumber/updateSerialNumber';
|
||||||
|
|||||||
@@ -147,7 +147,9 @@
|
|||||||
formatter: function (value, rec, index) {
|
formatter: function (value, rec, index) {
|
||||||
var str = '';
|
var str = '';
|
||||||
str += '<img src="/js/easyui/themes/icons/pencil.png" style="cursor: pointer;" onclick="editSystemConfig(\'' + index + '\');"/> ';
|
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;
|
return str;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -200,6 +202,7 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
dgResize();
|
dgResize();
|
||||||
|
toolbarStatus();
|
||||||
showSystemConfigDetails(1, initPageSize);
|
showSystemConfigDetails(1, initPageSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -403,6 +406,9 @@
|
|||||||
oldCompanyName = res.companyName;
|
oldCompanyName = res.companyName;
|
||||||
$('#systemConfigDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui/themes/icons/pencil.png"/> 编辑系统配置信息');
|
$('#systemConfigDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui/themes/icons/pencil.png"/> 编辑系统配置信息');
|
||||||
$(".window-mask").css({width: webW, height: webH});
|
$(".window-mask").css({width: webW, height: webH});
|
||||||
|
if(!isShowOpFun()){
|
||||||
|
$("#saveSystemConfig").hide();
|
||||||
|
}
|
||||||
$('#systemConfigFM').form('load', row);
|
$('#systemConfigFM').form('load', row);
|
||||||
systemConfigId = res.id;
|
systemConfigId = res.id;
|
||||||
$("#depotFlag").attr("checked", res.depotFlag == '1' ? true : false);
|
$("#depotFlag").attr("checked", res.depotFlag == '1' ? true : false);
|
||||||
|
|||||||
@@ -114,7 +114,9 @@
|
|||||||
formatter: function (value, rec, index) {
|
formatter: function (value, rec, index) {
|
||||||
var str = '';
|
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/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;
|
return str;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -144,6 +146,7 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
dgResize();
|
dgResize();
|
||||||
|
toolbarStatus();
|
||||||
showUnitDetails(1, initPageSize);
|
showUnitDetails(1, initPageSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -385,6 +388,9 @@
|
|||||||
oldUnit = rowsdata.uname;
|
oldUnit = rowsdata.uname;
|
||||||
$('#unitDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui/themes/icons/pencil.png"/> 编辑计量单位');
|
$('#unitDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui/themes/icons/pencil.png"/> 编辑计量单位');
|
||||||
$(".window-mask").css({width: webW, height: webH});
|
$(".window-mask").css({width: webW, height: webH});
|
||||||
|
if(!isShowOpFun()){
|
||||||
|
$("#saveUnit").hide();
|
||||||
|
}
|
||||||
unitID = rowsdata.id;
|
unitID = rowsdata.id;
|
||||||
$("#basicName").textbox("setValue", rowsdata.basicUnit);
|
$("#basicName").textbox("setValue", rowsdata.basicUnit);
|
||||||
$("#otherName").textbox("setValue", rowsdata.otherUnit);
|
$("#otherName").textbox("setValue", rowsdata.otherUnit);
|
||||||
|
|||||||
@@ -172,16 +172,18 @@
|
|||||||
columns: [[
|
columns: [[
|
||||||
{field: 'id', width: 35, align: "center", checkbox:true},
|
{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 = '';
|
var str = '';
|
||||||
if(rec.loginName != "jsh") {
|
if(rec.loginName != "jsh") {
|
||||||
str += '<img src="/js/easyui/themes/icons/pencil.png" style="cursor: pointer;" onclick="editUser(\'' + index + '\');"/> ';
|
str += '<img src="/js/easyui/themes/icons/pencil.png" style="cursor: pointer;" onclick="editUser(\'' + index + '\');"/> ';
|
||||||
}
|
}
|
||||||
if (rec.id != rec.tenantId && rec.loginName != "admin") {
|
if(isShowOpFun()) {
|
||||||
str += '<img src="/js/easyui/themes/icons/edit_remove.png" style="cursor: pointer;" onclick="deleteUser(' + rec.id + ');"/>';
|
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 {
|
} else {
|
||||||
str += '';
|
str += '';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
@@ -233,6 +235,7 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
dgResize();
|
dgResize();
|
||||||
|
toolbarStatus();
|
||||||
showUserDetails(1, initPageSize);
|
showUserDetails(1, initPageSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -469,6 +472,9 @@
|
|||||||
};
|
};
|
||||||
$('#userDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui/themes/icons/pencil.png"/> 编辑用户信息');
|
$('#userDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui/themes/icons/pencil.png"/> 编辑用户信息');
|
||||||
$(".window-mask").css({width: webW, height: webH});
|
$(".window-mask").css({width: webW, height: webH});
|
||||||
|
if(!isShowOpFun()){
|
||||||
|
$("#saveusername").hide();
|
||||||
|
}
|
||||||
$('#usernameFM').form('load', row);
|
$('#usernameFM').form('load', row);
|
||||||
userID = rowsdata.id;
|
userID = rowsdata.id;
|
||||||
//焦点在名称输入框==定焦在输入文字后面
|
//焦点在名称输入框==定焦在输入文字后面
|
||||||
|
|||||||
@@ -402,10 +402,13 @@
|
|||||||
columns: [[
|
columns: [[
|
||||||
{field: 'id', width: 35, align: "center", checkbox: true},
|
{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 = '';
|
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/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;
|
return str;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -508,6 +511,7 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
dgResize();
|
dgResize();
|
||||||
|
toolbarStatus();
|
||||||
showMaterialDetails(1, initPageSize);
|
showMaterialDetails(1, initPageSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1262,6 +1266,9 @@
|
|||||||
oldManyUnit = rowsdata.unitId;
|
oldManyUnit = rowsdata.unitId;
|
||||||
$('#materialDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui/themes/icons/pencil.png"/> 编辑商品信息');
|
$('#materialDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui/themes/icons/pencil.png"/> 编辑商品信息');
|
||||||
$(".window-mask").css({width: webW, height: webH});
|
$(".window-mask").css({width: webW, height: webH});
|
||||||
|
if(!isShowOpFun()){
|
||||||
|
$("#saveMaterial").hide();
|
||||||
|
}
|
||||||
materialID = rowsdata.id;
|
materialID = rowsdata.id;
|
||||||
//焦点在名称输入框==定焦在输入文字后面
|
//焦点在名称输入框==定焦在输入文字后面
|
||||||
$("#Name").val("").focus().val(rowsdata.name);
|
$("#Name").val("").focus().val(rowsdata.name);
|
||||||
|
|||||||
@@ -109,6 +109,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
toolbarStatus();
|
||||||
$('#tableData').prev('.datagrid-view2').find(".datagrid-body").append("<ul id='tt'><ul>");
|
$('#tableData').prev('.datagrid-view2').find(".datagrid-body").append("<ul id='tt'><ul>");
|
||||||
$('#tt').tree({
|
$('#tt').tree({
|
||||||
url: '/materialCategory/getMaterialCategoryTree?id='+id,
|
url: '/materialCategory/getMaterialCategoryTree?id='+id,
|
||||||
|
|||||||
@@ -126,7 +126,9 @@
|
|||||||
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 = '';
|
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/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;
|
return str;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -155,6 +157,7 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
dgResize();
|
dgResize();
|
||||||
|
toolbarStatus();
|
||||||
showPersonDetails(1, initPageSize);
|
showPersonDetails(1, initPageSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -383,6 +386,9 @@
|
|||||||
$("#Type").combobox("setValue", rowsdata.type);
|
$("#Type").combobox("setValue", rowsdata.type);
|
||||||
$('#personDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui/themes/icons/pencil.png"/> 编辑经手人信息');
|
$('#personDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui/themes/icons/pencil.png"/> 编辑经手人信息');
|
||||||
$(".window-mask").css({width: webW, height: webH});
|
$(".window-mask").css({width: webW, height: webH});
|
||||||
|
if(!isShowOpFun()){
|
||||||
|
$("#savePerson").hide();
|
||||||
|
}
|
||||||
personID = rowsdata.id;
|
personID = rowsdata.id;
|
||||||
url = '/person/update?id=' + rowsdata.id;
|
url = '/person/update?id=' + rowsdata.id;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user