Bladeren bron

feat: 数据看板 - 投手投放数据快捷跳转逻辑

zhengxy 1 jaar geleden
bovenliggende
commit
6b90f3db4c

+ 1 - 1
index.html

@@ -7,4 +7,4 @@
7 7
         hm.src = "https://hm.baidu.com/hm.js?d61b9e2caf4d46ccda7471b5385e2333";
8 8
         var s = document.getElementsByTagName("script")[0];
9 9
         s.parentNode.insertBefore(hm, s);
10
-      })();</script><link href=./static/css/app.4d226d9fa2acd6d64648f80cee97c3ce.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.4445ee9d9b8899065097.js></script><script type=text/javascript src=./static/js/app.6f64d82ef07d41a4dcde.js></script></body></html>
10
+      })();</script><link href=./static/css/app.a777081abe0c54330f713f04a9d348b3.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.d36e541d1164a569c3f2.js></script><script type=text/javascript src=./static/js/app.d327995c5fa95a8d4462.js></script></body></html>

+ 92 - 0
project/src/components/dataBoard/throwPerson/selectCorpDialog.vue

@@ -0,0 +1,92 @@
1
+<template>
2
+  <el-dialog
3
+    :visible.sync="dialogVisible"
4
+    :before-close="handleCancel"
5
+    class="dialog-wrap"
6
+    :title="title"
7
+    width="550px"
8
+    :close-on-click-modal="false"
9
+  >
10
+    <div class="content-wrap" v-loading="loading">
11
+      <p class="tips">当前数据项包含多个企微,请选择以下其中之一点击跳转至【充值订单管理】</p>
12
+      <div class="btn-wrap" v-if="corpOptions && corpOptions.length">
13
+        <el-button v-for="corp in corpOptions" :key="corp.corpid" type="text" class="text-btn" @click="onClickCorp(corp)">{{ corp.corp_name }}</el-button>
14
+      </div>
15
+    </div>
16
+    <div slot="footer" class="dialog-footer">
17
+      <el-button size="mini" type="primary" @click="handleCancel">关 闭</el-button>
18
+    </div>
19
+  </el-dialog>
20
+</template>
21
+
22
+<script>
23
+export default {
24
+  props: {
25
+    // 控制弹框是否显示
26
+    dialogVisible: {
27
+      type: Boolean,
28
+      default: () => false
29
+    },
30
+    corpOptions: {
31
+      type: Array,
32
+      default: () => []
33
+    }
34
+  },
35
+  data() {
36
+    return {
37
+      loading: false,
38
+    }
39
+  },
40
+  computed: {
41
+    title() {
42
+      return ``
43
+    },
44
+  },
45
+  watch: {
46
+    dialogVisible(isShow) {
47
+      if (isShow) {
48
+        // 获取表单数据
49
+        // this.handleGetFormData()
50
+      }
51
+    },
52
+  },
53
+  methods: {
54
+    onClickCorp(corp) {
55
+      this.$emit('confirm', corp)
56
+    },
57
+    handleCancel() {
58
+      // this.handleClearFormData()
59
+      this.$emit('cancel')
60
+    },
61
+    // 清空弹框表单数据
62
+    handleClearFormData() {
63
+
64
+    },
65
+  },
66
+};
67
+</script>
68
+
69
+<style lang="scss" scoped>
70
+.dialog-wrap {
71
+  .content-wrap {
72
+    .tips {
73
+      font-size:14px;
74
+      line-height:30px;
75
+      color:#666;
76
+    }
77
+    .btn-wrap {
78
+      margin-top: 10px;
79
+      display: flex;
80
+      align-items: center;
81
+      flex-wrap: wrap;
82
+      .text-btn {
83
+        margin-right: 15px;
84
+        margin-left: 0;
85
+      }
86
+    }
87
+  }
88
+  .dialog-footer {
89
+    text-align: center;
90
+  }
91
+}
92
+</style>

+ 62 - 1
project/src/components/dataBoard/throwPerson/throwPersonPuton.vue

@@ -94,6 +94,10 @@
94 94
         <template v-slot="{ row }">
95 95
           <span v-if="item.prop === 'account_name'" :class="sort_field == item.prop ? 'sortFieldStyle' : ''" style="color: #00b38a;cursor: pointer;" @click="onClickAccountName(row[item.prop])">{{ row[item.prop] }}</span>
