|
|
@@ -2,7 +2,7 @@ |
|
|
|
<el-drawer |
|
|
|
title="发货进度" |
|
|
|
:visible.sync="centervisible" |
|
|
|
size="80%" |
|
|
|
size="50%" |
|
|
|
class="deliveryLogDetail" |
|
|
|
@close='closeA' |
|
|
|
:show-close='false'> |
|
|
@@ -47,7 +47,7 @@ |
|
|
|
<method-btn |
|
|
|
v-if="tableBtn.length" |
|
|
|
slot="handleBtn" |
|
|
|
:width="150" |
|
|
|
:width="80" |
|
|
|
label="操作" |
|
|
|
:method-list="tableBtn" |
|
|
|
@clickBtn="viewDetDetail" |
|
|
@@ -65,7 +65,7 @@ |
|
|
|
<div v-if="activeName === 'barChart'"> |
|
|
|
<div |
|
|
|
id="logDetPieBar" |
|
|
|
style="width: 100%" |
|
|
|
style="width: 60%" |
|
|
|
:style="{ height: chartHeight + 'px' }" |
|
|
|
></div> |
|
|
|
</div> |
|
|
@@ -75,7 +75,7 @@ |
|
|
|
<!-- 详情抽屉 --> |
|
|
|
<el-drawer |
|
|
|
title="发货详情" |
|
|
|
size="60%" |
|
|
|
size="50%" |
|
|
|
:append-to-body="true" |
|
|
|
:visible.sync="innerDrawer" |
|
|
|
@close='closeB' |
|
|
@@ -141,7 +141,8 @@ const tableProps = [ |
|
|
|
}, |
|
|
|
{ |
|
|
|
prop: 'rate', |
|
|
|
label: '发货比列(%)' |
|
|
|
label: '发货比列(%)', |
|
|
|
width: 110 |
|
|
|
}, |
|
|
|
{ |
|
|
|
prop: 'principalCost', |
|
|
@@ -173,7 +174,8 @@ const tableProps2 = [ |
|
|
|
}, |
|
|
|
{ |
|
|
|
prop: 'packagingSize', |
|
|
|
label: '装箱规格(片/箱)' |
|
|
|
label: '装箱规格(片/箱)', |
|
|
|
minWidth: 140 |
|
|
|
}, |
|
|
|
{ |
|
|
|
prop: 'packagingNum', |
|
|
@@ -210,8 +212,8 @@ export default { |
|
|
|
tableBtn: [ |
|
|
|
this.$auth.hasPermi('base:group-team:update') |
|
|
|
? { |
|
|
|
type: 'detDetail', |
|
|
|
btnName: '查看发货详情' |
|
|
|
type: 'detail', |
|
|
|
btnName: '详情' |
|
|
|
} |
|
|
|
: undefined |
|
|
|
].filter((v) => v), |
|
|
@@ -230,7 +232,7 @@ export default { |
|
|
|
// 图 |
|
|
|
chartDom: '', |
|
|
|
chart: '', |
|
|
|
chartHeight: this.tableHeight(300) |
|
|
|
chartHeight: this.tableHeight(300)*0.6 |
|
|
|
} |
|
|
|
}, |
|
|
|
// watch: { |
|
|
@@ -270,6 +272,8 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
getBar() { |
|
|
|
let color = ['#7164FF','#288AFF','#63BDFF','#8EF0AB','#FFCE6A'] |
|
|
|
let colorList = [] |
|
|
|
if ( |
|
|
|
this.chart !== null && |
|
|
|
this.chart !== '' && |
|
|
@@ -280,64 +284,90 @@ export default { |
|
|
|
this.chartDom = document.getElementById('logDetPieBar') |
|
|
|
this.chart = echarts.init(this.chartDom) |
|
|
|
let seriesData = [] |
|
|
|
let sumData = 0 |
|
|
|
this.tableData && this.tableData.map(item =>{ |
|
|
|
if (this.tableData.length > 0) { |
|
|
|
for (let i = 0; i < this.tableData.length; i++) { |
|
|
|
let obj = {} |
|
|
|
obj.value = item.rate |
|
|
|
obj.name = item.name |
|
|
|
obj.value = this.tableData[i].num |
|
|
|
obj.name = this.tableData[i].name |
|
|
|
seriesData.push(obj) |
|
|
|
sumData+=item.rate |
|
|
|
}) |
|
|
|
if (sumData < 100) { |
|
|
|
if (i < 5) { |
|
|
|
colorList.push(color[i]) |
|
|
|
} else { |
|
|
|
colorList.push(color[i%5]) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if (this.orderMsg.num < this.orderMsg.orderNum) { |
|
|
|
let obj = {} |
|
|
|
obj.value = this.orderMsg.orderNum - this.orderMsg.num |
|
|
|
obj.name = "未发货" |
|
|
|
seriesData.push(obj) |
|
|
|
colorList.push('#F5F5F5') |
|
|
|
}else { |
|
|
|
let obj = {} |
|
|
|
obj.value = 100 - sumData |
|
|
|
obj.value = 0 |
|
|
|
obj.name = "未发货" |
|
|
|
seriesData.push(obj) |
|
|
|
colorList.push('#F5F5F5') |
|
|
|
} |
|
|
|
var option = { |
|
|
|
color: ['#B0EB42', '#FF9747', '#FF6860', '#7164FF', '#288AFF', '#63BDFF', '#73DE93', '#FFCE6A'], |
|
|
|
tooltip: { |
|
|
|
trigger: 'item', |
|
|
|
formatter: function(params) { |
|
|
|
let str = `<span style="display:inline-block;width:8px;height:8px;margin: 0 8px 0 -3px;border-radius:2px;background-color:${params.color};"></span>` |
|
|
|
return `<span> |
|
|
|
<span style="color:rgba(0,0,0,0.85);">${str}${params.name}</span> |
|
|
|
<span style="display:inline-block;margin-left:10px;color:rgba(0,0,0,0.45);">${params.percent}</span> |
|
|
|
</span>` |
|
|
|
} |
|
|
|
}, |
|
|
|
color: colorList, |
|
|
|
legend: { |
|
|
|
type: 'scroll', |
|
|
|
orient: 'vertical', |
|
|
|
right: '10%', |
|
|
|
top: 20, |
|
|
|
bottom: 20, |
|
|
|
icon: 'rect', |
|
|
|
itemHeight: 8, |
|
|
|
itemWidth: 8 |
|
|
|
bottom: '5%', |
|
|
|
left: 'center', |
|
|
|
itemWidth: 8, |
|
|
|
itemHeight: 8 |
|
|
|
}, |
|
|
|
series: [ |
|
|
|
{ |
|
|
|
type: 'pie', |
|
|
|
radius: ['60%', '80%'], |
|
|
|
avoidLabelOverlap: false, |
|
|
|
radius: ['40%', '55%'], |
|
|
|
emphasis: { |
|
|
|
scale: false |
|
|
|
}, |
|
|
|
label: { |
|
|
|
show: false, |
|
|
|
position: 'center' |
|
|
|
alignTo: 'edge', |
|
|
|
formatter: '{name|{b}}\n{value|{c}}', |
|
|
|
minMargin: 5, |
|
|
|
edgeDistance: 10, |
|
|
|
lineHeight: 15, |
|
|
|
rich: { |
|
|
|
name: { |
|
|
|
fontSize: 14, |
|
|
|
color: 'rgba(0,0,0,0.65)' |
|
|
|
}, |
|
|
|
emphasis: { |
|
|
|
value: { |
|
|
|
fontSize: 14, |
|
|
|
color: 'rgba(0,0,0,0.65)' |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
data: seriesData |
|
|
|
}, |
|
|
|
{ |
|
|
|
type: 'pie', |
|
|
|
radius: ['40%', '40%'], |
|
|
|
label: { |
|
|
|
show: true, |
|
|
|
fontSize: 40, |
|
|
|
fontWeight: 'bold' |
|
|
|
position: 'center', |
|
|
|
color: '#000', |
|
|
|
formatter: [ |
|
|
|
'{a|'+this.orderMsg.orderNum+'}', |
|
|
|
'{b|总数}' |
|
|
|
].join('\n\n'), |
|
|
|
rich: { |
|
|
|
a: { |
|
|
|
fontSize: 26 +'px' |
|
|
|
}, |
|
|
|
scale: true , |
|
|
|
scaleSize: 20 , |
|
|
|
b: { |
|
|
|
fontSize: 16 +'px' |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
labelLine: { |
|
|
|
show: false |
|
|
|
emphasis: { |
|
|
|
scale: false |
|
|
|
}, |
|
|
|
data: seriesData |
|
|
|
data: [100] |
|
|
|
} |
|
|
|
] |
|
|
|
}; |
|
|
@@ -377,11 +407,13 @@ export default { |
|
|
|
</script> |
|
|
|
<style scoped lang='scss'> |
|
|
|
.box1 { |
|
|
|
height: 56px; |
|
|
|
height: 76px; |
|
|
|
border-bottom: 1px solid #E9E9E9; |
|
|
|
margin: 0px 8px 20px 30px; |
|
|
|
.box_col { |
|
|
|
display: inline-block; |
|
|
|
width: 20%; |
|
|
|
padding: 8px 8px 8px 40px; |
|
|
|
padding: 8px 8px 8px 8px; |
|
|
|
.blodTip { |
|
|
|
height: 16px; |
|
|
|
font-size: 14px; |
|
|
@@ -398,7 +430,7 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
.box2 { |
|
|
|
padding:32px 32px 30px 30px; |
|
|
|
padding:0px 32px 30px 30px; |
|
|
|
height: calc(100vh - 150px); |
|
|
|
} |
|
|
|
.boxTitle { |
|
|
|