|
@@ -89,6 +89,9 @@ const UpdateAd: React.FC<Props> = ({ title = '修改广告', visible, onChange,
|
|
|
adgroupsUpdateBidAmountDTO['bidStrategy'] = newValues.bidStrategy
|
|
|
adgroupsUpdateBidAmountDTO['bidAmount'] = newValues.bidAmount * 100
|
|
|
break
|
|
|
+ case 'dailyBudget':
|
|
|
+ data['dailyBudget'] = newValues.dailyBudget * 100
|
|
|
+ break
|
|
|
case 'adgroupName':
|
|
|
data['adgroupName'] = newValues.adgroupName
|
|
|
break
|
|
@@ -158,6 +161,7 @@ const UpdateAd: React.FC<Props> = ({ title = '修改广告', visible, onChange,
|
|
|
</Tooltip>}
|
|
|
</Space>
|
|
|
</Checkbox>
|
|
|
+ <Checkbox value="dailyBudget">广告预算</Checkbox>
|
|
|
<Checkbox value="adgroupName">广告名称</Checkbox>
|
|
|
</Checkbox.Group>
|
|
|
</Form.Item>
|
|
@@ -223,6 +227,26 @@ const UpdateAd: React.FC<Props> = ({ title = '修改广告', visible, onChange,
|
|
|
<Input placeholder={`输入价格 元`} style={{ width: 300 }} />
|
|
|
</Form.Item>
|
|
|
</>}
|
|
|
+ {field?.includes('dailyBudget') && <>
|
|
|
+ <Form.Item label={<strong>广告预算</strong>} name='dailyBudget' rules={[
|
|
|
+ { required: true, message: '请输入广告预算' },
|
|
|
+ {
|
|
|
+ required: true, message: `大于0,并且填写数字`, validator(rule, value, callback) {
|
|
|
+ let regPos = /^[0-9]+.?[0-9]*/; //判断是否是数字。
|
|
|
+ if (!regPos.test(value)) {
|
|
|
+ return Promise.reject()
|
|
|
+ }
|
|
|
+ if (value >= 0) {
|
|
|
+ return Promise.resolve()
|
|
|
+ } else {
|
|
|
+ return Promise.reject()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ },
|
|
|
+ ]}>
|
|
|
+ <Input placeholder={`输入价格 元`} style={{ width: 300 }} />
|
|
|
+ </Form.Item>
|
|
|
+ </>}
|
|
|
{field?.includes('adgroupName') && <>
|
|
|
<Form.Item label={<strong>广告名称</strong>} name='adgroupName' rules={[{ required: true, message: '请输入广告名称' }]}>
|
|
|
<Input placeholder={`请输入广告名称`} style={{ width: 300 }} />
|