From 9592b4b1357a641b4dc4c2c464fb7605e5fd7aa0 Mon Sep 17 00:00:00 2001 From: LiaoYijun Date: Tue, 29 Jul 2025 09:53:55 +0800 Subject: [PATCH] =?UTF-8?q?doc:=20=E5=A2=9E=E5=8A=A0=E5=9C=B0=E6=8E=A5?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E9=A1=B5=E9=9D=A2=20SQL?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doc/RBAC 权限.sql | 2 ++ src/views/products/Detail/ProductInfoQuotation.jsx | 14 +++++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/doc/RBAC 权限.sql b/doc/RBAC 权限.sql index 75bc702..00a6bff 100644 --- a/doc/RBAC 权限.sql +++ b/doc/RBAC 权限.sql @@ -87,6 +87,8 @@ INSERT INTO [dbo].[auth_resource] ([res_name] ,[res_pattern], [res_category]) VALUES ('产品管理(客服)', 'route=/products', 'page') INSERT INTO [dbo].[auth_resource] ([res_name] ,[res_pattern], [res_category]) VALUES ('产品管理(供应商)', 'route=/products/edit', 'page') +INSERT INTO [dbo].[auth_resource] ([res_name] ,[res_pattern], [res_category]) +VALUES ('采购年份', 'route=/products/pick-year', 'page') INSERT INTO [dbo].[auth_permission] ([role_id] ,[res_id]) VALUES (1, 1) diff --git a/src/views/products/Detail/ProductInfoQuotation.jsx b/src/views/products/Detail/ProductInfoQuotation.jsx index c016fd8..b76936c 100644 --- a/src/views/products/Detail/ProductInfoQuotation.jsx +++ b/src/views/products/Detail/ProductInfoQuotation.jsx @@ -1,9 +1,10 @@ -import { useState } from 'react' +import { useState, useEffect } from 'react' import { Table, Form, Modal, Button, Radio, Input, Flex, Card, InputNumber, Checkbox, DatePicker, Space, App, Tooltip } from 'antd' import { useTranslation } from 'react-i18next' import { CloseOutlined, StarTwoTone, PlusOutlined, ExclamationCircleFilled, QuestionCircleOutlined } from '@ant-design/icons' import { useDatePresets } from '@/hooks/useDatePresets' import dayjs from 'dayjs' + import useProductsStore from '@/stores/Products/Index' import PriceCompactInput from '@/views/products/Detail/PriceCompactInput' import { formatGroupSize } from '@/hooks/useProductsSets' @@ -148,8 +149,15 @@ const ProductInfoQuotation = ({ editable, ...props }) => { const datePresets = useDatePresets() - const [quotationList, newEmptyQuotation, appendQuotationList, saveOrUpdateQuotation, deleteQuotation] = - useProductsStore((state) => [state.quotationList, state.newEmptyQuotation, state.appendQuotationList, state.saveOrUpdateQuotation, state.deleteQuotation]) + const [quotationList, newEmptyQuotation, appendQuotationList, saveOrUpdateQuotation, deleteQuotation, switchParams] = + useProductsStore((state) => [ + state.quotationList, state.newEmptyQuotation, state.appendQuotationList, state.saveOrUpdateQuotation, state.deleteQuotation, + state.switchParams + ]) + + useEffect(() => { + console.info('switchParams: ', switchParams) + }, [switchParams]) const triggerChange = (changedValue) => { onChange?.(