diff --git a/src/views/crmpc/stocking/stocking_list.vue b/src/views/crmpc/stocking/stocking_list.vue
index c4abcbd..785c4d9 100644
--- a/src/views/crmpc/stocking/stocking_list.vue
+++ b/src/views/crmpc/stocking/stocking_list.vue
@@ -7,6 +7,15 @@
>
+
+ 我的
+ 全部
+
([])
const timelineDialogVisible = ref(false)
@@ -279,6 +289,14 @@
const isFinites = ref(false)
import { useAuth } from '@/composables/useAuth'
const { hasAuth } = useAuth()
+ const userStore = useUserStore()
+ // 仅 userId=73 的特权用户可切换「全部/我的」
+ const canViewAll = computed(() => userStore.getUserInfo.userId === 73)
+ const viewScope = ref<'all' | 'self'>('self')
+ const onScopeChange = () => {
+ pagination.currentPage = 1
+ getList()
+ }
defineOptions({ name: 'CrmStockingList' }) // 定义组件名称,用于 KeepAlive 缓存控制
@@ -340,7 +358,8 @@
current: currentPage,
size: pageSize,
is_final: 0, // 只获取备货单,非终版
- keyword: keyword.value
+ keyword: keyword.value,
+ view_scope: viewScope.value
}
const { records, current, size, total } = await CrmService.getStockList(params)