Merge remote-tracking branch 'origin/master'

master
mengjiao 7 months ago
commit 29af1d604c

@ -31,3 +31,11 @@ export function getProductionLineInfo(data) {
data: data
});
}
// 产线信息
export function getPorOrderList(data) {
return request({
url: '/mes/mesborad/getPorOrderList',
method: 'post',
data: data
});
}

@ -81,7 +81,29 @@ export function getLineChartData() {
method: 'get'
});
}
// 首页-各线体当日计划产量(横向柱状图)
export function getLineProData(data) {
return request({
url: '/mes/reportWork/getLineProData',
method: 'post',
params: data
});
}
// 首页-当月各日实际产量(单折线图,
export function getMonthProData() {
return request({
url: '/mes/reportWork/getMonthProData',
method: 'get',
});
}
// 首页-当日产品产量(饼图)
export function getProductProData(data) {
return request({
url: '/mes/reportWork/getProductProData',
method: 'post',
params: data,
});
}
// 获取组线每月设备故障数
export function getGroupLineEquInfo() {
return request({

@ -59,3 +59,15 @@ export function syncSAP() {
method: 'post'
});
}
//同步制定产品的sap工艺
export function syncProductSAP(productCodes) {
const data = {
productCodes
}
return request({
url: '/technology/pro/proroute/syncProductSAP',
method: 'post',
data: data
})
}

@ -135,7 +135,7 @@ export const constantRoutes = [
// 包装线产线生产看板
{
path: "/kanban/Packagingline",
component: () => import("@/views/kanban/Packagingline/index"),
component: () => import("@/views/kanban/Packagingline/index2"),
hidden: true,
},

@ -1,7 +1,7 @@
<template>
<div>
<div ref="chart" style="width:90%;height:300px"></div>
<div ref="chart" style="width:90%;height:260px"></div>
</div>
</template>

@ -1,136 +0,0 @@
<template>
<div :class="className" :style="{height:height,width:width}" />
</template>
<script>
import * as echarts from 'echarts'
require('echarts/theme/macarons') // echarts theme
import resize from './mixins/resize'
export default {
mixins: [resize],
props: {
className: {
type: String,
default: 'chart'
},
width: {
type: String,
default: '100%'
},
height: {
type: String,
default: '350px'
},
autoResize: {
type: Boolean,
default: true
},
chartData: {
type: Object,
required: true
}
},
data() {
return {
chart: null,
lineChartData: lineChartData
}
},
watch: {
chartData: {
deep: true,
handler(val) {
this.setOptions(val)
}
}
},
mounted() {
this.$nextTick(() => {
this.initChart()
})
},
beforeDestroy() {
if (!this.chart) {
return
}
this.chart.dispose()
this.chart = null
},
methods: {
initChart() {
this.chart = echarts.init(this.$el, 'macarons')
this.setOptions(this.chartData)
},
setOptions({ expectedData, actualData } = {}) {
this.chart.setOption({
xAxis: {
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
boundaryGap: false,
axisTick: {
show: false
}
},
grid: {
left: 10,
right: 10,
bottom: 20,
top: 30,
containLabel: true
},
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'cross'
},
padding: [5, 10]
},
yAxis: {
axisTick: {
show: false
}
},
legend: {
data: ['expected', 'actual']
},
series: [{
name: 'expected', itemStyle: {
normal: {
color: '#FF005A',
lineStyle: {
color: '#FF005A',
width: 2
}
}
},
smooth: true,
type: 'line',
data: expectedData,
animationDuration: 2800,
animationEasing: 'cubicInOut'
},
{
name: 'actual',
smooth: true,
type: 'line',
itemStyle: {
normal: {
color: '#3888fa',
lineStyle: {
color: '#3888fa',
width: 2
},
areaStyle: {
color: '#f3f8ff'
}
}
},
data: actualData,
animationDuration: 2800,
animationEasing: 'quadraticOut'
}]
})
}
}
}
</script>

