Browse Source

广告数据

shensong00 3 months ago
parent
commit
7af7a7eb51

+ 1 - 1
index.html

7
         hm.src = "https://hm.baidu.com/hm.js?d61b9e2caf4d46ccda7471b5385e2333";
7
         hm.src = "https://hm.baidu.com/hm.js?d61b9e2caf4d46ccda7471b5385e2333";
8
         var s = document.getElementsByTagName("script")[0];
8
         var s = document.getElementsByTagName("script")[0];
9
         s.parentNode.insertBefore(hm, s);
9
         s.parentNode.insertBefore(hm, s);
10
-      })();</script><link href=./static/css/app.0e4451c01c962d84085deeefb29c12de.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.9a27d0411801e6eb4aba.js></script><script type=text/javascript src=./static/js/app.a422327706a6fd12c282.js></script></body></html>
10
+      })();</script><link href=./static/css/app.4cef2d4d8499be9fa2ff980d2ff2137d.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.005760f08540e67b9957.js></script><script type=text/javascript src=./static/js/app.796b9751e25609984bf2.js></script></body></html>

+ 1 - 0
project/src/assets/config/interface_api.js

320
   dataBoard_orderData_yxOrderList: '/api/order/yxOrderList',// 云选订单列表
320
   dataBoard_orderData_yxOrderList: '/api/order/yxOrderList',// 云选订单列表
321
   dataBoard_orderData_yxOrderActionReport: '/api/order/yxOrderActionReport',// 云选订单手动回传
321
   dataBoard_orderData_yxOrderActionReport: '/api/order/yxOrderActionReport',// 云选订单手动回传
322
   dataBoard_orderData_yxOrderExport: '/api/order/yxOrderExport',// 云选订单导出
322
   dataBoard_orderData_yxOrderExport: '/api/order/yxOrderExport',// 云选订单导出
323
+  dataBoard_orderData_adgroupStatList: '/api/order/adgroupStatList',// 云选广告数据统计
323
 
324
 
324
   getPlatformOptions: "/api/intelligentMassSending/platformIndex", // 平台筛选选项
325
   getPlatformOptions: "/api/intelligentMassSending/platformIndex", // 平台筛选选项
325
   accountManage_accountIndex: "/api/intelligentMassSending/accountIndex", // 平台账号管理 - 账号列表
326
   accountManage_accountIndex: "/api/intelligentMassSending/accountIndex", // 平台账号管理 - 账号列表

+ 69 - 10
project/src/components/dataBoard/yxOrderData.vue

6
         <selfInput style="margin-right: 10px;" width="220px" :hasLabel="false" :reset="resetFlag" label_name="订单ID" @inputChange='onInputOrderId' @onChange="onChangeOrderId" />
6
         <selfInput style="margin-right: 10px;" width="220px" :hasLabel="false" :reset="resetFlag" label_name="订单ID" @inputChange='onInputOrderId' @onChange="onChangeOrderId" />
7
         <selfChannelMultiple style="margin-right: 10px;" title="" type='adqAccount' :reset="resetFlag" :labelWidth="true" @channelDefine="onChangeAccountId" />
7
         <selfChannelMultiple style="margin-right: 10px;" title="" type='adqAccount' :reset="resetFlag" :labelWidth="true" @channelDefine="onChangeAccountId" />
8
         <selfInput style="margin-right: 10px;" width="220px" :hasLabel="false" :reset="resetFlag" label_name="自定义参数" @inputChange="onInputCpsId" @onChange="onChangeCpsId" />
8
         <selfInput style="margin-right: 10px;" width="220px" :hasLabel="false" :reset="resetFlag" label_name="自定义参数" @inputChange="onInputCpsId" @onChange="onChangeCpsId" />
9
-        <!-- <selfChannel style="margin-right: 10px;" title="" type="yxOrderStatus" :reset="resetFlag" :labelWidth="true" @channelDefine="onChangeOrderStatus"/>
10
-        <selfChannelMultiple style="margin-right: 10px;" title="" type='yxOrderReportStatus' :reset="resetFlag" :labelWidth="true" @channelDefine="onChangeReportStatus" />
11
-        <inputRange style="margin-right: 10px;" v-model="filter.money" label="预估佣金"/>
12
-        <el-button size="mini" type="primary" plain @click="init(1)">确定</el-button> -->
13
       </div>
9
       </div>
14
       <div class="reset" @click="resetEvent">重置</div>
10
       <div class="reset" @click="resetEvent">重置</div>
15
       <!-- <el-button v-if="isCanExport" class="export-btn" type="primary" size="mini" @click="onClickExport">导出Excel</el-button> -->
11
       <!-- <el-button v-if="isCanExport" class="export-btn" type="primary" size="mini" @click="onClickExport">导出Excel</el-button> -->
16
     </div>
12
     </div>
