| | |
| | | </div> |
| | | </div> |
| | | <div class="stat-content"> |
| | | <div class="stat-value">{{ indicatorKpis.shipRate }}%</div> |
| | | <div class="stat-value">{{ indicatorKpis.shipRate }}</div> |
| | | <div class="stat-label">发货率</div> |
| | | </div> |
| | | <div class="stat-bg-decoration"></div> |
| | |
| | | <div ref="indicatorChartRef" class="chart-wrapper"></div> |
| | | </div> |
| | | </el-card> |
| | | |
| | | <!-- 业绩统计(团队维度,无个人姓名) --> |
| | | <el-card v-if="showTeamPerformance" class="table-card" shadow="hover"> |
| | | <template #header> |
| | | <div class="card-header"> |
| | | <span class="card-title">团队业绩统计</span> |
| | | </div> |
| | | </template> |
| | | <el-table |
| | | :data="teamPerformanceList" |
| | | border |
| | | stripe |
| | | style="width: 100%" |
| | | :header-cell-style="{ background: '#f5f7fa', color: '#606266', fontWeight: 'bold' }" |
| | | > |
| | | <el-table-column prop="team" label="销售团队" min-width="120"/> |
| | | <el-table-column prop="orderCount" label="订单数" align="right" min-width="100"/> |
| | | <el-table-column prop="salesAmount" label="销售额" align="right" min-width="140"> |
| | | <template #default="scope">¥{{ scope.row.salesAmount.toLocaleString() }}</template> |
| | | </el-table-column> |
| | | <el-table-column prop="shipRate" label="发货率" align="right" min-width="100"> |
| | | <template #default="scope">{{ scope.row.shipRate }}%</template> |
| | | </el-table-column> |
| | | <el-table-column prop="attainment" label="目标达成率" align="center" min-width="120"> |
| | | <template #default="scope"> |
| | | <el-tag |
| | | :type="scope.row.attainment >= 100 ? 'success' : scope.row.attainment >= 80 ? 'warning' : 'danger'" |
| | | effect="dark" |
| | | > |
| | | {{ scope.row.attainment }}% |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-card> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | |
| | | const productOptions = ref([]) |
| | | const customerOption = ref([]) |
| | | |
| | | const teamPerformanceList = ref([ |
| | | { team: '华东大区', orderCount: 320, salesAmount: 2850000, shipRate: 90, attainment: 105 }, |
| | | { team: '华北大区', orderCount: 280, salesAmount: 2150000, shipRate: 86, attainment: 92 }, |
| | | { team: '华南大区', orderCount: 210, salesAmount: 1850000, shipRate: 88, attainment: 78 }, |
| | | { team: '西南大区', orderCount: 180, salesAmount: 1500000, shipRate: 83, attainment: 74 } |
| | | ]) |
| | | |
| | | // 转换产品树数据,将 id 改为 value |
| | | function convertIdToValue(data) { |
| | |
| | | indicatorKpis.orderCount = res.data.total || 0 |
| | | indicatorKpis.salesAmount = res.data.contractAmountTotal || 0 |
| | | // 发货率如果接口没有返回,保持原值或设为0 |
| | | // indicatorKpis.shipRate = res.data.shipRate || 0 |
| | | indicatorKpis.shipRate = res.data.shipRate || 0 |
| | | } |
| | | } catch (error) { |
| | | console.error('获取头部统计失败:', error) |