@ -30,7 +30,8 @@
},
chartData: {
type: Object,
required: true
required: true,
default: {},
}
},
data() {

@ -0,0 +1,203 @@
<template>
<div :class="className" :style="{ height: height, width: width }" />
</template>
<script>
import * as echarts from "echarts";
require("echarts/theme/macarons"); // echarts theme
import resize from "./mixins/resize";
export default {
mixins: [resize],
props: {
className: {
type: String,
default: "chart",
},
width: {
type: String,
default: "100%",
},
height: {
type: String,
default: "300px",
},
autoResize: {
type: Boolean,
default: true,
},
chartData: {
type: Object,
// required: true,
default: {},
},
},
data() {
return {
chart: null,
};
},
watch: {
chartData: {
deep: true,
handler(newValue, oldValue) {
this.chart.dispose();
this.chartData = newValue;
this.initChart(); //echarts
},
},
},
mounted() {
// debugger
this.$nextTick(() => {
this.initChart();
});
},
beforeDestroy() {
if (!this.chart) {
return;
}
this.chart.dispose();
this.chart = null;
},
methods: {
initChart() {
this.chart = echarts.init(this.$el, "macarons");
this.setOptions(this.chartData);
},
setOptions({ seriesNames, xAxisDatas, seriesDatas } = {}) {
var fontColor = "#30eee9";
var yDatas = [];
var xAxisDatas = [];
if (this.chartData) {
xAxisDatas = this.chartData.xAxisDatas;
yDatas = this.chartData.yDatas;
}
let max = Math.max(...yDatas);
this.chart.setOption({
grid: {
left: "5%",
right: "5%",
top: "10%",
bottom: "0%",
containLabel: true,
},
tooltip: {
show: true,
trigger: "item",
},
legend: {
show: true,
x: "center",
y: "35",
icon: "stack",
itemWidth: 10,
itemHeight: 10,
textStyle: {
color: "#1bb4f6",
},
data: ["已采纳", "已发布", "浏览量"],
},
xAxis: [
{
type: "category",
boundaryGap: false,
axisLabel: {
color: fontColor,
},
axisLine: {
show: true,
lineStyle: {
color: "#397cbc",
},
},
axisTick: {
show: false,
},
splitLine: {
show: false,
lineStyle: {
color: "#195384",
},
},
data: xAxisDatas,
},
],
yAxis: [
{
type: "value",
name: "数量(箱)",
min: 0,
max: max + 100,
axisLabel: {
formatter: "{value}",
textStyle: {
color: "#2ad1d2",
},
},
axisLine: {
lineStyle: {
color: "#27b4c2",
},
},
axisTick: {
show: false,
},
splitLine: {
show: false,
lineStyle: {
color: "#11366e",
},
},
},
],
series: [
{
name: "产量",
type: "line",
symbol: "circle",
symbolSize: 8,
smooth: false,
itemStyle: {
normal: {
color: "#0092f6",
lineStyle: {
color: "#0092f6",
width: 1,
},
areaStyle: {
//color: '#94C9EC'
color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
{
offset: 0,
color: "rgba(7,44,90,0.3)",
},
{
offset: 1,
color: "rgba(0,146,246,0.9)",
},
]),
},
label: {
show: true,
position: "top",
},
},
},
markPoint: {
itemStyle: {
normal: {
color: "red",
},
},
},
data: yDatas,
// data:[]
},
],
});
},
},
};
</script>

