|
@@ -6,14 +6,28 @@
|
6
|
6
|
<selfInput style="margin-right: 10px;" width="220px" :hasLabel="false" :reset="resetFlag" label_name="订单ID" @inputChange='onInputOrderId' @onChange="onChangeOrderId" />
|
7
|
7
|
<selfChannelMultiple style="margin-right: 10px;" title="" type='adqAccount' :reset="resetFlag" :labelWidth="true" @channelDefine="onChangeAccountId" />
|
8
|
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
|
9
|
</div>
|
14
|
10
|
<div class="reset" @click="resetEvent">重置</div>
|
15
|
11
|
<!-- <el-button v-if="isCanExport" class="export-btn" type="primary" size="mini" @click="onClickExport">导出Excel</el-button> -->
|
16
|
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
|
31
|
<div v-loading="loading">
|
18
|
32
|
<ux-grid class="uxGridBox" ref="plxTable" :border="false" @row-click="() => { return }"
|
19
|
33
|
:header-cell-style="headerColor" :height="height" show-footer-overflow="tooltip" show-overflow="tooltip"
|
|
@@ -89,6 +103,7 @@ export default {
|
89
|
103
|
return {
|
90
|
104
|
dataLoading: false,
|
91
|
105
|
loading: false,
|
|
106
|
+ summaryLoading: false,
|
92
|
107
|
page: 1,
|
93
|
108
|
pages: 0,
|
94
|
109
|
total: 0,
|
|
@@ -119,7 +134,14 @@ export default {
|
119
|
134
|
{ prop: "adgroup_name", label: "回传广告名称"},
|
120
|
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
|
145
|
filter: {
|
124
|
146
|
time: [],
|
125
|
147
|
order_id: '', // 订单ID
|
|
@@ -141,6 +163,7 @@ export default {
|
141
|
163
|
this.height = document.documentElement.clientHeight - 280 > 400 ? document.documentElement.clientHeight - 280 : 400
|
142
|
164
|
this.filter.time = this.default_time
|
143
|
165
|
this.init(1)
|
|
166
|
+ this.handleGetSummaryList()
|
144
|
167
|
// this.init_predata()
|
145
|
168
|
},
|
146
|
169
|
methods: {
|
|
@@ -234,11 +257,11 @@ export default {
|
234
|
257
|
start_date: this.filter.time[0],
|
235
|
258
|
end_date: this.filter.time[1],
|
236
|
259
|
account_id: this.filter.account_id.join(','),
|
237
|
|
- order_status: this.filter.order_status,
|
|
260
|
+ // order_status: this.filter.order_status,
|
238
|
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
|
265
|
sys_group_id: this.$cookie.getCookie('isSuperManage') == 1 ? sessionStorage.getItem('company_session_defaultCorp_level_1').toString() : '',
|
243
|
266
|
page: this.page,
|
244
|
267
|
page_size: this.page_size,
|
|
@@ -286,6 +309,7 @@ export default {
|
286
|
309
|
onInputCpsId(val) {
|
287
|
310
|
this.filter.cps_id = val
|
288
|
311
|
this.init(1)
|
|
312
|
+ this.handleGetSummaryList();
|
289
|
313
|
},
|
290
|
314
|
onChangeCpsId(val) {
|
291
|
315
|
this.filter.cps_id = val
|
|
@@ -293,6 +317,7 @@ export default {
|
293
|
317
|
onChangeAccountId(val) {
|
294
|
318
|
this.filter.account_id = val;
|
295
|
319
|
this.init(1);
|
|
320
|
+ this.handleGetSummaryList();
|
296
|
321
|
// this.init_predata();
|
297
|
322
|
},
|
298
|
323
|
onChangeReportStatus(val) {
|
|
@@ -315,7 +340,12 @@ export default {
|
315
|
340
|
this.filter.order_status = ''
|
316
|
341
|
this.filter.report_status = []
|
317
|
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
|
350
|
async onClickReport(row) {
|
321
|
351
|
try {
|
|
@@ -350,6 +380,35 @@ export default {
|
350
|
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
|
413
|
async onClickExport() {
|
355
|
414
|
try {
|