Commit c1b82cd7 authored by 黄奎's avatar 黄奎

权限验证修改

parent d25b11b2
......@@ -1863,9 +1863,9 @@
goB2B(ConfigId, tcid, type) {
var B2BDomain = this.CurrentUserInfo.B2BDomain;
if (type == 1) {
this.$tripUtils.GotoB2BPage(B2BDomain,ConfigId,tcid);
this.$tripUtils.GotoB2BPage(B2BDomain, ConfigId, tcid);
} else {
this.$tripUtils.GotoB2CPage(B2BDomain,ConfigId,tcid);
this.$tripUtils.GotoB2CPage(B2BDomain, ConfigId, tcid);
}
},
goTeamBalance(id, OutBranchId) {
......@@ -2284,7 +2284,7 @@
});
},
//保存报价单
setIsSetOutOffer(item,IsSetOut) {
setIsSetOutOffer(item, IsSetOut) {
var updateMsg = {
TCID: item.TCID,
IsSetOut: IsSetOut
......@@ -2328,6 +2328,22 @@
this.getAirlineList();
this.getEmployeeList();
this.getCountryCity();
this.IsModifyTravelControl=0;
if (
this.CurrentUserInfo.RB_Branch_id == 0 ||
this.CurrentUserInfo.RB_Branch_id == 1216 ||
this.CurrentUserInfo.RB_Branch_id == 49 ||
this.CurrentUserInfo.RB_Branch_id == 1218
) {
this.IsModifyTravelControl = 1;
} else {
//检查分公司是否有权限
this.CheckUserAuth("T_EditTravelControl", res => {
if (res.data.resultCode == 1 && res.data.data == 1) {
this.IsModifyTravelControl = 1;
}
});
}
},
created() {
//默认显示联运
......@@ -2348,26 +2364,6 @@
this.queryMsg.IsShowUnion = this.$route.query.IsUnionCked;
}
if (
this.CurrentUserInfo.RB_Branch_id == 0 ||
this.CurrentUserInfo.RB_Branch_id == 1216 ||
this.CurrentUserInfo.RB_Branch_id == 49||
this.CurrentUserInfo.RB_Branch_id== 1218
) {
this.IsModifyTravelControl = 1;
} else {
//检查分公司是否有权限
if (
("," + this.CurrentUserInfo.ActionMenuCode + ",").indexOf(
"T_EditTravelControl"
) > -1
) {
this.IsModifyTravelControl = 1;
} else {
this.IsModifyTravelControl = 0;
}
}
if (this.CurrentUserInfo.IsParentCompany == undefined) {
this.queryCommonData.IsParentCompany = 2;
} else {
......
......@@ -323,9 +323,22 @@ export default {
//用户权限验证
Vue.prototype.CheckUserAuth = function (authCode, successCall, faildCall) {
let localStorageJson = this.getLocalStorage();
var newCode = ',' + authCode + ',';
if (("," + localStorageJson.ActionMenuCode + ",").indexOf(newCode) > -1) {
var data = {
resultCode: 1,
data: 1,
};
var res={
data:data
}
successCall(res);
} else {
this.apipost("userauth_get_GetCheckUserAuthService", {
actionMenuCode: authCode
}, successCall, faildCall);
}
},
//供应商版请求接口方法
Vue.prototype.ApiPost2 = function (cmd, msg, successCall, faildCall) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment