From 957583e54eb58fffaf536236c39acb70f7030591 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=AD=A3=E5=9C=A3=E5=8D=8E?= <752718920@qq.com>
Date: Fri, 4 Sep 2020 23:50:40 +0800
Subject: [PATCH] =?UTF-8?q?=E5=AF=B9=E9=A1=B5=E9=9D=A2=E7=9A=84=E6=8C=89?=
=?UTF-8?q?=E9=92=AE=E8=BF=9B=E8=A1=8C=E6=9D=83=E9=99=90=E6=8E=A7=E5=88=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
erp_web/js/common/common.js | 25 +++++++++++++++++++
erp_web/js/modules/sys/menu.js | 2 +-
erp_web/js/pages/financial/financial_base.js | 7 ++++--
erp_web/js/pages/manage/supplier.js | 8 +++++-
erp_web/js/pages/materials/in_out.js | 11 +++++---
erp_web/pages/manage/account.html | 11 ++++++--
erp_web/pages/manage/depot.html | 8 +++++-
erp_web/pages/manage/functions.html | 11 ++++++--
erp_web/pages/manage/inOutItem.html | 11 ++++++--
erp_web/pages/manage/organization.html | 1 +
erp_web/pages/manage/role.html | 11 ++++++--
erp_web/pages/manage/serialNumber.html | 21 +++++++---------
erp_web/pages/manage/systemConfig.html | 8 +++++-
erp_web/pages/manage/unit.html | 8 +++++-
erp_web/pages/manage/user.html | 18 ++++++++-----
erp_web/pages/materials/material.html | 11 ++++++--
erp_web/pages/materials/materialcategory.html | 1 +
erp_web/pages/materials/person.html | 8 +++++-
18 files changed, 141 insertions(+), 40 deletions(-)
diff --git a/erp_web/js/common/common.js b/erp_web/js/common/common.js
index ff31bef0..29ba0be5 100644
--- a/erp_web/js/common/common.js
+++ b/erp_web/js/common/common.js
@@ -222,6 +222,31 @@
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”
*/
diff --git a/erp_web/js/modules/sys/menu.js b/erp_web/js/modules/sys/menu.js
index 0a2d0208..dde04f54 100644
--- a/erp_web/js/modules/sys/menu.js
+++ b/erp_web/js/modules/sys/menu.js
@@ -43,7 +43,7 @@ function initSelectInfo(lei) {
//按钮权限列表
else if (lei == 3) {
var btnStr = userBusinessList[0].btnStr;
- if (btnStr != null) {
+ if (btnStr != null && btnStr !="") {
var btnObj = JSON.parse(btnStr);
for (var j = 0; j < btnObj.length; j++) {
btnStrList.push(btnObj[j]);
diff --git a/erp_web/js/pages/financial/financial_base.js b/erp_web/js/pages/financial/financial_base.js
index 444e1d7e..e12810dc 100644
--- a/erp_web/js/pages/financial/financial_base.js
+++ b/erp_web/js/pages/financial/financial_base.js
@@ -233,8 +233,10 @@
var str = '';
var orgId = rec.organId ? rec.organId : 0;
str += '
';
- str += '
';
- str += '
';
+ if(isShowOpFun()) {
+ str += '
';
+ str += '
';
+ }
return str;
}
},
@@ -273,6 +275,7 @@
}
});
dgResize();
+ toolbarStatus();
}
//初始化表格数据-明细列表-编辑状态
diff --git a/erp_web/js/pages/manage/supplier.js b/erp_web/js/pages/manage/supplier.js
index 45fe8b52..fd34c947 100644
--- a/erp_web/js/pages/manage/supplier.js
+++ b/erp_web/js/pages/manage/supplier.js
@@ -61,7 +61,9 @@
formatter:function(value,rec,index) {
var str = '';
str += '
';
- str += '
';
+ if(isShowOpFun()) {
+ str += '
';
+ }
return str;
}
},
@@ -137,6 +139,7 @@
}
});
dgResize();
+ toolbarStatus();
showSupplierDetails(1,initPageSize);
}
@@ -582,6 +585,9 @@
oldSupplier = res.supplier;
$('#supplierDlg').dialog('open').dialog('setTitle','
编辑'+listType +"信息");
$(".window-mask").css({ width: webW ,height: webH});
+ if(!isShowOpFun()){
+ $("#saveSupplier").hide();
+ }
$('#supplierFM').form('load',row);
supplierID = sId;
//焦点在名称输入框==定焦在输入文字后面
diff --git a/erp_web/js/pages/materials/in_out.js b/erp_web/js/pages/materials/in_out.js
index 668b2f79..e5751040 100644
--- a/erp_web/js/pages/materials/in_out.js
+++ b/erp_web/js/pages/materials/in_out.js
@@ -448,14 +448,16 @@
pageList: initPageNum,
columns:[[
{ 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) {
var str = '';
var orgId = rec.organId? rec.organId:0;
str += '
';
- str += '
';
- str += '
';
- if(isShowSkip) {
+ if(isShowOpFun()){
+ str += '
';
+ str += '
';
+ }
+ if(isShowSkip) {
str += '
';
}
return str;
@@ -507,6 +509,7 @@
}
});
dgResize();
+ toolbarStatus();
}
//查找库存的方法
function findStockNumById(depotId, meId, monthTime, body, input, ratio, type){
diff --git a/erp_web/pages/manage/account.html b/erp_web/pages/manage/account.html
index ff8b1cf0..3215ffb6 100644
--- a/erp_web/pages/manage/account.html
+++ b/erp_web/pages/manage/account.html
@@ -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 += '
流水 ';
str += '
编辑 ';
- str += '
删除 ';
+ if(isShowOpFun()){
+ str += '
删除 ';
+ }
return str;
}
}
@@ -181,6 +184,7 @@
}
});
dgResize();
+ toolbarStatus();
showAccountDetails(1, initPageSize);
}
@@ -464,6 +468,9 @@
oldAccount = rowsdata.name;
$('#accountDlg').dialog('open').dialog('setTitle', '
编辑结算账户');
$(".window-mask").css({width: webW, height: webH});
+ if(!isShowOpFun()){
+ $("#saveAccount").hide();
+ }
accountID = rowsdata.id;
url = '/account/update?id=' + rowsdata.id;
}
diff --git a/erp_web/pages/manage/depot.html b/erp_web/pages/manage/depot.html
index c1299f6e..cf2698b7 100644
--- a/erp_web/pages/manage/depot.html
+++ b/erp_web/pages/manage/depot.html
@@ -166,7 +166,9 @@
formatter: function (value, rec, index) {
var str = '';
str += '
';
- str += '
';
+ if(isShowOpFun()) {
+ str += '
';
+ }
return str;
}
},
@@ -222,6 +224,7 @@
}
});
dgResize();
+ toolbarStatus();
showDepotDetails(1, initPageSize);
}
@@ -503,6 +506,9 @@
oldDepot = rowsdata.name;
$('#depotDlg').dialog('open').dialog('setTitle', '
编辑仓库信息');
$(".window-mask").css({width: webW, height: webH});
+ if(!isShowOpFun()){
+ $("#saveDepot").hide();
+ }
depotID = rowsdata.id;
url = '/depot/update?id=' + rowsdata.id;
}
diff --git a/erp_web/pages/manage/functions.html b/erp_web/pages/manage/functions.html
index ced05efa..9feefead 100644
--- a/erp_web/pages/manage/functions.html
+++ b/erp_web/pages/manage/functions.html
@@ -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 += '
编辑 ';
- str += '
删除 ';
+ if(isShowOpFun()) {
+ str += '
删除 ';
+ }
return str;
}
}
@@ -195,6 +198,7 @@
}
});
dgResize();
+ toolbarStatus();
showFunctionsDetails(1, initPageSize);
}
@@ -408,6 +412,9 @@
oldFunctions = rowsdata.name;
$('#functionsDlg').dialog('open').dialog('setTitle', '
编辑功能信息');
$(".window-mask").css({width: webW, height: webH});
+ if(!isShowOpFun()){
+ $("#saveFunctions").hide();
+ }
functionsID = rowsdata.id;
//焦点在名称输入框==定焦在输入文字后面
$("#Name").val("").focus().val(rowsdata.name);
diff --git a/erp_web/pages/manage/inOutItem.html b/erp_web/pages/manage/inOutItem.html
index 5c157037..59368053 100644
--- a/erp_web/pages/manage/inOutItem.html
+++ b/erp_web/pages/manage/inOutItem.html
@@ -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 += '
编辑 ';
- str += '
删除 ';
+ if(isShowOpFun()) {
+ str += '
删除 ';
+ }
return str;
}
}
@@ -158,6 +161,7 @@
}
});
dgResize();
+ toolbarStatus();
showInOutItemDetails(1, initPageSize);
}
@@ -397,6 +401,9 @@
oldInOutItem = rowsdata.name;
$('#inOutItemDlg').dialog('open').dialog('setTitle', '
编辑收支项目');
$(".window-mask").css({width: webW, height: webH});
+ if(!isShowOpFun()){
+ $("#saveInOutItem").hide();
+ }
$('#inOutItemFM').form('load', row);
inOutItemID = rowsdata.id;
url = '/inOutItem/update?id=' + rowsdata.id;
diff --git a/erp_web/pages/manage/organization.html b/erp_web/pages/manage/organization.html
index 60a707af..0152ea00 100644
--- a/erp_web/pages/manage/organization.html
+++ b/erp_web/pages/manage/organization.html
@@ -142,6 +142,7 @@
}
],
});
+ toolbarStatus();
$('#tableData').prev('.datagrid-view2').find(".datagrid-body").append("