Commit e0f46169 authored by Inner peace's avatar Inner peace

看板26号版本

parent 814838a6
...@@ -52,6 +52,15 @@ export const getBusinessConditionDatasByYoy = (cur_day) => fetch('/api/query/*/a ...@@ -52,6 +52,15 @@ export const getBusinessConditionDatasByYoy = (cur_day) => fetch('/api/query/*/a
// 应收账款汇总 // 应收账款汇总
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")
/**
* 获取账款情况
*/
export const getAccountSituation = (cur_day) => fetch("/api/query/dash_board/action/get_account_situation", {
aux: {
cur_day: cur_day
}
}, "POST")
// 应收账款列表 // 应收账款列表
export const arCompanyList = () => fetch("/api/query/dash_board/action/get_ar_company_list", {}, "POST") export const arCompanyList = () => fetch("/api/query/dash_board/action/get_ar_company_list", {}, "POST")
// 应收账款(结算单位) // 应收账款(结算单位)
......
...@@ -44,8 +44,7 @@ export default { ...@@ -44,8 +44,7 @@ export default {
components: {ContrastCard, TableColumn, TitleContentMark}, components: {ContrastCard, TableColumn, TitleContentMark},
data() { data() {
return { return {
today: "2023-05-18", today: moment().format("yyyy-MM-DD"),
// today: moment().format("yyyy-MM-DD"),
curPageCode: this.$route.query.code ? this.$route.query.code : "yye", curPageCode: this.$route.query.code ? this.$route.query.code : "yye",
currentData: {}, currentData: {},
mockDataDay: { mockDataDay: {
...@@ -134,7 +133,7 @@ export default { ...@@ -134,7 +133,7 @@ export default {
valueFormatter: this.valueFormatter valueFormatter: this.valueFormatter
}, },
dataset: { dataset: {
dimensions: ['date', '汽运(万元)', '水运(万元)', '铁运(万元)'], dimensions: ['date', '汽运(万元)', '水运(万元)', '铁运(万元)','汽运(万吨)', '水运(万吨)', '铁运(万吨)'],
source: [] source: []
}, },
xAxis: { xAxis: {
...@@ -202,6 +201,57 @@ export default { ...@@ -202,6 +201,57 @@ export default {
] ]
}, },
}, },
{
type: 'bar',
label: {
show: true,
position: 'top',
color: "#00CCD2",
formatter:this.labelFormatterWeight(4)
},
color: {
type: 'linear',
x: 0, y: 0, x2: 0, y2: 1,
colorStops: [
{offset: 0, color: '#91cc75'},
{offset: 1, color: '#91cc75'}
]
},
},
{
type: 'bar',
label: {
show: true,
position: 'top',
color: "#FFFAB7",
formatter:this.labelFormatterWeight(5)
},
color: {
type: 'linear',
x: 0, y: 0, x2: 0, y2: 1,
colorStops: [
{offset: 0, color: '#f2cc78'},
{offset: 1, color: '#f2cc78'}
]
},
},
{
type: 'bar',
label: {
show: true,
position: 'top',
color: "#81FBB8",
formatter:this.labelFormatterWeight(6)
},
color: {
type: 'linear',
x: 0, y: 0, x2: 0, y2: 1,
colorStops: [
{offset: 0, color: '#ee6666'},
{offset: 1, color: '#ee6666'}
]
},
}
] ]
}, },
discountOption : { discountOption : {
...@@ -318,7 +368,11 @@ export default { ...@@ -318,7 +368,11 @@ export default {
labelFormatter(dimensionNames){ labelFormatter(dimensionNames){
return function (param){ return function (param){
return conver_amont(param.value[param.dimensionNames[dimensionNames]]) + "万元"; return conver_amont(param.value[param.dimensionNames[dimensionNames]]) + "万元";
}
},
labelFormatterWeight(dimensionNames){
return function (param){
return conver_amont(param.value[param.dimensionNames[dimensionNames]]) + "万吨";
} }
}, },
async changeDimension(dimension) { async changeDimension(dimension) {
......
...@@ -477,6 +477,15 @@ export const detailConver = function (type, detailList) { ...@@ -477,6 +477,15 @@ export const detailConver = function (type, detailList) {
detail['铁运(万元)'] = data.cur_gross_profit_amount detail['铁运(万元)'] = data.cur_gross_profit_amount
} }
} }
if (data.cur_transport_type == '10') {
detail['汽运(万吨)'] = data.cur_unit_weight;
}
if (data.cur_transport_type == '20') {
detail['铁运(万吨)'] = data.cur_unit_weight;
}
if (data.cur_transport_type == '30') {
detail['水运(万吨)'] = data.cur_unit_weight;
}
} }
return detail; return detail;
} }
...@@ -488,6 +497,10 @@ export const initDetail = function () { ...@@ -488,6 +497,10 @@ export const initDetail = function () {
detail['汽运(万元)'] = 0 detail['汽运(万元)'] = 0
detail['水运(万元)'] = 0 detail['水运(万元)'] = 0
detail['铁运(万元)'] = 0 detail['铁运(万元)'] = 0
detail['汽运(万吨)'] = 0
detail['水运(万吨)'] = 0
detail['铁运(万吨)'] = 0
return detail; return detail;
} }
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
<display-board class="trade_right" title="账款情况"> <display-board class="trade_right" 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 mockData.zkqk" style="height: 28%;"> <contrast-card v-for="data in zkqk" style="height: 28%;">
<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
...@@ -158,6 +158,7 @@ import TableColumn from "./components/table/table-column.vue"; ...@@ -158,6 +158,7 @@ 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 { import {
arSummaryBar, arSummaryBar,
getAccountSituation,
arCompanyList, arCompanyList,
getBusinessConditionDatas, getBusinessConditionDatas,
getOrderLoseAddCustomer, getOrderLoseAddCustomer,
...@@ -181,6 +182,7 @@ export default { ...@@ -181,6 +182,7 @@ export default {
}, },
data() { data() {
return { return {
//TODO 上线改掉
today: "2023-05-18", today: "2023-05-18",
// today: moment().format("yyyy-MM-DD"), // today: moment().format("yyyy-MM-DD"),
yyqk: { yyqk: {
...@@ -257,6 +259,59 @@ export default { ...@@ -257,6 +259,59 @@ export default {
weight: "2,000", weight: "2,000",
amount: "20,000", amount: "20,000",
}, },
zkqk: {
yszk: {
title: "应收账款",
amount: "20,303",
unit: "万元",
hb: [
{
title: "昨天",
amount: "21,000",
rate: "-3.32%",
},
{
title: "上月",
amount: "20,000",
rate: "+4.92%",
},
],
},
yfzk: {
title: "应付账款",
amount: "10,303",
unit: "万元",
hb: [
{
title: "昨日",
amount: "11,000",
rate: "-2.68%",
},
{
title: "上月",
amount: "10,000",
rate: "+5.71%",
},
],
},
zsye: {
title: "账上余额",
amount: "10,000",
unit: "万元",
hb: [
{
title: "昨日",
amount: "10,000",
rate: "0.00%",
},
{
title: "上月",
amount: "10,000",
rate: "0.00%",
},
],
},
},
yl: { yl: {
weight: "2,000", weight: "2,000",
amount: "20,000", amount: "20,000",
...@@ -563,11 +618,38 @@ export default { ...@@ -563,11 +618,38 @@ export default {
this.arSummary[0].value = conver_num_retain(data.total_amount) this.arSummary[0].value = conver_num_retain(data.total_amount)
this.arSummary[1].value = conver_num_retain(data.unregister_amount) this.arSummary[1].value = conver_num_retain(data.unregister_amount)
this.arSummary[2].value = conver_num_retain(data.receivable_amount) this.arSummary[2].value = conver_num_retain(data.receivable_amount)
this.zkqk.yszk.amount = 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);
}); });
}, },
//获取账款情况
getAccountSituation(){
getAccountSituation(this.today).then(res => {
let data = res.data
this.zkqk.yszk.hb[0].amount = conver_amont(data.per_day_receivable_amount);
this.zkqk.yszk.hb[0].rate = calc_hb_str(this.zkqk.yszk.amount, data.per_day_receivable_amount);
this.zkqk.yszk.hb[1].amount = conver_amont(data.per_month_receivable_amount);
this.zkqk.yszk.hb[1].rate = calc_tb_str(this.zkqk.yszk.amount, data.per_month_receivable_amount);
this.zkqk.yfzk.amount = conver_amont(data.payable_amount)
this.zkqk.yfzk.hb[0].amount = conver_amont(data.per_day_payable_amount);
this.zkqk.yfzk.hb[0].rate = calc_hb_str(data.payable_amount, data.per_day_receivable_amount);
this.zkqk.yfzk.hb[1].amount = conver_amont(data.per_month_payable_amount);
this.zkqk.yfzk.hb[1].rate = calc_tb_str(data.payable_amount, data.per_month_payable_amount);
this.zkqk.zsye.amount = conver_amont(data.acc_bla)
this.zkqk.zsye.hb[0].amount = conver_amont(data.per_day_acc_bla);
this.zkqk.zsye.hb[0].rate = calc_hb_str(data.acc_bla, data.per_day_acc_bla);
this.zkqk.zsye.hb[1].amount = conver_amont(data.per_month_acc_bla);
this.zkqk.zsye.hb[1].rate = calc_tb_str(data.acc_bla, data.per_month_acc_bla);
}).catch(err => {
console.log(err);
});
},
// 获取已开票未收款排行 // 获取已开票未收款排行
getArCompanyList() { getArCompanyList() {
arCompanyList().then(res => { arCompanyList().then(res => {
...@@ -583,6 +665,7 @@ export default { ...@@ -583,6 +665,7 @@ export default {
getCustomerOrderFinishPie(res => this.customerOrderFinishPie = res, this.today); getCustomerOrderFinishPie(res => this.customerOrderFinishPie = res, this.today);
this.showBusinessConditionDatas(); this.showBusinessConditionDatas();
this.getArSummaryBar(); this.getArSummaryBar();
this.getAccountSituation();
this.getArCompanyList(); this.getArCompanyList();
this.getLoseAndAdd(); this.getLoseAndAdd();
this.getOrderBusinessCondition(); this.getOrderBusinessCondition();
......
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