@ -0,0 +1,210 @@
<template>
<div :class="className" :style="{ height: height, width: width }" />
</template>
<script>
import * as echarts from "echarts";
require("echarts/theme/macarons"); // echarts theme
import resize from "./mixins/resize";
export default {
mixins: [resize],
props: {
className: {
type: String,
default: "chart",
},
width: {
type: String,
default: "100%",
},
height: {
type: String,
default: "230px",
},
chartData: {
type: Array,
default: [],
},
},
data() {
return {
chart: null,
};
},
watch: {
chartData: {
deep: true,
handler(newValue, oldValue) {
this.chart.dispose();
this.chartData = newValue;
this.initChart(); //echarts
},
},
},
mounted() {
this.$nextTick(() => {
this.initChart();
});
},
beforeDestroy() {
if (!this.chart) {
return;
}
this.chart.dispose();
this.chart = null;
},
methods: {
initChart() {
this.chart = echarts.init(this.$el, "macarons");
var ydata = [];
var color = [
"#8d7fec",
"#5085f2",
"#e75fc3",
"#f87be2",
"#f2719a",
"#fca4bb",
"#f59a8f",
"#fdb301",
"#57e7ec",
"#cf9ef1",
];
var xdata = [];
if (this.chartData) {
this.chartData.forEach((item) => {
let a = {};
a.name = item.productName;
a.value = item.quantitySplit;
xdata.push(item.productName);
ydata.push(a);
});
}
this.chart.setOption({
// backgroundColor: "rgba(255,255,255,1)",
color: color,
legend: {
orient: "vartical",
x: "left",
top: "0%",
left: "35%",
bottom: "0%",
data: xdata,
itemWidth: 8,
itemHeight: 8,
itemGap: 16,
textStyle: {
fontSize: 10, // 14px
},
/*formatter:function(name){
var oa = option.series[0].data;
var num = oa[0].value + oa[1].value + oa[2].value + oa[3].value+oa[4].value + oa[5].value + oa[6].value + oa[7].value+oa[8].value + oa[9].value ;
for(var i = 0; i < option.series[0].data.length; i++){
if(name==oa[i].name){
return ' '+name + ' | ' + oa[i].value + ' | ' + (oa[i].value/num * 100).toFixed(2) + '%';
}
}
}*/
formatter: function (name) {
return "" + name;
},
},
series: [
{
type: "pie",
clockwise: false, //
minAngle: 2, //0 ~ 360
radius: ["50%", "85%"],
center: ["20%", "50%"],
avoidLabelOverlap: false,
itemStyle: {
//
normal: {
borderColor: "#ffffff",
borderWidth: 6,
},
},
label: {
normal: {
show: false,
position: "center",
formatter: "{text|{b}}\n{c} 箱({d}%)",
rich: {
text: {
color: "#666",
fontSize: 14,
align: "center",
verticalAlign: "middle",
padding: 8,
},
value: {
color: "#8693F3",
fontSize: 20,
align: "center",
verticalAlign: "middle",
},
},
},
emphasis: {
show: true,
textStyle: {
fontSize: 24,
},
},
},
data: ydata,
},
],
});
let dataCount1 = ydata.length;
this.chart.on("mouseover", (e) => {
this.chart.dispatchAction({
type: "highlight",
seriesIndex: 0,
dataIndex: e.dataIndex,
});
// optiondatalength
for (let i = 0; i < dataCount1; i++) {
if (i != e.dataIndex) {
this.chart.dispatchAction({
type: "downplay",
seriesIndex: 0,
dataIndex: i,
});
}
}
});
//
this.chart.on("mouseout", (e) => {
this.chart.dispatchAction({
type: "highlight",
seriesIndex: 0,
dataIndex: 0,
});
if (e.dataIndex !== 0) {
this.chart.dispatchAction({
type: "downplay",
seriesIndex: 0,
dataIndex: e.dataIndex,
});
} else {
this.chart.dispatchAction({
type: "highlight",
seriesIndex: 0,
dataIndex: 0,
});
}
});
setTimeout(() => {
this.chart.dispatchAction({
type: "highlight",
seriesIndex: 0,
dataIndex: 1,
});
}, 500);
},
},
};
</script>