96 96
 
97
+          <!-- S 首日充值金额 -->
98
+          <span v-else-if="item.prop === 'first_day_pay'" style="color: #00b38a;cursor: pointer;" @click="onClickFirstDayPay(row)">{{ row[item.prop] }}</span>
99
+          <!-- E 首日充值金额 -->
100
+
97 101
           <!-- S 公众号 -->
98 102
           <div v-else-if="item.prop === 'official_account_name'" style="padding: 4px 0;">
99 103
             <template v-if="row['official_account_name'] && row['official_account_name'].length">
@@ -127,16 +131,31 @@
127 131
         @current-change="handleCurrentChange" @size-change="handleSizeChange"
128 132
       />
129 133
     </div>
134
+
135
+    <selectCorpDialog
136
+      :dialogVisible="selectCorpDialogVisible"
137
+      :corpOptions="currentCorpOptions"
138
+      @cancel="onCancelSelectCorp"
139
+      @confirm="onConfirmSelectCorp"
140
+    />
130 141
   </div>
131 142
 </template>
132 143
 <script>
144
+import _lodash from 'lodash'
133 145
 import datePicker from '@/components/assembly/screen/datePicker.vue'
134 146
 import selfChannel from '@/components/assembly/screen/channel.vue'
135 147
 import selfChannelMultiple from '@/components/assembly/screen/channelMultiple.vue'
136 148
 import colPopover from '@/components/assembly/screen/colPopover.vue'
149
+import selectCorpDialog from './selectCorpDialog.vue'
137 150
 
138 151
 export default {
139
-  components: { datePicker, selfChannel, colPopover, selfChannelMultiple },
152
+  components: {
153
+    datePicker,
154
+    selfChannel,
155
+    colPopover,
156
+    selfChannelMultiple,
157
+    selectCorpDialog,
158
+  },
140 159
   data () {
141 160
     return {
142 161
       dataLoading: false,
@@ -267,6 +286,10 @@ export default {
267 286
       },//去重数据
268 287
       reset: false,
269 288
       updateTime: '', // 数据更新时间
289
+
290
+      selectCorpDialogVisible: false,
291
+      currentCorpOptions: [],
292
+      currentAccountName: '',
270 293
     }
271 294
   },
272 295
   computed: {
@@ -529,6 +552,44 @@ export default {
529 552
       const url = `https://ad.qq.com/atlas/${ account }/admanage/adgroup?query={"operation_status":["CALCULATE_STATUS_EXCLUDE_DEL"],"system_status":[]}&tab=adgroup`
530 553
       window.open(url, '_blank')
531 554
     },
555
+
556
+    onConfirmSelectCorp(corp) {
557
+      this.handleJumpToCZDDGL({
558
+        account: this.currentAccountName,
559
+        corpid: corp.corpid,
560
+      })
561
+      this.onCancelSelectCorp()
562
+    },
563
+    onCancelSelectCorp() {
564
+      this.selectCorpDialogVisible = false
565
+      this.currentCorpOptions = []
566
+      this.currentAccountName = ''
567
+    },
568
+    onClickFirstDayPay(row) {
569
+      this.currentAccountName = row.account_name
570
+      if (row.user_list && row.user_list.length) {
571
+        this.currentCorpOptions = _lodash.uniqBy(row.user_list, 'corpid')
572
+        if (this.currentCorpOptions.length > 1) { // 多企微弹框提示 => 选择企微后跳转
573
+          this.selectCorpDialogVisible = true
574
+        } else { // 单企微 => 直接跳转
575
+          this.handleJumpToCZDDGL({
576
+            account: this.currentAccountName,
577
+            corpid: this.currentCorpOptions[0].corpid,
578
+          })
579
+        }
580
+      } else {
581
+        this.$message.warning('暂无使用客服')
582
+        return false
583
+      }
584
+    },
585
+    // 跳转 => 充值订单管理
586
+    handleJumpToCZDDGL({ account, corpid }) {
587
+      const path = this.$router.resolve({
588
+        path: '/charge',
589
+        query: { account, corpid }
590
+      })
591
+      window.open(path.href, '_blank')
592
+    },
532 593
   }
533 594
 }
534 595
 </script>

