|
|
|
@ -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-date-picker
|
|
|
|
|
v-model="queryParams.incomeTimeArray"
|
|
|
|
|
format="yyyy-MM-dd HH:mm:ss"
|
|
|
|
|
type="datetimerange"
|
|
|
|
|
range-separator="至"
|
|
|
|
|
start-placeholder="开始日期"
|
|
|
|
|
end-placeholder="结束日期">
|
|
|
|
|
<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.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>
|