Browse Source

feat: 企微数据 - 数据循环统计 - 新增"首日ROI"等区间筛选接口联调

zhengxy 2 years ago
parent
commit
25b93290a6

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

@@ -96,6 +96,7 @@ var api = {
96 96
   stat_throwPersonList: "/api/stat/throwPersonList",
97 97
   pitcher_pitcherList: "/api/pitcher/pitcherList",
98 98
   statistics_reg_range_report: "/api/statistics/reg_range_report",
99
+  statistics_reg_range_report_new: "/api/statistics/reg_range_report_new",
99 100
   pitcher_bind: "/api/pitcher/bind",
100 101
   pitcher_index: "/api/pitcher/index",
101 102
   pitcher_relaEdit: "/api/pitcher/relaEdit",

+ 1 - 1
project/src/components/assembly/screen/switchMpAdq.vue

@@ -19,7 +19,7 @@ export default {
19 19
   props: {
20 20
     value: {
21 21
       type: String | Number,
22
-      default: () => orderTypeOptions.MP
22
+      default: () => ''
23 23
     },
24 24
   },
25 25
   data () {

+ 52 - 9
project/src/components/dataBoard/regRangeReport.vue

@@ -2,21 +2,21 @@
2 2
   <div v-loading="loading">
3 3
     <div class="screenBox flex">
4 4
       <div class="flex">
5
-        <date-picker title="自定义" :quickFlag='true' :afferent_time="default_time" :clearFlag='false'
5
+        <date-picker :reset="reset" title="自定义" :quickFlag='true' :afferent_time="default_time" :clearFlag='false'
6 6
           @changeTime="changeTime"></date-picker>
7 7
       </div>
8 8
       <el-button type="primary" size="mini" @click="init(1, 'export')">导出Excel</el-button>
9 9
     </div>
10 10
 
11 11
     <!-- S 新增区间筛选项 -->
12
-    <!-- TODO: 待联调 -->
13 12
     <div class="screenBox filter-wrap">
14
-      <input-range v-model="roiRangeValue" label="首日ROI" />
15
-      <input-range v-model="roiRangeValue" label="下单成本" />
16
-      <input-range v-model="roiRangeValue" label="下单成本(去重)" />
17
-      <input-range v-model="roiRangeValue" label="企微成本" />
18
-      <input-range v-model="roiRangeValue" label="回本率" />
13
+      <input-range v-model="firstDayRoi" label="首日ROI" />
14
+      <input-range v-model="firstOrderCost " label="下单成本" />
15
+      <input-range v-model="firstOrderCostUnique" label="下单成本(去重)" />
16
+      <input-range v-model="perFollowCost" label="企微成本" />
17
+      <input-range v-model="totalRoi" label="回本率" />
19 18
       <el-button size="mini" type="primary" plain @click="init(1)">确定</el-button>
19
+      <div class="reset" @click="handleReset">重置</div>
20 20
     </div>
21 21
     <!-- S 新增区间筛选项 -->
22 22
 
@@ -64,7 +64,12 @@ export default {
64 64
       desCol: [],
65 65
       height: '',
66 66
 
67
-      roiRangeValue: ['', ''],
67
+      firstDayRoi: ['', ''], // 首日ROI(范围)
68
+      firstOrderCost: ['', ''], // 下单成本(范围)
69
+      firstOrderCostUnique: ['', ''], // 下单成本(去重)(范围)
70
+      perFollowCost: ['', ''], // 企微成本(范围)
71
+      totalRoi: ['', ''], // 回本率(范围)
72
+      reset: false,
68 73
     }
69 74
   },
70 75
   created () {
@@ -73,6 +78,16 @@ export default {
73 78
     this.init(1)
74 79
   },
75 80
   methods: {
81
+    handleReset() {
82
+      this.reset = !this.reset
83
+      this.time = this.default_time
84
+      this.firstDayRoi = ['', ''] // 首日ROI(范围)
85
+      this.firstOrderCost = ['', ''] // 下单成本(范围)
86
+      this.firstOrderCostUnique = ['', ''] // 下单成本(去重)(范围)
87
+      this.perFollowCost = ['', ''] // 企微成本(范围)
88
+      this.totalRoi = ['', ''] // 回本率(范围)
89
+      this.init(1)
90
+    },
76 91
     changeTime (time) {//筛选时间变化
77 92
       if (!time || time && time.length == 0) {
78 93
         this.time = []
@@ -94,10 +109,20 @@ export default {
94 109
         }
95 110
       }
96 111
       this.loading = true
97
-      this.$axios.get(this.URL.BASEURL + this.URL.statistics_reg_range_report, {
112
+      this.$axios.get(`${this.URL.BASEURL}${this.URL.statistics_reg_range_report_new}`, {
98 113
         params: {
99 114
           begin_date: this.time[0],
100 115
           end_date: this.time[1],
116
+          first_day_roi_min: this.firstDayRoi[0],
117
+          first_day_roi_max: this.firstDayRoi[1],
118
+          first_order_cost_min: this.firstOrderCost[0],
119
+          first_order_cost_max: this.firstOrderCost[1],
120
+          first_order_cost_unique_min: this.firstOrderCostUnique[0],
121
+          first_order_cost_unique_max: this.firstOrderCostUnique[1],
122
+          per_follow_cost_min: this.perFollowCost[0],
123
+          per_follow_cost_max: this.perFollowCost[1],
124
+          total_roi_min: this.totalRoi[0],
125
+          total_roi_max: this.totalRoi[1],
101 126
           page: type == 'export' ? 1 : this.page,
102 127
           page_size: type == 'export' ? this.$store.state.exportNumber : this.page_size,
103 128
         }
@@ -156,8 +181,25 @@ export default {
156 181
 </script>
157 182
 <style lang="scss" scoped>
158 183
 .screenBox {
184
+  position: relative;
159 185
   background: #fff;
160 186
   padding: 5px 20px;
187
+  .reset {
188
+    width: 80px;
189
+    height: 30px;
190
+    background: #00b38a;
191
+    border-radius: 100px 3px 3px 3px;
192
+    border: 1px solid #d2d2d2;
193
+    color: #ffffff;
194
+    font-size: 14px;
195
+    line-height: 30px;
196
+    text-align: center;
197
+    position: absolute;
198
+    bottom: 0;
199
+    right: 0;
200
+    letter-spacing: 2px;
201
+    cursor: pointer;
202
+  }
161 203
 }
162 204
 .ml-10 {
163 205
   margin-left: 10px;
@@ -166,6 +208,7 @@ export default {
166 208
   display: flex;
167 209
   align-items: center;
168 210
   flex-wrap: wrap;
211
+  padding-bottom: 34px;
169 212
   & > div {
170 213
     margin: 0 10px 10px 0;
171 214
   }