|
@@ -419,22 +419,18 @@ export default {
|
|
|
goodsOption
|
|
|
);
|
|
|
|
|
|
- // 查看是否有admin 权限 没有admin的话按钮都不显示
|
|
|
- if (JSON.parse(localStorage.getItem('saber-userInfo')).content.role_name.indexOf('运营') != -1) {
|
|
|
- this.findObject(this.tableOption.column, "purchaseCost").hide = true;
|
|
|
- this.findObject(this.tableOption.column, "purchaseAmount").hide = true;
|
|
|
+ if (localStorage.getItem("roleName").indexOf('贸易') == -1 && localStorage.getItem("roleName").indexOf('运营') == -1) {
|
|
|
+ this.findObject(this.tableOption.column, "purchaseCost").hide = false;
|
|
|
+ this.findObject(this.tableOption.column, "purchaseCost").showColumn = true;
|
|
|
+ this.findObject(this.tableOption.column, "partsPrice").hide = false;
|
|
|
+ this.findObject(this.tableOption.column, "partsPrice").showColumn = true;
|
|
|
+ this.findObject(this.tableOption.column, "partsCost").hide = false;
|
|
|
+ this.findObject(this.tableOption.column, "partsCost").showColumn = true;
|
|
|
+ this.findObject(this.tableOption.column, "purchaseAmount").hide = false;
|
|
|
+ this.findObject(this.tableOption.column, "purchaseAmount").showColumn = true;
|
|
|
+ this.findObject(this.tableOption.column, "corpName").hide = false;
|
|
|
+ this.findObject(this.tableOption.column, "corpName").showColumn = true;
|
|
|
}
|
|
|
-
|
|
|
- if (localStorage.getItem("roleName") == "贸易") {
|
|
|
- this.findObject(this.tableOption.column, "purchaseCost").hide = true;
|
|
|
- this.findObject(this.tableOption.column, "purchaseCost").showColumn = false;
|
|
|
- this.findObject(this.tableOption.column, "partsCost").hide = true;
|
|
|
- this.findObject(this.tableOption.column, "partsCost").showColumn = false;
|
|
|
- this.findObject(this.tableOption.column, "purchaseAmount").hide = true;
|
|
|
- this.findObject(this.tableOption.column, "purchaseAmount").showColumn = false;
|
|
|
- this.findObject(this.tableOption.column, "corpName").hide = true;
|
|
|
- this.findObject(this.tableOption.column, "corpName").showColumn = false;
|
|
|
- }
|
|
|
this.getWorkDicts("Thread").then(res => {
|
|
|
this.ThreadList = res.data.data;
|
|
|
});
|
|
@@ -1327,16 +1323,18 @@ export default {
|
|
|
this.getColumnName(5.1),
|
|
|
this.tableOption
|
|
|
);
|
|
|
- if (localStorage.getItem("roleName") == "贸易") {
|
|
|
- this.findObject(this.tableOption.column, "purchaseCost").hide = true;
|
|
|
- this.findObject(this.tableOption.column, "purchaseCost").showColumn = false;
|
|
|
- this.findObject(this.tableOption.column, "partsCost").hide = true;
|
|
|
- this.findObject(this.tableOption.column, "partsCost").showColumn = false;
|
|
|
- this.findObject(this.tableOption.column, "purchaseAmount").hide = true;
|
|
|
- this.findObject(this.tableOption.column, "purchaseAmount").showColumn = false;
|
|
|
- this.findObject(this.tableOption.column, "corpName").hide = true;
|
|
|
- this.findObject(this.tableOption.column, "corpName").showColumn = false;
|
|
|
- }
|
|
|
+ if (localStorage.getItem("roleName").indexOf('贸易') == -1 && localStorage.getItem("roleName").indexOf('运营') == -1) {
|
|
|
+ this.findObject(this.tableOption.column, "purchaseCost").hide = false;
|
|
|
+ this.findObject(this.tableOption.column, "purchaseCost").showColumn = true;
|
|
|
+ this.findObject(this.tableOption.column, "partsPrice").hide = false;
|
|
|
+ this.findObject(this.tableOption.column, "partsPrice").showColumn = true;
|
|
|
+ this.findObject(this.tableOption.column, "partsCost").hide = false;
|
|
|
+ this.findObject(this.tableOption.column, "partsCost").showColumn = true;
|
|
|
+ this.findObject(this.tableOption.column, "purchaseAmount").hide = false;
|
|
|
+ this.findObject(this.tableOption.column, "purchaseAmount").showColumn = true;
|
|
|
+ this.findObject(this.tableOption.column, "corpName").hide = false;
|
|
|
+ this.findObject(this.tableOption.column, "corpName").showColumn = true;
|
|
|
+ }
|
|
|
if (inSave) {
|
|
|
this.$nextTick(() => {
|
|
|
this.$refs.crud.doLayout();
|
|
@@ -1360,16 +1358,18 @@ export default {
|
|
|
this.$nextTick(() => {
|
|
|
this.$refs.crud.doLayout();
|
|
|
});
|
|
|
- if (localStorage.getItem("roleName") == "贸易") {
|
|
|
- this.findObject(this.tableOption.column, "purchaseCost").hide = true;
|
|
|
- this.findObject(this.tableOption.column, "purchaseCost").showColumn = false;
|
|
|
- this.findObject(this.tableOption.column, "partsCost").hide = true;
|
|
|
- this.findObject(this.tableOption.column, "partsCost").showColumn = false;
|
|
|
- this.findObject(this.tableOption.column, "purchaseAmount").hide = true;
|
|
|
- this.findObject(this.tableOption.column, "purchaseAmount").showColumn = false;
|
|
|
- this.findObject(this.tableOption.column, "corpName").hide = true;
|
|
|
- this.findObject(this.tableOption.column, "corpName").showColumn = false;
|
|
|
- }
|
|
|
+ if (localStorage.getItem("roleName").indexOf('贸易') == -1 && localStorage.getItem("roleName").indexOf('运营') == -1) {
|
|
|
+ this.findObject(this.tableOption.column, "purchaseCost").hide = false;
|
|
|
+ this.findObject(this.tableOption.column, "purchaseCost").showColumn = true;
|
|
|
+ this.findObject(this.tableOption.column, "partsPrice").hide = false;
|
|
|
+ this.findObject(this.tableOption.column, "partsPrice").showColumn = true;
|
|
|
+ this.findObject(this.tableOption.column, "partsCost").hide = false;
|
|
|
+ this.findObject(this.tableOption.column, "partsCost").showColumn = true;
|
|
|
+ this.findObject(this.tableOption.column, "purchaseAmount").hide = false;
|
|
|
+ this.findObject(this.tableOption.column, "purchaseAmount").showColumn = true;
|
|
|
+ this.findObject(this.tableOption.column, "corpName").hide = false;
|
|
|
+ this.findObject(this.tableOption.column, "corpName").showColumn = true;
|
|
|
+ }
|
|
|
this.$message.success("重置成功");
|
|
|
//关闭窗口
|
|
|
setTimeout(() => {
|