Merge remote-tracking branch 'origin/master'

master
mengjiao 7 months ago
commit 03ffe69a50

@ -16,6 +16,14 @@ export function getMesBoardEquProductionToday(data) {
data: data data: data
}); });
} }
// 获取产量数据
export function getWhiteBoardEquPro7Days(data) {
return request({
url: '/mes/wcsInterface/getWhiteBoardEquPro7Days',
method: 'post',
data: data
});
}
// 获取班次 // 获取班次
export function getBoardShifts(data) { export function getBoardShifts(data) {
return request({ return request({

@ -62,3 +62,12 @@ export function syncSAPbp() {
data: data data: data
}); });
} }
// 查询设备小时产量
export function getHourProductionList(query) {
return request({
url: '/mes/reportWork/getHourProductionList',
method: 'get',
params: query
});
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 244 KiB

After

Width:  |  Height:  |  Size: 219 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 244 KiB

@ -66,13 +66,12 @@
<div class="box" style="top: 82.6%;left: 78.5%;"></div> <div class="box" style="top: 82.6%;left: 78.5%;"></div>
<div class="box" style="top: 64.3%;left: 85.3%;"></div> <div class="box" style="top: 64.3%;left: 85.3%;"></div>
<div class="box" style="top: 70.6%;left: 85.3%;"></div> <div class="box" style="top: 70.6%;left: 85.3%;"></div>
<div v-for="(i,k) in hfData" :class="(hfLocation[k].isProd || parseFloat(((hfData.find(v=> v&&v.equCode===`H${k+1}`))||{}).quantity))? 'hf1':'hf'"
<div v-for="(i,k) in hfData" :class="(hfLocation[k].isProd || parseFloat(i.quantity))? 'hf1':'hf'"
:style="`top: ${hfLocation[k].top}%;`"> :style="`top: ${hfLocation[k].top}%;`">
<span> <span>
烘房{{ k + 1 }} 产量{{ i.quantity }} 烘房{{ k + 1 }} 产量{{ ((hfData.find(v=>v&&v.equCode===`H${k+1}`))||{}).quantity ||0 }}
</span> </span>
<div v-if="hfLocation[k].isProd || parseFloat(i.quantity)" class="inProd"> <div v-if="hfLocation[k].isProd || parseFloat(((hfData.find(v=>v&&v.equCode===`H${k+1}`))||{}).quantity)" class="inProd">
<svg t="1723106843182" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" <svg t="1723106843182" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"
p-id="1501"> p-id="1501">
<path <path
@ -83,10 +82,10 @@
生产中 生产中
</div> </div>
<div class="infoModel" :style="`display:${loopIndex === k?'inline-block':''}`"> <div class="infoModel" :style="`display:${loopIndex === k?'inline-block':''}`">
<div class="title">{{ i.equName }}</div> <div class="title">{{ ((hfData.find(v=> v&&v.equCode===`H${k+1}`))||{}).equName }}</div>
<div class="equipmentOutput"><span style="color: #fff9">设备产量:</span> {{ i.quantity }}</div> <div class="equipmentOutput"><span style="color: #fff9">设备产量:</span> {{ (i||{}).quantity }}</div>
<div class="equipmentInfo"><span style="color: #fff9">设备状态:</span> {{ <div class="equipmentInfo"><span style="color: #fff9">设备状态:</span> {{
parseFloat(i.quantity) > 0 ? '运行' : '停机' parseFloat(((hfData.find(v=> v&&v.equCode===`H${k+1}`))||{}).quantity) > 0 ? '运行' : '停机'
}} }}
</div> </div>
</div> </div>
@ -96,10 +95,10 @@
:style="`top: ${equipmentLocation[k].top}%;left: ${equipmentLocation[k].left}%;`"> :style="`top: ${equipmentLocation[k].top}%;left: ${equipmentLocation[k].left}%;`">
<div :class="equipmentLocation[k].isRight?`equipmentName1`:`equipmentName`" <div :class="equipmentLocation[k].isRight?`equipmentName1`:`equipmentName`"
:style="`display:${loopIndex === 18+k?'inline-block':''}`"> :style="`display:${loopIndex === 18+k?'inline-block':''}`">
<div class="title">{{ i.equName }}</div> <div class="title">{{ ((equipmentData.find(v=>v&&v.equCode===`C${k+1}`))||{}).equName }}</div>
<div class="equipmentOutput"><span style="color: #fff9">设备产量:</span> {{ i.quantity }}</div> <div class="equipmentOutput"><span style="color: #fff9">设备产量:</span> {{ ((equipmentData.find(v=>v&&v.equCode===`C${k+1}`))||{}).quantity }}</div>
<div class="equipmentInfo"><span style="color: #fff9">设备状态:</span> {{ <div class="equipmentInfo"><span style="color: #fff9">设备状态:</span> {{
parseFloat(i.quantity) > 0 ? '运行' : '停机' parseFloat(((equipmentData.find(v=>v&&v.equCode===`C${k+1}`))||{}).quantity) > 0 ? '运行' : '停机'
}} }}
</div> </div>
</div> </div>
@ -108,7 +107,7 @@
v-for="(i,k) in ringLocation"></div> v-for="(i,k) in ringLocation"></div>
<div :class="`${i.IsLoad? 'agv2':'agv1'}`" v-for="i in agvData" v-show="i.show" <div :class="`${i.IsLoad? 'agv2':'agv1'}`" v-for="i in agvData" v-show="i.show && !(i.x>0.3&&i.x<0.62 && i.y <0.8)"
:style="`${getLocation(i.x,i.y)}transform: rotate(${parseFloat(i.rotate )- 180}deg);`"></div> :style="`${getLocation(i.x,i.y)}transform: rotate(${parseFloat(i.rotate )- 180}deg);`"></div>
</div> </div>
</div> </div>
@ -350,6 +349,8 @@ export default {
}, },
getData() { getData() {
let time = parseTime(new Date(), '{h}-{i}').split('-') let time = parseTime(new Date(), '{h}-{i}').split('-')
let i = parseFloat(time[0]) || 0 let i = parseFloat(time[0]) || 0
let s = parseFloat(time [1]) || 0 let s = parseFloat(time [1]) || 0
@ -382,6 +383,7 @@ export default {
} }
this.hfData = hfArr this.hfData = hfArr
this.equipmentData = equipmentArr this.equipmentData = equipmentArr
// console.log(this.hfData)
}) })
} }
}, },

