fix:光芯返修日志完善;fmlogs中添加日志记录

This commit is contained in:
shijing 2025-05-29 09:51:04 +08:00
parent bb93ade074
commit 10a9ffba15
6 changed files with 139 additions and 72 deletions

View File

@ -259,7 +259,21 @@
</el-col>
</el-row>
<el-divider></el-divider>
<el-row>
<el-row v-if="is_fix">
<el-col style="padding-left: 10px;">不良记录</el-col>
<el-col :md="6" :sm="12" v-for="item in qct_defects" :key="item.id">
<el-form-item :label="item.defect_name">
<el-input-number
v-model="defectform[item.defect_name]"
:min="0"
class="width-100"
controls-position="right"
@change="countChange"
/>
</el-form-item>
</el-col>
</el-row>
<el-row v-else>
<el-col :span=12>
<el-col>加工前不良</el-col>
<el-row style="width: 98%;">
@ -381,6 +395,7 @@ export default {
codeBatch:'',
route_code:'',
mgroupName:'',
materialFix:'',
materialCount:1,//
material_in:'',
material_out:'',
@ -462,38 +477,55 @@ export default {
},
getdefects(){
let that = this;
// material_in
that.$API.qm.qct.getQct.req({material: that.material_in,tag:'process'}).then((res) => {
res.qct_defects.forEach((item) => {
that.defectinform[item.defect_name] = 0;
})
that.qct_indefects=res.qct_defects;
if(that.mlogindefect.length>0){
that.qct_indefects.forEach(item => {
that.mlogindefect.forEach(item2=>{
if(item.defect==item2.defect){
that.defectinform[item.defect_name] = item2.count;
}
})
if(that.is_fix){
that.$API.qm.qct.getQct.req({material: that.materialFix,tag:'process'}).then((res) => {
res.qct_defects.forEach((item) => {
that.defectform[item.defect_name] = 0;
})
}
})
//material_out
that.$API.qm.qct.getQct.req({material: that.material_out,tag:'process'}).then((res) => {
res.qct_defects.forEach((item) => {
that.defectform[item.defect_name] = 0;
})
that.qct_defects=res.qct_defects;
if(that.mlogdefect.length>0){
that.qct_defects.forEach(item => {
that.mlogdefect.forEach(item2=>{
if(item.defect==item2.defect){
that.defectform[item.defect_name] = item2.count;
}
that.qct_defects=res.qct_defects;
if(that.mlogdefect.length>0){
that.qct_defects.forEach(item => {
that.mlogdefect.forEach(item2=>{
if(item.defect==item2.defect){
that.defectform[item.defect_name] = item2.count;
}
})
})
}
})
}else{
that.$API.qm.qct.getQct.req({material: that.material_in,tag:'process'}).then((res) => {
res.qct_defects.forEach((item) => {
that.defectinform[item.defect_name] = 0;
})
}
})
that.qct_indefects=res.qct_defects;
if(that.mlogindefect.length>0){
that.qct_indefects.forEach(item => {
that.mlogindefect.forEach(item2=>{
if(item.defect==item2.defect){
that.defectinform[item.defect_name] = item2.count;
}
})
})
}
})
//material_out
that.$API.qm.qct.getQct.req({material: that.material_out,tag:'process'}).then((res) => {
res.qct_defects.forEach((item) => {
that.defectform[item.defect_name] = 0;
})
that.qct_defects=res.qct_defects;
if(that.mlogdefect.length>0){
that.qct_defects.forEach(item => {
that.mlogdefect.forEach(item2=>{
if(item.defect==item2.defect){
that.defectform[item.defect_name] = item2.count;
}
})
})
}
})
}
},
getEquipment() {
let that = this;
@ -509,17 +541,20 @@ export default {
},
getRoute() {
let that = this;
that.$API.mtm.route.item.req(that.route).then(res=>{
that.material_in = res.material_in;
that.material_out = that.form.material_out = res.material_out;
console.log('that.mlogId',that.mlogId)
if(that.mlogId){
that.getMlogObj();
}else{
that.getdefects();
}
if(!that.is_fix){//
that.$API.mtm.route.item.req(that.route).then(res=>{
that.material_in = res.material_in;
that.material_out = that.form.material_out = res.material_out;
if(that.mlogId){
that.getMlogObj();
}else{
that.getdefects();
}
});
});
}else{
// that.getdefects();
}
},
//
getUserList() {
@ -542,17 +577,20 @@ export default {
});
},
//
// 10: ""
// 20: ""
// 30: ""
getMaterial() {
let that = this;
let params = {};
params.mtaskx = that.mtask;
params.mgroup = that.mgroup;
params.tag = 'todo';
params.page = 0;
if(that.is_fix){
params.state = 30;
if(that.is_fix){//&&
params.tag = 'canfix';
}else{
params.state = 10;
params.tag = 'todo';
params.state = 10;//
params.material = that.material_in;
}
that.$API.wpm.wmaterial.list.req(params).then((res) => {
@ -577,9 +615,11 @@ export default {
that.defectform[item.defect_name] = 0;
that.defectinform[item.defect_name] = 0;
})
that.materialFix = item.material;
that.materialCount = that.form.count_use =
that.form.count_real = that.form.count_ok = item.count;
that.form.count_real = item.count-that.form.count_pn_jgqbl;
that.getdefects();
}
})
},

View File

@ -47,7 +47,6 @@
:data="tableData"
row-key="id"
hideDo
hidePagination
@row-click="table_detail"
>
<el-table-column type="index" width="50"></el-table-column>
@ -99,7 +98,7 @@
</scTable>
</el-card>
<!-- 工段物料库存 -->
<el-card style="width: 100%; margin: 1vh 0;" header="工段物料列表" shadow="never">
<!-- <el-card style="width: 100%; margin: 1vh 0;" header="工段物料列表" shadow="never">
<scTable
ref="tableWm"
:apiObj="apiObjWm"
@ -123,7 +122,7 @@
</template>
</el-table-column>
</scTable>
</el-card>
</el-card> -->
<save-dialog
v-if="dialog.save"
ref="saveDialogs"
@ -245,7 +244,7 @@ export default {
this.getfmlogItem();
this.params.fmlog = this.fmlogId;
this.paramsWm.mgroup = this.mgroup;
// this.apiObj = this.$API.wpm.mlog.list;
this.apiObj = this.$API.wpm.mlog.list;
},
methods: {
open(codeText="") {
@ -278,8 +277,8 @@ export default {
res.forEach((item) => {
that.batchContains+= item.batch + " ";
})
that.paramsWm.search = that.batchContains;
that.apiObjWm = that.$API.wpm.wmaterial.list;
// that.paramsWm.search = that.batchContains;
// that.apiObjWm = that.$API.wpm.wmaterial.list;
}else{}
});
},

View File

@ -28,6 +28,16 @@
:mgroupcode="mgroup_code"
style="height: 40%"
></mtask>
<!-- 日志记录 -->
<mlogs-list
v-else-if="values == '日志记录'&&componentsShow"
:mgroupId="mgroupId"
:deptId = "mgroupDept"
:mgroupName="mgroupName"
:processId="processId"
:mgroupcode="mgroup_code"
:processtype="processtype"
></mlogs-list>
<!-- 交接记录 -->
<handover
v-else-if="values == '交接记录'&&componentsShow"
@ -70,14 +80,16 @@ import mlogs from "./fmlogs.vue";
import mtask from "./mtask.vue";
import handover from "./handover.vue";
import record from "./inmrecord.vue";
import mlogsList from "./mlogs.vue";
export default {
name: "bx",
components: { inm, inmOut,mlogs, mtask, handover,record },
components: { inm, inmOut,mlogs, mtask, handover,record,mlogsList },
data() {
return {
mgroups:[],
tableHieght: 200,
options: ["日志", "交接记录", "来料未完成","出料已完成","出入库记录"],
options: ["日志", "日志记录","交接记录", "来料未完成","出料已完成","出入库记录"],
values: "日志",
mgroupName: "",
mgroupId: "",

View File

@ -310,7 +310,7 @@
</scTable>
</el-card>
<!-- 工段物料库存 -->
<el-card style="width: 100%" header="工段物料列表" shadow="never">
<!-- <el-card style="width: 100%" header="工段物料列表" shadow="never">
<scTable
ref="tableWm"
:apiObj="apiObjWm"
@ -332,7 +332,7 @@
</template>
</el-table-column>
</scTable>
</el-card>
</el-card> -->
<save-dialog
v-if="dialog.save"
ref="saveDialog"
@ -619,8 +619,8 @@ export default {
res.forEach((item) => {
that.batchContains+= item.batch + " ";
})
that.paramsWm.search = that.batchContains;
that.apiObjWm = that.$API.wpm.wmaterial.list;
// that.paramsWm.search = that.batchContains;
// that.apiObjWm = that.$API.wpm.wmaterial.list;
}
})
});

View File

@ -436,7 +436,24 @@ export default {
getdefects(){
let that = this;
if(that.mlogbItem.qct!==null){
that.$API.qm.qct.item.req(that.mlogbItem.qct).then((res) => {
that.$API.qm.qct.getQct.req(that.mlogbItem.qct).then((res) => {
res.qct_defects.forEach((item) => {
that.defectform[item.defect_name] = 0;
})
that.max_defect_rate =res.max_defect_rate?Number(res.max_defect_rate):null;
that.qct_defects=res.qct_defects;
if(that.mlogboutdefect.length>0){
that.qct_defects.forEach(item => {
that.mlogboutdefect.forEach(item2=>{
if(item.defect==item2.defect){
that.defectform[item.defect_name] = item2.count;
}
})
})
}
})
}else{
that.$API.qm.qct.getQct.req({material: that.material_out,tag:'process'}).then((res) => {
res.qct_defects.forEach((item) => {
that.defectform[item.defect_name] = 0;
})

View File

@ -32,12 +32,7 @@
:label="item.batch"
:value="item.id"
>
<div
style="
display: flex;
justify-content: space-between;
"
>
<div style="display: flex;justify-content: space-between;">
<div>
<span>{{ item.batch }}({{ item.material_name }})</span>
<span v-if="item.defect_name !== null" style="color: orangered">{{ item.defect_name }}</span>
@ -243,11 +238,9 @@ export default {
},
],
},
// cells:0,//
batch_count:null,
// count_cell:0,//
// cell_start:1,//
codeBatch:"",
materialFix:"",
options: [],
cellsList:[],
qct_defects:[],
@ -271,8 +264,9 @@ export default {
}else{
that.getMaterial();
}
this.getdefects();
// this.getMtask();
if(that.is_fix){}else{
this.getdefects();
}
},
methods: {
open(mode="add",data) {
@ -299,8 +293,10 @@ export default {
obj.mtaskx =that.form.mtask;
obj.mgroup = that.mgroup;
obj.page =0;
if(that.is_fix){
obj.state =30;
if(that.is_fix){//&&
params.tag = 'canfix';
// obj.state = 20;
// obj.state =30;
}else{
obj.material =that.materialIn;
obj.state =10;
@ -325,7 +321,8 @@ export default {
},
getdefects(){
let that = this;
that.$API.qm.qct.getQct.req({material: that.materialIn,tag:'process'}).then((res) => {
let material = that.is_fix?that.materialFix:that.materialIn;
that.$API.qm.qct.getQct.req({material: material,tag:'process'}).then((res) => {
res.qct_defects.forEach((item) => {
that.defectform[item.defect_name] = 0;
})
@ -350,6 +347,8 @@ export default {
that.form.batch = item.batch;
that.form.count_use = item.count;
that.batch_count = item.count;
that.materialFix = item.material;
that.getdefects();
}
});
},