fix:标签中的切片数量展示

This commit is contained in:
shijing 2025-09-19 11:27:21 +08:00
parent d353df9c1d
commit 6b05f21ce6
3 changed files with 56 additions and 35 deletions

View File

@ -17,35 +17,17 @@
</el-descriptions-item>
</el-descriptions>
<el-descriptions>
<el-descriptions-item label="工段名称">{{
mlogItem.mgroup_name
}}</el-descriptions-item>
<el-descriptions-item label="生产设备" v-if="mlogItem.equipment_name!==null">{{
mlogItem.equipment_name
}}</el-descriptions-item>
<el-descriptions-item label="部门/车间">{{
mlogItem.belong_dept_name
}}</el-descriptions-item>
<el-descriptions-item label="处理人">{{
mlogItem.handle_user_name
}}</el-descriptions-item>
<el-descriptions-item label="工段名称">{{mlogItem.mgroup_name}}</el-descriptions-item>
<el-descriptions-item label="生产设备" v-if="mlogItem.equipment_name!==null">{{mlogItem.equipment_name}}</el-descriptions-item>
<el-descriptions-item label="部门/车间">{{mlogItem.belong_dept_name}}</el-descriptions-item>
<el-descriptions-item label="处理人">{{mlogItem.handle_user_name}}</el-descriptions-item>
<template v-for="item in oinfo_json" :key="item">
<el-descriptions-item :label="item.key" >
{{item.value}}
</el-descriptions-item>
<el-descriptions-item :label="item.key" >{{item.value}}</el-descriptions-item>
</template>
<el-descriptions-item label="创建时间">{{
mlogItem.create_time
}}</el-descriptions-item>
<el-descriptions-item label="操作日期">{{
mlogItem.handle_date
}}</el-descriptions-item>
<el-descriptions-item label="开始时间">{{
mlogItem.work_start_time
}}</el-descriptions-item>
<el-descriptions-item label="结束时间">{{
mlogItem.work_end_time
}}</el-descriptions-item>
<el-descriptions-item label="创建时间">{{mlogItem.create_time}}</el-descriptions-item>
<el-descriptions-item label="操作日期">{{mlogItem.handle_date}}</el-descriptions-item>
<el-descriptions-item label="开始时间">{{mlogItem.work_start_time}}</el-descriptions-item>
<el-descriptions-item label="结束时间">{{mlogItem.work_end_time}}</el-descriptions-item>
<el-descriptions-item label="指导文件" v-if="route_file!==null">
<el-button @click="showFile">查看</el-button>
</el-descriptions-item>
@ -367,7 +349,7 @@
:wm = "wm"
:dept="deptId"
:mgroup="mgroup"
:material_in="mlogItem.material_in"
:cutCount="cutCount"
:material_out="mlogItem.material_out"
:mgroupName= "mlogItem.mgroup_name"
:isSubmit="isSubmit"
@ -566,6 +548,7 @@ export default {
},
qct:null,
defectlist:[],
cutCount:0,
batchNumber:'',
hasRoute:false,
isSubmit:false,
@ -593,13 +576,9 @@ export default {
let that = this;
that.$API.wpm.mlog.item.req(that.mlogId).then((res) => {
that.mlogItem = res;
that.checkTableShow = true;
that.isSubmit = res.submit_time==null?false:true;
if(that.processType=='10'&&that.mlogItem.material_out_&&that.mlogItem.material_out_.tracking==20){
that.getMlogbw();
// if(that.mlogItem.qct!==null){
// that.getdefects(that.mlogItem.qct);
// }
}
if(res.route!==null){
that.hasRoute = true;
@ -608,7 +587,12 @@ export default {
if(res.oinfo_json_&&res.oinfo_json_!==null){
for(let key in res.oinfo_json_){
let obj = {};
obj.key = key;
if(key=='cutCount'){
that.cutCount = res.oinfo_json_[key];
obj.key = '切分数量';
}else{
obj.key = key;
}
obj.value = res.oinfo_json_[key];
that.oinfo_json.push(obj);
}
@ -621,6 +605,7 @@ export default {
}
that.materialIn = res.material_in;
that.deptId = res.belong_dept;
that.checkTableShow = true;
that.apiObjWm = that.$API.wpm.wmaterial.list;
that.$API.wpm.mlogb.list.req(that.paramsOut).then((res) => {
that.tableData2 = res;

View File

@ -48,6 +48,7 @@
clearable
filterable
style="width: 100%"
@change="routeChange"
>
<el-option
v-for="item in routeOptions"
@ -80,6 +81,17 @@
</el-select>
</el-form-item>
</el-col>
<el-col :md="12" :sm="12" :xs="24" v-if="route_code=='tuomoceliang'">
<el-form-item label="切分数量">
<el-input-number
v-model="form.cutCount"
:min="1"
class="width-100"
controls-position="right"
>
</el-input-number>
</el-form-item>
</el-col>
<el-col :md="12" :sm="12" :xs="24" v-for="item in testitems" :key="item.id">
<el-form-item :label="item.name">
<el-input-number
@ -422,6 +434,14 @@ export default {
}
this.getRoute(data.id);
},
routeChange(){
let that = this;
that.routeOptions.forEach((item) => {
if(item.id == that.form.route&&that.route_code=='tuomoceliang'){
that.form.cutCount = item.div_number;
}
})
},
changeMtask(){
let that = this;
that.mtaskOptions.forEach((item) => {
@ -446,6 +466,9 @@ export default {
that.testitems.forEach((item) => {
oinfo_json[item.id] = item.value;
})
if(that.route_code=="tuomoceliang"){
oinfo_json.cutCount = that.form.cutCount;
}
that.form.oinfo_json = oinfo_json;
if (that.mode === "add") {
that.$API.wpm.mlog.init.req(that.form).then((res) => {

View File

@ -359,6 +359,10 @@ export default {
processType:{
type:String,
default:"",
},
cutCount:{
type:Number,
default:0,
}
},
emits: ["success", "closed"],
@ -433,7 +437,7 @@ export default {
watch: {},
mounted() {
let that = this;
console.log('that.material_out',that.material_out)
console.log('that.cutCount',that.cutCount)
if(that.processType=='20'){
that.canMultiple = true;
}
@ -510,6 +514,7 @@ export default {
},
testdefectss(res){
let that = this;
console.log('res',res)
res.qct_defects.forEach((item) => {
that.addTemplate[item.defect_name] = false;
let obj = Object.assign({}, item);
@ -527,6 +532,9 @@ export default {
obj2.addto_wpr = item2.addto_wpr;
if(item2.testitem_field_type=='input-number'||item2.testitem_field_type=='input-int'){
obj2.value = null;
if(item2.testitem_name == '切片数'){
obj2.value = Number(that.cutCount);
}
that.addTemplate[item2.testitem_name] = null;
}
if(item2.testitem_field_type=='select-text'||item2.testitem_field_type=='selects-text'){
@ -535,6 +543,7 @@ export default {
obj2.testitem_choices = arr;
that.addTemplate[item2.testitem_name] = null;
}
console.log('obj2',obj2)
that.qct_testitems.push(obj2);
}
})
@ -587,7 +596,11 @@ export default {
obj[item1.defect_name] = false;
})
that.qct_testitems.forEach((item2) => {
obj[item2.testitem_name] = null;
if(item2.testitem_name == '切片数'){
obj[item2.testitem_name] = Number(that.cutCount);
}else{
obj[item2.testitem_name] = null;
}
})
}
}