|
@@ -1,208 +1,197 @@
|
|
|
<template>
|
|
|
<div class="app-container">
|
|
|
- <div style="margin-bottom: 15px">
|
|
|
- <el-date-picker
|
|
|
- v-model="uploadDate"
|
|
|
- style="width: 240px"
|
|
|
- value-format="yyyy-MM-dd"
|
|
|
- format="yyyy-MM-dd"
|
|
|
- type="daterange"
|
|
|
- range-separator="-"
|
|
|
- start-placeholder="开始日期"
|
|
|
- end-placeholder="结束日期"
|
|
|
- :picker-options="pickerOptions"
|
|
|
- ></el-date-picker>
|
|
|
+ <div v-if="showOld">
|
|
|
+ <div style="margin-bottom: 15px">
|
|
|
+ <el-date-picker
|
|
|
+ v-model="uploadDate"
|
|
|
+ style="width: 240px"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
+ format="yyyy-MM-dd"
|
|
|
+ type="daterange"
|
|
|
+ range-separator="-"
|
|
|
+ start-placeholder="开始日期"
|
|
|
+ end-placeholder="结束日期"
|
|
|
+ :picker-options="pickerOptions"
|
|
|
+ ></el-date-picker>
|
|
|
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- icon="el-icon-search"
|
|
|
- size="mini"
|
|
|
- @click="handleQuery"
|
|
|
- style="margin-left: 15px"
|
|
|
- >搜索</el-button
|
|
|
- >
|
|
|
- </div>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ icon="el-icon-search"
|
|
|
+ size="mini"
|
|
|
+ @click="handleQuery"
|
|
|
+ style="margin-left: 15px"
|
|
|
+ >搜索</el-button
|
|
|
+ >
|
|
|
+ </div>
|
|
|
|
|
|
- <el-row class="top-sum" :gutter="24">
|
|
|
- <el-col :span="12">
|
|
|
- <el-card shadow="never" class="card-show" v-loading="totalOneLoading">
|
|
|
- <div style="display: flex; width: 100%; margin-bottom: 15px">
|
|
|
- <div style="flex: 1">
|
|
|
- <p class="p-title">订单总数</p>
|
|
|
- <p class="p-main">{{ order.orderNum }}</p>
|
|
|
- </div>
|
|
|
- <div style="flex: 1">
|
|
|
- <p class="p-title">有效订单数</p>
|
|
|
- <p class="p-main">{{ order.validOrderNUm }}</p>
|
|
|
- </div>
|
|
|
- <div style="flex: 1">
|
|
|
- <p class="p-title">失效订单数</p>
|
|
|
- <p class="p-main">{{ order.invalidOrderNUm }}</p>
|
|
|
+ <el-row class="top-sum" :gutter="24">
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-card shadow="never" class="card-show" v-loading="totalOneLoading">
|
|
|
+ <div style="display: flex; width: 100%; margin-bottom: 15px">
|
|
|
+ <div style="flex: 1">
|
|
|
+ <p class="p-title">订单总数</p>
|
|
|
+ <p class="p-main">{{ order.orderNum }}</p>
|
|
|
+ </div>
|
|
|
+ <div style="flex: 1">
|
|
|
+ <p class="p-title">有效订单数</p>
|
|
|
+ <p class="p-main">{{ order.validOrderNUm }}</p>
|
|
|
+ </div>
|
|
|
+ <div style="flex: 1">
|
|
|
+ <p class="p-title">失效订单数</p>
|
|
|
+ <p class="p-main">{{ order.invalidOrderNUm }}</p>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
|
|
|
- <div style="display: flex; width: 100%">
|
|
|
- <div style="margin-right: 20px">
|
|
|
- <p class="p-main-data">
|
|
|
- 数据对比:<i
|
|
|
- :style="
|
|
|
- ratioData.orderTotalRatio > 0 ? 'color:red' : 'color:green'
|
|
|
- "
|
|
|
- >{{ (ratioData.orderTotalRatio * 100).toFixed(2) + "%" }}</i
|
|
|
- >
|
|
|
- </p>
|
|
|
- </div>
|
|
|
- <div
|
|
|
- style="margin-right: 20px"
|
|
|
- :style="dateType == 0 ? '' : 'visibility: hidden'"
|
|
|
- >
|
|
|
- <p class="p-main-data">
|
|
|
- 周同比:<i
|
|
|
- :style="order.yearRatio > 0 ? 'color:red' : 'color:green'"
|
|
|
- >{{ (order.yearRatio * 100).toFixed(2) + "%" }}</i
|
|
|
- >
|
|
|
- </p>
|
|
|
- </div>
|
|
|
- <div :style="dateType == 0 ? '' : 'visibility: hidden'">
|
|
|
- <p class="p-main-data">
|
|
|
- 日环比:<i
|
|
|
- :style="order.ringRatio > 0 ? 'color:red' : 'color:green'"
|
|
|
- >{{ (order.ringRatio * 100).toFixed(2) + "%" }}
|
|
|
- </i>
|
|
|
- </p>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <!-- ringRatio: 0, -->
|
|
|
- </el-card>
|
|
|
- </el-col>
|
|
|
- <el-col :span="12">
|
|
|
- <el-card shadow="never" class="card-show" v-loading="totalTwoLoading">
|
|
|
- <div style="display: flex; width: 100%; margin-bottom: 15px">
|
|
|
- <div style="flex: 1">
|
|
|
- <p class="p-title">订单金额</p>
|
|
|
- <p class="p-main">
|
|
|
- {{ priceFormat(regimentalPromotion.regimentalPromotionAmount) }}
|
|
|
- </p>
|
|
|
- </div>
|
|
|
- <div style="flex: 1">
|
|
|
- <p class="p-title">累计货款基数</p>
|
|
|
- <p class="p-main">
|
|
|
- {{ priceFormat(regimentalPromotion.personData) }}
|
|
|
- </p>
|
|
|
- </div>
|
|
|
- <div style="flex: 1">
|
|
|
- <p class="p-title">预估服务费</p>
|
|
|
- <p class="p-main">
|
|
|
- {{ priceFormat(regimentalPromotion.complete) }}
|
|
|
- </p>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div style="display: flex; width: 100%">
|
|
|
- <div style="margin-right: 20px">
|
|
|
- <p class="p-main-data">
|
|
|
- 数据对比:<i
|
|
|
- :style="
|
|
|
- ratioData.orderAmountRatio > 0 ? 'color:red' : 'color:green'
|
|
|
- "
|
|
|
- >{{ (ratioData.orderAmountRatio * 100).toFixed(2) + "%" }}</i
|
|
|
- >
|
|
|
- </p>
|
|
|
- </div>
|
|
|
- <div
|
|
|
- style="margin-right: 20px"
|
|
|
- :style="dateType == 0 ? '' : 'visibility: hidden'"
|
|
|
- >
|
|
|
- <p class="p-main-data">
|
|
|
- 周同比:
|
|
|
- <i
|
|
|
- :style="
|
|
|
- regimentalPromotion.yearRatio > 0
|
|
|
- ? 'color:red'
|
|
|
- : 'color:green'
|
|
|
- "
|
|
|
- >{{ (regimentalPromotion.yearRatio * 100).toFixed(2) + "%" }}
|
|
|
- </i>
|
|
|
- </p>
|
|
|
- </div>
|
|
|
- <div :style="dateType == 0 ? '' : 'visibility: hidden'">
|
|
|
- <p class="p-main-data">
|
|
|
- 日环比:<i
|
|
|
- :style="
|
|
|
- regimentalPromotion.ringRatio > 0
|
|
|
- ? 'color:red'
|
|
|
- : 'color:green'
|
|
|
- "
|
|
|
- >{{
|
|
|
- (regimentalPromotion.ringRatio * 100).toFixed(2) + "%"
|
|
|
- }}</i
|
|
|
- >
|
|
|
- </p>
|
|
|
+ <div style="display: flex; width: 100%">
|
|
|
+ <div style="margin-right: 20px">
|
|
|
+ <p class="p-main-data">
|
|
|
+ 数据对比:<i
|
|
|
+ :style="ratioData.orderTotalRatio > 0 ? 'color:red' : 'color:green'"
|
|
|
+ >{{ (ratioData.orderTotalRatio * 100).toFixed(2) + "%" }}</i
|
|
|
+ >
|
|
|
+ </p>
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ style="margin-right: 20px"
|
|
|
+ :style="dateType == 0 ? '' : 'visibility: hidden'"
|
|
|
+ >
|
|
|
+ <p class="p-main-data">
|
|
|
+ 周同比:<i :style="order.yearRatio > 0 ? 'color:red' : 'color:green'">{{
|
|
|
+ (order.yearRatio * 100).toFixed(2) + "%"
|
|
|
+ }}</i>
|
|
|
+ </p>
|
|
|
+ </div>
|
|
|
+ <div :style="dateType == 0 ? '' : 'visibility: hidden'">
|
|
|
+ <p class="p-main-data">
|
|
|
+ 日环比:<i :style="order.ringRatio > 0 ? 'color:red' : 'color:green'"
|
|
|
+ >{{ (order.ringRatio * 100).toFixed(2) + "%" }}
|
|
|
+ </i>
|
|
|
+ </p>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <!-- ringRatio: 0, -->
|
|
|
- </el-card>
|
|
|
- </el-col>
|
|
|
- <el-col :span="12" style="margin-top: 24px">
|
|
|
- <el-card shadow="never" class="card-show" v-loading="totalThreeLoading">
|
|
|
- <div style="display: flex; width: 100%; margin-bottom: 15px">
|
|
|
- <div style="flex: 1">
|
|
|
- <p class="p-title">达人总数</p>
|
|
|
- <p class="p-main">{{ taskNumber.noStarted }}</p>
|
|
|
+ <!-- ringRatio: 0, -->
|
|
|
+ </el-card>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-card shadow="never" class="card-show" v-loading="totalTwoLoading">
|
|
|
+ <div style="display: flex; width: 100%; margin-bottom: 15px">
|
|
|
+ <div style="flex: 1">
|
|
|
+ <p class="p-title">订单金额</p>
|
|
|
+ <p class="p-main">
|
|
|
+ {{ priceFormat(regimentalPromotion.regimentalPromotionAmount) }}
|
|
|
+ </p>
|
|
|
+ </div>
|
|
|
+ <div style="flex: 1">
|
|
|
+ <p class="p-title">累计货款基数</p>
|
|
|
+ <p class="p-main">
|
|
|
+ {{ priceFormat(regimentalPromotion.personData) }}
|
|
|
+ </p>
|
|
|
+ </div>
|
|
|
+ <div style="flex: 1">
|
|
|
+ <p class="p-title">预估服务费</p>
|
|
|
+ <p class="p-main">
|
|
|
+ {{ priceFormat(regimentalPromotion.complete) }}
|
|
|
+ </p>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <div style="flex: 1">
|
|
|
- <p class="p-title">发货数</p>
|
|
|
- <p class="p-main">{{ taskNumber.complete }}</p>
|
|
|
+ <div style="display: flex; width: 100%">
|
|
|
+ <div style="margin-right: 20px">
|
|
|
+ <p class="p-main-data">
|
|
|
+ 数据对比:<i
|
|
|
+ :style="ratioData.orderAmountRatio > 0 ? 'color:red' : 'color:green'"
|
|
|
+ >{{ (ratioData.orderAmountRatio * 100).toFixed(2) + "%" }}</i
|
|
|
+ >
|
|
|
+ </p>
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ style="margin-right: 20px"
|
|
|
+ :style="dateType == 0 ? '' : 'visibility: hidden'"
|
|
|
+ >
|
|
|
+ <p class="p-main-data">
|
|
|
+ 周同比:
|
|
|
+ <i
|
|
|
+ :style="
|
|
|
+ regimentalPromotion.yearRatio > 0 ? 'color:red' : 'color:green'
|
|
|
+ "
|
|
|
+ >{{ (regimentalPromotion.yearRatio * 100).toFixed(2) + "%" }}
|
|
|
+ </i>
|
|
|
+ </p>
|
|
|
+ </div>
|
|
|
+ <div :style="dateType == 0 ? '' : 'visibility: hidden'">
|
|
|
+ <p class="p-main-data">
|
|
|
+ 日环比:<i
|
|
|
+ :style="
|
|
|
+ regimentalPromotion.ringRatio > 0 ? 'color:red' : 'color:green'
|
|
|
+ "
|
|
|
+ >{{ (regimentalPromotion.ringRatio * 100).toFixed(2) + "%" }}</i
|
|
|
+ >
|
|
|
+ </p>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <div style="flex: 1">
|
|
|
- <p class="p-title">发货率</p>
|
|
|
- <p class="p-main">
|
|
|
- {{
|
|
|
- !!taskNumber.deliveryRadio
|
|
|
- ? (taskNumber.deliveryRadio * 100).toFixed(2) + "%"
|
|
|
- : "-"
|
|
|
- }}
|
|
|
- </p>
|
|
|
+ <!-- ringRatio: 0, -->
|
|
|
+ </el-card>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12" style="margin-top: 24px">
|
|
|
+ <el-card shadow="never" class="card-show" v-loading="totalThreeLoading">
|
|
|
+ <div style="display: flex; width: 100%; margin-bottom: 15px">
|
|
|
+ <div style="flex: 1">
|
|
|
+ <p class="p-title">达人总数</p>
|
|
|
+ <p class="p-main">{{ taskNumber.noStarted }}</p>
|
|
|
+ </div>
|
|
|
+ <div style="flex: 1">
|
|
|
+ <p class="p-title">发货数</p>
|
|
|
+ <p class="p-main">{{ taskNumber.complete }}</p>
|
|
|
+ </div>
|
|
|
+ <div style="flex: 1">
|
|
|
+ <p class="p-title">发货率</p>
|
|
|
+ <p class="p-main">
|
|
|
+ {{
|
|
|
+ !!taskNumber.deliveryRadio
|
|
|
+ ? (taskNumber.deliveryRadio * 100).toFixed(2) + "%"
|
|
|
+ : "-"
|
|
|
+ }}
|
|
|
+ </p>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div style="display: flex; width: 100%; visibility: hidden">
|
|
|
- <div style="margin-right: 20px">
|
|
|
- <p class="p-main-data">周同比:{{ order.yearRatio }}</p>
|
|
|
+ <div style="display: flex; width: 100%; visibility: hidden">
|
|
|
+ <div style="margin-right: 20px">
|
|
|
+ <p class="p-main-data">周同比:{{ order.yearRatio }}</p>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <p class="p-main-data">日环比:{{ order.ringRatio }}</p>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <div>
|
|
|
- <p class="p-main-data">日环比:{{ order.ringRatio }}</p>
|
|
|
+ <!-- ringRatio: 0, -->
|
|
|
+ </el-card>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row class="top-sum" :gutter="24" style="margin-top: 24px">
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-card
|
|
|
+ shadow="never"
|
|
|
+ class="card-show"
|
|
|
+ style="width: 100%; min-height: 700px"
|
|
|
+ v-loading="echartsLoading"
|
|
|
+ >
|
|
|
+ <div slot="header" class="clearfix">
|
|
|
+ <span style="font-size: 16px; font-weight: bold; float: left"
|
|
|
+ >订单统计</span
|
|
|
+ >
|
|
|
+ <el-select
|
|
|
+ v-model="echartsType"
|
|
|
+ placeholder="请选择类型"
|
|
|
+ clearable
|
|
|
+ style="width: 240px; float: right; padding: 3px 0"
|
|
|
+ @change="changeEchartsType"
|
|
|
+ >
|
|
|
+ <el-option label="订单数" value="orderNum" />
|
|
|
+ <el-option label="有效订单数" value="validOrderNum" />
|
|
|
+ <el-option label="订单金额" value="orderAmount" />
|
|
|
+ <el-option label="货款基数" value="baseAmount" />
|
|
|
+ <el-option label="发货数" value="deliveryNum" />
|
|
|
+ </el-select>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <!-- ringRatio: 0, -->
|
|
|
- </el-card>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <el-row class="top-sum" :gutter="24" style="margin-top: 24px">
|
|
|
- <el-col :span="24">
|
|
|
- <el-card
|
|
|
- shadow="never"
|
|
|
- class="card-show"
|
|
|
- style="width: 100%; min-height: 700px"
|
|
|
- v-loading="echartsLoading"
|
|
|
- >
|
|
|
- <div slot="header" class="clearfix">
|
|
|
- <span style="font-size: 16px; font-weight: bold; float: left"
|
|
|
- >订单统计</span
|
|
|
- >
|
|
|
- <el-select
|
|
|
- v-model="echartsType"
|
|
|
- placeholder="请选择类型"
|
|
|
- clearable
|
|
|
- style="width: 240px; float: right; padding: 3px 0"
|
|
|
- @change="changeEchartsType"
|
|
|
- >
|
|
|
- <el-option label="订单数" value="orderNum" />
|
|
|
- <el-option label="有效订单数" value="validOrderNum" />
|
|
|
- <el-option label="订单金额" value="orderAmount" />
|
|
|
- <el-option label="货款基数" value="baseAmount" />
|
|
|
- <el-option label="发货数" value="deliveryNum" />
|
|
|
- </el-select>
|
|
|
- </div>
|
|
|
- <!-- <el-date-picker
|
|
|
+ <!-- <el-date-picker
|
|
|
v-model="uploadDateEcharts"
|
|
|
style="width: 240px; float: left"
|
|
|
value-format="yyyy-MM-dd"
|
|
@@ -214,184 +203,166 @@
|
|
|
:picker-options="pickerOptions"
|
|
|
@change="getAllEchartsData"
|
|
|
></el-date-picker> -->
|
|
|
- <div
|
|
|
- id="echart"
|
|
|
- ref="echart"
|
|
|
- style="height: 500px; width: 100%; margin-top: 50px"
|
|
|
- ></div>
|
|
|
- </el-card>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
+ <div
|
|
|
+ id="echart"
|
|
|
+ ref="echart"
|
|
|
+ style="height: 500px; width: 100%; margin-top: 50px"
|
|
|
+ ></div>
|
|
|
+ </el-card>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
|
|
|
- <el-row class="top-sum" :gutter="24" style="margin-top: 24px">
|
|
|
- <el-col :span="12">
|
|
|
- <el-card
|
|
|
- shadow="never"
|
|
|
- class="card-show"
|
|
|
- style="width: 100%; min-height: 700px"
|
|
|
- >
|
|
|
- <div slot="header" class="clearfix">
|
|
|
- <span style="font-size: 16px; font-weight: bold; float: left"
|
|
|
- >商品排行榜</span
|
|
|
- >
|
|
|
- <el-button
|
|
|
- style="float: right; padding: 3px 0"
|
|
|
- type="text"
|
|
|
- @click="toOrderList"
|
|
|
- >更多>></el-button
|
|
|
- >
|
|
|
- </div>
|
|
|
- <el-table v-loading="orderRankLoading" :data="orderRankList">
|
|
|
- <!-- <el-table-column type="selection" width="55" align="center" /> -->
|
|
|
- <el-table-column type="index" :index="indexMethod">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="商品名称" align="center" prop="itemTitle">
|
|
|
- <template slot-scope="scope">
|
|
|
- <a
|
|
|
- :title="scope.row.itemTitle"
|
|
|
- @click="toOrderDetail(scope.row)"
|
|
|
- style="
|
|
|
- text-overflow: ellipsis;
|
|
|
- white-space: nowrap;
|
|
|
- overflow: hidden;
|
|
|
- "
|
|
|
- >
|
|
|
- {{ scope.row.itemTitle }}
|
|
|
- </a>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="订单数" align="center" prop="orderNum">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- label="有效订单"
|
|
|
- align="center"
|
|
|
- prop="validOrderNUm"
|
|
|
- >
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="有效率" align="center" prop="validRadio">
|
|
|
- <template slot-scope="scope">
|
|
|
- {{
|
|
|
- scope.row.validRadio
|
|
|
- ? (scope.row.validRadio * 100).toFixed(2) + "%"
|
|
|
- : "-"
|
|
|
- }}
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="发货数" align="center" prop="deliveryNum">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="发货率" align="center" prop="deliveryRadio">
|
|
|
- <template slot-scope="scope">
|
|
|
- {{
|
|
|
- scope.row.deliveryRadio
|
|
|
- ? (scope.row.deliveryRadio * 100).toFixed(2) + "%"
|
|
|
- : "-"
|
|
|
- }}
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
+ <el-row class="top-sum" :gutter="24" style="margin-top: 24px">
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-card
|
|
|
+ shadow="never"
|
|
|
+ class="card-show"
|
|
|
+ style="width: 100%; min-height: 700px"
|
|
|
+ >
|
|
|
+ <div slot="header" class="clearfix">
|
|
|
+ <span style="font-size: 16px; font-weight: bold; float: left"
|
|
|
+ >商品排行榜</span
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ style="float: right; padding: 3px 0"
|
|
|
+ type="text"
|
|
|
+ @click="toOrderList"
|
|
|
+ >更多>></el-button
|
|
|
+ >
|
|
|
+ </div>
|
|
|
+ <el-table v-loading="orderRankLoading" :data="orderRankList">
|
|
|
+ <!-- <el-table-column type="selection" width="55" align="center" /> -->
|
|
|
+ <el-table-column type="index" :index="indexMethod"> </el-table-column>
|
|
|
+ <el-table-column label="商品名称" align="center" prop="itemTitle">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <a
|
|
|
+ :title="scope.row.itemTitle"
|
|
|
+ @click="toOrderDetail(scope.row)"
|
|
|
+ style="text-overflow: ellipsis; white-space: nowrap; overflow: hidden"
|
|
|
+ >
|
|
|
+ {{ scope.row.itemTitle }}
|
|
|
+ </a>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="订单数" align="center" prop="orderNum">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="有效订单" align="center" prop="validOrderNUm">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="有效率" align="center" prop="validRadio">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{
|
|
|
+ scope.row.validRadio
|
|
|
+ ? (scope.row.validRadio * 100).toFixed(2) + "%"
|
|
|
+ : "-"
|
|
|
+ }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="发货数" align="center" prop="deliveryNum">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="发货率" align="center" prop="deliveryRadio">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{
|
|
|
+ scope.row.deliveryRadio
|
|
|
+ ? (scope.row.deliveryRadio * 100).toFixed(2) + "%"
|
|
|
+ : "-"
|
|
|
+ }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
|
|
|
- <el-table-column label="日涨幅" align="center" prop="radio">
|
|
|
- <template slot-scope="scope">
|
|
|
- <i :style="scope.row.radio > 0 ? 'color:red' : 'color:green'">{{
|
|
|
- scope.row.radio
|
|
|
- ? (scope.row.radio * 100).toFixed(2) + "%"
|
|
|
- : "-"
|
|
|
- }}</i>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- <pagination
|
|
|
- v-show="orderTotal > 0"
|
|
|
- :total="orderTotal"
|
|
|
- :page.sync="queryParams.pageNum"
|
|
|
- :limit.sync="queryParams.pageSize"
|
|
|
- @pagination="getIndexOrderRank"
|
|
|
- layout="total, prev, pager, next, jumper"
|
|
|
- :small="true"
|
|
|
- />
|
|
|
- </el-card>
|
|
|
- </el-col>
|
|
|
- <el-col :span="12">
|
|
|
- <el-card
|
|
|
- shadow="never"
|
|
|
- class="card-show"
|
|
|
- style="width: 100%; min-height: 700px"
|
|
|
- >
|
|
|
- <div slot="header" class="clearfix">
|
|
|
- <span style="font-size: 16px; font-weight: bold; float: left"
|
|
|
- >达人排行榜</span
|
|
|
- >
|
|
|
- <el-button
|
|
|
- style="float: right; padding: 3px 0"
|
|
|
- type="text"
|
|
|
- @click="toPersonList"
|
|
|
- >更多>></el-button
|
|
|
- >
|
|
|
- </div>
|
|
|
- <el-table v-loading="promoterLoading" :data="promoterRankList">
|
|
|
- <!-- <el-table-column type="selection" width="55" align="center" /> -->
|
|
|
- <el-table-column type="index" :index="indexMethodTwo" width="70">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- label="达人名称"
|
|
|
- align="center"
|
|
|
- prop="promoterNickName"
|
|
|
- >
|
|
|
- <template slot-scope="scope">
|
|
|
- <a
|
|
|
- :title="scope.row.promoterNickName"
|
|
|
- @click="toPersonDetail(scope.row)"
|
|
|
- style="
|
|
|
- width: 200px;
|
|
|
- text-overflow: ellipsis;
|
|
|
- white-space: nowrap;
|
|
|
- overflow: hidden;
|
|
|
- text-align: left;
|
|
|
- "
|
|
|
- >
|
|
|
- {{ scope.row.promoterNickName }}
|
|
|
- </a>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="订单数" align="center" prop="orderNum">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- label="有效订单"
|
|
|
- align="center"
|
|
|
- prop="validOrderNUm"
|
|
|
- >
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="有效率" align="center" prop="validRadio">
|
|
|
- <template slot-scope="scope">
|
|
|
- {{
|
|
|
- scope.row.validRadio
|
|
|
- ? (scope.row.validRadio * 100).toFixed(2) + "%"
|
|
|
- : "-"
|
|
|
- }}
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
+ <el-table-column label="日涨幅" align="center" prop="radio">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <i :style="scope.row.radio > 0 ? 'color:red' : 'color:green'">{{
|
|
|
+ scope.row.radio ? (scope.row.radio * 100).toFixed(2) + "%" : "-"
|
|
|
+ }}</i>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <pagination
|
|
|
+ v-show="orderTotal > 0"
|
|
|
+ :total="orderTotal"
|
|
|
+ :page.sync="queryParams.pageNum"
|
|
|
+ :limit.sync="queryParams.pageSize"
|
|
|
+ @pagination="getIndexOrderRank"
|
|
|
+ layout="total, prev, pager, next, jumper"
|
|
|
+ :small="true"
|
|
|
+ />
|
|
|
+ </el-card>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-card
|
|
|
+ shadow="never"
|
|
|
+ class="card-show"
|
|
|
+ style="width: 100%; min-height: 700px"
|
|
|
+ >
|
|
|
+ <div slot="header" class="clearfix">
|
|
|
+ <span style="font-size: 16px; font-weight: bold; float: left"
|
|
|
+ >达人排行榜</span
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ style="float: right; padding: 3px 0"
|
|
|
+ type="text"
|
|
|
+ @click="toPersonList"
|
|
|
+ >更多>></el-button
|
|
|
+ >
|
|
|
+ </div>
|
|
|
+ <el-table v-loading="promoterLoading" :data="promoterRankList">
|
|
|
+ <!-- <el-table-column type="selection" width="55" align="center" /> -->
|
|
|
+ <el-table-column type="index" :index="indexMethodTwo" width="70">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="达人名称" align="center" prop="promoterNickName">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <a
|
|
|
+ :title="scope.row.promoterNickName"
|
|
|
+ @click="toPersonDetail(scope.row)"
|
|
|
+ style="
|
|
|
+ width: 200px;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ white-space: nowrap;
|
|
|
+ overflow: hidden;
|
|
|
+ text-align: left;
|
|
|
+ "
|
|
|
+ >
|
|
|
+ {{ scope.row.promoterNickName }}
|
|
|
+ </a>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="订单数" align="center" prop="orderNum">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="有效订单" align="center" prop="validOrderNUm">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="有效率" align="center" prop="validRadio">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{
|
|
|
+ scope.row.validRadio
|
|
|
+ ? (scope.row.validRadio * 100).toFixed(2) + "%"
|
|
|
+ : "-"
|
|
|
+ }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
|
|
|
- <el-table-column label="日涨幅" align="center" prop="radio">
|
|
|
- <template slot-scope="scope">
|
|
|
- <i :style="scope.row.radio > 0 ? 'color:red' : 'color:green'">{{
|
|
|
- scope.row.radio
|
|
|
- ? (scope.row.radio * 100).toFixed(2) + "%"
|
|
|
- : "-"
|
|
|
- }}</i>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- <pagination
|
|
|
- v-show="promoterTotal > 0"
|
|
|
- :total="promoterTotal"
|
|
|
- :page.sync="queryParams.promoterPageNum"
|
|
|
- :limit.sync="queryParams.pageSize"
|
|
|
- layout="total, prev, pager, next, jumper"
|
|
|
- @pagination="getIndexPromoterRank"
|
|
|
- :small="true"
|
|
|
- />
|
|
|
- </el-card>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
+ <el-table-column label="日涨幅" align="center" prop="radio">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <i :style="scope.row.radio > 0 ? 'color:red' : 'color:green'">{{
|
|
|
+ scope.row.radio ? (scope.row.radio * 100).toFixed(2) + "%" : "-"
|
|
|
+ }}</i>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <pagination
|
|
|
+ v-show="promoterTotal > 0"
|
|
|
+ :total="promoterTotal"
|
|
|
+ :page.sync="queryParams.promoterPageNum"
|
|
|
+ :limit.sync="queryParams.pageSize"
|
|
|
+ layout="total, prev, pager, next, jumper"
|
|
|
+ @pagination="getIndexPromoterRank"
|
|
|
+ :small="true"
|
|
|
+ />
|
|
|
+ </el-card>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <staging v-else />
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -405,11 +376,16 @@ import {
|
|
|
getIndexStatistics, //echarts图表
|
|
|
getTimeRatio, //时间段对比
|
|
|
} from "@/api/index";
|
|
|
+import staging from "./staging.vue";
|
|
|
var echarts = require("echarts");
|
|
|
export default {
|
|
|
name: "Index",
|
|
|
+ components: {
|
|
|
+ staging,
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
+ showOld: false,
|
|
|
// 遮罩层
|
|
|
loading: true,
|
|
|
// 选中数组
|
|
@@ -563,15 +539,28 @@ export default {
|
|
|
let sdd = start.getDate();
|
|
|
sdd = sdd < 10 ? "0" + sdd : sdd;
|
|
|
this.uploadDateEcharts = [`${sy}-${sMM}-${sdd}`, `${ey}-${eMM}-${edd}`];
|
|
|
+
|
|
|
+ this.showOld =
|
|
|
+ this.$store.getters.roles[0] == "courtshipManager" ||
|
|
|
+ this.$store.getters.roles[0] == "courtship" ||
|
|
|
+ this.$store.getters.roles[0] == "bdManager" ||
|
|
|
+ this.$store.getters.roles[0] == "bd" ||
|
|
|
+ this.$store.getters.roles[0] == "association" ||
|
|
|
+ this.$store.getters.roles[0] == "associationManager" ||
|
|
|
+ this.$store.getters.roles[0] == "supplyChainAdmin"
|
|
|
+ ? false
|
|
|
+ : true;
|
|
|
},
|
|
|
mounted() {
|
|
|
- this.getIndexOrderInfo();
|
|
|
- this.getIndexServiceAmountInfo();
|
|
|
- this.getIndexAmountInfo();
|
|
|
- this.getIndexPromoterRank();
|
|
|
- this.getIndexOrderRank();
|
|
|
- this.getIndexStatistics();
|
|
|
- this.getTimeRatio();
|
|
|
+ if (this.showOld) {
|
|
|
+ this.getIndexOrderInfo();
|
|
|
+ this.getIndexServiceAmountInfo();
|
|
|
+ this.getIndexAmountInfo();
|
|
|
+ this.getIndexPromoterRank();
|
|
|
+ this.getIndexOrderRank();
|
|
|
+ this.getIndexStatistics();
|
|
|
+ this.getTimeRatio();
|
|
|
+ }
|
|
|
},
|
|
|
methods: {
|
|
|
getAllEchartsData(e) {
|
|
@@ -603,10 +592,7 @@ export default {
|
|
|
orderEndDate: this.uploadDate[1],
|
|
|
}).then((response) => {
|
|
|
this.echartsLoading = false;
|
|
|
- this.initEchart(
|
|
|
- "echart",
|
|
|
- this.handlerEchartOption(response, this.echartsType)
|
|
|
- );
|
|
|
+ this.initEchart("echart", this.handlerEchartOption(response, this.echartsType));
|
|
|
});
|
|
|
},
|
|
|
/** 获取echart的值 */
|
|
@@ -807,10 +793,8 @@ export default {
|
|
|
regimentalPromotionAmount: response.amountTotal.orderAmount / 100,
|
|
|
personData: response.amountTotal.baseAmount / 100,
|
|
|
complete: response.amountTotal.regimentalPromotionAmount / 100,
|
|
|
- ringRatio:
|
|
|
- this.dateType == 0 ? response.amountRatio.amountRingRatio : 0,
|
|
|
- yearRatio:
|
|
|
- this.dateType == 0 ? response.amountRatio.amountYearRatio : 0,
|
|
|
+ ringRatio: this.dateType == 0 ? response.amountRatio.amountRingRatio : 0,
|
|
|
+ yearRatio: this.dateType == 0 ? response.amountRatio.amountYearRatio : 0,
|
|
|
};
|
|
|
});
|
|
|
},
|
|
@@ -928,8 +912,7 @@ export default {
|
|
|
n = n || 2;
|
|
|
let symbol = ",";
|
|
|
if (num === null) return num;
|
|
|
- if (typeof num !== "number")
|
|
|
- throw new TypeError("num参数应该是一个number类型");
|
|
|
+ if (typeof num !== "number") throw new TypeError("num参数应该是一个number类型");
|
|
|
if (n < 0) throw new Error("参数n不应该小于0");
|
|
|
let hasDot = parseInt(num) != num; //这里检测num是否为小数,true表示小数
|
|
|
let m = n != undefined && n != null ? n : 1;
|
|
@@ -942,11 +925,9 @@ export default {
|
|
|
: num
|
|
|
: num.toFixed(m);
|
|
|
symbol = symbol || ",";
|
|
|
- num = num
|
|
|
- .toString()
|
|
|
- .replace(/(\d)(?=(\d{3})+\.)/g, function (match, p1, p2) {
|
|
|
- return p1 + symbol;
|
|
|
- });
|
|
|
+ num = num.toString().replace(/(\d)(?=(\d{3})+\.)/g, function (match, p1, p2) {
|
|
|
+ return p1 + symbol;
|
|
|
+ });
|
|
|
if (n == 0 || (!hasDot && !n)) {
|
|
|
//如果n为0或者传入的num是整数并且没有指定整数的保留位数,则去掉前面操作中的小数位
|
|
|
num = num.substring(0, num.indexOf("."));
|