@ -2,22 +2,24 @@
<div class="bg"> <div class="bg">
<div class="title">白坯车间数字应用大屏</div> <div class="title">白坯车间数字应用大屏</div>
<div class="modelTitle" style=" top: 15.2%;left: 3%;">烘房状态</div> <div class="modelTitle" style=" top: 15.2%;left: 3%;">烘房状态</div>
<div class="modelTitle" style="top:15.2%;left:32%">设备运行数据</div> <!-- <div class="modelTitle" style="top:15.2%;left:32%">设备运行数据</div>-->
<div class="modelTitle" style="top:15.2%;left:32%">烘房耗电量</div>
<div class="modelTitle" style="top:15.2%;left:71%">烘房白坯质量统计</div> <div class="modelTitle" style="top:15.2%;left:71%">烘房白坯质量统计</div>
<div class="modelTitle" style="top:65%;left:32%">近7天产量</div> <div class="modelTitle" style="top:65%;left:32%">近7天产量</div>
<!-- <div class="modelTitle" style="top:65%;left:32%">烘房耗电量</div>-->
<div class="modelTitle" style="top:65%;left:71%">计划达成率</div> <div class="modelTitle" style="top:65%;left:71%">计划达成率</div>
<div class="title1" style="top:24%;left:34%">成型机产量</div> <!-- <div class="title1" style="top:24%;left:34%">成型机产量</div>-->
<div class="title1" style="top:24%;left:52.5%">烘房产量</div> <!-- <div class="title1" style="top:24%;left:52.5%">烘房产量</div>-->
<div class="title1" style="top:45%;left:34%">烘房耗电量</div> <!-- <div class="title1" style="top:45%;left:34%">烘房耗电量</div>-->
<div class="title1" style="top:45%;left:52.5%">AGV开动数量</div> <!-- <div class="title1" style="top:45%;left:52.5%">AGV开动数量</div>-->
<div class="unit1" style="top: 31.3%;left: 45.5%;"></div> <!-- <div class="unit1" style="top: 31.3%;left: 45.5%;"></div>-->
<div class="unit1" style="top: 31.3%;left: 63.5%"></div> <!-- <div class="unit1" style="top: 31.3%;left: 63.5%"></div>-->
<div class="unit1" style="top: 51.3%;left: 45.5%;">KWh</div> <!-- <div class="unit1" style="top: 51.3%;left: 45.5%;">KWh</div>-->
<div class="unit1" style="top: 51.3%;left: 63.5%;"></div> <!-- <div class="unit1" style="top: 51.3%;left: 63.5%;"></div>-->
<div class="num1" style="top: 31.5%;left: 39.5%;">{{ CData.map(e=>parseFloat(e.quantity)||0).reduce((a,b)=>a+b,0) }}</div> <!-- <div class="num1" style="top: 31.5%;left: 39.5%;">{{ CData.map(e=>parseFloat(e.quantity)||0).reduce((a,b)=>a+b,0) }}</div>-->
<div class="num1" style="top:31.5%;left:57.7%">{{ HData.map(e=>parseFloat(e.quantity)||0).reduce((a,b)=>a+b,0) }}</div> <!-- <div class="num1" style="top:31.5%;left:57.7%">{{ HData.map(e=>parseFloat(e.quantity)||0).reduce((a,b)=>a+b,0) }}</div>-->
<div class="num1" style="top:51.6%;left:39.5%">{{ expend }}</div> <!-- <div class="num1" style="top:51.6%;left:39.5%">{{ expend }}</div>-->
<div class="num1" style="top:51.6%;left:57.7%">{{ agvData.length }}</div> <!-- <div class="num1" style="top:51.6%;left:57.7%">{{ agvData.length }}</div>-->
<div class="title2" style="top: 73.5%;left: 86.8%;">计划生产数量</div> <div class="title2" style="top: 73.5%;left: 86.8%;">计划生产数量</div>
<div class="title2" style="top: 85.3%;left: 86.8%;">实际生产数量</div> <div class="title2" style="top: 85.3%;left: 86.8%;">实际生产数量</div>
<div class="unit2" style="top: 76.5%;left: 95%;"></div> <div class="unit2" style="top: 76.5%;left: 95%;"></div>
@ -75,7 +77,7 @@
</div> </div>
<div <div
class="scrollTable" style="color:#49b2fc"> class="scrollTable" style="color:#49b2fc">
{{ (parseFloat(item.expend/item.yield)||0).toFixed(2) }}KWh {{ (parseFloat(item.expend / item.yield) || 0).toFixed(2) }}KWh
</div> </div>
</div> </div>
</div> </div>
@ -83,6 +85,7 @@
</div> </div>
<Chart ref="chart1" class="chart1"></Chart> <Chart ref="chart1" class="chart1"></Chart>
<Chart ref="chart2" class="chart2"></Chart> <Chart ref="chart2" class="chart2"></Chart>
<Chart ref="chart3" class="chart3"></Chart>
</div> </div>
</template> </template>
<script> <script>
@ -134,14 +137,111 @@ export default {
methods: { methods: {
getData() { getData() {
dryRoomDataCarousel().then(e => { dryRoomDataCarousel().then(e => {
this.table1Data = e.data.dryingroomList || [] this.table1Data = e.data.dryingroomList.filter(v => parseFloat(v.expend / v.yield)) || []
}) })
EnergyExpend().then(e => { EnergyExpend().then(e => {
this.expend = e.map(v => v.expend).reduce((a, b) => a + b, 0).toFixed(2) this.expend = e.map(v => v.expend).reduce((a, b) => a + b, 0).toFixed(2)
let option2 = {
grid: {
top: '15%',
bottom: '10%',
// left: '5%',
right: '3%'
},
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow',
label: {
show: true
}
}
},
legend: {
right: 0,
textStyle: {
color: '#eee'
}
},
xAxis: {
data: e.map(v => parseFloat(v.monitorName.split(' - ')?.[1]?.split('(')?.[0]) + "#"),
axisLine: {
show: true, //X线
lineStyle: {
color: '#fff'
}
},
axisTick: {
show: true //X
},
axisLabel: {
interval: 0,
show: true,
textStyle: {
color: '#fff' //X
}
}
},
yAxis: [
{
type: 'value',
name: '单位KWh',
nameTextStyle: {
color: '#fff'
},
splitLine: {
show: false
},
axisTick: {
show: true
},
axisLine: {
show: true,
lineStyle: {
color: '#fff'
}
},
axisLabel: {
show: true,
textStyle: {
color: '#fff'
}
}
}
],
series: [
{
label: {
show: true,
position: 'top',
formatter: "{c}",
color: "#fff"
},
name: '耗电量',
type: 'bar',
smooth: true, //线
showAllSymbol: true, //
symbol: "emptyCircle", //
symbolSize: 5, //
// itemStyle: {
// //线
// color: "#058cff",
// },
// lineStyle: {
// color: "#058cff",
// },
// areaStyle: {
// color: "rgba(5,140,255, 0.2)",
// },
data: e.map(v => parseFloat(v.expend)),
},
]
};
this.$refs.chart3.setData(option2)
}) })
agvdata().then(e => { agvdata().then(e => {
console.log(e) this.agvData = e.Data.filter(v => v.State === 2)
this.agvData = e.Data.filter(v=>v.State===2)
}) })
PlanAchievementRate().then(e => { PlanAchievementRate().then(e => {
this.proData = e.data this.proData = e.data
@ -178,56 +278,144 @@ export default {
createTimeStart: createTimeStart, createTimeStart: createTimeStart,
createTimeEnd: createTimeEnd, createTimeEnd: createTimeEnd,
chartType: 'cp' chartType: 'cp'
}).then(e => { }).then(vv => {
let e = vv.checkList
console.log(e)
let option = { let option = {
grid: {
top: '15%',
bottom: '10%',
left: '6%',
right: '6%'
},
tooltip: { tooltip: {
trigger: 'axis', trigger: 'axis',
axisPointer: { axisPointer: {
// Use axis to trigger tooltip type: 'shadow',
type: 'shadow' // 'shadow' as default; can also be 'line' or 'shadow' label: {
show: true
}
} }
}, },
legend: { legend: {
right: 0,
textStyle: { textStyle: {
color: '#eee' color: '#eee'
} }
}, },
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: { xAxis: {
type: 'value' data: e.map(v => v.machineName),
axisLine: {
show: true, //X线
lineStyle: {
color: '#fff'
}
},
axisTick: {
show: true //X
}, },
yAxis: {
type: 'category',
axisLabel: { axisLabel: {
color: '#ccc' interval:0,
show: true,
textStyle: {
color: '#fff' //X
}
}
}, },
data: e.checkList.map(v => v.machineName), yAxis: [
{
type: 'value',
name: '合格数',
nameTextStyle: {
color: '#fff'
}, },
splitLine: {
show: false
},
axisTick: {
show: true
},
axisLine: {
show: true,
lineStyle: {
color: '#fff'
}
},
axisLabel: {
show: true,
textStyle: {
color: '#fff'
}
}
},
{
type: 'value',
name: '合格率',
nameTextStyle: {
color: '#fff'
},
splitLine: {
show: false
},
axisTick: {
show: true
},
axisLine: {
show: true,
lineStyle: {
color: '#fff'
}
},
axisLabel: {
show: true,
textStyle: {
color: '#fff'
}
}
}
],
series: [ series: [
{ {
name: '合格数量',
type: 'bar',
stack: 'total',
label: { label: {
show: true, show: true,
position: 'insideRight', position: 'top',
formatter: "{c}车", formatter: "{c}%",
color: "#000" color: "#fff"
}, },
emphasis: { name: '合格率',
focus: 'series' type: 'line',
yAxisIndex: 1,
smooth: true, //线
showAllSymbol: true, //
symbol: "emptyCircle", //
symbolSize: 5, //
// itemStyle: {
// //线
// color: "#058cff",
// },
// lineStyle: {
// color: "#058cff",
// },
// areaStyle: {
// color: "rgba(5,140,255, 0.2)",
// },
data: e.map(v => ((parseFloat(v.okQuality) / parseFloat(v.quality)) * 100).toFixed(2)),
}, },
{
label: {
show: true,
position: 'top',
formatter: "{c}",
color: "#fff"
},
itemStyle: { itemStyle: {
color: { color: {
type: 'linear', type: 'linear',
x: 0, x: 0,
y: 0, y: 1,
x2: 1, x2: 0,
y2: 0, y2: 0,
colorStops: [{ colorStops: [{
offset: 0, color: '#1e60f2' // 0% offset: 0, color: '#1e60f2' // 0%
@ -237,25 +425,105 @@ export default {
global: false // false global: false // false
} }
}, },
data: e.checkList.map(v => parseFloat(v.quality)) name: '合格数',
},
{
name: '不合格数量',
type: 'bar', type: 'bar',
stack: 'total', smooth: true, //线
label: { showAllSymbol: true, //
show: true, symbol: "emptyCircle", //
position: 'right' symbolSize: 5, //
}, // itemStyle: {
emphasis: { // //线
focus: 'series' // color: "#058cff",
}, // },
data: e.checkList.map(v => 0) // lineStyle: {
// color: "#058cff",
// },
// areaStyle: {
// color: "rgba(5,140,255, 0.2)",
// },
data: e.map(v => parseFloat(v.quality)),
}, },
] ]
}; };
// let option = {
// tooltip: {
// trigger: 'axis',
// axisPointer: {
// // Use axis to trigger tooltip
// type: 'shadow' // 'shadow' as default; can also be 'line' or 'shadow'
// }
// },
// legend: {
// textStyle: {
// color: '#eee'
// }
// },
// grid: {
// left: '3%',
// right: '4%',
// bottom: '3%',
// containLabel: true
// },
// xAxis: {
// type: 'value'
// },
// yAxis: {
// type: 'category',
// axisLabel: {
// color: '#ccc'
// },
// data: e.checkList.map(v => v.machineName),
// // data: e.checkList.map((v,k) => ''+k),
// },
// series: [
// {
// name: '',
// type: 'bar',
// stack: 'total',
// label: {
// show: true,
// position: 'insideRight',
// formatter: "{c}",
// color: "#000"
// },
// emphasis: {
// focus: 'series'
// },
// itemStyle: {
// color: {
// type: 'linear',
// x: 0,
// y: 0,
// x2: 1,
// y2: 0,
// colorStops: [{
// offset: 0, color: '#1e60f2' // 0%
// }, {
// offset: 1, color: '#00b9ff' // 100%
// }],
// global: false // false
// }
// },
// data: e.checkList.map(v => parseFloat(v.quality))
// },
// {
// name: '',
// type: 'bar',
// stack: 'total',
// label: {
// show: true,
// position: 'right'
// },
// emphasis: {
// focus: 'series'
// },
// data: e.checkList.map(v => 0)
// },
// ]
// };
this.$refs.chart1.setData(option) this.$refs.chart1.setData(option)
}) })
getHourProductionLists().then(e => { getHourProductionLists().then(e => {
let option1 = { let option1 = {
grid: { grid: {
@ -491,6 +759,14 @@ export default {
} }
.chart3 {
position: absolute;
width: 37.4%;
height: 42.5%;
top: 17.6%;
left: 31.3%;
}
.case-item { .case-item {
border: 2px solid #0c61ad; border: 2px solid #0c61ad;
border-radius: 2px; border-radius: 2px;

@ -0,0 +1,258 @@
<template>
<div class="chart-container">
<div class="chart" :class="{ activehide: isActive }" ref="chart"></div>
<!-- 底座背景 -->
</div>
</template>
<script>
import { getPie3D, getParametricEquation } from "../../../utils/echart.js"; //js
const color = ["#005aff", "#f8b551"];
import * as echarts from "echarts";
export default {
name: "chart",
props: ["xAxis4data", "yAxis4seriesMAX1", "yAxis4seriesMAX2", "series4data"],
data() {
return {
optionData: [],
statusChart: null,
option: {},
isActive: false,
// color:["#005aff", "#f8b551",'#7CDCAC'],
};
},
watch: {
xAxis4data: function (newVal, oldVal) {
this.initChart();
},
colorlist: function (newVal, oldVal) {},
},
created() {
// console.log(this.list);
// this.color = this.colorlist
},
mounted() {
// this.setLabel();
// this.initChart();
//
const that = this;
window.onresize = function () {
that.changeSize();
};
},
methods: {
// label
setLabel() {
const that = this;
this.optionData = this.list;
this.optionData.forEach((item, index) => {
// item.itemStyle = {
// color: that.color[index],
// };
item.label = {
normal: {
show: true,
// color: that.color[index],
formatter: ["{b|{b}}:", "{d|{d}%}"].join(""), // \n
rich: {
b: {
color: "#fff",
lineHeight: 25,
align: "left",
},
c: {
fontSize: 22,
color: "#fff",
textShadowColor: "#1c90a6",
textShadowOffsetX: 0,
textShadowOffsetY: 2,
textShadowBlur: 5,
},
d: {
color: "#fff",
align: "left",
textShadowOffsetX: 0,
textShadowOffsetY: 2,
textShadowBlur: 5,
},
},
},
};
item.labelLine = {
normal: {
lineStyle: {
width: 1,
color: "rgba(255,255,255,0.7)",
},
},
};
});
},
//
initChart() {
console.log(this.xAxisdata1,'w222111')
this.statusChart = echarts.init(this.$refs.chart);
// option, 3d,
this.option = {
tooltip: {
trigger: "item",
axisPointer: {
//
type: "shadow", // 线'line' | 'shadow'
},
},
grid: {
left: "4%",
right: "4%",
bottom: "2%",
top: "6%",
containLabel: true,
},
legend: {
// data: ["", "", "", ""],
// left: "7%",
// top: "5%",
// textStyle: {
// color: "#ffffff",
// },
// itemWidth: 15,
// itemHeight: 10,
// itemGap: 25,
},
xAxis: {
type: "category",
data: this.xAxis4data,
axisLine: {
lineStyle: {
color: "#cdd5e2",
},
},
axisLabel: {
textStyle: {
color: "#666666",
},
},
axisLabel: {
//show:false,
color: "#7785D9",
fontSize: 12,
rotate: "45",
},
},
yAxis: [
{
type: "value",
splitLine: {
show: false,
},
axisLabel: {
textStyle: {
color: "#ffffff",
},
},
axisLine: {
lineStyle: {
color: "#cdd5e2",
},
},
axisLine: {
show: false,
lineStyle: {
color: "#e0e7ff",
},
},
max: this.yAxis4seriesMAX1,
},
// {
// type: "value",
// name: "",
// nameTextStyle: {
// color: "#ffffff",
// },
// position: "right",
// axisLine: {
// lineStyle: {
// color: "#cdd5e2",
// },
// },
// splitLine: {
// show: false,
// },
// axisLabel: {
// show: true,
// formatter: "{value} %", //Y
// textStyle: {
// color: "#ffffff",
// },
// },
// max: this.yAxis2seriesMAX,
// },
],
series: [
{
name: "",
type: "bar",
barWidth: "12px",
itemStyle: {
normal: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{
offset: 0,
color: "#29acff",
},
{
offset: 1,
color: "#4bdfff",
},
]),
barBorderRadius: 6,
},
},
data: this.series4data,
},
],
};
this.statusChart.setOption(this.option);
},
//
// optionNameoptionopiton
//
changeSize() {
this.statusChart.resize();
},
},
};
</script>
<style lang='scss' scoped>
.chart-container {
position: relative;
width: 100%;
height: 100%;
.chart,
.bg {
width: 100%;
height: 100%;
}
.bg {
position: absolute;
bottom: 50px;
left: 50%;
z-index: -1;
width: 180px;
height: 73px;
background: no-repeat center;
background-image: url("https://ks3-cn-beijing.ksyun.com/sxjg-elevator/datav-platform-2.0/images/chart_opacity_bg.png");
background-size: 100% 100%;
transform: translateX(-50%);
}
}
.activehide {
display: none;
}
</style>

@ -0,0 +1,299 @@
<template>
<div class="chart-container">
<div class="chart" :class="{ activehide: isActive }" ref="chart"></div>
<!-- 底座背景 -->
</div>
</template>
<script>
import { getPie3D, getParametricEquation } from "../../../utils/echart.js"; //js
const color = ["#005aff", "#f8b551"];
import * as echarts from "echarts";
export default {
name: "chart",
props: ["xAxis1data", "yAxis1seriesMAX1", "yAxis1seriesMAX2", "series1data1", "series1data2", "series1data3"],
data() {
return {
optionData: [],
statusChart: null,
option: {},
isActive: false,
// color:["#005aff", "#f8b551",'#7CDCAC'],
};
},
watch: {
xAxis1data: function (newVal, oldVal) {
this.initChart();
},
colorlist: function (newVal, oldVal) {},
},
created() {
// console.log(this.list);
// this.color = this.colorlist
},
mounted() {
// this.setLabel();
// this.initChart();
//
const that = this;
window.onresize = function () {
that.changeSize();
};
},
methods: {
// label
setLabel() {
const that = this;
this.optionData = this.list;
this.optionData.forEach((item, index) => {
// item.itemStyle = {
// color: that.color[index],
// };
item.label = {
normal: {
show: true,
// color: that.color[index],
formatter: ["{b|{b}}:", "{d|{d}%}"].join(""), // \n
rich: {
b: {
color: "#fff",
lineHeight: 25,
align: "left",
},
c: {
fontSize: 22,
color: "#fff",
textShadowColor: "#1c90a6",
textShadowOffsetX: 0,
textShadowOffsetY: 2,
textShadowBlur: 5,
},
d: {
color: "#fff",
align: "left",
textShadowOffsetX: 0,
textShadowOffsetY: 2,
textShadowBlur: 5,
},
},
},
};
item.labelLine = {
normal: {
lineStyle: {
width: 1,
color: "rgba(255,255,255,0.7)",
},
},
};
});
},
//
initChart() {
console.log(this.xAxisdata1,'w222111')
this.statusChart = echarts.init(this.$refs.chart);
// option, 3d,
this.option = {
tooltip: {
trigger: "item",
axisPointer: {
//
type: "shadow", // 线'line' | 'shadow'
},
},
grid: {
left: "4%",
right: "4%",
bottom: "2%",
top: "6%",
containLabel: true,
},
legend: {
// data: ["", "", "", ""],
// left: "7%",
// top: "5%",
// textStyle: {
// color: "#ffffff",
// },
// itemWidth: 15,
// itemHeight: 10,
// itemGap: 25,
},
xAxis: {
type: "category",
data: this.xAxis1data,
axisLine: {
lineStyle: {
color: "#cdd5e2",
},
},
axisLabel: {
textStyle: {
color: "#666666",
},
},
axisLabel: {
//show:false,
color: "#7785D9",
fontSize: 12,
rotate: "45",
},
},
yAxis: [
{
type: "value",
splitLine: {
show: false,
},
axisLabel: {
textStyle: {
color: "#ffffff",
},
},
axisLine: {
lineStyle: {
color: "#cdd5e2",
},
},
axisLine: {
show: false,
lineStyle: {
color: "#e0e7ff",
},
},
max: this.yAxis1seriesMAX1,
},
{
type: "value",
name: "百分比",
nameTextStyle: {
color: "#ffffff",
},
position: "right",
axisLine: {
lineStyle: {
color: "#cdd5e2",
},
},
splitLine: {
show: false,
},
axisLabel: {
show: true,
formatter: "{value} %", //Y
textStyle: {
color: "#ffffff",
},
},
max: this.yAxis1seriesMAX2,
},
],
series: [
{
//name: "",
type: "bar",
barWidth: "12px",
itemStyle: {
normal: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{
offset: 0,
color: "#29acff",
},
{
offset: 1,
color: "#4bdfff",
},
]),
barBorderRadius: 6,
},
},
data: this.series1data1,
},
{
//name: "",
type: "bar",
barWidth: "12px",
itemStyle: {
normal: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{
offset: 0,
color: "#3d93f2",
},
{
offset: 1,
color: "#5dc1fd",
},
]),
barBorderRadius: 6,
},
},
data: this.series1data2,
},
{
//name: "",
type: "line",
yAxisIndex: 1, //使 y index y
smooth: false, //线
symbol: "circle", //
symbolSize: 8, //
itemStyle: {
normal: {
color: "#ffa43a",
borderColor: "rgba(255, 234, 0, 0.5)", //
borderWidth: 5,
},
},
lineStyle: {
color: "#ffa43a",
},
data: this.series1data3,
},
],
};
this.statusChart.setOption(this.option);
},
//
// optionNameoptionopiton
//
changeSize() {
this.statusChart.resize();
},
},
};
</script>
<style lang='scss' scoped>
.chart-container {
position: relative;
width: 100%;
height: 100%;
.chart,
.bg {
width: 100%;
height: 100%;
}
.bg {
position: absolute;
bottom: 50px;
left: 50%;
z-index: -1;
width: 180px;
height: 73px;
background: no-repeat center;
background-image: url("https://ks3-cn-beijing.ksyun.com/sxjg-elevator/datav-platform-2.0/images/chart_opacity_bg.png");
background-size: 100% 100%;
transform: translateX(-50%);
}
}
.activehide {
display: none;
}
</style>

@ -60,14 +60,14 @@
<div class="content"> <div class="content">
<div class="item"> <div class="item">
<div class="titlebox"> <div class="titlebox">
<div class="titlename">湿料罐总产量</div> <div class="titlename">下料口接料次数</div>
</div> </div>
<div class="item-num"> <div class="item-num">
<img src="../../../assets/images/bg-zongchaliang.png" alt="" /> <img src="../../../assets/images/bg-zongchaliang.png" alt="" />
<div class="number">{{ number4 }}</div> <div class="number">{{ number4 }}</div>
</div> </div>
<div class="titlebox"> <div class="titlebox">
<div class="titlename">湿料罐产量</div> <div class="titlename">接料次数</div>
</div> </div>
<div class="echartsbox"> <div class="echartsbox">
<div <div
@ -76,14 +76,24 @@
></div> ></div>
</div> </div>
<div class="titlebox"> <div class="titlebox">
<div class="titlename">湿料罐产量占比</div> <div class="titlename">下料口放料次数</div>
</div> </div>
<div class="echartsbox echartspie"> <div class="echartsbox echartspie">
<Echarts3D <!-- <Echarts3D
:list="optionDatalist4" :list="optionDatalist4"
:colorlist="colorlist" :colorlist="colorlist"
style="margin: auto; width: 409.17px; height: 173px" style="margin: auto; width: 409.17px; height: 173px"
></Echarts3D> ></Echarts3D> -->
<!-- <div
id="echartbar1"
style="margin: auto; width: 409.17px; height: 173px"
></div> -->
<Echarts3dbar
:xAxis4data="xAxis4data"
:yAxis4seriesMAX1="yAxis4seriesMAX1"
:series4data="series4data"
style="margin: auto; width: 409.17px; height: 173px"
></Echarts3dbar>
</div> </div>
</div> </div>
<div class="item"> <div class="item">
@ -104,14 +114,18 @@
></div> ></div>
</div> </div>
<div class="titlebox"> <div class="titlebox">
<div class="titlename">成型机产量占比</div> <div class="titlename">成型机计划达成率</div>
</div> </div>
<div class="echartsbox echartspie"> <div class="echartsbox echartspie">
<Echarts3D <Echarts3dbar2
:list="optionDatalist1" :xAxis1data="xAxis1data"
:colorlist="colorlist" :yAxis1seriesMAX1="yAxis1seriesMAX1"
style="margin: auto; width: 439.17px; height: 183px" :yAxis1seriesMAX2="yAxis1seriesMAX2"
></Echarts3D> :series1data1="series1data1"
:series1data2="series1data2"
:series1data3="series1data3"
style="margin: auto; width: 409.17px; height: 173px"
></Echarts3dbar2>
</div> </div>
</div> </div>
<div class="item"> <div class="item">
@ -132,14 +146,18 @@
></div> ></div>
</div> </div>
<div class="titlebox"> <div class="titlebox">
<div class="titlename">烘房产量占比</div> <div class="titlename">烘房产量及达成率</div>
</div> </div>
<div class="echartsbox echartspie"> <div class="echartsbox echartspie">
<Echarts3D <Echarts3dbar2
:list="optionDatalist2" :xAxis1data="xAxis2data"
:colorlist="colorlist" :yAxis1seriesMAX1="yAxis2seriesMAX1"
:yAxis1seriesMAX2="yAxis2seriesMAX2"
:series1data1="series2data1"
:series1data2="series2data2"
:series1data3="series2data3"
style="margin: auto; width: 409.17px; height: 173px" style="margin: auto; width: 409.17px; height: 173px"
></Echarts3D> ></Echarts3dbar2>
</div> </div>
</div> </div>
<div class="item"> <div class="item">
@ -160,14 +178,18 @@
></div> ></div>
</div> </div>
<div class="titlebox"> <div class="titlebox">
<div class="titlename">收坯机产量占比</div> <div class="titlename">收坯机产量及达成率</div>
</div> </div>
<div class="echartsbox echartspie"> <div class="echartsbox echartspie">
<Echarts3D <Echarts3dbar2
:list="optionDatalist3" :xAxis1data="xAxis3data"
:colorlist="colorlist" :yAxis1seriesMAX1="yAxis3seriesMAX1"
:yAxis1seriesMAX2="yAxis3seriesMAX2"
:series1data1="series3data1"
:series1data2="series3data2"
:series1data3="series3data3"
style="margin: auto; width: 409.17px; height: 173px" style="margin: auto; width: 409.17px; height: 173px"
></Echarts3D> ></Echarts3dbar2>
</div> </div>
</div> </div>
@ -182,20 +204,23 @@
import { import {
getBoardFactory, getBoardFactory,
getMesBoardEquProductionToday, getMesBoardEquProductionToday,
getWhiteBoardEquPro7Days,
getBoardShifts, getBoardShifts,
} from "@/api/kanban/dailyoutput"; } from "@/api/kanban/dailyoutput";
import { import { getDeviceRefreshTime } from "@/api/kanban/equipment";
getDeviceRefreshTime,
} from "@/api/kanban/equipment";
import * as echarts from "echarts"; import * as echarts from "echarts";
import moment from "moment"; import moment from "moment";
import Echarts3D from "./echarts3d.vue"; import Echarts3D from "./echarts3d.vue";
import Echarts3D2 from "./echarts3d2.vue"; import Echarts3D2 from "./echarts3d2.vue";
import Echarts3dbar from "./echarts3dbar.vue";
import Echarts3dbar2 from "./echarts3dbar2.vue";
export default { export default {
name: "Index", name: "Index",
components: { components: {
Echarts3D, Echarts3D,
Echarts3D2, Echarts3D2,
Echarts3dbar,
Echarts3dbar2,
}, },
data() { data() {
return { return {
@ -226,10 +251,37 @@ export default {
colorlist: ["#005aff", "#f8b551"], colorlist: ["#005aff", "#f8b551"],
datetime: null, datetime: null,
time1: null, time1: null,
RefreshTime:null, RefreshTime: null,
Chart2yAxisMAX1: "",
Chart2yAxisMAX2: 100,
Chart2seriesdata: [],
Chart2seriesMAX: [],
Chart2xAxisname: [],
xAxis1data: [],
yAxis1seriesMAX1: 0,
yAxis1seriesMAX2: 0,
series1data1: [],
series1data2: [],
series1data3: [],
xAxis2data: [],
yAxis2seriesMAX1: 0,
yAxis2seriesMAX2: 0,
series2data1: [],
series2data2: [],
series2data3: [],
xAxis3data: [],
yAxis3seriesMAX1: 0,
yAxis3seriesMAX2: 0,
series3data1: [],
series3data2: [],
series3data3: [],
xAxis4data: [],
yAxis4seriesMAX1: 0,
series4data: [],
}; };
}, },
created() {}, created() {},
destroyed() { destroyed() {
clearInterval(this.time1); clearInterval(this.time1);
this.time1 = null; this.time1 = null;
@ -252,6 +304,7 @@ export default {
}, },
selectFactorylist() { selectFactorylist() {
const _this = this; const _this = this;
getBoardFactory({ getBoardFactory({
factory: null, factory: null,
}).then((response) => { }).then((response) => {
@ -266,7 +319,7 @@ export default {
_this.classesList = response.data; _this.classesList = response.data;
_this.selectxtclasses = _this.classesList[0].shiftId; _this.selectxtclasses = _this.classesList[0].shiftId;
_this.initChart1(); _this.initChart1();
_this.getDeviceRefreshTime() _this.getDeviceRefreshTime();
} }
}); });
} }
@ -276,11 +329,11 @@ export default {
const _this = this; const _this = this;
getDeviceRefreshTime().then((response) => { getDeviceRefreshTime().then((response) => {
if (response.data) { if (response.data) {
console.log(response.data) console.log(response.data);
this.RefreshTime = response.data this.RefreshTime = response.data;
this.time1 = setInterval(() => { this.time1 = setInterval(() => {
_this.initChart1(); _this.initChart1();
}, 1000*60*this.RefreshTime); }, 1000 * 60 * this.RefreshTime);
} }
}); });
}, },
@ -307,7 +360,7 @@ export default {
}, },
xAxis: { xAxis: {
name: "辆", name: "辆",
max: '100', max: "100",
splitLine: { splitLine: {
show: false, show: false,
}, },
@ -388,6 +441,31 @@ export default {
], ],
}; };
myChart1.setOption(option1); myChart1.setOption(option1);
getWhiteBoardEquPro7Days({
factory: _this.selectxt,
shiftId: _this.selectxtclasses,
ymd: _this.datetime,
equTypeCode: "equ_type_cxj",
}).then((response) => {
if (response) {
if (response.data) {
_this.xAxis1data = response.data.dayNames;
_this.series1data1 = response.data.plans;
_this.series1data2 = response.data.acts;
_this.series1data3 = response.data.finishRatio;
let MAX1 = 0;
let MAX2 = 0;
MAX1 = Math.max(..._this.series1data1);
MAX2 = Math.max(..._this.series1data2);
if (MAX1 > MAX2) {
_this.yAxis1seriesMAX1 = MAX1;
} else {
_this.yAxis1seriesMAX1 = MAX2;
}
_this.yAxis1seriesMAX2 = Math.max(..._this.series1data3);
}
}
});
getMesBoardEquProductionToday({ getMesBoardEquProductionToday({
factory: _this.selectxt, factory: _this.selectxt,
shiftId: _this.selectxtclasses, shiftId: _this.selectxtclasses,
@ -415,41 +493,10 @@ export default {
dataoption.push(a); dataoption.push(a);
numberlist.push(item.totalNum); numberlist.push(item.totalNum);
}); });
// response.data.everyNum.forEach((item) => {
// let a = {}; // dataoption.sort((a, b) => {
// a.name = item.equName; // return a.value - b.value;
// a.value = item.totalNum;
// a.code = item.equCode;
// dataoption.push(a);
// _this.optionDatalist1.push(a);
// }); // });
// response.data.everyNum.forEach((item) => {
// let a = {};
// a.name = item.equName;
// a.value = item.totalNum;
// a.code = item.equCode;
// dataoption.push(a);
// _this.optionDatalist1.push(a);
// });
// response.data.everyNum.forEach((item) => {
// let a = {};
// a.name = item.equName;
// a.value = item.totalNum;
// a.code = item.equCode;
// dataoption.push(a);
// _this.optionDatalist1.push(a);
// });
// response.data.everyNum.forEach((item) => {
// let a = {};
// a.name = item.equName;
// a.value = item.totalNum;
// a.code = item.equCode;
// dataoption.push(a);
// _this.optionDatalist1.push(a);
// });
dataoption.sort((a, b) => {
return a.value - b.value;
});
let max = Math.max(...numberlist); let max = Math.max(...numberlist);
max = max + 100; max = max + 100;
dataoption.forEach((item) => { dataoption.forEach((item) => {
@ -621,6 +668,32 @@ export default {
], ],
}; };
myChart2.setOption(option2); myChart2.setOption(option2);
getWhiteBoardEquPro7Days({
factory: _this.selectxt,
shiftId: _this.selectxtclasses,
ymd: _this.datetime,
equTypeCode: "equ_type_hf",
}).then((response) => {
if (response) {
if (response.data) {
_this.xAxis2data = response.data.dayNames;
_this.series2data1 = response.data.plans;
_this.series2data2 = response.data.acts;
_this.series2data3 = response.data.finishRatio;
let MAX1 = 0;
let MAX2 = 0;
MAX1 = Math.max(..._this.series2data1);
MAX2 = Math.max(..._this.series2data2);
if (MAX1 > MAX2) {
_this.yAxis2seriesMAX1 = MAX1;
} else {
_this.yAxis2seriesMAX1 = MAX2;
}
_this.yAxis2seriesMAX2 = Math.max(..._this.series2data3);
}
}
});
getMesBoardEquProductionToday({ getMesBoardEquProductionToday({
factory: _this.selectxt, factory: _this.selectxt,
shiftId: _this.selectxtclasses, shiftId: _this.selectxtclasses,
@ -646,9 +719,9 @@ export default {
dataoption.push(a); dataoption.push(a);
numberlist.push(item.totalNum); numberlist.push(item.totalNum);
}); });
dataoption.sort((a, b) => { // dataoption.sort((a, b) => {
return a.value - b.value; // return a.value - b.value;
}); // });
let max = Math.max(...numberlist); let max = Math.max(...numberlist);
max = max + 100; max = max + 100;
dataoption.forEach((item) => { dataoption.forEach((item) => {
@ -814,6 +887,31 @@ export default {
], ],
}; };
myChart3.setOption(option3); myChart3.setOption(option3);
getWhiteBoardEquPro7Days({
factory: _this.selectxt,
shiftId: _this.selectxtclasses,
ymd: _this.datetime,
equTypeCode: "equ_type_spj",
}).then((response) => {
if (response) {
if (response.data) {
_this.xAxis3data = response.data.dayNames;
_this.series3data1 = response.data.plans;
_this.series3data2 = response.data.acts;
_this.series3data3 = response.data.finishRatio;
let MAX1 = 0;
let MAX2 = 0;
MAX1 = Math.max(..._this.series3data1);
MAX2 = Math.max(..._this.series3data2);
if (MAX1 > MAX2) {
_this.yAxis3seriesMAX1 = MAX1;
} else {
_this.yAxis3seriesMAX1 = MAX2;
}
_this.yAxis3seriesMAX2 = Math.max(..._this.series3data3);
}
}
});
getMesBoardEquProductionToday({ getMesBoardEquProductionToday({
factory: _this.selectxt, factory: _this.selectxt,
shiftId: _this.selectxtclasses, shiftId: _this.selectxtclasses,
@ -840,9 +938,9 @@ export default {
dataoption.push(a); dataoption.push(a);
numberlist.push(item.totalNum); numberlist.push(item.totalNum);
}); });
dataoption.sort((a, b) => { // dataoption.sort((a, b) => {
return a.value - b.value; // return a.value - b.value;
}); // });
let max = Math.max(...numberlist); let max = Math.max(...numberlist);
max = max + 100; max = max + 100;
dataoption.forEach((item) => { dataoption.forEach((item) => {
@ -926,8 +1024,8 @@ export default {
}, },
}, },
xAxis: { xAxis: {
name: "", name: "次数",
max: 30, max: 100,
splitLine: { splitLine: {
show: false, show: false,
}, },
@ -1020,11 +1118,15 @@ export default {
let dataoption = []; let dataoption = [];
let totalArr = []; let totalArr = [];
_this.optionDatalist4 = []; _this.optionDatalist4 = [];
_this.series4data = [];
_this.xAxis4data = [];
if (response.data.totalNum.length > 0) { if (response.data.totalNum.length > 0) {
_this.number4 = response.data.totalNum[0].totalNum; _this.number4 = response.data.totalNum[0].totalNum;
} }
if (response.data.everyNum.length > 0) { if (response.data.everyNum.length > 0) {
response.data.everyNum.forEach((item) => { response.data.everyNum.forEach((item) => {
this.series4data.push(item.totalNum);
this.xAxis4data.push(item.equName);
let a = {}; let a = {};
a.name = item.equName; a.name = item.equName;
a.value = item.totalNum; a.value = item.totalNum;
@ -1033,9 +1135,10 @@ export default {
dataoption.push(a); dataoption.push(a);
numberlist.push(item.totalNum); numberlist.push(item.totalNum);
}); });
dataoption.sort((a, b) => { this.yAxis4seriesMAX1 = Math.max(...this.series4data);
return a.value - b.value; // dataoption.sort((a, b) => {
}); // return a.value - b.value;
// });
let max = Math.max(...numberlist); let max = Math.max(...numberlist);
max = max + 100; max = max + 100;
dataoption.forEach((item) => { dataoption.forEach((item) => {

@ -122,9 +122,9 @@
<el-table-column label="线体名称" align="center" prop="machineName" /> <el-table-column label="线体名称" align="center" prop="machineName" />
<el-table-column label="产品名称" align="center" prop="productName" width="220" :show-overflow-tooltip="true" /> <el-table-column label="产品名称" align="center" prop="productName" width="220" :show-overflow-tooltip="true" />
<el-table-column label="排产数量" align="center" prop="quantity" width="100" /> <el-table-column label="排产数量" align="center" prop="quantity" width="100" />
<el-table-column label="累计报工数量" align="center" prop="quantityFeedback" width="100" />
<el-table-column label="单位" align="center" prop="unit" /> <el-table-column label="单位" align="center" prop="unit" />
<el-table-column label="班次" align="center" prop="shiftName" /> <el-table-column label="班次" align="center" prop="shiftName" />
<el-table-column label="累计报工数量" align="center" prop="quantityFeedback" width="100" />
<!--<el-table-column label="用人数" align="center" prop="useMan" width="100"/>--> <!--<el-table-column label="用人数" align="center" prop="useMan" width="100"/>-->
<el-table-column label="累计工时" align="center" prop="workTime" /> <el-table-column label="累计工时" align="center" prop="workTime" />
<el-table-column label="生产时间" align="center" prop="productDate" width="100" /> <el-table-column label="生产时间" align="center" prop="productDate" width="100" />
@ -438,8 +438,8 @@
:show-overflow-tooltip="true" :formatter="productCodeFormate" /> :show-overflow-tooltip="true" :formatter="productCodeFormate" />
<el-table-column label="物料名称" width="280" align="left" prop="materialName" <el-table-column label="物料名称" width="280" align="left" prop="materialName"
:show-overflow-tooltip="true" /> :show-overflow-tooltip="true" />
<el-table-column label="BOM组件用量" width="110" align="left" prop="planQuantity" />
<el-table-column label="单位数量" align="center" prop="erfmg" :show-overflow-tooltip="true"/> <el-table-column label="Bom用量" width="100" align="left" prop="quantitySplitBom" />
<el-table-column label="条目单位" align="center" prop="erfme" /> <el-table-column label="条目单位" align="center" prop="erfme" />
<el-table-column label="实际用量" width="150" align="left" prop="quantity" <el-table-column label="实际用量" width="150" align="left" prop="quantity"
:show-overflow-tooltip="true"> :show-overflow-tooltip="true">
@ -452,7 +452,8 @@
<el-table-column label="单位" width="50" align="center" prop="unit" /> <el-table-column label="单位" width="50" align="center" prop="unit" />
<el-table-column label="反冲标识" align="center" prop="recoil" /> <el-table-column label="反冲标识" align="center" prop="recoil" />
<el-table-column label="订单数量" width="80" align="left" prop="quantitySplit" /> <el-table-column label="订单数量" width="80" align="left" prop="quantitySplit" />
<el-table-column label="Bom用量" width="100" align="left" prop="quantitySplitBom" /> <el-table-column label="单位数量" align="center" prop="erfmg" :show-overflow-tooltip="true"/>
<el-table-column label="BOM组件用量" width="110" align="left" prop="planQuantity" />
<el-table-column label="sap项目编码" width="100" align="center" prop="rspos" /> <el-table-column label="sap项目编码" width="100" align="center" prop="rspos" />
<el-table-column label="仓库" width="150" align="center" prop="warehouseCode"> <el-table-column label="仓库" width="150" align="center" prop="warehouseCode">
<template slot-scope="scope"> <template slot-scope="scope">

@ -499,6 +499,14 @@
<el-table-column align="center" width="150" prop="batchNumList" label="批次数量"></el-table-column> <el-table-column align="center" width="150" prop="batchNumList" label="批次数量"></el-table-column>
</el-table> </el-table>
<!-- 测试 --> <!-- 测试 -->
<el-row style="margin-top: 20px">
<el-steps :active="3">
<el-step title="成型" :description="totalQuantity_cx"></el-step>
<el-step title="烘房" :description="totalQuantity_hf"></el-step>
<el-step title="收坯" :description="totalQuantity_hf"></el-step>
</el-steps>
</el-row>
<!-- 操作按钮 --> <!-- 操作按钮 -->
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm" v-if="showDetail"> </el-button> <el-button type="primary" @click="submitForm" v-if="showDetail"> </el-button>
@ -640,6 +648,7 @@ import {
import moment from 'moment'; import moment from 'moment';
import { getProEquipment, getProRoutes, getProShifts,selectMaterielList} from '@/api/plan/order' import { getProEquipment, getProRoutes, getProShifts,selectMaterielList} from '@/api/plan/order'
import {prototype} from "clipboard"; import {prototype} from "clipboard";
import {getHourProductionList} from '@/api/plan/whiteOrder';
export default { export default {
name: "WorkorderBP", name: "WorkorderBP",
@ -728,6 +737,9 @@ export default {
showSearch: true, showSearch: true,
// //
total: 0, total: 0,
//
totalQuantity_cx: 0,
totalQuantity_hf: 0,
// //
workorderList: [], workorderList: [],
// //
@ -1447,6 +1459,34 @@ export default {
getWorkBatchList(this.selectWork).then(response => { getWorkBatchList(this.selectWork).then(response => {
this.formFields = response.data this.formFields = response.data
}) })
//
getHourProductionList({
workorderCode: this.selectWork.workorderCode,
}).then(response => {
let totalQuantity_cx = 0;
let totalQuantity_hf = 0;
// equName
response.forEach(item => {
// quantity
const quantity = Number(item.quantity) || 0;
if (item.equName.includes("成型")) {
totalQuantity_cx += quantity;
}
});
response.forEach(item => {
// quantity
const quantity = Number(item.quantity) || 0;
if (item.equName.includes("烘房")) {
totalQuantity_hf += quantity;
}
});
this.totalQuantity_cx = totalQuantity_cx;
this.totalQuantity_hf = totalQuantity_hf;
});
// //
// //

@ -91,7 +91,8 @@
<el-table-column label="已入库数量" align="center" prop="realityNumber" /> <el-table-column label="已入库数量" align="center" prop="realityNumber" />
<el-table-column label="单位" align="center" prop="unit" /> <el-table-column label="单位" align="center" prop="unit" />
<el-table-column label="单价" align="center" prop="price" /> <el-table-column label="单价" align="center" prop="price" />
<el-table-column label="订单来源" align="center" prop="attr2" />
<el-table-column label="申请人" align="center" prop="attr3" />
<el-table-column label="计划时间" align="center" prop="attr1" width="180"> <el-table-column label="计划时间" align="center" prop="attr1" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.attr1, '{y}-{m}-{d}') }}</span> <span>{{ parseTime(scope.row.attr1, '{y}-{m}-{d}') }}</span>
@ -135,7 +136,6 @@
<!-- <el-form-item label="物料编码" prop="materialCode">--> <!-- <el-form-item label="物料编码" prop="materialCode">-->
<!-- <el-input v-model="form.materialCode" placeholder="请输入物料编码" />--> <!-- <el-input v-model="form.materialCode" placeholder="请输入物料编码" />-->
<!-- </el-form-item>--> <!-- </el-form-item>-->
<el-form-item label="物料名称" prop="materialName" :rules="[{ required: true, message: '请选择物料名称', trigger: 'change' }]"> <el-form-item label="物料名称" prop="materialName" :rules="[{ required: true, message: '请选择物料名称', trigger: 'change' }]">
<el-select v-model="form.materialName" placeholder="请选择物料" clearable> <el-select v-model="form.materialName" placeholder="请选择物料" clearable>
<el-option <el-option
@ -148,9 +148,24 @@
</el-form-item> </el-form-item>
<el-form-item label="供应商" prop="supplyName"> <!-- <el-form-item label="供应商" prop="supplyName">-->
<el-input v-model="form.supplyName" placeholder="请输入供应商" /> <!-- <el-input v-model="form.supplyName" placeholder="请输入供应商" />-->
<!-- </el-form-item>-->
<el-form-item label="供应商" prop="supplyName" :rules="[{ required: true, message: '请选择供应商', trigger: 'change' }]">
<el-select v-model="form.supplyName" placeholder="请选择供应商" clearable>
<el-option
v-for="dict in dict.type.bp_supplier"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item> </el-form-item>
<el-form-item label="计划数量" prop="planNumber"> <el-form-item label="计划数量" prop="planNumber">
<el-input v-model="form.planNumber" placeholder="请输入计划数量" /> <el-input v-model="form.planNumber" placeholder="请输入计划数量" />
</el-form-item> </el-form-item>
@ -160,12 +175,9 @@
<el-form-item label="单位" prop="unit"> <el-form-item label="单位" prop="unit">
<el-input v-model="form.unit" placeholder="请输入单位" /> <el-input v-model="form.unit" placeholder="请输入单位" />
</el-form-item> </el-form-item>
<el-form-item label="" prop="price"> <el-form-item label="价" prop="price">
<el-input v-model="form.price" placeholder="请输入价格" /> <el-input v-model="form.price" placeholder="请输入价格" />
</el-form-item> </el-form-item>
<!-- <el-form-item label="用户自定义1" prop="attr1">-->
<!-- <el-input v-model="form.attr1" placeholder="请输入用户自定义1" />-->
<!-- </el-form-item>-->
<el-form-item label="计划时间" prop="attr1"> <el-form-item label="计划时间" prop="attr1">
@ -180,9 +192,25 @@
<!-- <el-form-item label="用户自定义2" prop="attr2">--> <!-- <el-form-item label="用户自定义2" prop="attr2">-->
<!-- <el-input v-model="form.attr2" placeholder="请输入用户自定义2" />--> <!-- <el-input v-model="form.attr2" placeholder="请输入用户自定义2" />-->
<!-- </el-form-item>--> <!-- </el-form-item>-->
<!-- <el-form-item label="用户自定义3" prop="attr3">-->
<!-- <el-input v-model="form.attr3" placeholder="请输入用户自定义3" />--> <el-form-item label="订单来源" prop="attr2" :rules="[{ required: true, message: '请选择订单来源', trigger: 'change' }]">
<!-- </el-form-item>--> <el-select v-model="form.attr2" placeholder="请选择订单来源" clearable>
<el-option
v-for="dict in dict.type.bp_osource"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="申请人" prop="attr3">
<el-input v-model="form.attr3" placeholder="请输入申请人" />
</el-form-item>
<!-- <el-form-item label="用户自定义4" prop="attr4">--> <!-- <el-form-item label="用户自定义4" prop="attr4">-->
<!-- <el-input v-model="form.attr4" placeholder="请输入用户自定义4" />--> <!-- <el-input v-model="form.attr4" placeholder="请输入用户自定义4" />-->
<!-- </el-form-item>--> <!-- </el-form-item>-->
@ -203,7 +231,7 @@ import { listBpprocure, getBpprocure, delBpprocure, addBpprocure, updateBpprocur
import JsBarcode from 'jsbarcode'; import JsBarcode from 'jsbarcode';
export default { export default {
name: "Bpprocure", name: "Bpprocure",
dicts: ['bp_raw'], dicts: ['bp_raw','bp_supplier','bp_osource'],
data() { data() {
return { return {
// //

@ -201,8 +201,8 @@
<!-- <el-table-column label="供应商" align="center" prop="supplyName" />--> <!-- <el-table-column label="供应商" align="center" prop="supplyName" />-->
<!-- <el-table-column label="计划数量" align="center" prop="amnountPlan" />--> <!-- <el-table-column label="计划数量" align="center" prop="amnountPlan" />-->
<el-table-column label="库存数量" align="center" prop="amountReal" /> <el-table-column label="库存数量" align="center" prop="amountReal" />
<!-- <el-table-column label="备用" align="center" prop="userDefined1" />--> <el-table-column label="安全库存" align="center" prop="userDefined1" />
<!-- <el-table-column label="备用" align="center" prop="userDefined2" />--> <el-table-column label="需求库存" align="center" prop="userDefined2" />
<!-- <el-table-column label="备用" align="center" prop="userDefined3" />--> <!-- <el-table-column label="备用" align="center" prop="userDefined3" />-->
<!-- <el-table-column label="备用" align="center" prop="userDefined4" />--> <!-- <el-table-column label="备用" align="center" prop="userDefined4" />-->
<!-- <el-table-column label="备用" align="center" prop="userDefined5" />--> <!-- <el-table-column label="备用" align="center" prop="userDefined5" />-->
@ -217,24 +217,24 @@
<!-- <span>{{ parseTime(scope.row.gmtModified, '{y}-{m}-{d}') }}</span>--> <!-- <span>{{ parseTime(scope.row.gmtModified, '{y}-{m}-{d}') }}</span>-->
<!-- </template>--> <!-- </template>-->
<!-- </el-table-column>--> <!-- </el-table-column>-->
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">-->
<template slot-scope="scope"> <!-- <template slot-scope="scope">-->
<el-button <!-- <el-button-->
size="mini" <!-- size="mini"-->
type="text" <!-- type="text"-->
icon="el-icon-edit" <!-- icon="el-icon-edit"-->
@click="handleUpdate(scope.row)" <!-- @click="handleUpdate(scope.row)"-->
v-hasPermi="['wms:raw:edit']" <!-- v-hasPermi="['wms:raw:edit']"-->
>修改</el-button> <!-- >修改</el-button>-->
<el-button <!-- <el-button-->
size="mini" <!-- size="mini"-->
type="text" <!-- type="text"-->
icon="el-icon-delete" <!-- icon="el-icon-delete"-->
@click="handleDelete(scope.row)" <!-- @click="handleDelete(scope.row)"-->
v-hasPermi="['wms:raw:remove']" <!-- v-hasPermi="['wms:raw:remove']"-->
>删除</el-button> <!-- >删除</el-button>-->
</template> <!-- </template>-->
</el-table-column> <!-- </el-table-column>-->
</el-table> </el-table>
<pagination <pagination

Loading…
Cancel
Save