diff --git a/package.json b/package.json index 617acb1..b9e0626 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "dependencies": { "@ant-design/icons": "^5.5.1", "@react-pdf/renderer": "^3.4.0", - "antd": "^5.17.2", + "antd": "^5.25.2", "dayjs": "^1.11.13", "docx": "^8.5.0", "file-saver": "^2.0.5", @@ -22,11 +22,11 @@ "i18next-http-backend": "^2.5.2", "react": "^18.3.1", "react-dom": "^18.3.1", + "react-router-dom": "^6.30.1", "react-i18next": "^14.1.2", - "react-router-dom": "^6.10.0", "react-to-pdf": "^1.0.1", "xlsx": "https://cdn.sheetjs.com/xlsx-0.18.11/xlsx-0.18.11.tgz", - "zustand": "^4.5.2" + "zustand": "^4.5.7" }, "devDependencies": { "@types/react": "^18.0.28", diff --git a/src/views/products/Detail/ProductInfoQuotation.jsx b/src/views/products/Detail/ProductInfoQuotation.jsx index 22a84eb..d6f7c12 100644 --- a/src/views/products/Detail/ProductInfoQuotation.jsx +++ b/src/views/products/Detail/ProductInfoQuotation.jsx @@ -139,6 +139,8 @@ const ProductInfoQuotation = ({ editable, ...props }) => { const [isQuotationModalOpen, setQuotationModalOpen] = useState(false) const [isBatchSetupModalOpen, setBatchSetupModalOpen] = useState(false) + const [groupSizeUnlimit, setGroupSizeUnlimit] = useState(false) + const [groupMaxUnlimit, setGroupMaxUnlimit] = useState(false) const { modal, notification } = App.useApp() const [quotationForm] = Form.useForm() const [batchSetupForm] = Form.useForm() @@ -445,6 +447,18 @@ const ProductInfoQuotation = ({ editable, ...props }) => { 每团 + { + if (e.target.checked) { + quotationForm.setFieldValue('group_size_min', 0) + quotationForm.setFieldValue('group_size_max', 1000) + setGroupSizeUnlimit(true) + + } else { + quotationForm.setFieldValue('group_size_min', 1) + if (!groupMaxUnlimit) quotationForm.setFieldValue('group_size_max', 999) + setGroupSizeUnlimit(false) + } + }}>不分人等(0~1000) { }, ]} > - + + + { + if (e.target.checked) { + quotationForm.setFieldValue('group_size_max', 1000) + setGroupMaxUnlimit(true) + } else { + quotationForm.setFieldValue('group_size_max', 999) + setGroupMaxUnlimit(false) + } + }}>不限(1000) { }, ]} > - +