|
@@ -2,7 +2,7 @@ import { Card, Form, Input, InputNumber, Space, Switch, Tooltip } from "antd"
|
|
|
import React, { useContext } from "react"
|
|
|
import { DispatchAd } from "./newCreateAd";
|
|
|
import New1Radio from "@/pages/launchSystemV3/components/New1Radio";
|
|
|
-import { BID_ALL_OCATION_MODE, BID_MODE_ENUM, BID_SCENE_NORMAL_ENUM, OPTIMIZATIONGOAL_ENUM, SMART_BID_TYPE_ENUM } from "../../const";
|
|
|
+import { BID_ALL_OCATION_MODE, BID_MODE_ENUM, BID_SCENE_NORMAL_ENUM, OPTIMIZATIONGOAL_ENUM, ROI_ALL_OCATION_MODE, SMART_BID_TYPE_ENUM } from "../../const";
|
|
|
import { QuestionCircleFilled } from "@ant-design/icons";
|
|
|
|
|
|
|
|
@@ -18,6 +18,7 @@ const AdgroupsPrice: React.FC = () => {
|
|
|
const siteSet = Form.useWatch('siteSet', form)
|
|
|
const bidMode = Form.useWatch('bidMode', form)
|
|
|
const bidAllocationMode = Form.useWatch('bidAllocationMode', form)
|
|
|
+ const roiAllocationMode = Form.useWatch(['deepConversionSpec', 'deepConversionWorthSpec', 'roiAllocationMode'], form)
|
|
|
const optimizationGoal = Form.useWatch('optimizationGoal', form)
|
|
|
const smartBidType = Form.useWatch('smartBidType', form)
|
|
|
const bidScene = Form.useWatch('bidScene', form)
|
|
@@ -110,7 +111,7 @@ const AdgroupsPrice: React.FC = () => {
|
|
|
<Form.Item name='bidAmountMax' rules={[{ required: true, message: '请输入价格最大值' }]} noStyle>
|
|
|
<Input
|
|
|
placeholder={`请输入价格最大值`}
|
|
|
- style={{ width: 180 }}
|
|
|
+ style={{ width: 200 }}
|
|
|
/>
|
|
|
</Form.Item>
|
|
|
<span>元/{optimizationGoal ? OPTIMIZATIONGOAL_ENUM[optimizationGoal as keyof typeof OPTIMIZATIONGOAL_ENUM] : ['BID_MODE_OCPM', 'BID_MODE_OCPC'].includes(bidMode) ? '千次曝光' : '点击'}</span>
|
|
@@ -124,7 +125,10 @@ const AdgroupsPrice: React.FC = () => {
|
|
|
</Form.Item>
|
|
|
</> :
|
|
|
deepConversionType === 'DEEP_CONVERSION_WORTH' ? <>
|
|
|
- <Form.Item
|
|
|
+ <Form.Item label={<strong>ROI分配方式</strong>} name={['deepConversionSpec', 'deepConversionWorthSpec', 'roiAllocationMode']} rules={[{ required: true, message: '请选择ROI分配方式' }]}>
|
|
|
+ <New1Radio data={ROI_ALL_OCATION_MODE} />
|
|
|
+ </Form.Item>
|
|
|
+ {roiAllocationMode === 1 ? <Form.Item
|
|
|
label={<strong>期望ROI</strong>}
|
|
|
name={['deepConversionSpec', 'deepConversionWorthSpec', 'expectedRoi']}
|
|
|
rules={[
|
|
@@ -141,7 +145,53 @@ const AdgroupsPrice: React.FC = () => {
|
|
|
]}
|
|
|
>
|
|
|
<InputNumber style={{ width: 480 }} placeholder={`期望ROI目标范围${goal === 'GOAL_1DAY_MONETIZATION_ROAS' ? '0.001~50' : '0.001~1000'},输入0.05,表示ROI目标为5%`} />
|
|
|
- </Form.Item>
|
|
|
+ </Form.Item> : <Form.Item label={<strong>{roiAllocationMode === 2 ? '随机出价' : '阶梯出价'}</strong>} required>
|
|
|
+ <Space>
|
|
|
+ <Form.Item
|
|
|
+ name={['deepConversionSpec', 'deepConversionWorthSpec', 'expectedRoiMin']}
|
|
|
+ rules={[
|
|
|
+ { required: true, message: '请输入期望ROI最小值' },
|
|
|
+ { type: 'number', ...(goal === 'GOAL_1DAY_MONETIZATION_ROAS' ? { min: 0.001, max: 50, message: '范围0.001~50' } : { min: 0.001, max: 1000, message: '范围0.001~1000' }) },
|
|
|
+ {
|
|
|
+ validator: (_: any, value: string) => {
|
|
|
+ if (!value || /^\d+(\.\d{0,3})?$/.test(value)) {
|
|
|
+ return Promise.resolve();
|
|
|
+ }
|
|
|
+ return Promise.reject(new Error('请输入最多三位小数'));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ]}
|
|
|
+ noStyle
|
|
|
+ >
|
|
|
+ <InputNumber
|
|
|
+ placeholder={`请输入期望ROI最小值`}
|
|
|
+ style={{ width: 228 }}
|
|
|
+ />
|
|
|
+ </Form.Item>
|
|
|
+ <span>-</span>
|
|
|
+ <Form.Item
|
|
|
+ name={['deepConversionSpec', 'deepConversionWorthSpec', 'expectedRoiMax']}
|
|
|
+ rules={[
|
|
|
+ { required: true, message: '请输入期望ROI最大值' },
|
|
|
+ { type: 'number', ...(goal === 'GOAL_1DAY_MONETIZATION_ROAS' ? { min: 0.001, max: 50, message: '范围0.001~50' } : { min: 0.001, max: 1000, message: '范围0.001~1000' }) },
|
|
|
+ {
|
|
|
+ validator: (_: any, value: string) => {
|
|
|
+ if (!value || /^\d+(\.\d{0,3})?$/.test(value)) {
|
|
|
+ return Promise.resolve();
|
|
|
+ }
|
|
|
+ return Promise.reject(new Error('请输入最多三位小数'));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ]}
|
|
|
+ noStyle
|
|
|
+ >
|
|
|
+ <InputNumber
|
|
|
+ placeholder={`请输入期望ROI最大值`}
|
|
|
+ style={{ width: 228 }}
|
|
|
+ />
|
|
|
+ </Form.Item>
|
|
|
+ </Space>
|
|
|
+ </Form.Item>}
|
|
|
</> : null}
|
|
|
|
|
|
{((bidMode === 'BID_MODE_OCPM' || bidMode === 'BID_MODE_OCPC') && (putInType === 'GAME' ? bidScene !== 'BID_SCENE_NORMAL_MAX' : smartBidType !== 'SMART_BID_TYPE_SYSTEMATIC')) && <>
|