|
@@ -40,7 +40,94 @@
|
|
|
</board>
|
|
|
|
|
|
<!-- 经营分析 -->
|
|
|
- <board :title="title[3]"></board>
|
|
|
+ <board :title="title[3]">
|
|
|
+ <!-- 成本分析 -->
|
|
|
+ <div class="cost">
|
|
|
+ <div class="select">
|
|
|
+ <el-select size="small" v-model="costValue">
|
|
|
+ <el-option
|
|
|
+ v-for="item in costOptions"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
+ <div class="cost-content">
|
|
|
+ <div class="cost-left">
|
|
|
+ <cost-pie></cost-pie>
|
|
|
+ </div>
|
|
|
+ <div class="cost-right">
|
|
|
+ <cost-histogram></cost-histogram>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <h3 class="label">成本分析</h3>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- 重要指标 -->
|
|
|
+ <div class="important">
|
|
|
+ <div class="condition">
|
|
|
+ <el-select
|
|
|
+ size="small"
|
|
|
+ v-model="importantValue"
|
|
|
+ style="margin-right: 20px">
|
|
|
+ <el-option
|
|
|
+ v-for="item in importantOptions"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ <el-date-picker
|
|
|
+ v-model="importantDates"
|
|
|
+ size="small"
|
|
|
+ type="daterange"
|
|
|
+ range-separator="至"
|
|
|
+ start-placeholder="开始日期"
|
|
|
+ end-placeholder="结束日期">
|
|
|
+ </el-date-picker>
|
|
|
+ </div>
|
|
|
+ <div class="important-chart">
|
|
|
+ <important-line></important-line>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- 销售情况 -->
|
|
|
+ <div class="sales">
|
|
|
+ <div class="sales-condition">
|
|
|
+ <x-form :formItems="salesFormItems" :day="salesDay" @setDay="salesSetDay" @onClickType="salesOnClickType"></x-form>
|
|
|
+ </div>
|
|
|
+ <div class="sales-content">
|
|
|
+ <div class="sales-left">
|
|
|
+ <div class="up">
|
|
|
+ <label>本周销售额</label>
|
|
|
+ <span>{{ weekSales }}元</span>
|
|
|
+ <div class="sales-change">
|
|
|
+ <div>
|
|
|
+ <div class="triangle-change" :class="weekSalesChange>0? 'triangle-up': 'triangle-down'"></div>
|
|
|
+ <span :class="weekSalesChange>0? 'color-up': 'color-down'">{{ weekSalesChange }}%</span>
|
|
|
+ 同比上周
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="down">
|
|
|
+ <label>本周销售量</label>
|
|
|
+ <span>{{ weekSalesVolume }}元</span>
|
|
|
+ <div class="sales-change">
|
|
|
+ <div>
|
|
|
+ <div class="triangle-change" :class="weekSalesVolumeChange>0? 'triangle-up': 'triangle-down'"></div>
|
|
|
+ <span :class="weekSalesVolumeChange>0? 'color-up': 'color-down'">{{ weekSalesVolumeChange }}%</span>
|
|
|
+ 同比上周
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="sales-right">
|
|
|
+ <sales-chart></sales-chart>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </board>
|
|
|
|
|
|
<!-- 应收排名 -->
|
|
|
<board :title="title[4]">
|
|
@@ -89,11 +176,17 @@ import ChartInventoryLines from './analysis/ChartInventoryLines.vue'
|
|
|
import InventoryItems from './analysis/InventoryItems.vue'
|
|
|
import ProductionDonuts from './analysis/ProductionDonuts.vue'
|
|
|
import ProductionItems from './analysis/ProductionItems.vue'
|
|
|
+import CostPie from './analysis/CostPie.vue'
|
|
|
+import CostHistogram from './analysis/CostHistogram.vue'
|
|
|
+import ImportantLine from './analysis/ImportantLine.vue'
|
|
|
+import XForm from "components/XForm";
|
|
|
+import SalesChart from './analysis/SalesChart.vue'
|
|
|
import TableFooter from "../../components/TableFooter"
|
|
|
|
|
|
import { tableItems, tableShows } from './analysis/table.config'
|
|
|
import { yingshouTableItems, yingshouTableShows } from './analysis/yingshouTable.config'
|
|
|
import { safetyTableItems, safetyTableShows } from './analysis/safetyTable.config'
|
|
|
+import { formItems } from './analysis/salesXForm.config'
|
|
|
|
|
|
export default {
|
|
|
name: "Analysis",
|
|
@@ -106,6 +199,11 @@ export default {
|
|
|
InventoryItems,
|
|
|
ProductionDonuts,
|
|
|
ProductionItems,
|
|
|
+ CostPie,
|
|
|
+ CostHistogram,
|
|
|
+ ImportantLine,
|
|
|
+ XForm,
|
|
|
+ SalesChart,
|
|
|
TableFooter
|
|
|
},
|
|
|
data() {
|
|
@@ -149,6 +247,20 @@ export default {
|
|
|
tableShows: {},
|
|
|
height: 300,
|
|
|
tableData: [],
|
|
|
+ // 生产情况
|
|
|
+ costOptions: [],
|
|
|
+ costValue: '',
|
|
|
+ // 重要指标
|
|
|
+ importantOptions: [],
|
|
|
+ importantValue: '',
|
|
|
+ importantDates: [],
|
|
|
+ // 销售额
|
|
|
+ salesFormItems: [],
|
|
|
+ salesDay: 2, //默认选择本周
|
|
|
+ weekSales: 1545252,
|
|
|
+ weekSalesChange: 10,
|
|
|
+ weekSalesVolume: 1000,
|
|
|
+ weekSalesVolumeChange: -10,
|
|
|
// 应收排名
|
|
|
yingshouTableItems: [],
|
|
|
yingshouTableShows: {},
|
|
@@ -165,6 +277,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
+ this.salesFormItems = formItems
|
|
|
this.tableItems = tableItems
|
|
|
this.tableShows = tableShows
|
|
|
this.yingshouTableItems = yingshouTableItems
|
|
@@ -194,6 +307,14 @@ export default {
|
|
|
}
|
|
|
console.log(params)
|
|
|
// 获取后端数据
|
|
|
+ },
|
|
|
+ // 销售额选中日期
|
|
|
+ salesSetDay(data) {
|
|
|
+ this.salesDay = data;
|
|
|
+ },
|
|
|
+ // 销售额选中日周月
|
|
|
+ salesOnClickType(data) {
|
|
|
+ console.log(data)
|
|
|
}
|
|
|
},
|
|
|
}
|
|
@@ -209,4 +330,113 @@ export default {
|
|
|
.table-content {
|
|
|
padding: 10px 15px 12px;
|
|
|
}
|
|
|
+
|
|
|
+/* 成本分析echarts图排列 */
|
|
|
+.cost {
|
|
|
+ border-bottom: 1px solid rgba(228, 228, 228, 1);
|
|
|
+ position: relative;
|
|
|
+}
|
|
|
+.cost>.select {
|
|
|
+ position: absolute;
|
|
|
+ right: 0;
|
|
|
+ margin: 20px;
|
|
|
+}
|
|
|
+.cost-content {
|
|
|
+ padding-top: 20px;
|
|
|
+ display: flex;
|
|
|
+}
|
|
|
+.cost-left {
|
|
|
+ flex: 1;
|
|
|
+}
|
|
|
+.cost-right {
|
|
|
+ flex: 1;
|
|
|
+}
|
|
|
+.cost>.label {
|
|
|
+ text-align: center;
|
|
|
+ font-weight: bold;
|
|
|
+ font-size: 18px;
|
|
|
+}
|
|
|
+/* 重要指标 */
|
|
|
+.important {
|
|
|
+ padding: 20px;
|
|
|
+ position: relative;
|
|
|
+ border-bottom: 1px solid rgba(228, 228, 228, 1);
|
|
|
+}
|
|
|
+.important>.condition {
|
|
|
+ position: absolute;
|
|
|
+ right: 0;
|
|
|
+ margin-right: 20px;
|
|
|
+}
|
|
|
+.important-chart {
|
|
|
+ margin-top: 20px;
|
|
|
+}
|
|
|
+/* 销售情况 */
|
|
|
+.sales {
|
|
|
+ padding: 20px;
|
|
|
+ padding-bottom: 0;
|
|
|
+}
|
|
|
+.sales-content {
|
|
|
+ padding-top: 20px;
|
|
|
+ width: 100%;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ justify-content: space-around
|
|
|
+}
|
|
|
+.sales-left {
|
|
|
+ width: 15%;
|
|
|
+ line-height: 25px;
|
|
|
+ padding-top: 30px;
|
|
|
+}
|
|
|
+.sales-left>.up {
|
|
|
+ margin-bottom: 20px;
|
|
|
+}
|
|
|
+.sales-left>.up>label,
|
|
|
+.sales-left>.down>label {
|
|
|
+ display: block;
|
|
|
+ text-align: center;
|
|
|
+ font-size: 13px;
|
|
|
+ color: #999;
|
|
|
+}
|
|
|
+.sales-left>.up>span,
|
|
|
+.sales-left>.down>span {
|
|
|
+ display: block;
|
|
|
+ text-align: center;
|
|
|
+ font-size: 16px;
|
|
|
+ color: #333;
|
|
|
+}
|
|
|
+.sales-left>.up>.sales-change,
|
|
|
+.sales-left>.down>.sales-change {
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-around;
|
|
|
+ font-size: 13px;
|
|
|
+}
|
|
|
+/* 三角形 */
|
|
|
+.triangle-change {
|
|
|
+ display: inline-block;
|
|
|
+ width: 8px;
|
|
|
+ height: 8px;
|
|
|
+ border-style: solid;
|
|
|
+ border-width: 8px;
|
|
|
+ margin-right: 20px;
|
|
|
+}
|
|
|
+.triangle-up {
|
|
|
+ border-color: transparent transparent rgb(238, 16, 16) transparent;
|
|
|
+}
|
|
|
+.triangle-down {
|
|
|
+ border-color: rgb(2, 112, 2) transparent transparent transparent;
|
|
|
+ position: relative;
|
|
|
+ top: 7px;
|
|
|
+}
|
|
|
+.color-up {
|
|
|
+ color: rgb(238, 16, 16);
|
|
|
+}
|
|
|
+.color-down {
|
|
|
+ color: rgb(2, 112, 2);
|
|
|
+}
|
|
|
+/* 销售情况右侧 */
|
|
|
+.sales-right {
|
|
|
+ width: 85%;
|
|
|
+ border-left: 1px solid rgba(228, 228, 228, 1);
|
|
|
+ height: 300px;
|
|
|
+}
|
|
|
</style>
|