@ -1,7 +1,7 @@
<template>
<div>
<div ref="chart" style="width:90%;height:300px"></div>
<div ref="chart" style="width:90%;height:260px"></div>
</div>
</template>
@ -26,7 +26,7 @@
},
height: {
type: String,
default: '260px'
default: '230px'
},
autoResize: {
type: Boolean,
@ -34,7 +34,8 @@
},
chartData: {
type: Object,
required: true
required: true,
default: {},
}
},
data() {

@ -0,0 +1,190 @@
<template>
<div :class="className" :style="{ height: height, width: width }" />
</template>
<script>
import * as echarts from "echarts";
require("echarts/theme/macarons"); // echarts theme
import resize from "./mixins/resize";
const animationDuration = 6000;
export default {
mixins: [resize],
props: {
className: {
type: String,
default: "chart",
},
width: {
type: String,
default: "100%",
},
height: {
type: String,
default: "250px",
},
chartData: {
type: Array,
default: [],
},
},
data() {
return {
chart: null,
};
},
watch: {
chartData: {
deep: true,
handler(newValue, oldValue) {
this.chart.dispose();
this.chartData = newValue;
this.initChart(); //echarts
},
},
},
mounted() {
this.$nextTick(() => {
this.initChart();
});
},
beforeDestroy() {
if (!this.chart) {
return;
}
this.chart.dispose();
this.chart = null;
},
methods: {
initChart() {
this.chart = echarts.init(this.$el, "macarons");
let yLabel = [];
let yData = [];
let yRtData = [];
if(this.chartData.length>0){
this.chartData.forEach((item) => {
yLabel.push(item.machineName)
yData.push(item.quantitySplit)
yRtData.push(item.quantitySplit)
});
}
this.chart.setOption({
grid: {
left: "5%",
right: "5%",
bottom: "10%",
top: "5%",
containLabel: true,
},
tooltip: {
show: true,
trigger: "axis", //axis , item
backgroundColor: "RGBA(0, 49, 85, 1)",
borderColor: "rgba(0, 151, 251, 1)",
borderWidth: 1,
borderRadius: 0,
axisPointer: {
type: "none",
// show:false
},
textStyle: {
color: "#BCE9FC",
fontSize: 16,
align: "left",
},
formatter: function (a) {
return a[0].seriesName + "" + a[0].value;
},
},
// backgroundColor: "#031d33",
xAxis: {
name:'箱',
show: true,
type: "value",
// data:xData
splitNumber: 7,
axisLabel: {
//
interval: 0, // 1
// margin:15,
textStyle: {
// color: "rgba(128, 207, 240, 1)",
fontStyle: "normal",
fontSize: 16,
// fontWeight: 'bolder'
},
},
},
yAxis: [
{
type: "category",
inverse: true,
axisLabel: {
show: true,
margin: 15,
textStyle: {
fontSize: "16",
fontWeight: "bolder",
},
},
splitLine: {
show: false,
},
axisTick: {
show: false,
},
axisLine: {
show: false,
},
data: yLabel,
},
{
type: "category",
inverse: true,
axisTick: "none",
axisLine: "none",
show: true,
axisLabel: {
textStyle: {
color: "rgba(128, 207, 240, 1)",
fontSize: "16",
},
formatter: function (value) {
return value;
},
},
data: yRtData,
},
],
series: [
{
name: "数量",
type: "bar",
zlevel: 1,
itemStyle: {
normal: {
color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [
{
offset: 1,
color: "#0097FB",
},
{
offset: 0,
color: "#30ECA6",
},
]),
// shadowBlur: 0,
// shadowColor: 'rgba(87,220,222,0.7)',
},
},
barWidth: 18,
data: yData,
},
],
});
},
},
};
</script>

@ -904,7 +904,7 @@ export default {
for (let i = 0; i < response.data.length; i++) {
this.personList.push({
label: response.data[i].nickName + '(' + response.data[i].userName + ')',
key: response.data[i].userId,
key: response.data[i].userName,
})
}
});

@ -949,7 +949,7 @@ export default {
for (let i = 0; i < response.data.length; i++) {
this.personList.push({
label: response.data[i].nickName + '(' + response.data[i].userName + ')',
key: response.data[i].userId,
key: response.data[i].userName,
})
}
});

