质量看板调整

master
zhaoxiaolin 3 months ago
parent 8132164aa7
commit 6ec7f03164

@ -74,6 +74,14 @@ export function getProjectInfoList(query) {
});
}
//方案下拉
export function getProjectOptions(query) {
return request({
url: '/quality/checkTypeProject/getProjectOptions',
method: 'get',
params: query
});
}
export function getAutoDataOption(query) {
return request({
url: '/quality/checkTypeProject/getAutoDataOption',

@ -19,16 +19,16 @@
<option :key="index" :value="x.parentName" v-for="(x, index) in getLineList">
{{ x.deptName }}
</option>
<!-- <option :key="index" :value="x.seriesName" v-for="(x, index) in ceshib">{{ x.seriesName }}</option> -->
</select>
</div>
<div class="selectborder selectborder1">
<div class="selectborder selectborder1" v-show="false">
<select v-model="selectxtclasses" class="select1" @change="selectline2(selectxtclasses)">
<option :key="index" :value="x.ymdType" v-for="(x, index) in dictDatatype">
{{ x.ymdTypeName }}
</option>
</select>
</div>
</div>
<div class="timebox">
<div class="time">
@ -116,8 +116,23 @@
<div class="item-table item-table1">
<div class="titlebox" style="margin-bottom: 14px;">
<div class="titlename">质量异常信息</div>
<el-date-picker
style="
margin-left: 10px;
background-color: #142945;
color: #ffffff;
height: 90%;
"
v-model="ymdArray"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
value-format="yyyy-MM-dd"
end-placeholder="结束日期"
>
</el-date-picker>
</div>
<vue-seamless-scroll :data="Qualitylist" class="wrapscroll" :class-option="classOption" style="height:400px">
<vue-seamless-scroll :step="0.1" :data="Qualitylist" class="wrapscroll" :class-option="classOption" style="height:400px">
<div class="table-tbody">
<div class="item" :class="[index % 2 == 1 ? 'active1' : 'active2']" style="height:48px"
:key="index" v-for="(n, index) in Qualitylist">
@ -138,12 +153,28 @@
<div class="item-table item-table1">
<div class="titlebox" style="margin-bottom: 14px;">
<div class="titlename">不良类型占比</div>
<el-date-picker
style="
margin-left: 10px;
background-color: #142945;
color: #ffffff;
height: 90%;
"
v-model="ymdArray"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
value-format="yyyy-MM-dd"
end-placeholder="结束日期"
>
</el-date-picker>
</div>
<div id="echart2" style="margin: auto; width: 425px; height: 410.26px;top: -10px;"></div>
</div>
<div class="item-table item-table1">
<div class="titlebox" style="margin-bottom: 14px;">
<div class="titlename">产品不合格数量对比</div>
<div class="titlename">本年各月产品不合格数量对比</div>
</div>
<div id="echart3" style="margin: auto; width: 395px; height: 400.26px"></div>
</div>
@ -151,7 +182,7 @@
<div class="itembottom">
<div class="item-table item-table1">
<div class="titlebox" style="margin-bottom: 14px;">
<div class="titlename">产品异常趋势</div>
<div class="titlename">本年各日产品异常趋势</div>
</div>
<div id="echart5" style="margin: auto; width: 900px; height:304.15px"></div>
</div>
@ -195,7 +226,7 @@ export default {
return {
classOption:{
direction: 1,
hoverstop:true, step: 0.5,
hoverstop:true, step: 0.1,
openNatch: true,
limitMoveNum:7
},
@ -235,21 +266,51 @@ export default {
seriesmyChart5: [],
dictDatatype: [],
RefreshTime: null,
yearShow:false,
monthShow:true,
dateShow:false,
ymdArray:[],
ymdStart:null,
ymdEnd:null
};
},
created() { },
created() {
this.getDate();
},
destroyed() {
clearInterval(this.time1);
this.time1 = null;
},
mounted() {
// this.datetime = moment().subtract(2, "day").format("yyyy-MM-DD");
//console.log('zhuanhuahou',this.dateRangeone)
// this.getdatalist(this.selectxt)
this.selectFactorylist();
this.gettime();
},
methods: {
/**获取默认查询时间段**/
getDate() {
let start = this.Fungetdate (0);
let end = this.Fungetdate (0);
this.ymdArray.push(start,end);
this.optionDatalist1 = [];
this.optionDatalist2 = [];
this.optionDatalist3 = [];
this.optionDatalist4 = [];
this.ymdStart = moment(this.ymdArray[0]).format('YYYY-MM-DD');
this.ymdEnd = moment(this.ymdArray[1]).format('YYYY-MM-DD');
this.getdatalist(moment(this.ymdArray[0]).format('YYYY-MM-DD'),moment(this.ymdArray[1]).format('YYYY-MM-DD'));
this.initChart1()
},
Fungetdate (num) {
var dd = new Date();
dd.setDate(dd.getDate() + num);
var y = dd.getFullYear();
var m = dd.getMonth() + 1;//
var d = dd.getDate();
return y + "-" + m + "-" + d;
},
back() {
this.$router.push({ path: "/index" });
},
@ -268,7 +329,7 @@ export default {
_this.getLineList = response.data;
_this.selectxt = _this.getLineList[0].parentName;
this.getDictData()
//this.getDictData()
this.getDeviceRefreshTime()
}
});
@ -280,33 +341,38 @@ export default {
// console.log(response.data)
this.RefreshTime = response.data
this.time1 = setInterval(() => {
_this.getdatalist(_this.selectxt)
_this.getdatalist(
_this.ymdStart,_this.ymdEnd
)
_this.initChart1()
}, 1000 * 60 * this.RefreshTime);
}
});
},
getDictData() {
const _this = this;
getDictData(
{
dictType: 'static_dims',
}
).then((response) => {
if (response) {
// console.log(response)
this.dictDatatype = response
_this.selectxtclasses = _this.dictDatatype[0].ymdType;
this.getDeviceRefreshTime()
this.getdatalist()
this.initChart1()
}
});
},
// getDictData() {
// const _this = this;
// getDictData(
// {
// dictType: 'static_dims',
// }
// ).then((response) => {
// if (response) {
// // console.log(response)
// this.dictDatatype = response
// _this.selectxtclasses = _this.dictDatatype[1].ymdType;
// this.getDeviceRefreshTime()
// this.getdatalist()
// this.initChart1()
// }
// });
// },
getdatalist() {
const _this = this;
//
getProduceStaticInfo({
ymdType: _this.selectxtclasses,//moment().format(_this.selectxtclasses),
ymdType: _this.selectxtclasses,
typeCode: 'produce',
factoryCode: 'ds_' + _this.selectxt,
}).then((response) => {
@ -316,18 +382,24 @@ export default {
this.initChart2()
}
});
//
getProduceNoOkList({
typeCode: 'produce',
ymdType: _this.selectxtclasses,
productDateStart:this.ymdStart,
productDateEnd:this.ymdEnd,
factoryCode: 'ds_' + _this.selectxt,
}).then((response) => {
if (response) {
_this.Qualitylist = response
}
});
//
getCheckProjectsPie({
typeCode: 'produce',
ymdType: _this.selectxtclasses,//moment().format(_this.selectxtclasses),
ymdType: _this.selectxtclasses,
productDateStart:this.ymdStart,
productDateEnd:this.ymdEnd,
factoryCode: 'ds_' + _this.selectxt,
}).then((response) => {
if (response) {
@ -361,7 +433,7 @@ export default {
type: "none",
},
formatter: function (e) {
return `${e[0].data.name}\n${e[0].marker}${e[0].data.value}`;
return `${e[0].data.name}\n${e[0].marker}${e[0].data.value} PC`;
},
},
xAxis: {
@ -451,6 +523,7 @@ export default {
getProMonthNoOk({
typeCode: 'produce',
factoryCode: 'ds_' + _this.selectxt,
}).then((response) => {
if (response) {
let numberlist = [];
@ -600,7 +673,7 @@ export default {
min: 0,
max: 1000,
axisLabel: {
formatter: '{value}',
formatter: '{value} PC',
textStyle: {
color: '#D0DEEE'
}
@ -705,7 +778,7 @@ export default {
// nameTextStyle:{
// color: '#D0DEEE'
// },
data: ['已采纳', '已发布', '浏览量']
data: []
},
xAxis: [
{
@ -742,7 +815,7 @@ export default {
min: 0,
max: 1000,
axisLabel: {
formatter: '{value}',
formatter: '{value} PC',
textStyle: {
color: '#D0DEEE'
}
@ -810,10 +883,15 @@ export default {
}
},
label: {
show: true, //
position: 'top', // 'top', 'bottom', 'left', 'right'
formatter: '{c}' // {c}
},
data: []
},
{
name: '不合格比例',
name: "本年",
type: 'line',
stack: '总量',
symbol: 'circle',
@ -832,7 +910,7 @@ export default {
data: []
},
{
name: '不合格数量',
name: "上年",
data: [],
type: 'bar',
showBackground: true,
@ -891,6 +969,10 @@ export default {
let max2 = Math.max(...seriesdata3) + 5
let max3 = Math.max(...seriesdata2) + 5
let max4 = Math.max(...seriesdata4) + 5
let legenddata = []
legenddata.push("上年")
legenddata.push("本年")
let yAxismax1 = 0
let yAxismax2 = 0
if (max1 > max2) {
@ -930,7 +1012,10 @@ export default {
{
data: seriesdata3,
}
]
],
legend: {
data: legenddata
}
};
myChart6.setOption(option6);
}
@ -1388,37 +1473,6 @@ export default {
const _this = this
var colorList = ['#2D6ACA', '#72C6B5', '#F0D766', '#80B5F4', '#FD866A', '#9E87FF', '#58D5FF'];
var data = _this.optionDatalist2
// var data = [{
// 'name': '',
// 'value': 5600
// }, {
// 'name': '',
// 'value': 3600
// }, {
// 'name': '',
// 'value': 1500
// }, {
// 'name': '线',
// 'value': 2000
// }, {
// 'name': '',
// 'value': 899
// }, {
// 'name': '',
// 'value': 4000
// }, {
// 'name': '1',
// 'value': 4000
// }, {
// 'name': '2',
// 'value': 4000
// }, {
// 'name': '3',
// 'value': 4000
// }, {
// 'name': '4',
// 'value': 4000
// }]
var myChart2 = echarts.init(document.querySelector("#echart2"));
var option2 = {
//
@ -1816,14 +1870,21 @@ export default {
this.getdatalist()
this.initChart1()
},
selectline2() {
const _this = this;
this.optionDatalist1 = [];
this.optionDatalist2 = [];
this.optionDatalist3 = [];
this.optionDatalist4 = [];
this.getdatalist()
this.initChart1()
selectline2(ymd) {
if(ymd =='yyyy'){
this.yearShow = true;
this.monthShow = false;
this.dateShow = false;
}else if(ymd =='mm'){
this.yearShow = false;
this.monthShow = true;
this.dateShow = false;
}else if(ymd =='dd'){
this.yearShow = false;
this.monthShow = false;
this.dateShow = true;
}
},
//
},
@ -1887,7 +1948,7 @@ export default {
position: relative;
.factory {
width: 540px;
width: 600px;
height: 60px;
background: url("../../../assets/images/bg- border1.png") no-repeat;
background-size: 100% 100%;
@ -2171,7 +2232,7 @@ export default {
display: flex;
align-items: center;
justify-content: space-around;
width: 350px;
width: 280px;
margin-left: 50px;
}
@ -2183,7 +2244,7 @@ export default {
display: flex;
align-items: center;
justify-content: space-around;
width: 88px;
width: 66px;
margin-left: 25px;
}

@ -0,0 +1,288 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"
label-width="68px">
<el-form-item label="生产日期" prop="productDate">
<el-date-picker clearable
v-model="queryParams.productDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择生产日期">
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
>新增
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
>修改
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
>删除
</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="qtyList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"/>
<el-table-column label="生产日期" align="center" prop="productDate" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.productDate, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="班长人数" align="center" prop="monitorQty"/>
<el-table-column label="组长人数" align="center" prop="groupleaderQty"/>
<el-table-column label="物料员人数" align="center" prop="materialQty"/>
<el-table-column label="药管员人数" align="center" prop="pillMgrQty"/>
<el-table-column label="配药员人数" align="center" prop="pillDisQty"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
>修改
</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
>删除
</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改辅助工时摊分对话框 -->
<el-dialog :title="title" :visible.sync="open" width="400px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-form-item label="生产日期" prop="productDate">
<el-date-picker clearable
v-model="form.productDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择生产日期">
</el-date-picker>
</el-form-item>
<el-form-item label="班长人数" prop="monitorQty">
<el-input v-model="form.monitorQty" placeholder="请输入班长人数"/>
</el-form-item>
<el-form-item label="组长人数" prop="groupleaderQty">
<el-input v-model="form.groupleaderQty" placeholder="请输入组长人数"/>
</el-form-item>
<el-form-item label="物料员人数" prop="materialQty">
<el-input v-model="form.materialQty" placeholder="请输入物料员人数"/>
</el-form-item>
<el-form-item label="药管员人数" prop="pillMgrQty">
<el-input v-model="form.pillMgrQty" placeholder="请输入药管员人数"/>
</el-form-item>
<el-form-item label="配药员人数" prop="pillDisQty">
<el-input v-model="form.pillDisQty" placeholder="请输入配药员人数"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listQty,getQty,delQty,addQty,updateQty } from "@/api/mes/report";
export default {
name: "Assistqty",
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
qtyList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
factoryCode: null,
productDate: null,
monitorQty: null,
groupleaderQty: null,
materialQty: null,
pillMgrQty: null,
pillDisQty: null,
attr1: null,
attr2: null,
attr3: null,
attr4: null,
},
//
form: {
}
,
//
rules: {
}
}
;
},
created() {
this.getList();
},
methods: {
/** 查询辅助工时摊分列表 */
getList() {
this.loading = true;
listQty(this.queryParams).then(response => {
this.qtyList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
factoryCode: null,
productDate: null,
monitorQty: null,
groupleaderQty: null,
materialQty: null,
pillMgrQty: null,
pillDisQty: null,
attr1: null,
attr2: null,
attr3: null,
attr4: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null
}
;
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length !== 1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加辅助工时摊分";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id =
row.id || this.ids
getQty(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改辅助工时摊分";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate((valid) => {
if (valid) {
if (this.form.id != null) {
updateQty(this.form).then((response) => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addQty(this.form).then((response) => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除"' + ids + '"的数据项?').then(function() {
return delQty(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
}
}
}
</script>

@ -0,0 +1,251 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
<el-form-item label="生产日期" prop="productDateStr" width="100px">
<el-date-picker
v-model="queryParams.productDateStr"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择生产日期">
</el-date-picker>
</el-form-item>
<el-form-item label="车间" prop="carCode">
<el-input
v-model="queryParams.carCode"
placeholder="请输入车间名称"
clearable
/>
</el-form-item>
<el-form-item label="SAP产线编码" prop="lineCode">
<el-input
v-model="queryParams.lineCode"
placeholder="请输入SAP产线编码"
clearable
/>
</el-form-item>
<el-form-item label="产品名称" prop="productName">
<el-input
v-model="queryParams.productName"
placeholder="请输入产品名称"
clearable
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<!--<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>-->
<el-button
type="primary"
plain
icon="el-icon-user-solid"
size="mini"
@click="handleAdd"
v-hasPermi="['mes:pro:assistTable:manmgr']"
>辅助人员管理</el-button>
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['mes:pro:assistTable:export']"
>导出</el-button>
</el-form-item>
</el-form>
<!--
<el-row :gutter="10" class="mb8">
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>-->
<el-table v-loading="loading" :data="assistHourList" height="500px">
<el-table-column type="index" width="50" align="center" :index="indexMethod" label="序号" fixed/>
<el-table-column label="日期" align="center" prop="productDate" width="100px" fixed>
<template slot-scope="scope">
<span>{{ parseTime(scope.row.productDate, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="工厂" align="center" prop="factoryCode" fixed/>
<el-table-column label="车间" align="center" prop="carCode" width="100px" fixed/>
<el-table-column label="SAP产线编码" align="center" prop="lineCode" fixed/>
<el-table-column label="产品名称" align="center" prop="productName" width="230px" fixed/>
<el-table-column label="产品工时" align="center" prop="productHour" fixed/>
<el-table-column label="工时占比" align="center" prop="hourRatio" fixed/>
<el-table-column label="辅助工时合计" align="center" prop="assistHourSum" />
<el-table-column label="班长" align="center">
<el-table-column label="用人" align="center" prop="monitorQty" />
<el-table-column label="工时" align="center" prop="monitorHour" />
</el-table-column>
<el-table-column label="组长" align="center">
<el-table-column label="用人" align="center" prop="groupleaderQty" />
<el-table-column label="工时" align="center" prop="groupLeaderHour" />
</el-table-column>
<el-table-column label="物料员" align="center">
<el-table-column label="用人" align="center" prop="materialQty" />
<el-table-column label="工时" align="center" prop="materialHour" />
</el-table-column>
<el-table-column label="药管员" align="center">
<el-table-column label="用人" align="center" prop="pillMgrQty" />
<el-table-column label="工时" align="center" prop="pillMgrHour" />
</el-table-column>
<el-table-column label="配药员" align="center">
<el-table-column label="用人" align="center" prop="pillDisQty" />
<el-table-column label="工时" align="center" prop="pillDisHour" />
</el-table-column>
</el-table>
<!--
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>-->
<!-- 辅助人员维护 -->
<el-dialog
title="辅助人员维护"
:visible.sync="openAssist"
width="1160px"
append-to-body
>
<Assistqty></Assistqty>
<div slot="footer" class="dialog-footer">
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listAssistHour} from "@/api/mes/report";
import Assistqty from "./assistqty.vue";
export default {
name: "ProAssistTable",
components: { Assistqty },
data() {
return {
//
loading: false,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
assistHourList: [],
//
title: "",
//
open: false,
//
queryParams: {
productDateStr:null,
pageNum: 1,
pageSize: 10,
fileName: null,
fileAddress: null,
sourceId: null,
attr1: null,
attr2: null,
attr3: null,
attr4: null,
},
//
form: {},
//
rules: {
},
openAssist: false,
};
},
created() {
this.getDate();
},
methods: {
/**获取默认查询时间段**/
getDate() {
let start = this.Fungetdate (0);
this.queryParams.productDateStr = start;
this.getList();
},
Fungetdate (num) {
var dd = new Date();
dd.setDate(dd.getDate() + num);
var y = dd.getFullYear();
var m = dd.getMonth() + 1;//
var d = dd.getDate();
return y + "-" + m + "-" + d;
},
//
indexMethod(index) {
return index + 1;
},
getList() {
this.loading = true;
listAssistHour(this.queryParams).then(response => {
this.assistHourList = response;
//this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.openAssist = false;
this.reset();
},
//
reset() {
this.form = {
fileId: null,
fileName: null,
fileAddress: null,
sourceId: null,
remark: null,
attr1: null,
attr2: null,
attr3: null,
attr4: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.fileId)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.openAssist = true;
},
/** 导出按钮操作 */
handleExport() {
this.download('mes/reportWorks/assistqty/listAssistHourExport', {
...this.queryParams
}, `assistTable_${new Date().getTime()}.xlsx`)
}
}
};
</script>

@ -0,0 +1,259 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
<el-form-item label="生产日期" prop="productDateStr">
<el-date-picker
v-model="queryParams.productDateStr"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择生产日期">
</el-date-picker>
</el-form-item>
<el-form-item label="车间" prop="carCode">
<el-input
v-model="queryParams.carCode"
placeholder="请输入车间名称"
clearable
/>
</el-form-item>
<el-form-item label="SAP产线编码" prop="lineCode">
<el-input
v-model="queryParams.lineCode"
placeholder="请输入SAP产线编码"
clearable
/>
</el-form-item>
<el-form-item label="产品名称" prop="productName">
<el-input
v-model="queryParams.productName"
placeholder="请输入产品名称"
clearable
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['mes:pro:baseFile:export']"
>导出</el-button>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="efficiencyList" height="500px">
<el-table-column type="index" width="50" align="center" :index="indexMethod" label="序号" fixed/>
<el-table-column label="生产日期" align="center" prop="productDate" width="100px" fixed>
<template slot-scope="scope">
<span>{{ parseTime(scope.row.productDate, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="工厂" align="center" prop="factoryCode" width="70px" fixed/>
<el-table-column label="车间" align="center" prop="carCode" width="100px" fixed :show-overflow-tooltip="true"/>
<el-table-column label="产线编码" align="center" prop="lineCode" fixed/>
<el-table-column label="品类" align="center" prop="category" fixed/>
<el-table-column label="产品名称" align="center" prop="productName" width="200px" fixed :show-overflow-tooltip="true"/>
<el-table-column label="规格" align="center" prop="spec" />
<el-table-column label="单位" align="center" prop="unit" />
<el-table-column label="计划产量(件/PC" align="center" prop="planQty" width="90px"/>
<el-table-column label="实际产量(件)" align="center" prop="actQty" />
<el-table-column label="实际产量PC" align="center" prop="actQtySon" width="90px"/>
<el-table-column label="产量达成率" align="center" prop="completeRate" />
<el-table-column label="一线" align="center">
<el-table-column label="标准工艺效率PC/H" align="center" prop="standEff" width="100px"/>
<el-table-column label="标准用人" align="center" prop="standMan" />
<el-table-column label="实际用人" align="center" prop="actMan" />
<el-table-column label="产品标准工时" align="center" prop="standHour" />
<el-table-column label="产品实际工时" align="center" prop="actHour" />
<el-table-column label="一线工时合计" align="center" prop="oneHourSum" />
<el-table-column label="一线标准效率" align="center" prop="oneStandEff" />
<el-table-column label="一线实际效率" align="center" prop="oneActEff" />
<el-table-column label="效率达成率" align="center" prop="effRate" />
</el-table-column>
<el-table-column label="辅助" align="center">
<el-table-column label="辅助用人数" align="center">
<el-table-column label="用人合计" align="center" prop="assisManSum" />
<el-table-column label="班长" align="center" prop="monitorQty" />
<el-table-column label="组长" align="center" prop="groupleaderQty" />
<!--<el-table-column label="机操工" align="center" prop="operateMachineQty" />-->
<el-table-column label="物料员" align="center" prop="materialQty" />
<el-table-column label="配料员" align="center" prop="materialDisQty" />
<el-table-column label="配药员" align="center" prop="pillDisQty" />
<<el-table-column label="药管员" align="center" prop="pillMgrQty" />
<!--<el-table-column label="锅炉工" align="center" prop="boilerQty" />
<el-table-column label="石油气看管员" align="center" prop="oilQty" width="100px"/>
<el-table-column label="库区管理员" align="center" prop="wareMgrQty" width="100px"/>
<el-table-column label="机修工" align="center" prop="repairQty" />
<el-table-column label="清洁工" align="center" prop="cleanerQty" />-->
</el-table-column>
<el-table-column label="辅助工时数" align="center">
<el-table-column label="工时合计" align="center" prop="assisHourSum" />
<el-table-column label="班长" align="center" prop="monitorHour" />
<el-table-column label="组长" align="center" prop="groupleaderHour" />
<!--<el-table-column label="机操工" align="center" prop="operateMachineHour" />-->
<el-table-column label="物料员" align="center" prop="materialHour" />
<el-table-column label="配料员" align="center" prop="materialDisHour" />
<el-table-column label="配药员" align="center" prop="pillDisHour" />
<el-table-column label="药管员" align="center" prop="pillMgrHour" />
<!--<el-table-column label="锅炉工" align="center" prop="boilerHour" />
<el-table-column label="石油气看管员" align="center" prop="oilHour" width="100px"/>
<el-table-column label="库区管理员" align="center" prop="wareMgrHour" width="100px"/>
<el-table-column label="机修工" align="center" prop="repairHour" />
<el-table-column label="清洁工" align="center" prop="cleanerHour" />-->
</el-table-column>
</el-table-column>
<el-table-column label="一线+辅助" align="center">
<el-table-column label="总工时" align="center" prop="hourSum" />
<el-table-column label="效率提升基数" align="center" prop="effUpBase" />
<el-table-column label="提升目标" align="center" prop="upGoal" />
<el-table-column label="目标效率" align="center" prop="goalRate" />
<el-table-column label="实际效率" align="center" prop="actRate" />
<el-table-column label="效率提升率" align="center" prop="effUpRate" />
</el-table-column>
<el-table-column label="原因分析" align="center" prop="reasonAnalysis" />
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
<script>
import { listEfficiencyDayList} from "@/api/mes/report";
export default {
name: "ProEfficiencyTable",
data() {
return {
//
loading: false,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
efficiencyList: [],
//
title: "",
//
open: false,
//
queryParams: {
productDateStr:null,
pageNum: 1,
pageSize: 10,
fileName: null,
fileAddress: null,
sourceId: null,
attr1: null,
attr2: null,
attr3: null,
attr4: null,
},
//
form: {},
//
rules: {
}
};
},
created() {
this.getDate();
},
methods: {
//
indexMethod(index) {
return index + 1;
},
/**获取默认查询时间段**/
getDate() {
let start = this.Fungetdate (0);
this.queryParams.productDateStr = start;
this.getList();
},
Fungetdate (num) {
var dd = new Date();
dd.setDate(dd.getDate() + num);
var y = dd.getFullYear();
var m = dd.getMonth() + 1;//
var d = dd.getDate();
return y + "-" + m + "-" + d;
},
getList() {
this.loading = true;
listEfficiencyDayList(this.queryParams).then(response => {
this.efficiencyList = response;
//this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
fileId: null,
fileName: null,
fileAddress: null,
sourceId: null,
remark: null,
attr1: null,
attr2: null,
attr3: null,
attr4: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.fileId)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加工艺附件管理";
},
/** 导出按钮操作 */
handleExport() {
this.download('mes/reportWorks/assistqty/listEfficiencyDayExport', {
...this.queryParams
}, `effTable_${new Date().getTime()}.xlsx`)
}
}
};
</script>

@ -392,6 +392,11 @@
</el-table-column>
<el-table-column label="工单编码" width="80" align="left" prop="workorderCode"
:show-overflow-tooltip="true"/>
<el-table-column label="批次检验" width="80" align="left" prop="checkResult">
<template slot-scope="scope">
<dict-tag :options="dict.type.check_result" :value="scope.row.checkResult"/>
</template>
</el-table-column>
<el-table-column label="报工单号" width="80" align="left" prop="reportCode"
:show-overflow-tooltip="true" />
<el-table-column label="创建时间" align="center" prop="createTime" width="150" />
@ -710,7 +715,7 @@ import moment from "moment";
import { getlistCK } from "@/api/wms/outorder";
export default {
name: "ReportWork",
dicts: ["report_type", "report_sap_status", 'workorder_type'],
dicts: ["report_type", "report_sap_status", 'workorder_type',"check_result"],
components: {
ReportWorkConsume,
ItemSelectUser,

@ -486,6 +486,7 @@
<el-form-item label="设备编码" prop="equipmentCode">
<el-input
v-model="form.equipmentCode"
:disabled = "!canEdit"
placeholder="请输入设备编码"
/>
</el-form-item>
@ -1326,6 +1327,7 @@ export default {
single: true,
//
multiple: true,
canEdit: true,
//
showSearch: true,
//
@ -1754,6 +1756,7 @@ export default {
this.queryAuxiliaryEquipmentParams.equipmentCode = null;
this.open = true;
this.title = "修改设备管理";
this.canEdit = false;
});
},

Loading…
Cancel
Save