feat: 全局跨域公司选择器 + 权限页crossDomain开关
- 新增CompanySelector组件: 仅crossDomain权限或SUPER_ADMIN可见 - 权限分配页: 全局系统特权下新增"允许全局跨域"操作权限checkbox - 入库汇总/出库记录搜索栏嵌入CompanySelector - PermissionConfig: transformData识别crossDomain为操作权限码
This commit is contained in:
@ -1,6 +1,8 @@
|
||||
<template>
|
||||
<div v-if="userStore.hasPermission('inbound_summary:view')" class="app-container">
|
||||
<div class="filter-container">
|
||||
<CompanySelector v-model="listQuery.company" @change="handleFilter" style="margin-right: 10px;" />
|
||||
|
||||
<el-input
|
||||
v-model="listQuery.keyword"
|
||||
placeholder="SKU / 名称 / 规格 / 批次号 / 来源"
|
||||
@ -107,6 +109,7 @@ import { ref, reactive, onMounted, onBeforeUnmount } from 'vue'
|
||||
import { getInboundSummaryList, submitExportTask, checkExportStatus } from '@/api/inbound/inbound_summary'
|
||||
import { useUserStore } from '@/stores/user'
|
||||
import { ElMessage, ElLoading } from 'element-plus'
|
||||
import CompanySelector from '@/components/CompanySelector.vue'
|
||||
|
||||
const userStore = useUserStore()
|
||||
|
||||
@ -120,7 +123,8 @@ const listQuery = reactive({
|
||||
per_page: 20, // 默认每页20
|
||||
keyword: '',
|
||||
source_type: '',
|
||||
dateRange: null as any
|
||||
dateRange: null as any,
|
||||
company: '' as string
|
||||
})
|
||||
|
||||
const fetchData = async () => {
|
||||
@ -132,7 +136,8 @@ const fetchData = async () => {
|
||||
keyword: listQuery.keyword,
|
||||
source_type: listQuery.source_type,
|
||||
start_date: listQuery.dateRange ? listQuery.dateRange[0] : null,
|
||||
end_date: listQuery.dateRange ? listQuery.dateRange[1] : null
|
||||
end_date: listQuery.dateRange ? listQuery.dateRange[1] : null,
|
||||
company: listQuery.company || undefined
|
||||
}
|
||||
|
||||
const res = await getInboundSummaryList(params)
|
||||
@ -175,7 +180,8 @@ const handleExport = () => {
|
||||
keyword: listQuery.keyword,
|
||||
source_type: listQuery.source_type,
|
||||
start_date: listQuery.dateRange ? listQuery.dateRange[0] : null,
|
||||
end_date: listQuery.dateRange ? listQuery.dateRange[1] : null
|
||||
end_date: listQuery.dateRange ? listQuery.dateRange[1] : null,
|
||||
company: listQuery.company || undefined
|
||||
}
|
||||
|
||||
const loadingInstance = ElLoading.service({
|
||||
|
||||
Reference in New Issue
Block a user