wjx há 3 semanas atrás
pai
commit
8fb8c4d47b

+ 8 - 0
src/pages/adMonitor/adMonitorList/data.tsx

@@ -32,4 +32,12 @@ export const ADGROUP_STATUS = {
     'ADGROUP_STATUS_CREATIVE_EMPTY': <Badge status="warning" text={<span style={{ fontSize: 12 }}>创意准备中</span>}/>,
     'ADGROUP_STATUS_JOINT_BUDGET_REACHED': <Badge status="warning" text={<span style={{ fontSize: 12 }}>广告被暂停</span>}/>,
     'ADGROUP_STATUS_TOTAL_BUDGET_REACHED': <Badge status="warning" text={<span style={{ fontSize: 12 }}>广告达到总预算上限</span>}/>,
+    'SMART_ADGROUP_STATUS_SUSPEND': <Badge status="warning" text={<span style={{ fontSize: 12 }}>已暂停(智投)</span>}/>,
+    'SMART_ADGROUP_STATUS_USING': <Badge status="processing" text={<span style={{ fontSize: 12 }}>项目启用中(智投)</span>}/>,
+    'SMART_ADGROUP_STATUS_ADGROUP_STATUS_STOP': <Badge status="success" text={<span style={{ fontSize: 12 }}>投放结束(智投)</span>}/>,
+    'SMART_ADGROUP_STATUS_ACCOUNT_BALANCE_NOT_ENOUGH': <Badge status="warning" text={<span style={{ fontSize: 12 }}>账户余额不足(智投)</span>}/>,
+    'SMART_ADGROUP_STATUS_JOINT_BUDGET_REACHED': <Badge status="warning" text={<span style={{ fontSize: 12 }}>项目被暂停(智投)</span>}/>,
+    'SMART_ADGROUP_STATUS_DAILY_BUDGET_REACHED': <Badge status="warning" text={<span style={{ fontSize: 12 }}>项目日预算到达上限(智投)</span>}/>,
+    'SMART_ADGROUP_STATUS_NOT_IN_DELIVERY_TIME': <Badge status="default" text={<span style={{ fontSize: 12 }}>未到投放时间(智投)</span>}/>,
+    'SMART_ADGROUP_STATUS_ACTIVE': <Badge status="processing" text={<span style={{ fontSize: 12 }}>投放中(智投)</span>}/>
 }

+ 22 - 21
src/pages/launchSystemV3/adMonitorListV3/config.ts

