|
@@ -9,10 +9,12 @@
|
|
|
:searchConfig="searchConfig"
|
|
|
highlight-current-row
|
|
|
:action-list="[
|
|
|
- {
|
|
|
- text: '新建订单',
|
|
|
- action: () => clickAddOrder(),
|
|
|
- },
|
|
|
+ judgeRoles()
|
|
|
+ ? {
|
|
|
+ text: '新建订单',
|
|
|
+ action: () => clickAddOrder(),
|
|
|
+ }
|
|
|
+ : {},
|
|
|
]"
|
|
|
@get-list="getList"
|
|
|
@clickReset="clickReset">
|
|
@@ -451,6 +453,16 @@ watch(refreshStore().refresh, (val) => {
|
|
|
getList();
|
|
|
}
|
|
|
});
|
|
|
+const judgeRoles = () => {
|
|
|
+ let status = false;
|
|
|
+ if (proxy.useUserStore().user.roles && proxy.useUserStore().user.roles.length > 0) {
|
|
|
+ let list = proxy.useUserStore().user.roles.filter((item) => ["purchasingOfficer", "sypurchasing", "bzpurchasing"].includes(item.roleKey));
|
|
|
+ if (list && list.length > 0) {
|
|
|
+ status = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return status;
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|