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?.(