@ -1,17 +1,72 @@
<template>
<div class="app-container home">
<el-row :gutter="20">
<div class="top">
<div class="echartsbox1">
<div class="titlename">各线体当日计划产量</div>
<crossBarChart :chart-data="crossBarChart" ref="crossBarChart" />
<div class="el-date-picker">
<el-date-picker
v-model="value1"
type="date"
format="yyyy-MM-dd"
placeholder="选择日期"
@change="changecrossBarChart"
>
</el-date-picker>
</div>
</div>
<div class="echartsbox1 echartsbox2">
<div class="titlename">当日产品产量</div>
<PieChart3 :chart-data="PieChart3Data" ref="PieChart3" />
<div class="el-date-picker">
<el-date-picker
v-model="value2"
format="yyyy-MM-dd"
type="date"
placeholder="选择日期"
@change="changePieChart3Data"
>
</el-date-picker>
</div>
</div>
</div>
<div class="content">
<div class="echartsbox3">
<div class="titlename">
{{ titlename }}
</div>
<div style="">
<LineChartshadow :chart-data="lineChartData" ref="lineChart" />
</div>
</div>
</div>
<div class="bottom">
<div class="echartsbox4">
<div class="titlename">各线体设备月故障数</div>
<DeviceChartLine
:chart-data="deviceChartLineData"
ref="DeviceChartLine"
/>
</div>
<div class="echartsbox4 echartsbox5">
<div class="titlename">各车间生产不良率</div>
<QcChartLine :chart-data="qcChartLineData" ref="QcChartLine" />
</div>
</div>
<!-- <el-row :gutter="20">
<el-col :sm="24" :lg="24">
<span style="font-size: 20px;margin: 40%;color: cadetblue;">{{title}}</span>
<span style="font-size: 20px; margin: 40%; color: cadetblue">{{
titlename
}}</span>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="24">
<div style="border: 1px solid #cfdee4;">
<div style="border: 1px solid #cfdee4">
<line-chart :chart-data="lineChartData" ref="lineChart" />
</div>
</el-col>
</el-row>
</el-row> -->
<!--
<el-row :gutter="20">
<el-col :span="12">
@ -21,30 +76,48 @@
<pie-chart ref="pieChart2"/>
</el-col>
</el-row>-->
<el-row :gutter="20">
<!-- <el-row :gutter="20">
<el-col :span="12">
<span style="font-size: 18px;padding: 1% 39%;color: cadetblue;">各线体设备月故障数</span>
<span style="font-size: 18px; padding: 1% 39%; color: cadetblue"
>各线体设备月故障数</span
>
</el-col>
<el-col :span="12">
<span style="font-size: 18px;padding: 1% 39%;color: cadetblue;">各车间生产不良率</span>
<span style="font-size: 18px; padding: 1% 39%; color: cadetblue"
>各车间生产不良率</span
>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<DeviceChartLine :chart-data="deviceChartLineData" ref="DeviceChartLine"/>
<DeviceChartLine
:chart-data="deviceChartLineData"
ref="DeviceChartLine"
/>
</el-col>
<el-col :span="12">
<QcChartLine :chart-data="qcChartLineData" ref="QcChartLine" />
</el-col>
</el-row>
</el-row> -->
</div>
</template>
<script>
import LineChart from './dashboard/LineChart';
import PieChart from './dashboard/PieChart';
import PieChart2 from './dashboard/PieChart2';
import {getGroupLineEquInfo, getLineChartData,getLineQcData} from '@/api/mes/reportWork'
import LineChart from "./dashboard/LineChart";
import LineChartshadow from "./dashboard/LineChartshadow";
import crossBarChart from "./dashboard/crossBarChart";
import PieChart from "./dashboard/PieChart";
import PieChart2 from "./dashboard/PieChart2";
import PieChart3 from "./dashboard/PieChart3";
import moment from "moment";
import {
getGroupLineEquInfo,
getLineChartData,
getLineQcData,
getLineProData,
getMonthProData,
getProductProData,
} from "@/api/mes/reportWork";
import DeviceChartLine from "./dashboard/DeviceChartLine";
import QcChartLine from "./dashboard/QcChartLine";
export default {
@ -52,7 +125,10 @@ export default {
components: {
DeviceChartLine,
QcChartLine,
LineChart//,PieChart,PieChart2
LineChart, //,PieChart,PieChart2
crossBarChart,
PieChart3,
LineChartshadow,
},
data() {
return {
@ -61,22 +137,61 @@ export default {
lineChartData: null,
deviceChartLineData: null,
qcChartLineData: null,
title:"本月工厂产量"
titlename: "本月工厂产量",
crossBarChart: null,
PieChart3Data: null,
value1: null,
value2: null,
};
},
created() {
this.getLineChartData();
},
mounted() {
// this.datetime = moment().subtract(2, "day").format("yyyy-MM-DD");
this.value1 = moment().format("yyyy-MM-DD");
this.value2 = moment().format("yyyy-MM-DD");
this.getLineProData();
this.getProductProData();
this.getMonthProData();
},
methods: {
goTarget(href) {
window.open(href, "_blank");
},
getLineChartData() {
getLineChartData().then(data => {
getLineChartData().then((data) => {
this.lineChartData = data;
});
},
getLineProData() {
getLineProData({
productDate: this.value1,
}).then((data) => {
this.crossBarChart = data;
});
},
getMonthProData() {
getMonthProData().then((data) => {
this.lineChartData = data;
});
},
getProductProData() {
getProductProData({
productDate: this.value2,
}).then((data) => {
this.PieChart3Data = data;
});
},
changecrossBarChart() {
this.value1 = moment(this.value1).format("yyyy-MM-DD");
this.getLineProData();
},
changePieChart3Data() {
this.value2 = moment(this.value2).format("yyyy-MM-DD");
this.getProductProData();
},
/**
getGroupLineEquInfo(){
getGroupLineEquInfo().then(response => {
@ -150,5 +265,96 @@ export default {
}
}
}
.app-container {
background: #d8e9fd;
height: calc(100vh - 84px);
overflow-y: scroll;
.top {
width: 100%;
display: flex;
.echartsbox1 {
position: relative;
width: 49.5%;
height: 270px;
background: #ffffff;
border-radius: 15px;
margin-right: 10px;
.titlename {
padding: 10px;
font-size: 20px;
color: #ffffff;
background-color: #547bfe;
box-sizing: border-box;
border-radius: 15px 15px 0px 0px;
}
}
.echartsbox2 {
position: relative;
width: 49.5%;
background: #ffffff;
border-radius: 15px;
margin-right: 0px;
padding-bottom: 10px;
.titlename {
background-color: #42c6f3;
}
}
}
.content {
margin-top: 10px;
.echartsbox3 {
position: relative;
width: 100%;
height: 370px;
background: #ffffff;
border-radius: 15px;
margin-right: 10px;
.titlename {
padding: 10px;
font-size: 20px;
color: #ffffff;
background-color: #58dc91;
box-sizing: border-box;
border-radius: 15px 15px 0px 0px;
}
}
}
.bottom {
margin-top: 10px;
display: flex;
.echartsbox4 {
position: relative;
width: 50%;
height: 324px;
background: #ffffff;
border-radius: 15px;
margin-right: 10px;
.titlename {
padding: 10px;
font-size: 20px;
color: #ffffff;
background-color: #d4d52b;
box-sizing: border-box;
border-radius: 15px 15px 0px 0px;
}
}
.echartsbox5 {
position: relative;
margin-right: 0px;
.titlename {
background-color: #ff7168;
}
}
}
}
.el-date-picker {
position: absolute;
right: -90px;
top: 8px;
height: 60px;
}
::v-deep .el-input--medium .el-input__inner {
height: 32px;
}
</style>

File diff suppressed because it is too large Load Diff

@ -584,7 +584,7 @@
</el-row>
<!-- 主数据 -->
<el-table v-if="refreshNewWorkerTable" v-loading="newWorkerLoading" class="my-print-table"
:data="printData.workTable" border style="width: 100%">
:data="printData.workTable" border style="width: 100%" :summary-method="getRKSummaries" show-summary>
<el-table-column type="index" label="序号" width="50"></el-table-column>
<el-table-column prop="workorderCodeSap" label="订单号" width="130"
:formatter="orderCodeFormate" />
@ -1604,6 +1604,38 @@ export default {
item.remark = remark;
});
},
getRKSummaries(param) {
const { columns, data } = param;
const sums = [];
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = "";
return;
}
const values = data.map((item) => Number(item[column.property]));
if (!values.every((value) => isNaN(value))) {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr);
if (!isNaN(value)) {
return prev + curr;
} else {
return prev;
}
}, 0);
sums[index] += "";
if (sums[index] > 1000000) {
sums[index] = "";
}
} else{
sums[index] = ""; //N/A
}
if(column.label == "批次"){
sums[index] = "合计";
}
});
return sums;
},
},
};
</script>

@ -170,7 +170,7 @@
:disabled="single"
@click="editMachine"
v-hasPermi="['mes:pro:workorder:edit']"
>设备修改
>切线调拨
</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>

@ -220,6 +220,10 @@
<el-form-item label="排序" prop="sort">
<el-input type="number" v-model="form.sort" placeholder="请输入排序" />
</el-form-item>
<el-form-item label="是否称重" prop="weight">
<el-radio v-model="form.weight" label="1"></el-radio>
<el-radio v-model="form.weight" label="0"></el-radio>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>

@ -95,6 +95,7 @@
</template>
</el-table-column>
<el-table-column width="150" label="不良名称" align="center" prop="defectSubclass" />
<el-table-column width="150" label="不良系数" align="center" prop="ratio" />
<el-table-column width="180" label="备注" align="center" prop="defectRemark" />
<el-table-column width="100" label="创建人" align="center" prop="createBy" />
<el-table-column width="180" label="创建时间" align="center" prop="createTime">
@ -155,6 +156,9 @@
<el-form-item label="不良名称" prop="defectSubclass">
<el-input v-model="form.defectSubclass" placeholder="请输入不良名称" />
</el-form-item>
<el-form-item label="不良系数" prop="ratio">
<el-input type="number" v-model="form.ratio" placeholder="请输入不良系数" />
</el-form-item>
<el-form-item label="备注" prop="defectRemark">
<el-input v-model="form.defectRemark" placeholder="请输入备注" />
</el-form-item>
@ -245,6 +249,15 @@ export default {
form: {},
//
rules: {
defectType: [
{ required: true, message: "请选择不良类型", trigger: "blur" }
],
defectSubclass: [
{ required: true, message: "请输入不良名称", trigger: "blur" }
],
ratio: [
{ required: true, pattern: /^(0(?:\.\d{1,2})?|1(?:\.0{0,2})?)$/ ,message: "请输入(0-1)之间的两位小数", trigger: "blur" }
],
}
};
},
@ -366,9 +379,8 @@ export default {
}
}
}
this.$modal.confirm('是否确认删除不良类型维护编号为"' + defectCodes + '"的数据项?').then(function() {
return deldefectType(defectIds);
return delDefectType(defectIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");

@ -452,7 +452,7 @@ export default {
/** 查询库存检验列表 */
getList() {
this.loading = true;
console.log("--------"+this.queryParams)
if(this.queryParams.incomeTimeArray!=null && this.queryParams.incomeTimeArray.length>0){
this.queryParams.incomeTimeStart = moment(this.queryParams.incomeTimeArray[0]).format('YYYY-MM-DD HH:mm:ss');
this.queryParams.incomeTimeEnd = moment(this.queryParams.incomeTimeArray[1]).format('YYYY-MM-DD HH:mm:ss');

@ -523,14 +523,20 @@ export default {
getList() {
this.loading = true;
if(this.queryParams.incomeTimeArray.length>0){
if(this.queryParams.incomeTimeArray != null && this.queryParams.incomeTimeArray.length>0){
this.queryParams.incomeTimeStart = moment(this.queryParams.incomeTimeArray[0]).format('YYYY-MM-DD HH:mm:ss');
this.queryParams.incomeTimeEnd = moment(this.queryParams.incomeTimeArray[1]).format('YYYY-MM-DD HH:mm:ss');
}else{
this.queryParams.incomeTimeStart = null;
this.queryParams.incomeTimeEnd = null;
}
if(this.queryParams.checkTimeArray.length>0){
if(this.queryParams.checkTimeArray != null && this.queryParams.checkTimeArray.length>0){
this.queryParams.checkTimeStart = moment(this.queryParams.checkTimeArray[0]).format('YYYY-MM-DD HH:mm:ss');
this.queryParams.checkTimeEnd = moment(this.queryParams.checkTimeArray[1]).format('YYYY-MM-DD HH:mm:ss');
}else{
this.queryParams.checkTimeStart = null;
this.queryParams.checkTimeEnd = null;
}
listWarehousing(this.queryParams).then(response => {

@ -389,9 +389,12 @@ export default {
getList() {
this.loading = true;
if(this.queryParams.checkTimeArray.length>0){
if(this.queryParams.checkTimeArray != null && this.queryParams.checkTimeArray.length>0){
this.queryParams.checkTimeStart = moment(this.queryParams.checkTimeArray[0]).format('YYYY-MM-DD HH:mm:ss');
this.queryParams.checkTimeEnd = moment(this.queryParams.checkTimeArray[1]).format('YYYY-MM-DD HH:mm:ss');
}else {
this.queryParams.checkTimeStart = null;
this.queryParams.checkTimeEnd = null;
}
listUnqualified(this.queryParams).then(response => {

@ -145,7 +145,7 @@ export default {
};
</script>
<style rel="stylesheet/scss" lang="scss">
<style rel="stylesheet/scss" lang="scss" scoped>
.register {
display: flex;
justify-content: center;

@ -172,6 +172,9 @@
<el-form-item label="数据源名称" prop="parkName">
<el-input v-model="form.parkName" placeholder="请输入数据源名称" disabled/>
</el-form-item>
<el-form-item label="数据源名称" prop="parkName">
<el-input v-model="form.poolName" placeholder="请输入数据源标识"/>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
</el-form-item>

@ -102,6 +102,18 @@
v-hasPermi="['mes:pro:proroute:import']"
>批量上传附件</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-download"
:disabled="multiple"
size="mini"
@click="handleSyncProductSAP"
v-hasPermi="['mes:pro:order:add']"
>同步物料工艺
</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
@ -116,7 +128,9 @@
>{{scope.row.routeCode}}</el-button>
</template>
</el-table-column>
<el-table-column label="产品编码" align="center" prop="productCode" width="250" v-if="false"/>
<el-table-column label="产品编码" align="center" prop="productCode" width="130"
:formatter="productCodeFormate"
/>
<el-table-column label="工艺路线名称" align="center" prop="routeName" width="250"/>
<el-table-column label="工艺路线说明" align="center" prop="routeDesc" width="250"/>
<el-table-column label="工艺路线版本" align="center" prop="routeVersion" width="100"/>
@ -327,7 +341,7 @@
</template>
<script>
import { listProroute, getProroute, delProroute, addProroute, updateProroute,syncSAP,importProroute } from "@/api/technology/proroute";
import { listProroute, getProroute, delProroute, addProroute, updateProroute,syncSAP,importProroute,syncProductSAP } from "@/api/technology/proroute";
import Routeprocess from "./routeprocess";
import Routeprodproduct from "./routeprodproduct";
export default {
@ -341,6 +355,7 @@ export default {
loading: true,
//
ids: [],
productCodes:[],
//
single: true,
//
@ -391,6 +406,12 @@ export default {
this.getList();
},
methods: {
//
productCodeFormate(row, column, cellValue){
if(cellValue !=null){
return cellValue.slice(7,18); //
}
},
/** 查询工艺路线列表 */
getList() {
this.loading = true;
@ -441,6 +462,7 @@ export default {
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.routeId)
this.productCodes = selection.map(item => item.productCode)
this.single = selection.length!==1
this.multiple = !selection.length
},
@ -594,6 +616,11 @@ export default {
this.$modal.msgSuccess('同步成功')
}).catch(() => {
})
},
/**选择产品进行工艺同步**/
handleSyncProductSAP(){
const productCodes = this.productCodes;
return syncProductSAP(productCodes);
}
}
};

@ -143,7 +143,7 @@
</template>
</el-table-column>
<el-table-column
label="报工率"
label="报工折算率"
align="center"
prop="reportRate"
width="150"
@ -344,7 +344,7 @@
<el-form-item label="工厂编码" prop="factoryCode">
<el-input v-model="form.factoryCode" placeholder="请输入工厂编码" />
</el-form-item> -->
<el-form-item label="报工率" prop="reportRate">
<el-form-item label="报工折算率" prop="reportRate">
<el-input-number
:min="0"
:step="1"
@ -440,7 +440,7 @@
<el-descriptions-item label="物料类别">{{
form.mtart
}}</el-descriptions-item>
<el-descriptions-item label="报工率">{{
<el-descriptions-item label="报工折算率">{{
form.reportRate
}}</el-descriptions-item>
<el-descriptions-item label="品类">{{

Loading…
Cancel
Save