From 1d9ef001c1f4dc21c991cca518c77bac9a2e01f4 Mon Sep 17 00:00:00 2001 From: mzl Date: Thu, 6 Aug 2026 11:40:19 +0800 Subject: [PATCH] =?UTF-8?q?feat(stocking):=20=E5=A4=87=E8=B4=A7=E5=8D=95?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E4=B8=BA=E7=89=B9=E6=9D=83=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E3=80=8C=E5=85=A8=E9=83=A8/=E6=88=91?= =?UTF-8?q?=E7=9A=84=E3=80=8D=E8=A7=86=E5=9B=BE=E5=88=87=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude --- src/views/crmpc/stocking/stocking_list.vue | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) 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)