perf: 更新技术栈版本

feat: 规范价格的人等数字
main
LiaoYijun 2 months ago
parent 21a11657b0
commit 5bac44f1dc

@ -13,7 +13,7 @@
"dependencies": { "dependencies": {
"@ant-design/icons": "^5.5.1", "@ant-design/icons": "^5.5.1",
"@react-pdf/renderer": "^3.4.0", "@react-pdf/renderer": "^3.4.0",
"antd": "^5.17.2", "antd": "^5.25.2",
"dayjs": "^1.11.13", "dayjs": "^1.11.13",
"docx": "^8.5.0", "docx": "^8.5.0",
"file-saver": "^2.0.5", "file-saver": "^2.0.5",
@ -22,11 +22,11 @@
"i18next-http-backend": "^2.5.2", "i18next-http-backend": "^2.5.2",
"react": "^18.3.1", "react": "^18.3.1",
"react-dom": "^18.3.1", "react-dom": "^18.3.1",
"react-router-dom": "^6.30.1",
"react-i18next": "^14.1.2", "react-i18next": "^14.1.2",
"react-router-dom": "^6.10.0",
"react-to-pdf": "^1.0.1", "react-to-pdf": "^1.0.1",
"xlsx": "https://cdn.sheetjs.com/xlsx-0.18.11/xlsx-0.18.11.tgz", "xlsx": "https://cdn.sheetjs.com/xlsx-0.18.11/xlsx-0.18.11.tgz",
"zustand": "^4.5.2" "zustand": "^4.5.7"
}, },
"devDependencies": { "devDependencies": {
"@types/react": "^18.0.28", "@types/react": "^18.0.28",

@ -139,6 +139,8 @@ const ProductInfoQuotation = ({ editable, ...props }) => {
const [isQuotationModalOpen, setQuotationModalOpen] = useState(false) const [isQuotationModalOpen, setQuotationModalOpen] = useState(false)
const [isBatchSetupModalOpen, setBatchSetupModalOpen] = useState(false) const [isBatchSetupModalOpen, setBatchSetupModalOpen] = useState(false)
const [groupSizeUnlimit, setGroupSizeUnlimit] = useState(false)
const [groupMaxUnlimit, setGroupMaxUnlimit] = useState(false)
const { modal, notification } = App.useApp() const { modal, notification } = App.useApp()
const [quotationForm] = Form.useForm() const [quotationForm] = Form.useForm()
const [batchSetupForm] = Form.useForm() const [batchSetupForm] = Form.useForm()
@ -445,6 +447,18 @@ const ProductInfoQuotation = ({ editable, ...props }) => {
<Radio value='1'>每团</Radio> <Radio value='1'>每团</Radio>
</Radio.Group> </Radio.Group>
</Form.Item> </Form.Item>
<Checkbox onChange={e => {
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)</Checkbox>
<Form.Item <Form.Item
label={t('products:group_size')} label={t('products:group_size')}
name='group_size_min' name='group_size_min'
@ -455,8 +469,18 @@ const ProductInfoQuotation = ({ editable, ...props }) => {
}, },
]} ]}
> >
<InputNumber style={{ width: '100%' }} /> <InputNumber disabled={groupSizeUnlimit} min='0' max='999' style={{ width: '100%' }} />
</Form.Item> </Form.Item>
<Checkbox disabled={groupSizeUnlimit} onChange={e => {
if (e.target.checked) {
quotationForm.setFieldValue('group_size_max', 1000)
setGroupMaxUnlimit(true)
} else {
quotationForm.setFieldValue('group_size_max', 999)
setGroupMaxUnlimit(false)
}
}}>不限(1000)</Checkbox>
<Form.Item <Form.Item
label={t('products:group_size')} label={t('products:group_size')}
name='group_size_max' name='group_size_max'
@ -467,7 +491,7 @@ const ProductInfoQuotation = ({ editable, ...props }) => {
}, },
]} ]}
> >
<InputNumber style={{ width: '100%' }} /> <InputNumber disabled={groupSizeUnlimit || groupMaxUnlimit} min='0' max='999' style={{ width: '100%' }} />
</Form.Item> </Form.Item>
<Form.Item <Form.Item
label={t('products:use_dates')} label={t('products:use_dates')}

Loading…
Cancel
Save