13
+    <!-- S 广告汇总 summaryTable -->
14
+    <div v-loading="summaryLoading">
15
+        <ux-grid class="uxGridBox" ref="summaryTable" :border="false" @row-click="() => { return }" :header-cell-style="headerColor" :max-height="height" show-footer-overflow="tooltip" show-overflow="tooltip" size="mini">
16
+          <ux-table-column v-for="(item, idx) in summaryTableCol" :key="item.prop" :resizable="true" :field="item.prop" :title="item.label" :min-width="item.min_width ? item.min_width : 120" :fixed="item.fixed ? item.fixed : ''" align="center">
17
+            <template #header>
18
+            <div class="flex-align-jus-center">{{ item.label }}
19
+              <el-tooltip v-if="item.notes" :content="item.notes" placement="top">
20
+                <div><i class="el-icon-question"></i></div>
21
+              </el-tooltip>
22
+            </div>
23
+          </template>
24
+            <template v-slot="{ row }">
25
+              <span>{{ (row[item.prop] || row[item.prop] == 0) ? $formatNum(row[item.prop]) : '-' }}</span>
26
+            </template>
27
+          </ux-table-column>
28
+        </ux-grid>
29
+      </div>
30
+      <!-- E 广告汇总 summaryTable -->
17
     <div v-loading="loading">
31
     <div v-loading="loading">
18
       <ux-grid class="uxGridBox" ref="plxTable" :border="false" @row-click="() => { return }"
32
       <ux-grid class="uxGridBox" ref="plxTable" :border="false" @row-click="() => { return }"
19
         :header-cell-style="headerColor" :height="height" show-footer-overflow="tooltip" show-overflow="tooltip"
33
         :header-cell-style="headerColor" :height="height" show-footer-overflow="tooltip" show-overflow="tooltip"
89
     return {
103
     return {
90
       dataLoading: false,
104
       dataLoading: false,
91
       loading: false,
105
       loading: false,
106
+      summaryLoading: false,
92
       page: 1,
107
       page: 1,
93
       pages: 0,
108
       pages: 0,
94
       total: 0,
109
       total: 0,
119
         { prop: "adgroup_name", label: "回传广告名称"},
134
         { prop: "adgroup_name", label: "回传广告名称"},
120
         { prop: "actionBtn", label: "操作", fixed: 'right' },
135
         { prop: "actionBtn", label: "操作", fixed: 'right' },
121
       ],
136
       ],
122
-
137
+      summaryTableCol: [
138
+        { prop: "adgroup_name", label: "广告" },
139
+        { prop: "cost", label: "花费" },
140
+        { prop: "predict_commission_fee", label: "预估收入" },
141
+        { prop: "actual_roi", label: "实际roi" },
142
+        { prop: "bid_amount", label: "出价" },
143
+        { prop: "conversions_cost", label: "目标转化成本" }
144
+      ],
123
       filter: {
145
       filter: {
124
         time: [],
146
         time: [],
125
         order_id: '', // 订单ID
147
         order_id: '', // 订单ID
141
     this.height = document.documentElement.clientHeight - 280 > 400 ? document.documentElement.clientHeight - 280 : 400
163
     this.height = document.documentElement.clientHeight - 280 > 400 ? document.documentElement.clientHeight - 280 : 400
142
     this.filter.time = this.default_time
164
     this.filter.time = this.default_time
143
     this.init(1)
165
     this.init(1)
166
+    this.handleGetSummaryList()
144
     // this.init_predata()
167
     // this.init_predata()
145
   },
168
   },
