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

流失客户

parent 28136f23
...@@ -43,13 +43,6 @@ export const getBusinessConditionDatasByYear = (cur_day) => fetch('/api/query/*/ ...@@ -43,13 +43,6 @@ export const getBusinessConditionDatasByYear = (cur_day) => fetch('/api/query/*/
}, 'POST'); }, 'POST');
// 应收账款汇总 // 应收账款汇总
export const arSummaryBar = () => fetch("/api/query/dash_board/action/get_ar_summary_bar", {}, "POST") export const arSummaryBar = () => fetch("/api/query/dash_board/action/get_ar_summary_bar", {}, "POST")
// 应收账款列表 // 应收账款列表
...@@ -106,6 +99,11 @@ export const getAllTypeBusinessConditionDetailByYear = (cur_day) => fetch('/api/ ...@@ -106,6 +99,11 @@ export const getAllTypeBusinessConditionDetailByYear = (cur_day) => fetch('/api/
}, 'POST'); }, 'POST');
export const transportTypeOrderFinishPie = (date) => fetch("/api/query/dash_board/action/get_order_finish_data_by_transport_type_day", {aux: {"cur_day":date}}, "POST") export const transportTypeOrderFinishPie = (date) => fetch("/api/query/dash_board/action/get_order_finish_data_by_transport_type_day", {aux: {"cur_day": date}}, "POST")
export const customerOrderFinishPie = (date) => fetch("/api/query/dash_board/action/get_order_finish_data_by_customer_day", {aux: {"cur_day":date}}, "POST") export const customerOrderFinishPie = (date) => fetch("/api/query/dash_board/action/get_order_finish_data_by_customer_day", {aux: {"cur_day": date}}, "POST")
//流失客户 & 新增客户
export const getOrderLoseAddCustomer = (cur_day) => fetch('/api/query/*/action/get_order_loss_add_customer', {
aux: {
cur_day: cur_day
}
}, 'POST');
...@@ -113,20 +113,20 @@ ...@@ -113,20 +113,20 @@
<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.lskh.weight" content-style="font-size: 16px;" mark-style="font-size: 10px;" :content="lskh.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.lskh.amount" mark="万元"/> :content="lskh.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.xzkh.weight" content-style="font-size: 16px;" mark-style="font-size: 10px;" :content="xzkh.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.xzkh.amount" mark="万元"/> :content="xzkh.amount" mark="万元"/>
</showcase> </showcase>
</div> </div>
</div> </div>
...@@ -149,7 +149,7 @@ import WinnersList from "./components/card/winners-list.vue"; ...@@ -149,7 +149,7 @@ 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} from "../api/apiList" import {arSummaryBar, arCompanyList, getBusinessConditionDatas, customerOrderFinishPie,getOrderLoseAddCustomer} 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";
...@@ -227,6 +227,14 @@ export default { ...@@ -227,6 +227,14 @@ export default {
{title: '应收款(财务)', value: '20,303'}, {title: '应收款(财务)', value: '20,303'},
{title: '应收款(营销)', value: '20,303',}, {title: '应收款(营销)', value: '20,303',},
], ],
lskh: {
weight: "2,000",
amount: "20,000",
},
xzkh: {
weight: "2,000",
amount: "20,000",
},
mockData: { mockData: {
zqk: { zqk: {
yszk: { yszk: {
...@@ -465,14 +473,14 @@ export default { ...@@ -465,14 +473,14 @@ export default {
arSummaryBar().then(res => { arSummaryBar().then(res => {
let data = res.data let data = res.data
let seriesData = [] let seriesData = []
seriesData.push(data.unsettled_amount) seriesData.push(conver_num_retain(data.unsettled_amount))
seriesData.push(data.settled_amount) seriesData.push(conver_num_retain(data.settled_amount))
seriesData.push(data.unregister_amount) seriesData.push(conver_num_retain(data.unregister_amount))
seriesData.push(data.receivable_amount) seriesData.push(conver_num_retain(data.receivable_amount))
seriesData.push(data.cancelled_amount) seriesData.push(conver_num_retain(data.cancelled_amount))
this.arSummary[0].value = data.total_amount this.arSummary[0].value = conver_num_retain(data.total_amount)
this.arSummary[1].value = data.unregister_amount this.arSummary[1].value = conver_num_retain(data.unregister_amount)
this.arSummary[2].value = data.receivable_amount this.arSummary[2].value = conver_num_retain(data.receivable_amount)
this.$refs.arSummaryBar.drawArSummaryBar(seriesData) this.$refs.arSummaryBar.drawArSummaryBar(seriesData)
}).catch(err => { }).catch(err => {
console.log(err); console.log(err);
...@@ -498,6 +506,15 @@ export default { ...@@ -498,6 +506,15 @@ export default {
pieDataFormatter (param) { pieDataFormatter (param) {
return param.name + '\r\n' + this.pieDataValueFormatter(param.value) + "万元"; return param.name + '\r\n' + this.pieDataValueFormatter(param.value) + "万元";
}, },
getLoseAndAdd() {
getOrderLoseAddCustomer(this.today).then(res => {
let data = res.data
this.lskh.amount = conver_amont(data.lost_sell_settle_amount_sum);
this.lskh.weight = conver_amont(data.lost_weight_sum);
this.xzkh.amount = conver_amont(data.add_sell_settle_amount_sum);
this.xzkh.weight = conver_amont(data.add_weight_sum);
})
}
}, },
mounted() { mounted() {
this.showBusinessConditionDatas(); this.showBusinessConditionDatas();
...@@ -506,6 +523,7 @@ export default { ...@@ -506,6 +523,7 @@ export default {
}, 500) }, 500)
this.getArSummaryBar(); this.getArSummaryBar();
this.getArCompanyList(); this.getArCompanyList();
this.getLoseAndAdd();
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