+ 33 - 5
project/src/components/orderManage/charge.vue

@@ -10,10 +10,11 @@
10 10
         <self-channel style="margin-right: 10px;" title="" type='launchType' :reset="resetFlag" :labelWidth="true" @channelDefine="(val) => { order_type = val; init(1); init_predata() }" />
11 11
         <self-channel style="margin-right: 10px;" title="" type='promotionType' :reset="resetFlag" :labelWidth="true" @channelDefine="(val) => { plat_order_type = val; init(1); init_predata() }" />
12 12
         <self-channel style="margin-right: 10px;" title="" type='incomeSource' :reset="resetFlag" :labelWidth="true" @channelDefine="(val) => { is_ad_user = val; init(1); init_predata() }" />
13
-        <self-channel style="margin-right: 10px;" title="" type='adqAccount' :reset="resetFlag" :labelWidth="true" @channelDefine="(val) => { account_id = val; init(1); init_predata() }" />
13
+        <selfChannelV2 style="margin-right: 10px;" v-model="account_id" type='adqAccount' title="" :labelWidth="true" @change="(val) => { account_id = val; init(1); init_predata() }" />
14 14
         <date-picker title="" :quickFlag="false" :clearFlag='true' :timeFlag="true" :reset="resetFlag" placeholder="用户注册时间" :defaultTime="['00:00:00', '23:59:59']" :pickerOptions="pickerOptions" @changeTime="changeTimeUserReg" style="margin-right: 10px;"  />
15 15
         <selfChannelV2 style="margin-right: 10px;" v-model="order_pay_type" type='orderPayType' title="" :labelWidth="true" @change="onChangeOrderPayType" />
16 16
         <selfChannelV2 style="margin-right: 10px;" v-model="ad_report_action_type" type='adReportType' title="" :labelWidth="true" @change="onChangeAdReportActionType" />
17
+        <selfSelectCorp style="margin-right: 10px;" v-model="corp_id" labelName="" placeholder="企微主体" @change="onChangeCorpid" />
17 18
       </div>
18 19
       <div class="reset" @click="resetEvent">重置</div>
19 20
       <el-button class="export-btn" type="primary" size="mini" @click="init(1, 'export')">导出Excel</el-button>
@@ -147,8 +148,7 @@
147 148
       </ux-grid>
148 149
       <div class="pagination" v-show="total > 0">
149 150
         <el-pagination background :current-page="page" @current-change="handleCurrentChange" layout="prev, pager, next"
150
-          :page-count='Number(pages)'>
151
-        </el-pagination>
151
+          :page-count='Number(pages)' />
152 152
       </div>
153 153
     </div>
154 154
     <!--详情-->
@@ -167,10 +167,18 @@ import selfChannel from '@/components/assembly/screen/channel.vue'
167 167
 import selfInput from '@/components/assembly/screen/input.vue'
168 168
 import { promotionTypeDesc, incomeSourceDesc, launchTypeDesc } from '@/assets/js/staticTypes'
169 169
 import selfChannelV2 from '@/components/assembly/screen/channelV2.vue'
170
+import selfSelectCorp from '@/components/assembly/screen/selectCorp.vue'
170 171
 
