Commit ba8d8f82 authored by 潘自豪's avatar 潘自豪

首页订单当日订单量,当日完成量

parent 02c851f6
...@@ -119,3 +119,11 @@ export const getOrderAddCustomerDetail = (cur_day, type) => fetch('/api/query/*/ ...@@ -119,3 +119,11 @@ export const getOrderAddCustomerDetail = (cur_day, type) => fetch('/api/query/*/
} }
}, 'POST'); }, 'POST');
//当日订单量,当时完成量 余量
export const getOrderBusinessConditionData = (cur_day, type) => fetch('/api/query/*/action/get_order_business_condition_data', {
aux: {
cur_day: cur_day
}
}, 'POST');
...@@ -4,7 +4,8 @@ ...@@ -4,7 +4,8 @@
<display-board class="trade_left" title="营业情况"> <display-board class="trade_left" title="营业情况">
<div <div
style="height: 100%; display: flex; flex-direction: column; justify-content: space-around; padding: 0 1rem 0 1rem;"> style="height: 100%; display: flex; flex-direction: column; justify-content: space-around; padding: 0 1rem 0 1rem;">
<contrast-card v-for="data in yyqk" style="height: 28%;" @click.native="routerTo('/turnover-detail',paths[data.title])"> <contrast-card v-for="data in yyqk" style="height: 28%;"
@click.native="routerTo('/turnover-detail',paths[data.title])">
<title-content-mark style="width: 40%;color: #369afa;float: left;" :title="data.title" <title-content-mark style="width: 40%;color: #369afa;float: left;" :title="data.title"
:content="data.amount" :mark="data.unit"/> :content="data.amount" :mark="data.unit"/>
<div <div
...@@ -21,7 +22,8 @@ ...@@ -21,7 +22,8 @@
<display-board class="trade_middle" corner_size="large"> <display-board class="trade_middle" corner_size="large">
<div style="height: 36%;display: flex;justify-content: space-evenly;padding-top: 1.5rem"> <div style="height: 36%;display: flex;justify-content: space-evenly;padding-top: 1.5rem">
<simple-card v-for="data in arSummary" style="width: 30%;height: 100%"> <simple-card v-for="data in arSummary" style="width: 30%;height: 100%">
<title-content-mark style="color: #5eeef4;" :title="data.title" :content="data.value" :mark="'万元'" isCenter isBold/> <title-content-mark style="color: #5eeef4;" :title="data.title" :content="data.value" :mark="'万元'"
isCenter isBold/>
</simple-card> </simple-card>
</div> </div>
<ar-summary-bar ref="arSummaryBar" style="width: 100%; height: 64%;"></ar-summary-bar> <ar-summary-bar ref="arSummaryBar" style="width: 100%; height: 64%;"></ar-summary-bar>
...@@ -87,28 +89,28 @@ ...@@ -87,28 +89,28 @@
<showcase style="width: 18%;" title="当日订单量"> <showcase style="width: 18%;" title="当日订单量">
<title-content-mark <title-content-mark
style="float:left;width: 100%;height: 50%;color: #5eeef4;padding: 0 15%;font-size: 16px;" style="float:left;width: 100%;height: 50%;color: #5eeef4;padding: 0 15%;font-size: 16px;"
content-style="font-size: 16px;" mark-style="font-size: 10px;" :content="mockData.drddl.weight" content-style="font-size: 16px;" mark-style="font-size: 10px;" :content="drddl.weight"
mark="万吨"/> mark="万吨"/>
<title-content-mark style="float:left;width: 100%;height: 50%;color: #5eeef4;padding: 0 15%;" <title-content-mark style="float:left;width: 100%;height: 50%;color: #5eeef4;padding: 0 15%;"
content-style="font-size: 16px;" mark-style="font-size: 10px;" content-style="font-size: 16px;" mark-style="font-size: 10px;"
:content="mockData.drddl.amount" mark="万元"/> :content="drddl.amount" mark="万元"/>
</showcase> </showcase>
<showcase style="width: 18%;" title="当日完成量"> <showcase style="width: 18%;" title="当日完成量">
<title-content-mark <title-content-mark
style="float:left;width: 100%;height: 50%;color: #5eeef4;padding: 0 15%;font-size: 16px;" style="float:left;width: 100%;height: 50%;color: #5eeef4;padding: 0 15%;font-size: 16px;"
content-style="font-size: 16px;" mark-style="font-size: 10px;" :content="mockData.drwcl.weight" content-style="font-size: 16px;" mark-style="font-size: 10px;" :content="drwcl.weight"
mark="万吨"/> mark="万吨"/>
<title-content-mark style="float:left;width: 100%;height: 50%;color: #5eeef4;padding: 0 15%;" <title-content-mark style="float:left;width: 100%;height: 50%;color: #5eeef4;padding: 0 15%;"
content-style="font-size: 16px;" mark-style="font-size: 10px;" content-style="font-size: 16px;" mark-style="font-size: 10px;"
:content="mockData.drwcl.amount" mark="万元"/> :content="drwcl.amount" mark="万元"/>
</showcase> </showcase>
<showcase style="width: 18%;" title="余量"> <showcase style="width: 18%;" title="余量">
<title-content-mark <title-content-mark
style="float:left;width: 100%;height: 50%;color: #5eeef4;padding: 0 15%;font-size: 16px;" style="float:left;width: 100%;height: 50%;color: #5eeef4;padding: 0 15%;font-size: 16px;"
content-style="font-size: 16px;" mark-style="font-size: 10px;" :content="mockData.yl.weight" mark="万吨"/> content-style="font-size: 16px;" mark-style="font-size: 10px;" :content="yl.weight" mark="万吨"/>
<title-content-mark style="float:left;width: 100%;height: 50%;color: #5eeef4;padding: 0 15%;" <title-content-mark style="float:left;width: 100%;height: 50%;color: #5eeef4;padding: 0 15%;"
content-style="font-size: 16px;" mark-style="font-size: 10px;" content-style="font-size: 16px;" mark-style="font-size: 10px;"
:content="mockData.yl.amount" mark="万元"/> :content="yl.amount" mark="万元"/>
</showcase> </showcase>
<showcase style="width: 18%;" title="流失客户" @click.native="routerTo('/lost-add-customer')"> <showcase style="width: 18%;" title="流失客户" @click.native="routerTo('/lost-add-customer')">
<title-content-mark <title-content-mark
...@@ -131,9 +133,14 @@ ...@@ -131,9 +133,14 @@
</div> </div>
</div> </div>
<display-board class="trade_right" title="当日订单量占比"> <display-board class="trade_right" title="当日订单量占比">
<div style="height: 100%; display: flex; flex-direction: column; justify-content: space-around; padding: 0 1rem 0 1rem;"> <div
<ring-pie-chart ref="transportTypeChart" style="width: 100%;height: 50%;z-index: 999" name="运输类型占比" :data="transportTypeOrderFinishPie" @click.native="routerTo('/order-proportion')" :value-formatter="pieDataValueFormatter" :formatter="pieDataFormatter"/> style="height: 100%; display: flex; flex-direction: column; justify-content: space-around; padding: 0 1rem 0 1rem;">
<ring-pie-chart ref="customerChart" style="width: 100%;height: 50%;" name="公司占比" :data="customerOrderFinishPie" @click.native="routerTo('/order-proportion')" :value-formatter="pieDataValueFormatter" :formatter="pieDataFormatter"/> <ring-pie-chart ref="transportTypeChart" style="width: 100%;height: 50%;z-index: 999" name="运输类型占比"
:data="transportTypeOrderFinishPie" @click.native="routerTo('/order-proportion')"
:value-formatter="pieDataValueFormatter" :formatter="pieDataFormatter"/>
<ring-pie-chart ref="customerChart" style="width: 100%;height: 50%;" name="公司占比"
:data="customerOrderFinishPie" @click.native="routerTo('/order-proportion')"
:value-formatter="pieDataValueFormatter" :formatter="pieDataFormatter"/>
</div> </div>
</display-board> </display-board>
</div> </div>
...@@ -149,9 +156,15 @@ import WinnersList from "./components/card/winners-list.vue"; ...@@ -149,9 +156,15 @@ import WinnersList from "./components/card/winners-list.vue";
import TitleContentMark from "./components/layout/title-content-mark.vue"; import TitleContentMark from "./components/layout/title-content-mark.vue";
import TableColumn from "./components/table/table-column.vue"; import TableColumn from "./components/table/table-column.vue";
import RingPieChart from "./components/chart/ring-pie-chart.vue"; import RingPieChart from "./components/chart/ring-pie-chart.vue";
import {arSummaryBar, arCompanyList, getBusinessConditionDatas, customerOrderFinishPie,getOrderLoseAddCustomer} from "../api/apiList" import {
arSummaryBar,
arCompanyList,
getBusinessConditionDatas,
getOrderLoseAddCustomer,
getOrderBusinessConditionData
} from "../api/apiList"
import {calc_hb_str, calc_tb_str, conver_amont, conver_num_retain} from "../utils/numUtil"; import {calc_hb_str, calc_tb_str, conver_amont, conver_num_retain} from "../utils/numUtil";
import {getTransportTypeOrderFinishPie,getCustomerOrderFinishPie} from "./databoard/js/indexPieData"; import {getTransportTypeOrderFinishPie, getCustomerOrderFinishPie} from "./databoard/js/indexPieData";
export default { export default {
components: { components: {
...@@ -235,6 +248,18 @@ export default { ...@@ -235,6 +248,18 @@ export default {
weight: "2,000", weight: "2,000",
amount: "20,000", amount: "20,000",
}, },
drddl: {
weight: "2,000",
amount: "20,000",
},
drwcl: {
weight: "2,000",
amount: "20,000",
},
yl: {
weight: "2,000",
amount: "20,000",
},
mockData: { mockData: {
zqk: { zqk: {
yszk: { yszk: {
...@@ -414,15 +439,15 @@ export default { ...@@ -414,15 +439,15 @@ export default {
"成本": "cb", "成本": "cb",
"毛利": "ml", "毛利": "ml",
}, },
dataset:{}, dataset: {},
transportTypeOrderFinishPie:[], transportTypeOrderFinishPie: [],
customerOrderFinishPie:[], customerOrderFinishPie: [],
arCompanyList:[], arCompanyList: [],
charts: {} charts: {}
} }
}, },
methods: { methods: {
log(){ log() {
}, },
cellStyleFunction(data) { cellStyleFunction(data) {
let res = {color: '#33ff66'}; let res = {color: '#33ff66'};
...@@ -436,7 +461,7 @@ export default { ...@@ -436,7 +461,7 @@ export default {
this.charts[chartsKey].resize(); this.charts[chartsKey].resize();
} }
}, },
routerTo(path,code) { routerTo(path, code) {
this.$router.push({path: path, query: {code: code}}); this.$router.push({path: path, query: {code: code}});
}, },
//营业情况 //营业情况
...@@ -496,14 +521,14 @@ export default { ...@@ -496,14 +521,14 @@ export default {
console.log(err); console.log(err);
}); });
}, },
refreshData(){ refreshData() {
getTransportTypeOrderFinishPie(res => this.transportTypeOrderFinishPie = res,this.today); getTransportTypeOrderFinishPie(res => this.transportTypeOrderFinishPie = res, this.today);
getCustomerOrderFinishPie(res => this.customerOrderFinishPie = res,this.today); getCustomerOrderFinishPie(res => this.customerOrderFinishPie = res, this.today);
}, },
pieDataValueFormatter(param){ pieDataValueFormatter(param) {
return conver_amont(param) + "万元"; return conver_amont(param) + "万元";
}, },
pieDataFormatter (param) { pieDataFormatter(param) {
return param.name + '\r\n' + this.pieDataValueFormatter(param.value) + "万元"; return param.name + '\r\n' + this.pieDataValueFormatter(param.value) + "万元";
}, },
getLoseAndAdd() { getLoseAndAdd() {
...@@ -514,6 +539,17 @@ export default { ...@@ -514,6 +539,17 @@ export default {
this.xzkh.amount = conver_amont(data.add_sell_settle_amount_sum); this.xzkh.amount = conver_amont(data.add_sell_settle_amount_sum);
this.xzkh.weight = conver_amont(data.add_weight_sum); this.xzkh.weight = conver_amont(data.add_weight_sum);
}) })
},
getOrderBusinessCondition() {
getOrderBusinessConditionData(this.today).then(res => {
let data = res.data
this.drddl.amount = conver_amont(data.cur_sell_settle_amount);
this.drddl.weight = conver_amont(data.cur_unit_weight);
this.drwcl.amount = conver_amont(data.cur_finish_sell_settle_amount);
this.drwcl.weight = conver_amont(data.cur_finish_unit_weight);
this.yl.amount = conver_amont(data.cur_unfinish_sell_settle_amount);
this.yl.weight = conver_amont(data.cur_unfinish_unit_weight);
})
} }
}, },
mounted() { mounted() {
...@@ -524,6 +560,7 @@ export default { ...@@ -524,6 +560,7 @@ export default {
this.getArSummaryBar(); this.getArSummaryBar();
this.getArCompanyList(); this.getArCompanyList();
this.getLoseAndAdd(); this.getLoseAndAdd();
this.getOrderBusinessCondition();
this.refreshData(); this.refreshData();
}, },
beforeDestroy() { beforeDestroy() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment