质量报表

yangwl
zhaoxiaolin 12 months ago
parent a8822645ee
commit 43df1b84d5

@ -87,7 +87,7 @@
<el-table-column label="物料名称" align="center" prop="materialName" width="150"/>
<el-table-column label="收货数量" align="center" prop="quality" />
<el-table-column label="单位" align="center" prop="unit" />
<el-table-column label="供应商名称" align="center" prop="supplierName" width="240"/>
<el-table-column label="产线名称" align="center" prop="supplierName" width="240"/>
<el-table-column label="检验时间" align="center" prop="checkTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.checkTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
@ -166,13 +166,13 @@
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="供应商编码" prop="supplierCode">
<el-input v-model="form.supplierCode" placeholder="请输入供应商编码" disabled/>
<el-form-item label="产线编码" prop="supplierCode">
<el-input v-model="form.supplierCode" placeholder="请输入产线编码" disabled/>
</el-form-item>
</el-col>
<el-col :span="16">
<el-form-item label="供应商名称" prop="supplierName">
<el-input v-model="form.supplierName" placeholder="请选择供应商名称" disabled/>
<el-form-item label="产线名称" prop="supplierName">
<el-input v-model="form.supplierName" placeholder="请选择产线名称" disabled/>
</el-form-item>
</el-col>
</el-row>

@ -87,7 +87,7 @@
<el-table-column label="物料名称" align="center" prop="materialName" width="150"/>
<el-table-column label="收货数量" align="center" prop="quality" />
<el-table-column label="单位" align="center" prop="unit" />
<el-table-column label="供应商名称" align="center" prop="supplierName" width="240"/>
<el-table-column label="仓库名称" align="center" prop="supplierName" width="240"/>
<el-table-column label="检验时间" align="center" prop="checkTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.checkTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
@ -166,13 +166,13 @@
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="供应商编码" prop="supplierCode">
<el-input v-model="form.supplierCode" placeholder="请输入供应商编码" disabled/>
<el-form-item label="仓库编码" prop="supplierCode">
<el-input v-model="form.supplierCode" placeholder="请输入仓库编码" disabled/>
</el-form-item>
</el-col>
<el-col :span="16">
<el-form-item label="供应商名称" prop="supplierName">
<el-input v-model="form.supplierName" placeholder="请选择供应商名称" disabled/>
<el-form-item label="仓库名称" prop="supplierName">
<el-input v-model="form.supplierName" placeholder="请选择仓库名称" disabled/>
</el-form-item>
</el-col>
</el-row>
@ -353,7 +353,7 @@ export default {
getDate() {
let start = this.Fungetdate (0)
let end = this.Fungetdate (1)
this.queryParams.incomeTimeArray.push(start,end)
//this.queryParams.incomeTimeArray.push(start,end)
this.queryParams.checkTimeArray.push(start,end)
},
Fungetdate (num) {

@ -1,26 +1,38 @@
<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="incomeTimeArray">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px" style="margin-bottom: -34px;">
<el-form-item label="来料月份" prop="incomeTimeYM">
<el-date-picker
v-model="queryParams.incomeTimeArray"
format="yyyy-MM-dd HH:mm:ss"
type="datetimerange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期">
v-model="queryParams.incomeTimeYM"
type="month"
placeholder="选择月">
</el-date-picker>
</el-form-item>
<el-form-item label="供应商" prop="incomeTimeArray1">
<!--
<el-select v-model="form.mtart" placeholder="请选择物料类别" style="width:320px">
<el-option
v-for="dict in dict.type.material_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>-->
<el-form-item label="供应商" prop="supplierCodeArray">
<div class="tagbox">
<div class="tag" style="" placeholder="请选择辅助设备">
<el-tag
:key="index"
class="tagitem"
v-for="(tag, index) in selectMaterielListtag"
closable
:disable-transitions="false"
@close="handleClose(tag)"
>
{{ tag.supplierName }}
</el-tag>
</div>
<el-button
slot="append"
class="button1"
@click="handleSelectSupplier"
icon="el-icon-search"
></el-button>
<el-row style="display: none;">
<el-input type="input" clearable v-model="queryParams.supplierCode" placeholder="点击选择物料"/>
<el-input type="input"clearable v-model="queryParams.supplierName" placeholder="点击选择物料"/>
</el-row>
</div>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
@ -42,47 +54,17 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="rfidProcessList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<!-- 序号 -->
<el-table-column type="index" align="center" :index="indexMethod" label="序号" fixed/>
<el-table-column label="工单编号" align="center" prop="workorderCode" width="200" fixed/>
<el-table-column label="订单编号" align="center" prop="orderCode" width="200"/>
<el-table-column label="产品编码" align="center" prop="productCode" width="200"/>
<el-table-column label="产品名称" align="center" prop="productName" width="200"/>
<el-table-column label="生产时间" align="center" prop="productDate" width="200"/>
<el-table-column label="班次" align="center" prop="shiftId" >
<template slot-scope="scope">
<span v-if="scope.row.shiftId == 5"></span>
<span v-else></span>
</template>
</el-table-column>
<el-table-column label="rfid号" align="center" prop="rfid" width="180"/>
<el-table-column label="工厂编码" align="center" prop="factoryCode" />
<el-table-column label="机台编码" align="center" prop="machineCode" />
<el-table-column label="当前步工序编码" align="center" prop="nowProcessCode" width="150"/>
<el-table-column label="当前步工序名称" align="center" prop="nowProcessName" width="150"/>
<el-table-column label="下一步工序编码" align="center" prop="nextProcessCode" width="150"/>
<el-table-column label="下一步工序名称" align="center" prop="nextProcessName" width="150"/>
<el-table-column label="工序步骤" align="center" prop="orderNum" />
<el-table-column label="入时间" align="center" prop="inTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.inTime, '{y}-{m}-{d}') }}</span>
{{ parseTime(scope.row.inTime, '{h}:{m}:{s}') }}
</template>
</el-table-column>
<el-table-column label="出时间" align="center" prop="outTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.outTime, '{y}-{m}-{d}') }}</span>
<span>{{ parseTime(scope.row.outTime, '{h}:{m}:{s}') }}</span>
</template>
</el-table-column>
<el-table-column label="状态" align="center" prop="status">
<template slot-scope="scope">
{{ scope.row.status == "0" ? "待办" : "完成" }}
</template>
</el-table-column>
<el-table-column label="备注" align="center" prop="remark" />
<el-table v-loading="loading" :data="incomeList" @selection-change="handleSelectionChange">
<el-table-column label="供应商编号" align="center" prop="supplierCode" width="120" fixed/>
<el-table-column label="供应商名称" align="left" prop="supplierName" width="390" fixed/>
<el-table-column label="总批数" align="center" prop="batchs" width="90"/>
<el-table-column label="合格批次" align="center" prop="okBatchs" width="100"/>
<el-table-column label="不合格批次" align="center" prop="noOkBatchs" width="100"/>
<el-table-column label="批次不良率" align="center" prop="noOkBatchRate" width="100"/>
<el-table-column label="总数量" align="center" prop="nums" width="90"/>
<el-table-column label="合格数量" align="center" prop="okNums" width="100"/>
<el-table-column label="不合格数量" align="center" prop="noOkNums" width="100"/>
<el-table-column label="数量不良率" align="center" prop="noOkNumRate" width="100"/>
</el-table>
<pagination
@ -92,15 +74,20 @@
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!--供应商选择弹窗-->
<ItemSelectSupplier
ref="itemSelectSupplier"
@onSelected="onSelectSupplier"
></ItemSelectSupplier>
</div>
</template>
<script>
import { getIncomeTableList,getTest} from "@/api/quality/qcTable";
import { getIncomeTableList} from "@/api/quality/qcTable";
import ItemSelectSupplier from "./selectSupplier.vue";
export default {
name: "RfidProcess",
components: {ItemSelectSupplier},
data() {
return {
//
@ -116,13 +103,16 @@ export default {
//
total: 0,
// rfid
rfidProcessList: [],
incomeList: [],
//
title: "",
//
open: false,
// -listtag
selectMaterielListtag:[],
//
queryParams: {
incomeTimeYM:null,
incomeTimeArray: [],
checkTimeArray: [],
pageNum: 1,
@ -139,8 +129,8 @@ export default {
status: null,
shiftId: null,
productCode: null,
productName: null,
productDate: null
supplierName: '',
supplierCode: ''
},
//
form: {},
@ -160,12 +150,11 @@ export default {
this.getList();
},
methods: {
/**获取默认查询时间段**/
getDate() {
let start = this.Fungetdate (0)
let end = this.Fungetdate (1)
this.queryParams.incomeTimeArray.push(start,end)
//this.queryParams.checkTimeArray.push(start,end)
this.queryParams.incomeTimeYM=start
},
Fungetdate (num) {
var dd = new Date();
@ -173,13 +162,13 @@ export default {
var y = dd.getFullYear();
var m = dd.getMonth() + 1;//
var d = dd.getDate();
return y + "-" + m + "-" + d+" 00:00:00";
return y + "-" + m;
},
/** 查询生产rfid流程列表 */
/** 查询列表 */
getList() {
this.loading = true;
getIncomeTableList(this.queryParams).then(response => {
this.rfidProcessList = response.rows;
this.incomeList = response.rows;
this.total = response.total;
this.loading = false;
});
@ -283,7 +272,86 @@ export default {
this.download('mes/rfidProcess/export', {
...this.queryParams
}, `rfidProcess_${new Date().getTime()}.xlsx`)
},
/**供应商选择弹出框**/
handleSelectSupplier() {
this.$refs.itemSelectSupplier.showFlag = true;
},
//
onSelectSupplier(objs) {
var code = '';
var desc = '';
for (let i = 0; i < objs.length; i++) {
if(this.queryParams.supplierCode.indexOf(objs[i].supplierCode)<0){
code = code + objs[i].supplierCode + ',';
this.selectMaterielListtag.push(objs[i])
}else{
this.$message({
message: objs[i].supplierName+'已经选择',
type: 'warning'
})
}
if(this.queryParams.supplierName.indexOf(objs[i].supplierName)<0){
desc = desc + objs[i].supplierName + ',';
}
}
this.queryParams.supplierCode += code;
this.queryParams.supplierName += desc;
},
//
handleClose(tag) {
this.selectMaterielListtag.splice(this.selectMaterielListtag.indexOf(tag.supplierName), 1);
this.form.supplierCode =''
this.form.supplierName =''
var code = "";
var desc = "";
for (let i = 0; i < this.selectMaterielListtag.length; i++) {
code = code + this.selectMaterielListtag[i].supplierCode + ",";
desc = desc + this.selectMaterielListtag[i].supplierName + ",";
}
this.form.supplierCode += code;
this.form.supplierName += desc;
}
}
};
</script>
<style lang="scss" scoped>
.tagbox {
display: flex;
/* overflow: scroll; */
position: relative;
width: 80%;
padding-left: 26px;
margin-bottom: 15px;
.tagboxlabel{
width: 100px;
text-align: right;
vertical-align: middle;
font-size: 14px;
color: black;
line-height: 40px;
-webkit-box-sizing: border-box;
box-sizing: border-box;
margin-right: 12px;
}
.tag {
width: 720px;
border: 1px #DCDFE6 solid;
height: 60px;
padding: 5px 15px;
overflow-y: scroll;
.tagitem{
margin-left: 5px;
}
}
.button1{
width: 37px;
height: 37px;
position: absolute;
right: -39px;
top: 2px;
}
}
</style>
Loading…
Cancel
Save