|
@@ -251,17 +251,19 @@ const config = computed(() => {
|
|
|
},
|
|
|
renderHTML(row) {
|
|
|
return [
|
|
|
- {
|
|
|
- attrs: {
|
|
|
- label: "修改包装配置",
|
|
|
- type: "primary",
|
|
|
- text: true,
|
|
|
- },
|
|
|
- el: "button",
|
|
|
- click() {
|
|
|
- clickChangePackaging(row);
|
|
|
- },
|
|
|
- },
|
|
|
+ judgeRoles()
|
|
|
+ ? {
|
|
|
+ attrs: {
|
|
|
+ label: "修改包装配置",
|
|
|
+ type: "primary",
|
|
|
+ text: true,
|
|
|
+ },
|
|
|
+ el: "button",
|
|
|
+ click() {
|
|
|
+ clickChangePackaging(row);
|
|
|
+ },
|
|
|
+ }
|
|
|
+ : {},
|
|
|
[40, 50].includes(row.status)
|
|
|
? {
|
|
|
attrs: {
|
|
@@ -568,6 +570,16 @@ const selectExpressPacking = (data) => {
|
|
|
}
|
|
|
ElMessage({ message: "添加成功", type: "success" });
|
|
|
};
|
|
|
+const judgeRoles = () => {
|
|
|
+ let status = true;
|
|
|
+ if (proxy.useUserStore().user.roles && proxy.useUserStore().user.roles.length > 0) {
|
|
|
+ let list = proxy.useUserStore().user.roles.filter((item) => ["factoryAdmin", "factoryLaser", "factoryPacker", "factoryZxy"].includes(item.roleKey));
|
|
|
+ if (list && list.length > 0) {
|
|
|
+ status = false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return status;
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|