171 172
 export default {
172 173
   name: 'charge',
173
-  components: { datePicker, selfChannel, selfInput, detial, selfChannelV2, },
174
+  components: {
175
+    datePicker,
176
+    selfChannel,
177
+    selfInput,
178
+    detial,
179
+    selfChannelV2,
180
+    selfSelectCorp,
181
+  },
174 182
   data () {
175 183
     return {
176 184
       time: [],
@@ -234,10 +242,19 @@ export default {
234 242
       is_ad_user: '',
235 243
       order_pay_type: '',
236 244
       ad_report_action_type: '',
245
+      corp_id: '', // 企微筛选(非header全局筛选)
237 246
     }
238 247
   },
239 248
   created () {
240 249
     this.height = document.documentElement.clientHeight - 280 > 400 ? document.documentElement.clientHeight - 280 : 400
250
+    const { query: { account = '' } } = this.$route
251
+    if (account) { // 默认筛选ADQ账号
252
+      this.account_id = account
253
+      this.default_time = [this.$getDay(0, false), this.$getDay(0, false)]
254
+    }
255
+  },
256
+  mounted() {
257
+    this.corp_id = this.$route.query.corpid || '' // 默认筛选企微
241 258
     this.time = this.default_time
242 259
     this.init(1)
243 260
     this.init_predata()
@@ -324,7 +341,8 @@ export default {
324 341
     },
325 342
     resetEvent () {//重置
326 343
       this.resetFlag = !this.resetFlag
327
-      this.time = [this.$getDay(-30, false), this.$getDay(0, false)]
344
+      this.default_time = [this.$getDay(-30, false), this.$getDay(0, false)]
345
+      this.time = this.default_time
328 346
       this.userRegTime = []
329 347
       this.chargePay_val = ''
330 348
       this.paySource_val = ''
@@ -336,6 +354,8 @@ export default {
336 354
       this.is_ad_user = ''
337 355
       this.order_pay_type = ''
338 356
       this.ad_report_action_type = ''
357
+      this.corp_id = ''
358
+      if (this.$route.query.account) { this.$router.replace({ query: {} }) } // 清除url参数
339 359
       this.init_predata()
340 360
       this.init(1)
341 361
     },
@@ -370,6 +390,12 @@ export default {
370 390
       this.init_predata()
371 391
       this.init(1)
372 392
     },
393
+    // 监听企微主体筛选变化
394
+    onChangeCorpid(corp) {
395
+      this.corp_id = corp ? corp.corpid : ''
396
+      this.init_predata()
397
+      this.init(1)
398
+    },
373 399
     init_predata () {
374 400
       this.dataLoading = true
375 401
       this.$axios.post(this.URL.BASEURL + this.URL.charge_pre_data, {
@@ -386,6 +412,7 @@ export default {
386 412
         order_pay_type: this.order_pay_type || 0, // 全部0
387 413
         ad_report_action_type: this.ad_report_action_type || 0, // 全部0
388 414
         type: 1, // "猎羽-充值订单管理"传1、"数据看板-订单数据统计"传2
415
+        corp_id: this.corp_id || '',
389 416
       })
390 417
         .then((res) => {
391 418
           var res = res.data
@@ -444,6 +471,7 @@ export default {
444 471
         user_reg_st: this.userRegTime[0] || '',
445 472
         user_reg_et: this.userRegTime[1] || '',
446 473
         pay_status: this.chargePay_val,
474
+        corp_id: this.corp_id || '',
447 475
         page: type == 'export' ? 1 : this.page,
448 476
         page_size: type == 'export' ? this.$store.state.exportNumber : this.page_size,
449 477
       }).then((res) => {

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


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


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


File diff suppressed because it is too large
+ 1 - 1
static/js/10.95284700dababf14bbb4.js


File diff suppressed because it is too large
+ 1 - 1
static/js/11.b86d3f6370a5dbc7360f.js


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


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


File diff suppressed because it is too large
+ 1 - 1
static/js/81.2f7efb0abd0a1a6fb87e.js


File diff suppressed because it is too large
+ 1 - 1
static/js/82.f5711b28bebd658f9149.js


File diff suppressed because it is too large
+ 1 - 1
static/js/83.9f6c1077ae155499d495.js


File diff suppressed because it is too large
+ 1 - 1
static/js/84.7c72a980ebeb7168c1f2.js


File diff suppressed because it is too large
+ 1 - 1
static/js/85.e7ada41f13750a220043.js


File diff suppressed because it is too large
+ 1 - 1
static/js/86.ed25e10d5ab10e0064b1.js


File diff suppressed because it is too large
+ 1 - 1
static/js/87.4a030193415e89e010a2.js


File diff suppressed because it is too large
+ 1 - 1
static/js/88.627161342ac3e8470a75.js


File diff suppressed because it is too large
+ 1 - 1
static/js/89.892cdbf38fa832efe134.js


File diff suppressed because it is too large
+ 1 - 1
static/js/90.4e5d9510d0b6e4c6a48b.js


File diff suppressed because it is too large
+ 1 - 1
static/js/91.4579b56b2a96ac1ab691.js


File diff suppressed because it is too large
+ 1 - 1
static/js/92.ec7d00e8040debc77e6f.js


File diff suppressed because it is too large
+ 1 - 1
static/js/93.91f9ceb00fc3d1c51394.js


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


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


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