|
@@ -3,8 +3,7 @@
|
|
|
<div v-if="!state.error && isShow">
|
|
|
<div v-loading="dayCompanyLoading">
|
|
|
<div class="main-title">
|
|
|
- <p class="title">业务公司开票(每日)</p>
|
|
|
-
|
|
|
+ <p class="title">业务公司维度</p>
|
|
|
|
|
|
<div style="display: flex;">
|
|
|
<ElDatePicker style="width:135px" placeholder="日期" v-model="companyDayDate" :clearable="false"
|
|
@@ -12,39 +11,62 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<el-table size="small" border :data="dayCompany">
|
|
|
- <el-table-column label="业务公司" prop="companyName" width="160px" show-overflow-tooltip />
|
|
|
-
|
|
|
- <el-table-column label="开票金额" min-width="80px">
|
|
|
- <template slot-scope="scope">
|
|
|
- {{ scope.row.dayinfo.inv_fee }}
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
-
|
|
|
- <el-table-column label="开票金额(退)" min-width="100px">
|
|
|
- <template slot-scope="scope">
|
|
|
- {{ scope.row.dayinfo.return_inv_fee }}
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
-
|
|
|
- <el-table-column label="成本金额" min-width="80px">
|
|
|
- <template slot-scope="scope">
|
|
|
- {{ scope.row.dayinfo.cost_fee }}
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
-
|
|
|
- <el-table-column label="成本金额(退)" min-width="100px">
|
|
|
- <template slot-scope="scope">
|
|
|
- {{ scope.row.dayinfo.return_cost_fee }}
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
+ <el-table-column label="业务公司" prop="companyName" width="160px" show-overflow-tooltip fixed="left" />
|
|
|
+ <el-table-column label="当日开票收入" min-width="100px" prop="invDay" />
|
|
|
+ <el-table-column label="当月开票收入目标" min-width="140px" prop="inv_tips" />
|
|
|
+ <el-table-column label="当月开票收入" min-width="100px" prop="invMonth" />
|
|
|
+ <el-table-column label="当月开票完成比" min-width="120px" prop="monthInvRate" />
|
|
|
+ <el-table-column label="当月开票成本" min-width="120px" prop="costMonth" />
|
|
|
+ <el-table-column label="毛利目标" min-width="100px" prop="cost_tips" />
|
|
|
+ <el-table-column label="毛利完成比" min-width="100px" prop="costRate" />
|
|
|
</el-table>
|
|
|
</div>
|
|
|
|
|
|
- <div v-loading="dayCompanyLoading">
|
|
|
- <div class="main-title" style="flex-wrap: wrap;">
|
|
|
- <p class="title">业务公司开票(每月)</p>
|
|
|
+
|
|
|
+ <div v-loading="dayAccountLoading">
|
|
|
+ <div class="main-title">
|
|
|
+ <p class="title">业务经理维度</p>
|
|
|
+ <ElDatePicker style="width:135px" placeholder="日期" v-model="dayDate" :clearable="false"
|
|
|
+ @change="requestAccountDay" size="mini" value-format="yyyy-MM-dd" />
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <el-table size="small" border :data="dayAccount">
|
|
|
+ <el-table-column label="业务经理" prop="uname" width="100px" show-overflow-tooltip fixed="left" />
|
|
|
+ <el-table-column label="当日开票收入" prop="invDay" min-width="120px" />
|
|
|
+ <el-table-column label="当月开票收入目标" prop="inv_tips" min-width="140px" />
|
|
|
+ <el-table-column label="当月开票收入" prop="invMonth" min-width="100px" />
|
|
|
+ <el-table-column label="当月开票完成比" prop="invMonthRate" min-width="120px" />
|
|
|
+ <el-table-column label="当月开票成本" prop="costMonthTotal" min-width="100px" />
|
|
|
+ <el-table-column label="毛利目标" min-width="80px" show-overflow-tooltip prop="cost_tips" />
|
|
|
+ <el-table-column label="毛利完成比" min-width="100px" show-overflow-tooltip prop="costMonthRate" />
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
|
|
|
|
|
|
+ <div v-loading="dayAccountLoading">
|
|
|
+ <div class="main-title">
|
|
|
+ <p class="title">业务经理维度(补录)</p>
|
|
|
+ <ElDatePicker style="width:135px" placeholder="日期" v-model="blDayDate" :clearable="false"
|
|
|
+ @change="requestCompanyDayBL" size="mini" value-format="yyyy-MM-dd" />
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <el-table size="small" border :data="blDayAccount">
|
|
|
+ <el-table-column label="业务经理" prop="uname" width="100px" show-overflow-tooltip fixed="left" />
|
|
|
+ <el-table-column label="当日开票收入" prop="invDay" min-width="120px" />
|
|
|
+ <el-table-column label="当月开票收入目标" prop="inv_tips" min-width="120px" />
|
|
|
+ <el-table-column label="当月开票收入" prop="invMonth" min-width="100px" />
|
|
|
+ <el-table-column label="当月开票完成比" prop="invMonthRate" min-width="100px" />
|
|
|
+ <el-table-column label="当月开票成本" prop="costMonthTotal" min-width="100px" />
|
|
|
+ <el-table-column label="毛利目标" min-width="80px" show-overflow-tooltip prop="cost_tips" />
|
|
|
+ <el-table-column label="毛利完成比" min-width="100px" show-overflow-tooltip prop="costMonthRate" />
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+
|
|
|
+
|
|
|
+ <div v-loading="monthCompanyLoading">
|
|
|
+ <div class="main-title" style="flex-wrap: wrap;">
|
|
|
+ <p class="title">年度业务公司维度</p>
|
|
|
+
|
|
|
<div style="display: flex;">
|
|
|
<ElSelect v-model="monthCompanyNo" @change="requestCompanyMonth" size="mini" style="margin-right: 10px">
|
|
|
<ElOption v-for="comp in companies" :label="comp.companyName" :value="comp.companyNo" />
|
|
@@ -55,82 +77,21 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<el-table size="small" border :data="monthCompany">
|
|
|
- <el-table-column label="月份" width="80px" show-overflow-tooltip>
|
|
|
- <template slot-scope="scope">
|
|
|
- {{ scope.row.year }}-{{ String(scope.row.month).length === '1' ? '0' + scope.row.month : scope.row.month
|
|
|
- }}
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
-
|
|
|
- <el-table-column label="开票指标" min-width="80px" show-overflow-tooltip prop="inv_tips" />
|
|
|
-
|
|
|
- <el-table-column label="开票金额" min-width="80px" show-overflow-tooltip>
|
|
|
- <template slot-scope="scope">
|
|
|
- {{ scope.row.month_info.month_inv_fee }}
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
-
|
|
|
- <el-table-column label="开票金额(退)" min-width="100px" show-overflow-tooltip>
|
|
|
- <template slot-scope="scope">
|
|
|
- {{ scope.row.month_info.month_return_inv_fee }}
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
-
|
|
|
- <el-table-column label="成本指标" min-width="80px" show-overflow-tooltip prop="cost_tips" />
|
|
|
-
|
|
|
- <el-table-column label="成本金额" min-width="80px" show-overflow-tooltip>
|
|
|
- <template slot-scope="scope">
|
|
|
- {{ scope.row.month_info.month_cost_fee }}
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
-
|
|
|
- <el-table-column label="成本金额(退)" min-width="100px" show-overflow-tooltip>
|
|
|
- <template slot-scope="scope">
|
|
|
- {{ scope.row.month_info.month_return_cost_fee }}
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
+ <el-table-column label="月份" width="80px" show-overflow-tooltip prop="month" fixed="left" />
|
|
|
+ <el-table-column label="开票收入目标" min-width="120px" show-overflow-tooltip prop="inv_tips" />
|
|
|
+ <el-table-column label="开票收入" min-width="80px" show-overflow-tooltip prop="invMonth" />
|
|
|
+ <el-table-column label="开票完成比" min-width="100px" show-overflow-tooltip prop="monthInvRate" />
|
|
|
+ <el-table-column label="毛利目标" min-width="80px" show-overflow-tooltip prop="cost_tips" />
|
|
|
+ <el-table-column label="毛利完成" min-width="80px" show-overflow-tooltip prop="costMonth" />
|
|
|
+ <el-table-column label="毛利完成比" min-width="100px" show-overflow-tooltip prop="costMonthRate" />
|
|
|
</el-table>
|
|
|
</div>
|
|
|
|
|
|
- <div v-loading="dayAccountLoading">
|
|
|
- <div class="main-title">
|
|
|
- <p class="title">业务经理开票(每日)</p>
|
|
|
- <ElDatePicker style="width:135px" placeholder="日期" v-model="dayDate" :clearable="false"
|
|
|
- @change="requestAccountDay" size="mini" value-format="yyyy-MM-dd" />
|
|
|
- </div>
|
|
|
|
|
|
- <el-table size="small" border :data="dayAccount">
|
|
|
- <el-table-column label="用户" prop="uname" width="100px" show-overflow-tooltip />
|
|
|
-
|
|
|
- <el-table-column label="开票金额" min-width="80px">
|
|
|
- <template slot-scope="scope">
|
|
|
- {{ scope.row.dayinfo.inv_fee }}
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
-
|
|
|
- <el-table-column label="开票金额(退)" min-width="100px">
|
|
|
- <template slot-scope="scope">
|
|
|
- {{ scope.row.dayinfo.return_inv_fee }}
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
-
|
|
|
- <el-table-column label="成本金额" min-width="80px">
|
|
|
- <template slot-scope="scope">
|
|
|
- {{ scope.row.dayinfo.cost_fee }}
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
-
|
|
|
- <el-table-column label="成本金额(退)" min-width="100px">
|
|
|
- <template slot-scope="scope">
|
|
|
- {{ scope.row.dayinfo.return_cost_fee }}
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- </div>
|
|
|
|
|
|
<div v-loading="monthLoading" style="margin-top: 10px">
|
|
|
<div class="main-title" style="flex-wrap: wrap;">
|
|
|
- <p class="title">业务经理开票(每月)</p>
|
|
|
+ <p class="title">年度业务经理维度</p>
|
|
|
|
|
|
<div style="display: flex;justify-self: end;">
|
|
|
<UserSelect :value.sync="monthUser" :year="monthDate" style="margin-right: 10px"
|
|
@@ -142,20 +103,15 @@
|
|
|
</div>
|
|
|
|
|
|
<el-table size="small" border :data="monthAccount">
|
|
|
- <el-table-column label="月份" prop="month" width="100px" show-overflow-tooltip />
|
|
|
-
|
|
|
- <el-table-column label="开票金额" min-width="80px" prop="month_inv_fee" />
|
|
|
- <el-table-column label="开票金额(退)" min-width="100px" prop="month_return_inv_fee" />
|
|
|
-
|
|
|
- <el-table-column label="成本金额" min-width="80px" prop="month_cost_fee" />
|
|
|
- <el-table-column label="成本金额(退)" min-width="100px" prop="month_return_cost_fee" />
|
|
|
+ <el-table-column label="月份" width="80px" show-overflow-tooltip prop="month" fixed="left" />
|
|
|
+ <el-table-column label="开票收入目标" min-width="120px" show-overflow-tooltip prop="inv_tips" />
|
|
|
+ <el-table-column label="开票收入" min-width="80px" show-overflow-tooltip prop="invMonth" />
|
|
|
+ <el-table-column label="开票完成比" min-width="100px" show-overflow-tooltip prop="monthInvRate" />
|
|
|
+ <el-table-column label="毛利目标" min-width="80px" show-overflow-tooltip prop="cost_tips" />
|
|
|
+ <el-table-column label="毛利完成" min-width="80px" show-overflow-tooltip prop="costMonth" />
|
|
|
+ <el-table-column label="毛利完成比" min-width="100px" show-overflow-tooltip prop="costMonthRate" />
|
|
|
</el-table>
|
|
|
</div>
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
</div>
|
|
|
|
|
|
<template v-else-if="!state.loading">
|
|
@@ -172,11 +128,10 @@ import dayjs from "dayjs"
|
|
|
import UnusualState from "@/components/unusual/index.vue";
|
|
|
import { getOpenid, getParameterByName, removeOpenid, setOpenid } from "../utils/auth";
|
|
|
import asyncRequest from "@/api/newResults";
|
|
|
-
|
|
|
import userRequest from "@/api/index";
|
|
|
import UserSelect from "@/components/userSelect/index.vue"
|
|
|
-// import { ElDatePicker } from "element-ui/types/date-picker";
|
|
|
|
|
|
+import { addition, division, subtraction } from "./_utils";
|
|
|
|
|
|
export default {
|
|
|
name: "invData",
|
|
@@ -191,8 +146,6 @@ export default {
|
|
|
isDisplay: false,
|
|
|
|
|
|
companies: [],
|
|
|
-
|
|
|
-
|
|
|
monthCompanyNo: '',
|
|
|
companyMonthLoading: false,
|
|
|
companyMonthDate: '',
|
|
@@ -211,6 +164,11 @@ export default {
|
|
|
dayAccountLoading: false,
|
|
|
dayAccount: [],
|
|
|
dayDate: '',
|
|
|
+
|
|
|
+
|
|
|
+ blDayAccountLoading: false,
|
|
|
+ blDayAccount: [],
|
|
|
+ blDayDate: '',
|
|
|
|
|
|
state:{
|
|
|
message: '',
|
|
@@ -221,38 +179,80 @@ export default {
|
|
|
},
|
|
|
mounted() {
|
|
|
document.title = "数据统计"
|
|
|
- if(!getParameterByName('code')){ this.login() }else{
|
|
|
- this.requestUserinfo()
|
|
|
- }
|
|
|
-
|
|
|
this.dayDate = dayjs(new Date()).format("YYYY-MM-DD")
|
|
|
+ this.blDayDate = dayjs(new Date()).format("YYYY-MM-DD")
|
|
|
this.monthDate = dayjs(new Date()).format("YYYY")
|
|
|
this.companyDayDate = dayjs(new Date()).format("YYYY-MM-DD")
|
|
|
this.companyMonthDate = dayjs(new Date()).format("YYYY")
|
|
|
-
|
|
|
+ if(!getParameterByName('code')){ this.login() }else{
|
|
|
+ this.requestUserinfo()
|
|
|
+ }
|
|
|
},
|
|
|
methods: {
|
|
|
- async requestCompanyDay() {
|
|
|
- this.companyDayLoading = true
|
|
|
- const { data, code } = await asyncRequest.everyCompanyDay({ daytime: this.companyDayDate })
|
|
|
- this.companyDayLoading = false
|
|
|
- if (code === 0) { this.dayCompany = data }
|
|
|
+ addition,
|
|
|
+ division,
|
|
|
+ subtraction,
|
|
|
+ isNotValidNum(num){
|
|
|
+ return Number(num) === NaN || Number(num) === 0
|
|
|
},
|
|
|
+ calcBl(n1, n2){
|
|
|
+ n1 === undefined && (n1 = 0)
|
|
|
+ n2 === undefined && (n2 = 0)
|
|
|
+ if (Number(n2) === 0) { return '--' }
|
|
|
+ if (this.isNotValidNum(n1) && this.isNotValidNum(n2)) { return '0.00%' }
|
|
|
+ return Number(division(n1, n2) * 100).toFixed(2) + '%'
|
|
|
+ },
|
|
|
+
|
|
|
async requestCompanyMonth() {
|
|
|
this.companyMonthLoading = true
|
|
|
const { data, code } = await asyncRequest.everyCompanMonth({ year: this.companyMonthDate, companyNo: this.monthCompanyNo })
|
|
|
this.companyMonthLoading = false
|
|
|
- if (code === 0) { this.monthCompany = data }
|
|
|
- },
|
|
|
- async requestAccountDay(){
|
|
|
- this.dayAccountLoading = true
|
|
|
- const { data, code } = await asyncRequest.everyAccountDay({ daytime: this.dayDate })
|
|
|
- this.dayAccountLoading = false
|
|
|
- if (code === 0) { this.dayAccount = data }
|
|
|
+
|
|
|
+ if (code === 0) {
|
|
|
+ const list = []
|
|
|
+ for(const item of data){
|
|
|
+ const { cost_tips, inv_tips, year, month } = item
|
|
|
+ const invMonth = subtraction(item.month_info.month_inv_fee, item.month_info.month_return_inv_fee)
|
|
|
+ const costMonth = subtraction(invMonth, subtraction(item.month_info.month_cost_fee, item.month_info.month_return_cost_fee))
|
|
|
+ const monthInvRate = this.calcBl(invMonth, inv_tips)
|
|
|
+ const costMonthRate = this.calcBl(costMonth, cost_tips)
|
|
|
+
|
|
|
+ list.push({
|
|
|
+ month: `${year}-${String(month).length === 1 ? '0' + month : month}`,
|
|
|
+ invMonth,
|
|
|
+ cost_tips,
|
|
|
+ inv_tips,
|
|
|
+ monthInvRate,
|
|
|
+ costMonth,
|
|
|
+ costMonthRate,
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ const totalItem = list.reduce((prev, current) => ({
|
|
|
+ invMonth: addition(prev.invMonth, current.invMonth),
|
|
|
+ cost_tips: addition(prev.cost_tips, current.cost_tips),
|
|
|
+ inv_tips: addition(prev.inv_tips, current.inv_tips),
|
|
|
+ costMonth: addition(prev.costMonth, current.costMonth),
|
|
|
+ }), {
|
|
|
+ invMonth: 0,
|
|
|
+ cost_tips: 0,
|
|
|
+ inv_tips: 0,
|
|
|
+ costMonth: 0,
|
|
|
+ })
|
|
|
+
|
|
|
+
|
|
|
+ totalItem.month = '合计'
|
|
|
+ totalItem.monthInvRate = this.calcBl(totalItem.invMonth, totalItem.inv_tips)
|
|
|
+ totalItem.costMonthRate = this.calcBl(totalItem.costMonth, totalItem.cost_tips)
|
|
|
+
|
|
|
+ list.push(totalItem)
|
|
|
+
|
|
|
+ this.monthCompany = list
|
|
|
+ }
|
|
|
},
|
|
|
+
|
|
|
async requestAccountMonth() {
|
|
|
- if (this.monthDate !== '2025'){
|
|
|
- console.log('joined', this.monthUser)
|
|
|
+ if (this.monthDate !== '2025') {
|
|
|
this.monthAccount = []
|
|
|
return
|
|
|
}
|
|
@@ -260,14 +260,158 @@ export default {
|
|
|
this.monthAccountLoading = true
|
|
|
const { data, code } = await asyncRequest.everyAccountMonth({ year: this.monthDate, uid: this.monthUser })
|
|
|
this.monthAccountLoading = false
|
|
|
- if (code === 0) { this.monthAccount = data }
|
|
|
+
|
|
|
+
|
|
|
+ const list = []
|
|
|
+ if (code === 0) {
|
|
|
+ for (const item of data) {
|
|
|
+ const { cost_tips, inv_tips, month } = item
|
|
|
+ const invMonth = subtraction(item.month_inv_fee, item.month_return_inv_fee)
|
|
|
+ const costMonth = subtraction(invMonth, subtraction(item.month_cost_fee, item.month_return_cost_fee))
|
|
|
+ const monthInvRate = this.calcBl(invMonth, inv_tips)
|
|
|
+ const costMonthRate = this.calcBl(costMonth, cost_tips)
|
|
|
+
|
|
|
+ list.push({
|
|
|
+ month,
|
|
|
+ invMonth,
|
|
|
+ cost_tips,
|
|
|
+ inv_tips,
|
|
|
+ monthInvRate,
|
|
|
+ costMonth,
|
|
|
+ costMonthRate,
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ const totalItem = list.reduce((prev, current) => ({
|
|
|
+ invMonth: addition(prev.invMonth, current.invMonth),
|
|
|
+ cost_tips: addition(prev.cost_tips, current.cost_tips),
|
|
|
+ inv_tips: addition(prev.inv_tips, current.inv_tips),
|
|
|
+ costMonth: addition(prev.costMonth, current.costMonth),
|
|
|
+ }), {
|
|
|
+ invMonth: 0,
|
|
|
+ cost_tips: 0,
|
|
|
+ inv_tips: 0,
|
|
|
+ costMonth: 0
|
|
|
+ })
|
|
|
+
|
|
|
+ totalItem.month = '合计'
|
|
|
+ totalItem.monthInvRate = this.calcBl(totalItem.invMonth, totalItem.inv_tips)
|
|
|
+ totalItem.costMonthRate = this.calcBl(totalItem.costMonth, totalItem.cost_tips)
|
|
|
+
|
|
|
+
|
|
|
+ this.monthAccount = list
|
|
|
+
|
|
|
+ list.push(totalItem)
|
|
|
+ this.monthAccount = list
|
|
|
+ },
|
|
|
+
|
|
|
+ async requestCompanyDay() {
|
|
|
+ this.companyDayLoading = true
|
|
|
+ const { data, code } = await asyncRequest.everyCompanyDay({ daytime: this.companyDayDate })
|
|
|
+ this.companyDayLoading = false
|
|
|
+ if (code === 0) {
|
|
|
+
|
|
|
+
|
|
|
+ const list = []
|
|
|
+ for (const item of data) {
|
|
|
+ const { cost_tips, inv_tips } = item.tips
|
|
|
+ const invDay = subtraction(item.dayinfo.inv_fee, item.dayinfo.return_inv_fee)
|
|
|
+ const invMonth = subtraction(item.month_inv_fee, item.month_return_inv_fee)
|
|
|
+ const costMonth = subtraction(item.month_cost_fee, item.month_return_cost_fee)
|
|
|
+ const monthInvRate = this.calcBl(invMonth, inv_tips)
|
|
|
+ const costRate = this.calcBl(subtraction(invMonth, costMonth), cost_tips)
|
|
|
+
|
|
|
+
|
|
|
+ list.push({
|
|
|
+ companyName: item.companyName,
|
|
|
+ invDay,
|
|
|
+ invMonth,
|
|
|
+ inv_tips,
|
|
|
+ cost_tips,
|
|
|
+ monthInvRate,
|
|
|
+ costMonth,
|
|
|
+ costRate
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ this.dayCompany = list
|
|
|
+ }
|
|
|
+ },
|
|
|
+ async requestAccountDay(){
|
|
|
+ this.dayAccountLoading = true
|
|
|
+ const { data, code } = await asyncRequest.everyAccountDay({ daytime: this.dayDate })
|
|
|
+ this.dayAccountLoading = false
|
|
|
+ if (code === 0) {
|
|
|
+
|
|
|
+ const list = []
|
|
|
+ for (const item of data) {
|
|
|
+ const { inv_tips, cost_tips } = item.tips
|
|
|
+ const invDay = subtraction(item.dayinfo.inv_fee, item.dayinfo.return_inv_fee)
|
|
|
+ const invMonth = subtraction(item.month_inv_fee, item.month_return_inv_fee)
|
|
|
+ const invMonthRate = this.calcBl(item.month_inv_fee, inv_tips)
|
|
|
+ const costMonthTotal = subtraction(item.month_cost_fee, item.month_return_cost_fee)
|
|
|
+ const costMonthRate = this.calcBl(invMonth, cost_tips)
|
|
|
+
|
|
|
+
|
|
|
+ list.push({
|
|
|
+ uname: item.uname,
|
|
|
+ companyName: item.companyName,
|
|
|
+ invDay,
|
|
|
+ invMonth,
|
|
|
+ inv_tips,
|
|
|
+ invMonthRate,
|
|
|
+ costMonthTotal,
|
|
|
+ cost_tips,
|
|
|
+ costMonthRate
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ this.dayAccount = list
|
|
|
+ }
|
|
|
},
|
|
|
+ async requestAccountDayBl() {
|
|
|
+ this.blDayAccountLoading = true
|
|
|
+ const { data, code } = await asyncRequest.accountInvList({ daytime: this.blDayDate })
|
|
|
+ this.blDayAccountLoading = false
|
|
|
+ if (code === 0) {
|
|
|
+
|
|
|
+ const list = []
|
|
|
+ for (const item of data) {
|
|
|
+ const { inv_tips, cost_tips } = item.tips
|
|
|
+ const invDay = subtraction(item.dayinfo.inv_fee, item.dayinfo.return_inv_fee)
|
|
|
+ const invMonth = subtraction(item.month_inv_fee, item.month_return_inv_fee)
|
|
|
+ const invMonthRate = this.calcBl(item.month_inv_fee, inv_tips)
|
|
|
+ const costMonthTotal = subtraction(item.month_cost_fee, item.month_return_cost_fee)
|
|
|
+ const costMonthRate = this.calcBl(invMonth, cost_tips)
|
|
|
+
|
|
|
+
|
|
|
+ list.push({
|
|
|
+ uname: item.uname,
|
|
|
+ companyName: item.companyName,
|
|
|
+ invDay,
|
|
|
+ invMonth,
|
|
|
+ inv_tips,
|
|
|
+ invMonthRate,
|
|
|
+ costMonthTotal,
|
|
|
+ cost_tips,
|
|
|
+ costMonthRate
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ this.blDayAccount = list
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
async requestData(){
|
|
|
this.requestAccountDay()
|
|
|
- // this.requestAccountMonth()
|
|
|
+ this.requestAccountDayBl()
|
|
|
+ this.requestAccountMonth()
|
|
|
this.requestCompanyDay()
|
|
|
this.requestCompanyMonth()
|
|
|
- // const data = await asyncRequest.everyAccountMonth({ year: '2025' })
|
|
|
},
|
|
|
async time(e) {
|
|
|
const { startTime, endTime } = e;
|
|
@@ -292,47 +436,47 @@ export default {
|
|
|
this.state.loading = true;
|
|
|
const openid = getOpenid()
|
|
|
const code = getParameterByName('code')
|
|
|
- const result = await userRequest.userinfo({ ...( openid ? { openid } : { code }) })
|
|
|
-
|
|
|
- // const result ={
|
|
|
- // "code": 0,
|
|
|
- // "message": "获取成功",
|
|
|
- // "data": {
|
|
|
- // "id": "1",
|
|
|
- // "openid": "oOpc26KiZFBKIm7SB8knFGvov1qg",
|
|
|
- // "mobile": "",
|
|
|
- // "gender": "0",
|
|
|
- // "nickname": "雪寒",
|
|
|
- // "avatar": "",
|
|
|
- // "subscribe_time": "2022-12-21 15:52:14",
|
|
|
- // "addr": "\/\/",
|
|
|
- // "status": "1",
|
|
|
- // "is_show": ["1", "2", "4"],
|
|
|
- // "companyArr": [{
|
|
|
- // "companyNo": "GS2302231125079621",
|
|
|
- // "companyName": "北京百辰荣达国际科贸有限公司",
|
|
|
- // "info": [1,2]
|
|
|
- // }, {
|
|
|
- // "companyNo": "GS2302231323386950",
|
|
|
- // "companyName": "北京泓源广诚国际商贸有限公司",
|
|
|
- // "info": [1,2]
|
|
|
- // }, {
|
|
|
- // "companyNo": "GS2304031312553746",
|
|
|
- // "companyName": "北京锦兴弘昌科技有限公司",
|
|
|
- // "info": [1, 2]
|
|
|
- // }, {
|
|
|
- // "companyNo": "GS2302231124114965",
|
|
|
- // "companyName": "北京普润心堂商贸有限公司",
|
|
|
- // "info": [1, 2]
|
|
|
- // }, {
|
|
|
- // "companyNo": "GS2203161855277894",
|
|
|
- // "companyName": "北京万宇恒通国际科贸有限公司",
|
|
|
- // "info": [1, 2]
|
|
|
- // }],
|
|
|
- // "addtime": "2023-04-10 18:11:07",
|
|
|
- // "updatetime": "2023-05-09 16:22:33"
|
|
|
- // }
|
|
|
- // }
|
|
|
+ // const result = await userRequest.userinfo({ ...( openid ? { openid } : { code }) })
|
|
|
+
|
|
|
+ const result ={
|
|
|
+ "code": 0,
|
|
|
+ "message": "获取成功",
|
|
|
+ "data": {
|
|
|
+ "id": "1",
|
|
|
+ "openid": "oOpc26KiZFBKIm7SB8knFGvov1qg",
|
|
|
+ "mobile": "",
|
|
|
+ "gender": "0",
|
|
|
+ "nickname": "雪寒",
|
|
|
+ "avatar": "",
|
|
|
+ "subscribe_time": "2022-12-21 15:52:14",
|
|
|
+ "addr": "\/\/",
|
|
|
+ "status": "1",
|
|
|
+ "is_show": ["1", "2", "4"],
|
|
|
+ "companyArr": [{
|
|
|
+ "companyNo": "GS2304031312553746",
|
|
|
+ "companyName": "北京锦兴弘昌科技有限公司",
|
|
|
+ "info": [1, 2]
|
|
|
+ },{
|
|
|
+ "companyNo": "GS2302231125079621",
|
|
|
+ "companyName": "北京百辰荣达国际科贸有限公司",
|
|
|
+ "info": [1,2]
|
|
|
+ }, {
|
|
|
+ "companyNo": "GS2302231323386950",
|
|
|
+ "companyName": "北京泓源广诚国际商贸有限公司",
|
|
|
+ "info": [1,2]
|
|
|
+ }, {
|
|
|
+ "companyNo": "GS2302231124114965",
|
|
|
+ "companyName": "北京普润心堂商贸有限公司",
|
|
|
+ "info": [1, 2]
|
|
|
+ }, {
|
|
|
+ "companyNo": "GS2203161855277894",
|
|
|
+ "companyName": "北京万宇恒通国际科贸有限公司",
|
|
|
+ "info": [1, 2]
|
|
|
+ }],
|
|
|
+ "addtime": "2023-04-10 18:11:07",
|
|
|
+ "updatetime": "2023-05-09 16:22:33"
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
this.state.loading = false
|
|
|
switch(Number(result.code)){
|