workReport.vue
15.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
<template>
<div class="index_wrap">
<Top :activeIndex="activeIndex"></Top>
<!-- 主体内容 -->
<div class="work_report_wrap">
<!-- 标题 -->
<div class="report_title">
工作报告</div>
<!-- 工作报告 -->
<div class="work_report_main">
<!-- 下拉选框 -->
<div class="select_group layout align_center flex_row flex-wrap">
<!-- 时间区间 -->
<div class="qujian">
<div class="quname">时间区间:</div>
<el-select
class="currency_money"
v-model="timeValue"
placeholder="Time interval"
@change="getReport()"
>
<el-option
v-for="item in timeOption"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</div>
<!-- 客户状态 -->
<div class="qujian">
<div class="quname">客户状态</div>
<el-select
class="currency_money"
v-model="customerValue"
placeholder="Customer status"
@change="getReport()"
>
<el-option
v-for="item in customerOption"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</div>
<!-- 货币类型 -->
<div class="qujian">
<div class="quname">币种</div>
<el-select
class="currency_money"
v-model="currencyValue"
placeholder="Currency"
@change="getReport()"
>
<el-option
v-for="item in currencyOption"
:key="item.id"
:label="item.currency_name"
:value="item.id"
></el-option>
</el-select>
</div>
<!-- 付款状态 -->
<div class="qujian">
<div class="quname">付款状态</div>
<el-select
class="currency_money"
v-model="payValue"
placeholder="Payment status"
@change="getReport()"
>
<el-option
v-for="item in payOption"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</div>
<!-- 移民办理状态 -->
<div class="qujian">
<div class='quname'>移民办理状态</div>
<el-select
class="currency_money"
v-model="dealValue"
placeholder="Transaction state"
@change="getReport()"
>
<el-option
v-for="item in dealOption"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</div>
<!-- 办理结果 -->
<div class="qujian">
<div class="quname">办理结果</div>
<el-select
class="currency_money"
v-model="resultValue"
placeholder="Transaction results"
@change="getReport()"
>
<el-option
v-for="item in resultOption"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</div>
<!-- 我的代理 -->
<div v-show="type == 1">
<div class="my_agent" v-if="isAgent" @click="toAgent()">我的代理</div>
<div class="my_agent" v-else @click="closeAgent()">关闭</div>
</div>
</div>
<!-- 客户信息 -->
<div class="customer_infor">
<!-- 标题 -->
<div class="cus_infor_title layout align_center flex_row justify_start">
<div class="customer_icon">
<img src="@/assets/img_21.png" alt />
</div>
<div>客户信息</div>
</div>
<!-- 表格 -->
<div class="customer_table">
<el-table
:data="tableData"
:cell-style="changeFirstRow"
border
:header-row-style="changeTitle"
>
<el-table-column fixed prop="number" label="申请ID" width="120" align="center"></el-table-column>
<el-table-column fixed prop="name" label="客户姓名" width="120" align="center"></el-table-column>
<!-- 客户状态 -->
<el-table-column label="客户状态" width="100" align="center">
<template
slot-scope="scope"
>{{scope.row.user_status == 1?"移民测评":scope.row.user_status == 2?"资质审核":scope.row.user_status == 3?"合同签订":scope.row.user_status == 4?"费用交纳":scope.row.user_status == 5?"移民办理":scope.row.user_status == 6?"结单":""}}</template>
</el-table-column>
<!-- 移民国家 -->
<el-table-column
prop="country_name"
label="移民国家"
width="100"
align="center"
></el-table-column>
<!-- 创建时间 -->
<el-table-column prop="createtime" label="创建时间" width="160" align="center"></el-table-column>
<!-- 测评分值 -->
<el-table-column
prop="score"
label="测评分值"
width="113"
align="center"
></el-table-column>
<!-- 办理时长 -->
<el-table-column prop="month" label="办理时长" width="105" align="center"></el-table-column>
<!-- 合同状态 -->
<el-table-column prop="city" label="合同状态" width="90" align="center">
<template slot-scope="scope">
<div
:class="{red_color:scope.row.agreement_status == 1}"
>{{scope.row.agreement_status == 1?"未签订":scope.row.agreement_status == 2?"已签订":""}}</div>
</template>
</el-table-column>
<!-- 合同签订时间 -->
<el-table-column
prop="contract_time"
label="合同签订时间"
width="160"
align="center"
></el-table-column>
<!-- 付款状态 -->
<el-table-column label="付款状态" width="90" align="center">
<template slot-scope="scope">
<div
:class="{red_color:scope.row.pay_status == 3 && scope.row.user_status == 4}"
>{{scope.row.pay_status == 1?"付款中":scope.row.pay_status == 2?"已付款":scope.row.pay_status == 3?"财务催款":""}}</div>
</template>
</el-table-column>
<!-- 币种 -->
<el-table-column prop="currency_name" label="币种" width="90" align="center"></el-table-column>
<!-- 付款账户 -->
<el-table-column
prop="bank_account"
label="付款账户"
width="105"
align="center"
></el-table-column>
<!-- 移民款 -->
<el-table-column label="移民款" align="center">
<el-table-column
prop="immigrant_total"
label="应付金额"
width="110"
align="center"
></el-table-column>
<el-table-column
prop="immigrant_pay_total"
label="已付金额"
width="110"
align="center"
></el-table-column>
<el-table-column
prop="immigrant_residue_total"
label="未付金额"
width="110"
align="center"
></el-table-column>
</el-table-column>
<!-- 捐赠款 -->
<el-table-column label="捐赠款" align="center">
<el-table-column
prop="donate_total"
label="应付金额"
width="110"
align="center"
></el-table-column>
<el-table-column
prop="donate_pay_total"
label="已付金额"
width="110"
align="center"
></el-table-column>
<el-table-column
prop="dontate_residue_total"
label="未付金额"
width="110"
align="center"
></el-table-column>
</el-table-column>
<!-- 移民办理状态 -->
<el-table-column label="移民办理状态" width="120" align="center">
<template slot-scope="scope">
<div>{{scope.row.banli_status==1?"办理中":scope.row.banli_status==2?"结单":""}}</div>
</template>
</el-table-column>
<!-- 办理结果 -->
<el-table-column label="办理结果" width="110" align="center">
<template slot-scope="scope">
<div>{{scope.row.result_status == 1?"成功":scope.row.result_status == 2?"失败":""}}</div>
</template>
</el-table-column>
<!-- 代理商姓名 -->
<el-table-column
v-if="agency == 1"
prop="agent_name"
label="代理商姓名"
width="105"
align="center"
></el-table-column>
<!-- 提成 -->
<el-table-column
label="销售提成"
width="110"
align="center"
key="1"
v-if="payCurrency.length>0"
>
<el-table-column
:label="item.currency_name"
width="110"
align="center"
v-for="(item,index) in payCurrency"
:key="index"
>
<template slot-scope="scope">
<!-- 合计 -->
<div v-if="scope.row.number == '合计'">{{item.money}}</div>
<div v-else>{{scope.row.currency_id == item.id?scope.row.deduct:""}}</div>
</template>
</el-table-column>
</el-table-column>
</el-table>
</div>
<!-- 分页 -->
<div class="customer_page">
<Pagation @getPage="getSonPage" :allPages="allPages"></Pagation>
</div>
</div>
</div>
</div>
<Bottom></Bottom>
</div>
</template>
<script>
import Top from "../../common/top";
import Bottom from "../../common/bottom";
import Pagation from "../../common/pagation";
import { post } from "../../../api/http";
export default {
data() {
return {
// 是否为代理员
// 1:业务员 2:代理商
type: "",
agency: "",
// 我的代理
isAgent: true,
// 页数
page: 1,
// 总页数
allPages: 1,
activeIndex: 2,
// 时间区间
timeOption: [
{
value: "year",
label: "本年"
},
{
value: "quarter",
label: "本季度"
},
{
value: "month",
label: "本月"
}
],
timeValue: "month",
// 客户状态
customerOption: [
{
value: "",
label: "全部"
},
{
value: "1",
label: "移民测评"
},
{
value: "2",
label: "资质审核"
},
{
value: "3",
label: "合同签订"
},
{
value: "4",
label: "费用交纳"
},
{
value: "5",
label: "移民办理"
},
{
value: "6",
label: "结单"
}
],
customerValue: "",
// 货币类型
currencyOption: [
{
id: "",
currency_name: "全部"
}
],
currencyValue: "",
// 付款状态
payOption: [
{
value: "",
label: "全部"
},
{
value: "1",
label: "付款中"
},
{
value: "2",
label: "已付款"
},
{
value: "3",
label: "财务催款"
}
],
payValue: "",
// 移民办理状态
dealOption: [
{
value: "",
label: "全部"
},
{
value: "1",
label: "办理中"
},
{
value: "2",
label: "结单"
}
],
dealValue: "",
// 办理结果
resultOption: [
{
value: "",
label: "全部"
},
{
value: "1",
label: "成功"
},
{
value: "2",
label: "失败"
}
],
resultValue: "",
// 客户信息
tableData: [],
// 支付币种类型
payCurrency: []
};
},
methods: {
// 我的代理
toAgent() {
this.isAgent = false;
this.agency = 1;
this.getReport();
},
closeAgent() {
this.isAgent = true;
this.agency = "";
this.getReport();
},
// 获取货币类型
getCurrency() {
let url = "/api/sundry/get_currency";
post(url).then(res => {
this.currencyOption = [...this.currencyOption, ...res];
});
},
// 获取工作报告
getReport() {
let url = "/api/report/index";
let params = {
time: this.timeValue,
user_status: this.customerValue,
currency_id: this.currencyValue,
pay_status: this.payValue,
agency: this.agency,
result_status: this.resultValue,
banli_status: this.dealValue,
page: this.page
};
post(url, params).then(res => {
this.allPages = res.total_page;
if (res.list.length > 1) {
this.tableData = res.list;
} else {
this.tableData = [];
}
// 币种
if (res.currency) {
this.payCurrency = res.currency;
} else {
this.payCurrency = [];
}
});
},
// 更改表头样式
changeTitle({ row, rowIndex }) {
return "color:#333;font-size:16px";
},
// 更改第一行样式
changeFirstRow({ row, column, rowIndex, columnIndex }) {
if (rowIndex == 0) {
return "color: #00c317;";
}
},
// 获取当前页码 跳页
getSonPage(data) {
this.page = data;
this.getReport();
}
},
components: {
Top,
Bottom,
Pagation
},
mounted() {
// 是否为代理员 1:业务员 2:代理商
this.type = localStorage.getItem("type");
// 获取货币类型
this.getCurrency();
// 获取工作报告
this.getReport();
}
};
</script>
<style>
.work_report_wrap .el-select {
margin-right: 9px;
/* margin-bottom: 20px; */
font-size: 18px;
}
</style>
<style scoped>
@import url("../../../style/workReport.css");
.currency_money{
width:109px;
}
.customer_page {
margin-right: 13px;
}
.qujian{
display:flex;
align-items: center;
justify-content: center;
margin-bottom:20px;
}
.quname{
height:37px;
line-height: 37px;
margin-right:10px;
font-size: 6px;
}
/* 我的代理 */
.my_agent {
width: 120px;
height: 40px;
text-align: center;
line-height: 40px;
background-color: #526aa6;
color: #fff;
border-radius: 3px;
font-size: 20px;
margin-bottom: 20px;
}
.my_agent:hover {
opacity: 0.8;
}
/* 异常状态 */
.red_color {
color: #00c317;
}
.green_color {
color: #008000;
}
</style>