Merge remote-tracking branch 'origin/master'

master
wws 1 year ago
commit fdd4824d69

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

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

@ -1,26 +1,38 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> <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="incomeTimeArray"> <el-form-item label="来料月份" prop="incomeTimeYM">
<el-date-picker <el-date-picker
v-model="queryParams.incomeTimeArray" v-model="queryParams.incomeTimeYM"
format="yyyy-MM-dd HH:mm:ss" type="month"
type="datetimerange" placeholder="选择月">
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="供应商" prop="incomeTimeArray1"> <el-form-item label="供应商" prop="supplierCodeArray">
<!-- <div class="tagbox">
<el-select v-model="form.mtart" placeholder="请选择物料类别" style="width:320px"> <div class="tag" style="" placeholder="请选择辅助设备">
<el-option <el-tag
v-for="dict in dict.type.material_type" :key="index"
:key="dict.value" class="tagitem"
:label="dict.label" v-for="(tag, index) in selectMaterielListtag"
:value="dict.value" closable
></el-option> :disable-transitions="false"
</el-select>--> @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-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button> <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> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
<el-table v-loading="loading" :data="rfidProcessList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="incomeList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" /> <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 type="index" align="center" :index="indexMethod" label="序号" fixed/> <el-table-column label="总批数" align="center" prop="batchs" width="90"/>
<el-table-column label="工单编号" align="center" prop="workorderCode" width="200" fixed/> <el-table-column label="合格批次" align="center" prop="okBatchs" width="100"/>
<el-table-column label="订单编号" align="center" prop="orderCode" width="200"/> <el-table-column label="不合格批次" align="center" prop="noOkBatchs" width="100"/>
<el-table-column label="产品编码" align="center" prop="productCode" width="200"/> <el-table-column label="批次不良率" align="center" prop="noOkBatchRate" width="100"/>
<el-table-column label="产品名称" align="center" prop="productName" width="200"/> <el-table-column label="总数量" align="center" prop="nums" width="90"/>
<el-table-column label="生产时间" align="center" prop="productDate" width="200"/> <el-table-column label="合格数量" align="center" prop="okNums" width="100"/>
<el-table-column label="班次" align="center" prop="shiftId" > <el-table-column label="不合格数量" align="center" prop="noOkNums" width="100"/>
<template slot-scope="scope"> <el-table-column label="数量不良率" align="center" prop="noOkNumRate" width="100"/>
<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> </el-table>
<pagination <pagination
@ -92,15 +74,20 @@
:limit.sync="queryParams.pageSize" :limit.sync="queryParams.pageSize"
@pagination="getList" @pagination="getList"
/> />
<!--供应商选择弹窗-->
<ItemSelectSupplier
ref="itemSelectSupplier"
@onSelected="onSelectSupplier"
></ItemSelectSupplier>
</div> </div>
</template> </template>
<script> <script>
import { getIncomeTableList,getTest} from "@/api/quality/qcTable"; import { getIncomeTableList} from "@/api/quality/qcTable";
import ItemSelectSupplier from "./selectSupplier.vue";
export default { export default {
name: "RfidProcess", name: "RfidProcess",
components: {ItemSelectSupplier},
data() { data() {
return { return {
// //
@ -116,13 +103,16 @@ export default {
// //
total: 0, total: 0,
// rfid // rfid
rfidProcessList: [], incomeList: [],
// //
title: "", title: "",
// //
open: false, open: false,
// -listtag
selectMaterielListtag:[],
// //
queryParams: { queryParams: {
incomeTimeYM:null,
incomeTimeArray: [], incomeTimeArray: [],
checkTimeArray: [], checkTimeArray: [],
pageNum: 1, pageNum: 1,
@ -139,8 +129,8 @@ export default {
status: null, status: null,
shiftId: null, shiftId: null,
productCode: null, productCode: null,
productName: null, supplierName: '',
productDate: null supplierCode: ''
}, },
// //
form: {}, form: {},
@ -160,12 +150,11 @@ export default {
this.getList(); this.getList();
}, },
methods: { methods: {
/**获取默认查询时间段**/ /**获取默认查询时间段**/
getDate() { getDate() {
let start = this.Fungetdate (0) let start = this.Fungetdate (0)
let end = this.Fungetdate (1) this.queryParams.incomeTimeYM=start
this.queryParams.incomeTimeArray.push(start,end)
//this.queryParams.checkTimeArray.push(start,end)
}, },
Fungetdate (num) { Fungetdate (num) {
var dd = new Date(); var dd = new Date();
@ -173,13 +162,13 @@ export default {
var y = dd.getFullYear(); var y = dd.getFullYear();
var m = dd.getMonth() + 1;// var m = dd.getMonth() + 1;//
var d = dd.getDate(); var d = dd.getDate();
return y + "-" + m + "-" + d+" 00:00:00"; return y + "-" + m;
}, },
/** 查询生产rfid流程列表 */ /** 查询列表 */
getList() { getList() {
this.loading = true; this.loading = true;
getIncomeTableList(this.queryParams).then(response => { getIncomeTableList(this.queryParams).then(response => {
this.rfidProcessList = response.rows; this.incomeList = response.rows;
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
}); });
@ -283,7 +272,86 @@ export default {
this.download('mes/rfidProcess/export', { this.download('mes/rfidProcess/export', {
...this.queryParams ...this.queryParams
}, `rfidProcess_${new Date().getTime()}.xlsx`) }, `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> </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>

@ -0,0 +1,142 @@
<template>
<el-dialog title="供应商选择"
v-if="showFlag"
:visible.sync="showFlag"
:modal= false
width="1000px"
>
<el-row :gutter="20">
<!--BOM数据-->
<el-col :span="24" :xs="24">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="105px" align="center">
<el-form-item label="供应商编码" prop="itemCode">
<el-input
v-model="queryParams.supplierCode"
placeholder="供应商编码"
clearable
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="供应商名称" prop="itemName">
<el-input
v-model="queryParams.supplierName"
placeholder="供应商名称"
clearable
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</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-table v-loading="loading" :data="itemList" @selection-change="handleBomSelectionChange" ref="myTable" >
<el-table-column width="50" align="center" type="selection">
</el-table-column>
<!-- 序号 -->
<el-table-column type="index" width="90" align="center" :index="indexMethod" label="序号"></el-table-column>
<el-table-column label="供应商编码" align="left" key="supplierCode" prop="supplierCode" :show-overflow-tooltip="true" />
<el-table-column label="供应商名称" align="left" key="supplierName" prop="supplierName" :show-overflow-tooltip="true" />
<el-table-column label="地址" align="left" key="address" prop="address" :show-overflow-tooltip="true" />
<el-table-column label="联系方式" align="left" key="contactPhone" prop="contactPhone" :show-overflow-tooltip="true" />
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</el-col>
</el-row>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitBomForm"> </el-button>
<el-button @click="showFlag=false"> </el-button>
</div>
</el-dialog>
</template>
<script>
import { getQcListSupplier } from "@/api/quality/income";
export default {
name: "itemSelectSupplier",
data() {
return {
showFlag:false,
//
selectedRows: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
// BOM
itemList: null,
//
itemTypeOptions: undefined,
//
supplierCode: undefined,
defaultProps: {
id: "id",
label: "label"
},
//
queryParams: {
pageNum: 1,
pageSize: 10,
supplierCode: '',
supplierName : ''
}
};
},
created() {
this.getList();
},
methods: {
/** 查询表格列表*/
getList() {
this.loading = true;
getQcListSupplier(this.queryParams).then(response => {
this.itemList = response.rows;
this.total = response.total;
this.loading = false;
}
);
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
//
handleBomSelectionChange(selection) {
this.selectedRows = selection
},
submitBomForm() {
this.$emit('onSelected', this.selectedRows);
this.showFlag = false;
this.queryParams.itemCodeGet = "";
}
}
};
</script>
Loading…
Cancel
Save