|
@@ -382,7 +382,7 @@ const Ad: React.FC<Props> = (props) => {
|
|
|
</Col>
|
|
|
{model ? <>
|
|
|
|
|
|
- <Col><Button type='primary' style={{ background: '#1890ff' }} icon={<FieldTimeOutlined />} disabled={selectedRows.length === 0} onClick={editScheduling}>修改排期出价名称</Button></Col>
|
|
|
+ <Col><Button type='primary' style={{ background: '#1890ff' }} icon={<FieldTimeOutlined />} disabled={selectedRows.length === 0} onClick={editScheduling}>修改排期出价名称</Button></Col>
|
|
|
<Col><Button type='primary' style={{ background: '#1890ff' }} icon={<CopyOutlined />} disabled={selectedRows.length === 0} onClick={copyHandle}>批量复制</Button></Col>
|
|
|
<Col><Button type='primary' style={{ background: '#67c23a', borderColor: '#67c23a' }} loading={editAdqAdgroupsData.loading} icon={<PlayCircleOutlined />} disabled={selectedRows.length === 0} onClick={() => adStatus('play')}>启动广告</Button></Col>
|
|
|
<Col><Button type='primary' style={{ background: '#e6a23c', borderColor: '#e6a23c' }} loading={editAdqAdgroupsData.loading} icon={<PauseCircleOutlined />} disabled={selectedRows.length === 0} onClick={() => adStatus('suspend')}>暂停广告</Button></Col>
|
|
@@ -417,8 +417,17 @@ const Ad: React.FC<Props> = (props) => {
|
|
|
)
|
|
|
}),
|
|
|
onChange: (selectedRowKeys: any, selectedRowss: any) => {
|
|
|
+ console.log(selectedRowss)
|
|
|
let newArr: any = [...selectedRows]
|
|
|
- let type = selectedRowss.length === 0 ? 'delAll' : selectedRowss.length === listAjax?.data.data.records.length ? 'add' : 'del'
|
|
|
+ let ajaxData = listAjax?.data.data.records?.filter((record: any) => {
|
|
|
+ if (model) {
|
|
|
+ return record.status !== 'STATUS_DELETED'
|
|
|
+ } else {
|
|
|
+ return record.status !== 'STATUS_DELETED' && record?.promotedObjectType === 'PROMOTED_OBJECT_TYPE_WECHAT_OFFICIAL_ACCOUNT' && record?.optimizationGoal === 'OPTIMIZATIONGOAL_FOLLOW' && record?.deepConversionSpec?.deepConversionWorthSpec?.goal === 'GOAL_1DAY_PURCHASE_ROAS'
|
|
|
+ }
|
|
|
+ })
|
|
|
+ let type = selectedRowss.length === 0 ? 'delAll' : selectedRowss.length === ajaxData?.length ? 'add' : 'del'
|
|
|
+ console.log(selectedRowss.length, listAjax?.data.data.records.length, ajaxData.length)
|
|
|
switch (type) {
|
|
|
case 'add':
|
|
|
console.log('新增')
|