feat:自动补货/手动采购逻辑修改:批量获取-》打包-》获取Token列表

This commit is contained in:
2026-10-29 16:05:39 +08:00
parent 8198bd6feb
commit 8494fabc82
23 changed files with 3679 additions and 85 deletions
@@ -27,9 +27,12 @@ const { Text } = Typography
export interface RockStrategyCardProps {
form: FormInstance
autoDelivery: boolean
autoPurchaseEnabled: boolean
togglingAutoPurchase: boolean
testingConn: boolean
savingConfig: boolean
onToggleAutoDelivery: (checked: boolean) => void
onToggleAutoPurchase: (checked: boolean) => void
onTestConnection: () => void
onSaveConfig: () => void
}
@@ -37,9 +40,12 @@ export interface RockStrategyCardProps {
export function RockStrategyCard({
form,
autoDelivery,
autoPurchaseEnabled,
togglingAutoPurchase,
testingConn,
savingConfig,
onToggleAutoDelivery,
onToggleAutoPurchase,
onTestConnection,
onSaveConfig,
}: RockStrategyCardProps) {
@@ -227,13 +233,24 @@ export function RockStrategyCard({
</Form.Item>
</Col>
<Col span={12}>
<Form.Item name="auto_purchase_enabled" label="自动补货触发开关" valuePropName="checked">
<Switch checkedChildren="开启自动补货" unCheckedChildren="关闭" />
<Form.Item label="自动补货触发开关">
<Space direction="vertical" size={2}>
<Switch
checked={autoPurchaseEnabled}
onChange={onToggleAutoPurchase}
loading={togglingAutoPurchase}
checkedChildren="开启自动补货"
unCheckedChildren="关闭"
/>
<Text type="secondary" style={{ fontSize: 11 }}>
切换后立即保存
</Text>
</Space>
</Form.Item>
</Col>
<Col span={12}>
<Form.Item name="auto_purchase_count" label="单次自动补货数量">
<InputNumber min={5} max={200} style={{ width: '100%' }} addonAfter="个" />
<InputNumber min={1} max={200} style={{ width: '100%' }} addonAfter="个" />
</Form.Item>
</Col>
<Col span={12}>