|
@@ -26,6 +26,7 @@ const UpdateAd3: React.FC<Props> = ({ visible, type, onClose, onChange, updateDa
|
|
|
const [form] = Form.useForm();
|
|
|
const timeSeriesType = Form.useWatch('timeSeriesType', form)
|
|
|
const updateType = Form.useWatch('updateType', form)
|
|
|
+ const goal = Form.useWatch(['deepConversionSpec', 'deepConversionWorthSpec', 'goal'], form)
|
|
|
|
|
|
const [failIdList, setFailIdList] = useState<{ adgroupId: number, code: number, message: string, messageCn: string }[]>([])
|
|
|
const [failVisible, setFailVisible] = useState<boolean>(false)
|
|
@@ -61,7 +62,7 @@ const UpdateAd3: React.FC<Props> = ({ visible, type, onClose, onChange, updateDa
|
|
|
message.success(`修改操作完成!`)
|
|
|
onChange?.()
|
|
|
} else {
|
|
|
- setFailIdList(res?.data?.failIdList || [])
|
|
|
+ setFailIdList(res?.data?.list || [])
|
|
|
setFailVisible(true)
|
|
|
}
|
|
|
})
|
|
@@ -87,7 +88,7 @@ const UpdateAd3: React.FC<Props> = ({ visible, type, onClose, onChange, updateDa
|
|
|
message.success(`修改操作完成!`)
|
|
|
onChange?.()
|
|
|
} else {
|
|
|
- setFailIdList(res?.data?.failIdList || [])
|
|
|
+ setFailIdList(res?.data?.list || [])
|
|
|
setFailVisible(true)
|
|
|
}
|
|
|
})
|
|
@@ -108,7 +109,7 @@ const UpdateAd3: React.FC<Props> = ({ visible, type, onClose, onChange, updateDa
|
|
|
message.success(`修改操作完成!`)
|
|
|
onChange?.()
|
|
|
} else {
|
|
|
- setFailIdList(res?.data?.failIdList || [])
|
|
|
+ setFailIdList(res?.data?.list || [])
|
|
|
setFailVisible(true)
|
|
|
}
|
|
|
})
|
|
@@ -119,7 +120,7 @@ const UpdateAd3: React.FC<Props> = ({ visible, type, onClose, onChange, updateDa
|
|
|
message.success(`修改操作完成!`)
|
|
|
onChange?.()
|
|
|
} else {
|
|
|
- setFailIdList(res?.data?.failIdList || [])
|
|
|
+ setFailIdList(res?.data?.list || [])
|
|
|
setFailVisible(true)
|
|
|
}
|
|
|
})
|
|
@@ -130,7 +131,7 @@ const UpdateAd3: React.FC<Props> = ({ visible, type, onClose, onChange, updateDa
|
|
|
message.success(`删除广告操作完成!`)
|
|
|
onChange?.()
|
|
|
} else {
|
|
|
- setFailIdList(res?.data?.failIdList || [])
|
|
|
+ setFailIdList(res?.data?.list || [])
|
|
|
setFailVisible(true)
|
|
|
}
|
|
|
})
|
|
@@ -240,7 +241,7 @@ const UpdateAd3: React.FC<Props> = ({ visible, type, onClose, onChange, updateDa
|
|
|
<InputNumber min={0} style={{ width: '100%' }} placeholder="请输入日限额 元" />
|
|
|
</Form.Item> : type === '修改投放时间' ? <>
|
|
|
<Form.Item label={<strong>投放日期</strong>} name='date' rules={[{ required: true, message: '请选择投放日期' }]}>
|
|
|
- {/* @ts-ignore */}
|
|
|
+ {/* @ts-ignore */}
|
|
|
<DatePicker.RangePicker disabledDate={disabledDate} />
|
|
|
</Form.Item>
|
|
|
<Form.Item label={<strong>投放时间</strong>}>
|
|
@@ -271,7 +272,7 @@ const UpdateAd3: React.FC<Props> = ({ visible, type, onClose, onChange, updateDa
|
|
|
</Form.Item>
|
|
|
<Form.Item label={<strong>深度优化目标</strong>} name={['deepConversionSpec', 'deepConversionWorthSpec', 'goal']} rules={[{ required: true, message: '请选择深度优化目标' }]}>
|
|
|
<Select style={{ width: 480 }} placeholder='请选择'>
|
|
|
- <Select.Option value={'GOAL_1DAY_PURCHASE_ROAS'}>首日付费ROI</Select.Option>
|
|
|
+ {goal === 'GOAL_1DAY_PURCHASE_ROAS' ? <Select.Option value={'GOAL_1DAY_PURCHASE_ROAS'}>首日付费ROI</Select.Option> : goal === 'GOAL_1DAY_MONETIZATION_ROAS' ? <Select.Option value={'GOAL_1DAY_MONETIZATION_ROAS'}>首日变现 ROI</Select.Option> : null}
|
|
|
</Select>
|
|
|
</Form.Item>
|
|
|
<Form.Item
|
|
@@ -342,7 +343,7 @@ const UpdateAd3: React.FC<Props> = ({ visible, type, onClose, onChange, updateDa
|
|
|
<Table
|
|
|
size="small"
|
|
|
bordered
|
|
|
- rowKey={'adgroupId'}
|
|
|
+ rowKey={'id'}
|
|
|
columns={[{
|
|
|
title: '广告ID',
|
|
|
dataIndex: 'adgroupId',
|
|
@@ -362,7 +363,7 @@ const UpdateAd3: React.FC<Props> = ({ visible, type, onClose, onChange, updateDa
|
|
|
key: 'messageCn',
|
|
|
render: (value) => <span style={{ fontSize: 12 }}>{value}</span>,
|
|
|
}]}
|
|
|
- dataSource={failIdList}
|
|
|
+ dataSource={failIdList.map((item, index) => ({...item, id: index}))}
|
|
|
/>
|
|
|
</Modal>}
|
|
|
</>
|