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-col>
</el-row> </el-row>
<el-divider></el-divider> <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 :span=12>
<el-col>加工前不良</el-col> <el-col>加工前不良</el-col>
<el-row style="width: 98%;"> <el-row style="width: 98%;">
@ -381,6 +395,7 @@ export default {
codeBatch:'', codeBatch:'',
route_code:'', route_code:'',
mgroupName:'', mgroupName:'',
materialFix:'',
materialCount:1,// materialCount:1,//
material_in:'', material_in:'',
material_out:'', material_out:'',
@ -462,7 +477,23 @@ export default {
}, },
getdefects(){ getdefects(){
let that = this; let that = this;
// material_in 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;
})
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) => { that.$API.qm.qct.getQct.req({material: that.material_in,tag:'process'}).then((res) => {
res.qct_defects.forEach((item) => { res.qct_defects.forEach((item) => {
that.defectinform[item.defect_name] = 0; that.defectinform[item.defect_name] = 0;
@ -494,6 +525,7 @@ export default {
}) })
} }
}) })
}
}, },
getEquipment() { getEquipment() {
let that = this; let that = this;
@ -509,10 +541,10 @@ export default {
}, },
getRoute() { getRoute() {
let that = this; let that = this;
if(!that.is_fix){//
that.$API.mtm.route.item.req(that.route).then(res=>{ that.$API.mtm.route.item.req(that.route).then(res=>{
that.material_in = res.material_in; that.material_in = res.material_in;
that.material_out = that.form.material_out = res.material_out; that.material_out = that.form.material_out = res.material_out;
console.log('that.mlogId',that.mlogId)
if(that.mlogId){ if(that.mlogId){
that.getMlogObj(); that.getMlogObj();
}else{ }else{
@ -520,6 +552,9 @@ export default {
} }
}); });
}else{
// that.getdefects();
}
}, },
// //
getUserList() { getUserList() {
@ -542,17 +577,20 @@ export default {
}); });
}, },
// //
// 10: ""
// 20: ""
// 30: ""
getMaterial() { getMaterial() {
let that = this; let that = this;
let params = {}; let params = {};
params.mtaskx = that.mtask; params.mtaskx = that.mtask;
params.mgroup = that.mgroup; params.mgroup = that.mgroup;
params.tag = 'todo';
params.page = 0; params.page = 0;
if(that.is_fix){ if(that.is_fix){//&&
params.state = 30; params.tag = 'canfix';
}else{ }else{
params.state = 10; params.tag = 'todo';
params.state = 10;//
params.material = that.material_in; params.material = that.material_in;
} }
that.$API.wpm.wmaterial.list.req(params).then((res) => { that.$API.wpm.wmaterial.list.req(params).then((res) => {
@ -577,9 +615,11 @@ export default {
that.defectform[item.defect_name] = 0; that.defectform[item.defect_name] = 0;
that.defectinform[item.defect_name] = 0; that.defectinform[item.defect_name] = 0;
}) })
that.materialFix = item.material;
that.materialCount = that.form.count_use = that.materialCount = that.form.count_use =
that.form.count_real = that.form.count_ok = item.count; that.form.count_real = that.form.count_ok = item.count;
that.form.count_real = item.count-that.form.count_pn_jgqbl; that.form.count_real = item.count-that.form.count_pn_jgqbl;
that.getdefects();
} }
}) })
}, },

View File

@ -47,7 +47,6 @@
:data="tableData" :data="tableData"
row-key="id" row-key="id"
hideDo hideDo
hidePagination
@row-click="table_detail" @row-click="table_detail"
> >
<el-table-column type="index" width="50"></el-table-column> <el-table-column type="index" width="50"></el-table-column>
@ -99,7 +98,7 @@
</scTable> </scTable>
</el-card> </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 <scTable
ref="tableWm" ref="tableWm"
:apiObj="apiObjWm" :apiObj="apiObjWm"
@ -123,7 +122,7 @@
</template> </template>
</el-table-column> </el-table-column>
</scTable> </scTable>
</el-card> </el-card> -->
<save-dialog <save-dialog
v-if="dialog.save" v-if="dialog.save"
ref="saveDialogs" ref="saveDialogs"
@ -245,7 +244,7 @@ export default {
this.getfmlogItem(); this.getfmlogItem();
this.params.fmlog = this.fmlogId; this.params.fmlog = this.fmlogId;
this.paramsWm.mgroup = this.mgroup; this.paramsWm.mgroup = this.mgroup;
// this.apiObj = this.$API.wpm.mlog.list; this.apiObj = this.$API.wpm.mlog.list;
}, },
methods: { methods: {
open(codeText="") { open(codeText="") {
@ -278,8 +277,8 @@ export default {
res.forEach((item) => { res.forEach((item) => {
that.batchContains+= item.batch + " "; that.batchContains+= item.batch + " ";
}) })
that.paramsWm.search = that.batchContains; // that.paramsWm.search = that.batchContains;
that.apiObjWm = that.$API.wpm.wmaterial.list; // that.apiObjWm = that.$API.wpm.wmaterial.list;
}else{} }else{}
}); });
}, },

View File

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

View File

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

View File

@ -436,7 +436,24 @@ export default {
getdefects(){ getdefects(){
let that = this; let that = this;
if(that.mlogbItem.qct!==null){ 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) => { res.qct_defects.forEach((item) => {
that.defectform[item.defect_name] = 0; that.defectform[item.defect_name] = 0;
}) })

View File

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