146
   methods: {
169
   methods: {
234
         start_date: this.filter.time[0],
257
         start_date: this.filter.time[0],
235
         end_date: this.filter.time[1],
258
         end_date: this.filter.time[1],
236
         account_id: this.filter.account_id.join(','),
259
         account_id: this.filter.account_id.join(','),
237
-        order_status: this.filter.order_status,
260
+        // order_status: this.filter.order_status,
238
         tx_cps_id: this.filter.cps_id,
261
         tx_cps_id: this.filter.cps_id,
239
-        money_min: this.filter.money[0],
240
-        money_max: this.filter.money[1],
241
-        report_status: this.filter.report_status.join(','),
262
+        // money_min: this.filter.money[0],
263
+        // money_max: this.filter.money[1],
264
+        // report_status: this.filter.report_status.join(','),
242
         sys_group_id: this.$cookie.getCookie('isSuperManage') == 1 ? sessionStorage.getItem('company_session_defaultCorp_level_1').toString() : '',
265
         sys_group_id: this.$cookie.getCookie('isSuperManage') == 1 ? sessionStorage.getItem('company_session_defaultCorp_level_1').toString() : '',
243
         page: this.page,
266
         page: this.page,
244
         page_size: this.page_size,
267
         page_size: this.page_size,
286
     onInputCpsId(val) {
309
     onInputCpsId(val) {
287
       this.filter.cps_id = val
310
       this.filter.cps_id = val
288
       this.init(1)
311
       this.init(1)
312
+      this.handleGetSummaryList();
289
     },
313
     },
290
     onChangeCpsId(val) {
314
     onChangeCpsId(val) {
291
       this.filter.cps_id = val
315
       this.filter.cps_id = val
293
     onChangeAccountId(val) {
317
     onChangeAccountId(val) {
294
       this.filter.account_id = val;
318
       this.filter.account_id = val;
295
       this.init(1);
319
       this.init(1);
320
+      this.handleGetSummaryList();
296
       // this.init_predata();
321
       // this.init_predata();
297
     },
322
     },
298
     onChangeReportStatus(val) {
323
     onChangeReportStatus(val) {
315
       this.filter.order_status = ''
340
       this.filter.order_status = ''
316
       this.filter.report_status = []
341
       this.filter.report_status = []
317
       // this.init_predata()
342
       // this.init_predata()
318
-      this.init(1)
343
+      this.init(1);
344
+      this.handleGetSummaryList();
345
+    },
346
+    async flushData () {
347
+      this.init();
348
+      this.handleGetSummaryList();
319
     },
349
     },
320
     async onClickReport(row) {
350
     async onClickReport(row) {
321
       try {
351
       try {
350
         this.loading = false
380
         this.loading = false
351
       }
381
       }
352
     },
382
     },
383
+    // 获取广告统计数据
384
+    async handleGetSummaryList() {
385
+      try {
386
+        this.summaryLoading = true
387
+        const params = {
388
+          start_date: this.filter.time[0],
389
+          end_date: this.filter.time[1],
390
+          account_id: this.filter.account_id.join(','),
391
+          tx_cps_id: this.filter.cps_id,
392
+          sys_group_id: this.$cookie.getCookie('isSuperManage') == 1 ? sessionStorage.getItem('company_session_defaultCorp_level_1').toString() : '',
393
+        }
394
+        const url = `${this.URL.BASEURL}${this.URL.dataBoard_orderData_adgroupStatList}`
395
+        const { data: res = {} } = await this.$axios.get(url, { params })
396
+        if (res && res.errno == 0) {
397
+          await this.$nextTick()
398
+          // const summaryTableList = Array.isArray(res.rst) ? res.rst : [res.rst]
399
+          const summaryTableList = res.rst
400
+          this.$refs.summaryTable.reloadData(summaryTableList)
401
+        } else if (res.errno != 4002) {
402
+          this.$message.warning(res.err)
403
+          this.$refs.summaryTable.reloadData([])
404
+        }
405
+      } catch (error) {
406
+        console.log(error)
407
+        this.$refs.summaryTable.reloadData([])
408
+      } finally {
409
+        this.summaryLoading = false
410
+      }
411
+    },
353
     // 监听点击"导出" - 离线导出
412
     // 监听点击"导出" - 离线导出
354
     async onClickExport() {
413
     async onClickExport() {
355
       try {
414
       try {

File diff suppressed because it is too large
+ 1 - 1
static/css/app.0e4451c01c962d84085deeefb29c12de.css


File diff suppressed because it is too large
+ 1 - 0
static/js/88.f8d119bdd6cc624e81d0.js


File diff suppressed because it is too large
+ 1 - 1
static/js/88.df44eaa7533aedeb5c3d.js


File diff suppressed because it is too large
+ 1 - 1
static/js/89.2c8ae0658bba4e503dd6.js


File diff suppressed because it is too large
+ 1 - 1
static/js/90.3f37bb3ebb245a060232.js


File diff suppressed because it is too large
+ 1 - 1
static/js/91.f8c2f5c4c3dc43a6c304.js


File diff suppressed because it is too large
+ 1 - 1
static/js/92.0249ea1c8f5cd9f474ec.js


File diff suppressed because it is too large
+ 1 - 1
static/js/93.41918ce7b7243452ec79.js


File diff suppressed because it is too large
+ 1 - 1
static/js/94.0e4d1ec155bc6359d2ad.js


File diff suppressed because it is too large
+ 1 - 1
static/js/95.0b14eb70672a9ce774ce.js


File diff suppressed because it is too large
+ 1 - 1
static/js/96.fbeeca7ce05d2fe451bd.js


File diff suppressed because it is too large
+ 1 - 1
static/js/97.88cc08499fa2a35aba0e.js


File diff suppressed because it is too large
+ 0 - 1
static/js/98.470e4344a266f86165fc.js


File diff suppressed because it is too large
+ 2 - 2
static/js/app.a422327706a6fd12c282.js


File diff suppressed because it is too large
+ 1 - 1
static/js/manifest.9a27d0411801e6eb4aba.js