Commit eadf167a authored by 王礼鸿 Baimax Wang's avatar 王礼鸿 Baimax Wang

Merge remote-tracking branch 'origin/ld_databoard_fix' into ld_databoard_fix

# Conflicts:
#	src/module/databoard/databoard/turnover-detail.vue
parents aeb18610 b910bbdc
<template>
<div class="turnover-detail">
<div class="card-board">
<contrast-card v-for="(data,key) in currentData.head" style="height: 100%;width: 20%;" :class="{'selectCard': currentCard === key}"
<contrast-card v-for="(data,key) in currentData.head" style="height: 100%;width: 20%;"
:class="{'selectCard': currentCard ===}"
@click.native="selectLegend(key)">
<title-content-mark style="color: #369afa;float: left;width: 40%;font-size: 18px"
:title-style="{'font-weight': 'bold'}" :title="key" :content="data.amount" isBold/>
......@@ -118,7 +119,7 @@ export default {
currentBtn: "day",
currentLegend: '汽运(元)',
currentCard: '营业额',
chartOption:{
chartOption: {
legend: {
textStyle: {
color: 'white'
......@@ -143,66 +144,66 @@ export default {
}
},
series: [
{
type: 'bar',
label: {
show: true,
position: 'top',
color: "#00CCD2",
},
color: {
type: 'linear',
x: 0, y: 0, x2: 0, y2: 1,
colorStops: [
{offset: 0, color: '#00CCD2'},
{offset: 1, color: '#00A2FF'}
]
},
{
type: 'bar',
label: {
show: true,
position: 'top',
color: "#00CCD2",
},
{
type: 'bar',
label: {
show: true,
position: 'top',
color: "#FFFAB7",
},
color: {
type: 'linear',
x: 0, y: 0, x2: 0, y2: 1,
colorStops: [
{offset: 0, color: '#FFFAB7'},
{offset: 1, color: '#FFF459'}
]
},
color: {
type: 'linear',
x: 0, y: 0, x2: 0, y2: 1,
colorStops: [
{offset: 0, color: '#00CCD2'},
{offset: 1, color: '#00A2FF'}
]
},
{
type: 'bar',
label: {
show: true,
position: 'top',
color: "#81FBB8",
},
color: {
type: 'linear',
x: 0, y: 0, x2: 0, y2: 1,
colorStops: [
{offset: 0, color: '#81FBB8'},
{offset: 1, color: '#28C76F'}
]
},
},
{
type: 'bar',
label: {
show: true,
position: 'top',
color: "#FFFAB7",
},
{
type: 'line',
color: 'red',
data: []
}
color: {
type: 'linear',
x: 0, y: 0, x2: 0, y2: 1,
colorStops: [
{offset: 0, color: '#FFFAB7'},
{offset: 1, color: '#FFF459'}
]
},
},
{
type: 'bar',
label: {
show: true,
position: 'top',
color: "#81FBB8",
},
color: {
type: 'linear',
x: 0, y: 0, x2: 0, y2: 1,
colorStops: [
{offset: 0, color: '#81FBB8'},
{offset: 1, color: '#28C76F'}
]
},
},
{
type: 'line',
color: 'red',
data: []
}
]
}
}
},
watch: {},
methods: {
back(){
back() {
this.$router.push({path: '/'});
},
resizeChart() {
......@@ -253,9 +254,29 @@ export default {
case '铁运营业额':
name = "铁运(元)";
break;
case '汽运成本':
name = "汽运(元)";
break;
case '水运成本':
name = "水运(元)";
break;
case '铁运成本':
name = "铁运(元)";
break;
case '汽运毛利':
name = "汽运(元)";
break;
case '水运毛利':
name = "水运(元)";
break;
case '铁运毛利':
name = "铁运(元)";
break;
default:
break;
}
console.log(name)
if (name) {
this.chart.dispatchAction({
type: 'legendInverseSelect'
......@@ -344,11 +365,12 @@ input[type="button"] {
background-color: #1234a1;
}
input[type="button"]:hover{
input[type="button"]:hover {
color: #1234a1 !important;
background-color: #00c8d6 !important;
}
.selectedBtn{
.selectedBtn {
color: #1234a1 !important;
background-color: #00c8d6 !important;
}
......@@ -357,7 +379,8 @@ input[type="button"]:hover{
color: #00c8d6;
background-color: #1234a1;
}
.selectCard{
.selectCard {
background-color: var(--card-background-select-color) !important;
}
</style>
......@@ -20,9 +20,8 @@
</display-board>
<display-board class="trade_middle" corner_size="large">
<div style="height: 36%;display: flex;justify-content: space-evenly;padding-top: 1.5rem">
<simple-card v-for="data in mockData.sr" style="width: 30%;height: 100%">
<title-content-mark style="color: #5eeef4;" :title="data.title" :content="data.value" :mark="'万元'"
isCenter isBold/>
<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/>
</simple-card>
</div>
<ar-summary-bar ref="arSummaryBar" style="width: 100%; height: 64%;"></ar-summary-bar>
......@@ -223,6 +222,11 @@ export default {
],
},
},
arSummary: [
{title: '累计营业收入(当年)', value: '20,303'},
{title: '应收款(财务)', value: '20,303'},
{title: '应收款(营销)', value: '20,303',},
],
mockData: {
zqk: {
yszk: {
......@@ -459,13 +463,16 @@ export default {
// 获取应收账款数据
getArSummaryBar() {
arSummaryBar().then(res => {
let data = res.data.data
let data = res.data
let seriesData = []
seriesData.push(data.unsettled_amount)
seriesData.push(data.settled_amount)
seriesData.push(data.unregister_amount)
seriesData.push(data.receivable_amount)
seriesData.push(data.cancelled_amount)
this.arSummary[0].value = data.total_amount
this.arSummary[1].value = data.unregister_amount
this.arSummary[2].value = data.receivable_amount
this.$refs.arSummaryBar.drawArSummaryBar(seriesData)
}).catch(err => {
console.log(err);
......@@ -474,8 +481,8 @@ export default {
// 获取已开票未收款排行
getArCompanyList() {
arCompanyList().then(res => {
if (res.data.data.length) {
this.arCompanyList = res.data.data
if (res.data.length) {
this.arCompanyList = res.data
}
}).catch(err => {
console.log(err);
......
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