Commit c1b82cd7 authored by 黄奎's avatar 黄奎

权限验证修改

parent d25b11b2
......@@ -972,7 +972,7 @@
{{$t('Operation.Op_b2bView')}}
</el-dropdown-item>
<el-dropdown-item @click.native="goB2B(item.ConfigId, item.TCID , 2)"
<el-dropdown-item @click.native="goB2B(item.ConfigId, item.TCID , 2)"
v-if="CurrentUserInfo.B2BDomain!=''&&item.LineID!=2&&item.LineID!=8">
直客版预览
</el-dropdown-item>
......@@ -998,7 +998,7 @@
<el-dropdown-item>
<div @click='goOPCommissionInfo(item.TCID)'>查看OP提成 </div>
</el-dropdown-item>
<el-dropdown-item v-if="item.IsSetOut==0">
<el-dropdown-item v-if="item.IsSetOut==0">
<div @click='setIsSetOutOffer(item,1)'>取消发团 </div>
</el-dropdown-item>
<el-dropdown-item v-if="item.IsSetOut==1">
......@@ -1861,11 +1861,11 @@
});
},
goB2B(ConfigId, tcid, type) {
var B2BDomain = this.CurrentUserInfo.B2BDomain;
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,19 +2284,19 @@
});
},
//保存报价单
setIsSetOutOffer(item,IsSetOut) {
setIsSetOutOffer(item, IsSetOut) {
var updateMsg = {
TCID: item.TCID,
IsSetOut: IsSetOut
};
this.apipost("travel_post_SetIsSetOutService", updateMsg, res => {
if (res.data.resultCode == 1) {
this.Success(res.data.message);
this.getControlList();
} else {
this.Info(res.data.message);
}
});
TCID: item.TCID,
IsSetOut: IsSetOut
};
this.apipost("travel_post_SetIsSetOutService", updateMsg, res => {
if (res.data.resultCode == 1) {
this.Success(res.data.message);
this.getControlList();
} else {
this.Info(res.data.message);
}
});
},
},
filters: {
......@@ -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) {
this.apipost("userauth_get_GetCheckUserAuthService", {
actionMenuCode: 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