@@ -4,33 +4,34 @@ const planAdConfig = [
         label: '广告详情',
         data: [
             { title: '启停', dataIndex: 'configured_status', serverIndex: 'adgroup.configured_status', label: '广告详情', default: 1, width: 40 },
-            { title: '所属账号', dataIndex: 'account_id', serverIndex: 'adgroup.account_id', label: '广告详情', default: 2, width: 75 },
-            { title: '腾讯备注', dataIndex: 'memo', serverIndex: 'ad_account.memo', label: '广告详情', default: 3, width: 80 },
-            { title: '本地备注', dataIndex: 'remark', serverIndex: 'ad_account.remark', label: '广告详情', default: 4, width: 80 },
-            { title: '广告ID', dataIndex: 'adgroup_id', serverIndex: 'adgroup.adgroup_id', label: '广告详情', default: 5, width: 90 },
-            { title: '投手', dataIndex: 'put_user_name', serverIndex: 'sys_user.put_user_name', label: '广告详情', default: 6, width: 70 },
-            { title: '广告名称', dataIndex: 'adgroup_name', serverIndex: 'adgroup.adgroup_name', label: '广告详情', default: 7, width: 280 },
-            { title: '投放日期', dataIndex: 'begin_date', serverIndex: 'adgroup.begin_date, adgroup.end_date', label: '广告详情', default: 8, width: 150 },
-            { title: '投放时间', dataIndex: 'time_series', serverIndex: 'adgroup.time_series', label: '广告详情', default: 9, width: 55 },
-            { title: '首日开始投放时间', dataIndex: 'first_day_begin_time', serverIndex: 'adgroup.first_day_begin_time', label: '广告详情', default: 10, width: 70 },
-            { title: '出价', dataIndex: 'bid_amount', serverIndex: 'adgroup.bid_amount,adgroup.bid_mode,adgroup.optimization_goal', label: '广告详情', default: 11, width: 140 },
-            { title: '深度优化行为出价', dataIndex: 'deep_conversion_behavior_bid', serverIndex: 'adgroup.deep_conversion_worth_rate', label: '广告详情', default: 12, width: 70 },
+            { title: '是否智投', dataIndex: 'smart_delivery_platform', serverIndex: 'adgroup.smart_delivery_platform', label: '广告详情', default: 2, width: 70 },
+            { title: '所属账号', dataIndex: 'account_id', serverIndex: 'adgroup.account_id', label: '广告详情', default: 3, width: 75 },
+            { title: '腾讯备注', dataIndex: 'memo', serverIndex: 'ad_account.memo', label: '广告详情', default: 4, width: 80 },
+            { title: '本地备注', dataIndex: 'remark', serverIndex: 'ad_account.remark', label: '广告详情', default: 5, width: 80 },
+            { title: '广告ID', dataIndex: 'adgroup_id', serverIndex: 'adgroup.adgroup_id', label: '广告详情', default: 6, width: 90 },
+            { title: '投手', dataIndex: 'put_user_name', serverIndex: 'sys_user.put_user_name', label: '广告详情', default: 7, width: 70 },
+            { title: '广告名称', dataIndex: 'adgroup_name', serverIndex: 'adgroup.adgroup_name', label: '广告详情', default: 8, width: 280 },
+            { title: '投放日期', dataIndex: 'begin_date', serverIndex: 'adgroup.begin_date, adgroup.end_date', label: '广告详情', default: 9, width: 150 },
+            { title: '投放时间', dataIndex: 'time_series', serverIndex: 'adgroup.time_series', label: '广告详情', default: 10, width: 55 },
+            { title: '首日开始投放时间', dataIndex: 'first_day_begin_time', serverIndex: 'adgroup.first_day_begin_time', label: '广告详情', default: 11, width: 70 },
+            { title: '出价', dataIndex: 'bid_amount', serverIndex: 'adgroup.bid_amount,adgroup.bid_mode,adgroup.optimization_goal', label: '广告详情', default: 12, width: 140 },
+            { title: '深度优化行为出价', dataIndex: 'deep_conversion_behavior_bid', serverIndex: 'adgroup.deep_conversion_worth_rate', label: '广告详情', default: 13, width: 70 },
             // { title: '深度优化行为出价', dataIndex: 'deep_conversion_behavior_bid', serverIndex: 'adgroup.deep_conversion_behavior_bid', label: '广告详情', default: 12, width: 70 },
-            { title: '出价类型', dataIndex: 'smart_bid_type', serverIndex: 'adgroup.smart_bid_type', label: '广告详情', default: 13, width: 80 },
-            { title: '出价策略', dataIndex: 'bid_strategy', serverIndex: 'adgroup.bid_strategy', label: '广告详情', default: 14, width: 80 },
-            { title: '广告组日预算(元)', dataIndex: 'daily_budget', serverIndex: 'adgroup.daily_budget', label: '广告详情', default: 15, width: 80 },
-            { title: '是否开启自动版位功能', dataIndex: 'automatic_site_enabled', serverIndex: 'adgroup.automatic_site_enabled', label: '广告详情', default: 16, width: 80 },
-            { title: '定向条件描述', dataIndex: 'targeting_translation', serverIndex: 'adgroup.targeting_translation', label: '广告详情', default: 17, width: 120 },
-            { title: '创建时间', dataIndex: 'created_time', serverIndex: 'adgroup.created_time', label: '广告详情', default: 18, width: 140 },
-            { title: '是否已删除', dataIndex: 'is_deleted', serverIndex: 'adgroup.is_deleted', label: '广告详情', default: 19, width: 60 },
-            { title: '广告状态', dataIndex: 'system_status', serverIndex: 'adgroup.system_status', label: '广告详情', default: 20, width: 100 },
-            { title: '广告详情', dataIndex: 'cost_speed', label: '广告详情', default: 21, width: 80 },
+            { title: '出价类型', dataIndex: 'smart_bid_type', serverIndex: 'adgroup.smart_bid_type', label: '广告详情', default: 14, width: 80 },
+            { title: '出价策略', dataIndex: 'bid_strategy', serverIndex: 'adgroup.bid_strategy', label: '广告详情', default: 15, width: 80 },
+            { title: '广告组日预算(元)', dataIndex: 'daily_budget', serverIndex: 'adgroup.daily_budget', label: '广告详情', default: 16, width: 80 },
+            { title: '是否开启自动版位功能', dataIndex: 'automatic_site_enabled', serverIndex: 'adgroup.automatic_site_enabled', label: '广告详情', default: 17, width: 80 },
+            { title: '定向条件描述', dataIndex: 'targeting_translation', serverIndex: 'adgroup.targeting_translation', label: '广告详情', default: 18, width: 120 },
+            { title: '创建时间', dataIndex: 'created_time', serverIndex: 'adgroup.created_time', label: '广告详情', default: 19, width: 140 },
+            { title: '是否已删除', dataIndex: 'is_deleted', serverIndex: 'adgroup.is_deleted', label: '广告详情', default: 20, width: 60 },
+            { title: '广告状态', dataIndex: 'system_status', serverIndex: 'adgroup.system_status', label: '广告详情', default: 21, width: 100 },
+            { title: '广告详情', dataIndex: 'cost_speed', label: '广告详情', default: 22, width: 80 },
             { title: '营销目的', dataIndex: 'marketing_goal', label: '广告详情', width: 85, serverIndex: 'adgroup.marketing_goal' },
             { title: '推广内容资产类型', dataIndex: 'marketing_target_type', label: '广告详情', width: 85, serverIndex: 'adgroup.marketing_target_type' },
             { title: '标记备注', dataIndex: 'tag_remark', label: '广告详情', width: 80, serverIndex: 'adgroup_user_tag.tag_remark' },
             { title: '业务单元类型', dataIndex: 'ad_unit_type', label: '广告详情', width: 75, serverIndex: 'ad_account.ad_unit_type' },
             { title: '创意预览', dataIndex: 'creative_ids', serverIndex: 'adgroup_data.creative_ids', label: '广告详情', width: 130 },
-            { title: '操作', dataIndex: 'cz', label: '广告详情', default: 22, width: 116 },
+            { title: '操作', dataIndex: 'cz', label: '广告详情', default: 23, width: 116 },
         ]
     },
     {

+ 22 - 2
src/pages/launchSystemV3/adMonitorListV3/tablePlanListConfig.tsx

@@ -12,7 +12,7 @@ import SwitchStatus from '../adqv3/ad/switchStatus'
 import CreativePreview from './CreativePreview'
 import { ADGROUP_STATUS } from '@/pages/adMonitor/adMonitorList/data'
 import { AdUnitType_Enum } from '@/pages/launchSystemNew/account/const'
-import { MARKETING_GOAL_ENUM, MARKETING_TARGET_TYPE_ENUM } from '../tencentAdPutIn/const'
+import { MARKETING_GOAL_ENUM, MARKETING_TARGET_TYPE_ENUM, SMART_DELIVERY_GOAL_ENUM } from '../tencentAdPutIn/const'
 function tablePlanConfig(
     onChange: () => void,
     details: (data: any) => void,
@@ -36,6 +36,17 @@ function tablePlanConfig(
                 return <SwitchStatus configuredStatus={a} isDeleted={b?.is_deleted} adgroupId={b?.adgroup_id} accountId={b?.account_id} onChange={onChange} />
             }
         },
+        {
+            title: '是否智投',
+            dataIndex: 'smart_delivery_platform',
+            key: 'smart_delivery_platform',
+            align: 'center',
+            width: 70,
+            fixed: 'left',
+            render: (a: string) => {
+                return <Badge status={a ? "processing" : "error"} text={a ? '是' : '否'} />
+            }
+        },
         {
             title: '所属账号',
             dataIndex: 'account_id',
@@ -158,8 +169,17 @@ function tablePlanConfig(
             width: 140,
             ellipsis: true,
             sorter: true,
-            render: (a: string, b: { bid_mode: string, optimization_goal: string, account_id: any }) => {
+            render: (a: string, b: { bid_mode: string, optimization_goal: string, account_id: any, smart_delivery_platform?: string, smart_delivery_scene_spec?: any }) => {
                 if (b?.account_id === '总计') return '--';
+                if (b?.smart_delivery_platform && b?.smart_delivery_scene_spec) {
+                    const smartDeliverySceneSpec = JSON.parse(b.smart_delivery_scene_spec)
+                    const goalDto = SMART_DELIVERY_GOAL_ENUM[smartDeliverySceneSpec?.smartDeliveryGoal as keyof typeof SMART_DELIVERY_GOAL_ENUM]
+                    return `${goalDto?.smartDeliveryGoalSpec?.map(item => {
+                        const field_name = item.field_name
+                        const data = smartDeliverySceneSpec?.smartDeliveryGoalSpec?.[goalDto?.smartDeliveryGoalSpecName]?.[item.field_name]
+                        return `${item.title}: ${field_name?.includes('Roi') ? data : data / 100}${item?.unitTips || ''}`
+                    })}`
+                }
                 return `${b?.bid_mode ? BidModeEnum[b?.bid_mode as keyof typeof BidModeEnum] : ''} ${a}元/${b?.bid_mode === 'BID_MODE_CPM' ? '千次曝光' : b?.bid_mode === 'BID_MODE_CPC' ? '点击' : OptimizationGoalEnum[b?.optimization_goal as keyof typeof OptimizationGoalEnum]}`
             }
         },