diff --git a/src/views/crmpc/stocking/final_list.vue b/src/views/crmpc/stocking/final_list.vue index 416f5dd..384cbbc 100644 --- a/src/views/crmpc/stocking/final_list.vue +++ b/src/views/crmpc/stocking/final_list.vue @@ -5,6 +5,15 @@ 创建备货单 -->
+ + 我的 + 全部 + ([]) const timelineDialogVisible = ref(false) @@ -227,6 +237,14 @@ orderData: {} as OrderData }) 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() + } function statusClass(status: any) { if (status === 'rejected') return 'status-lost' @@ -278,8 +296,9 @@ const params = { current: currentPage, size: pageSize, - is_final: 1, // 只获取备货单,非终版 - keyword: keyword.value + is_final: 1, // 终版 + keyword: keyword.value, + view_scope: viewScope.value } const { records, current, size, total } = await CrmService.getStockList(params)