feat:板段查询页面添加最新日志和最近交接

This commit is contained in:
shijing 2026-02-05 10:13:45 +08:00
parent 0faf237e43
commit 0617dce254
1 changed files with 39 additions and 18 deletions

View File

@ -30,30 +30,39 @@
</el-side> </el-side>
<el-main id="elMain"> <el-main id="elMain">
<el-container> <el-container>
<el-header style="height: 150px;"> <el-header style="height: 180px;display: inline-block;">
<el-descriptions :column="3"> <el-descriptions :column="3" class="descriptionspadding8" style="border-bottom: 1px solid #ddd;margin-bottom: 5px;">
<el-descriptions-item label="物料名称" width="30vw"> <el-descriptions-item label="物料名称" style="padding-bottom:5px;" width="30vw">
<span v-if="wprItem.material_name">{{wprItem.material_name}}</span> <span v-if="wprItem.material_name">{{wprItem.material_name}}</span>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="物料编号" width="30vw"> <el-descriptions-item label="物料编号" style="padding-bottom:5px;" width="30vw">
<span v-if="wprItem.number">{{wprItem.number}}</span> <span v-if="wprItem.number">{{wprItem.number}}</span>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="所属部门" width="30vw"> <el-descriptions-item label="所属部门" style="padding-bottom:5px;" width="30vw">
<span v-if="wprItem.belong_dept_name">{{wprItem.belong_dept_name}}</span> <span v-if="wprItem.belong_dept_name">{{wprItem.belong_dept_name}}</span>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="所属工段" width="30vw"> <el-descriptions-item label="批次号" style="padding-bottom:5px;" width="30vw">
<span v-if="wprItem.mgroup_name">{{wprItem.mgroup_name}}</span>
</el-descriptions-item>
<el-descriptions-item label="批次号" width="30vw">
<span v-if="wprItem.batch">{{wprItem.batch}}</span> <span v-if="wprItem.batch">{{wprItem.batch}}</span>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="原始物料" width="30vw"> <el-descriptions-item label="原始物料" style="padding-bottom:5px;" width="30vw">
<span v-if="wprItem.material_ofrom_name">{{wprItem.material_ofrom_name}}</span> <span v-if="wprItem.material_ofrom_name">{{wprItem.material_ofrom_name}}</span>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="原始批次" width="30vw"> <el-descriptions-item label="原始批次" style="padding-bottom:5px;" width="30vw">
<span v-if="wprItem.batch_ofrom">{{wprItem.batch_ofrom}}</span> <span v-if="wprItem.batch_ofrom">{{wprItem.batch_ofrom}}</span>
</el-descriptions-item> </el-descriptions-item>
</el-descriptions>
<el-descriptions :column="1" class="descriptionspadding8">
<el-descriptions-item label="当前所在工段" style="padding-bottom:5px;" width="30vw">
<span v-if="wprItem.mgroup_name">{{wprItem.mgroup_name}}</span>
</el-descriptions-item>
<el-descriptions-item label="最新日志" style="padding-bottom:5px;" width="30vw">
<span v-if="mlogItem!==null"> [{{mlogItem.belong_dept_name}}/{{mlogItem.mgroup_name}}]
<span style="color: blue;">{{mlogItem.submit_user_name}}</span>
{{mlogItem.update_time}}提交</span>
</el-descriptions-item>
<el-descriptions-item label="最近交接" style="padding-bottom:5px;" width="30vw">
<span v-if="handoverItem!==null">[{{handoverItem.send_mgroup_name}}]<span style="color: blue;">{{handoverItem.send_user_name}}</span><span v-show="handoverItem.submit_time!=null"></span>交送[{{handoverItem.recive_mgroup_name}}]<span style="color: blue;">{{handoverItem.recive_user_name}}</span>{{ handoverItem.submit_time }}接收</span>
</el-descriptions-item>
</el-descriptions> </el-descriptions>
</el-header> </el-header>
<el-main style="padding: 0 1px;"> <el-main style="padding: 0 1px;">
@ -93,7 +102,7 @@
prop="handle_user_name" prop="handle_user_name"
width="80" width="80"
></el-table-column> ></el-table-column>
<el-table-column label="保温剩余时间" v-if="mgroup_name=='黑化'||mgroup_name=='退火'"> <el-table-column label="保温剩余时间" v-if="wprItem.mgroup_name=='黑化'||wprItem.mgroup_name=='退火'">
<template #default="scope"> <template #default="scope">
{{ getRemaTime(scope.row) }} {{ getRemaTime(scope.row) }}
</template> </template>
@ -186,9 +195,9 @@
width="80" width="80"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
label="交接日期" label="交接时间"
prop="send_date" prop="submit_time"
width="120" width="140"
></el-table-column> ></el-table-column>
</scTable> </scTable>
</el-main> </el-main>
@ -269,6 +278,8 @@ export default {
apiObj_mlog:null, apiObj_mlog:null,
apiObj_handover:null, apiObj_handover:null,
apiObj_mio:null, apiObj_mio:null,
mlogItem:null,
handoverItem:null,
}; };
}, },
mounted() { mounted() {
@ -295,8 +306,18 @@ export default {
that.apiObj_handover = that.$API.wpm.handover.list; that.apiObj_handover = that.$API.wpm.handover.list;
that.apiObj_mio = that.$API.inm.mio.list; that.apiObj_mio = that.$API.inm.mio.list;
that.$refs.tableMlog.queryData(that.params_mlog); that.$refs.tableMlog.queryData(that.params_mlog);
that.$refs.tableHandover.queryData(that.params_handover); // that.$refs.tableHandover.queryData(that.params_handover);
that.$refs.tableMio.queryData(that.params_mio); // that.$refs.tableMio.queryData(that.params_mio);
setTimeout(()=>{
this.$API.wpm.mlog.list.req({cnumber: row.number,page:1,page_size:1}).then(mlogres=>{
console.log('mlogres',mlogres);
that.mlogItem = mlogres.results[0];
})
this.$API.wpm.handover.list.req({b_handover__w_handoverb__number : row.number,page:1,page_size:1}).then(handoverres=>{
console.log('handoverres',handoverres);
that.handoverItem = handoverres.results[0];
})
},1000)
}) })
}, },