feat:禅道385批次查询加查询批次的基本信息

This commit is contained in:
shijing 2026-05-11 16:50:10 +08:00
parent dbb3ede81b
commit f338070e9a
1 changed files with 45 additions and 7 deletions

View File

@ -31,11 +31,11 @@
</el-aside>
<el-main id="elMain">
<el-container>
<el-header style="height: 50%;flex-direction: column;align-items: start;overflow: scroll;">
<el-header style="height: 45%;flex-direction: column;align-items: start;overflow: scroll;">
<div>批次流转图</div>
<scDegra
v-if="limitedWatch"
ref="degraDialogs"
v-if="limitedWatch"
ref="degraDialogs"
:nodes="nodes"
:edges="edges"
:rankdir="'LR'"
@ -44,7 +44,23 @@
>
</scDegra>
</el-header>
<el-main style="height: 50%;background: #fff;">
<el-header v-if="batchItem.mgroup_name || mlogItem || handoverItem" style="height:auto;display:block;padding:4px 15px;background:#fff;border-bottom:1px solid #ebeef5;">
<div>{{ searchBatch }}</div>
<el-descriptions :column="1" class="descriptionspadding8">
<el-descriptions-item label="当前所在工段" v-if="batchItem.mgroup_name">
{{batchItem.belong_dept_name}}/{{batchItem.mgroup_name}}
</el-descriptions-item>
<el-descriptions-item label="最新日志" v-if="mlogItem">
<span>[{{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="最近交接" v-if="handoverItem">
<span>[{{handoverItem.send_mgroup_name}}]<span style="color:blue;">{{handoverItem.send_user_name}}</span>交送[{{handoverItem.recive_mgroup_name}}]<span style="color:blue;">{{handoverItem.recive_user_name}}</span>{{ handoverItem.submit_time }}接收</span>
</el-descriptions-item>
</el-descriptions>
</el-header>
<el-main style="background:#fff;padding:0;">
<el-tabs type="border-card" v-model="activeName" @tab-click="handleClick" style="height: 100%;" lazy>
<el-tab-pane name="mlog" label="生产日志" style="height: 100%;">
<el-container v-if="activeName=='mlog'">
@ -327,6 +343,10 @@ export default {
apiObj_mio:null,
nodes: [],
edges: [],
batchItem: {},
mlogItem: null,
handoverItem: null,
searchBatch:'',
stateDict: {
10: "创建中",
20: "已提交",
@ -342,7 +362,7 @@ export default {
//mlog\handover
params_mlog:{
cbatch:'',
ordering:'create_time',
ordering:'-create_time',
with_mlogb:'yes',
query: " { id,material_out_name,mlogb_full,count_real,count_ok,is_fix,belong_dept_name,mgroup_name,handle_user_name,handle_date,reminder_interval_list,mstate_json,work_start_time,work_end_time,oinfo_json,submit_time,submit_user_name}"
},
@ -370,9 +390,13 @@ export default {
methods: {
rowClick(row){
let that = this;
that.nodes =[];
that.nodes = [];
that.edges = [];
that.limitedWatch = false;
that.batchItem = {};
that.mlogItem = null;
that.handoverItem = null;
that.searchBatch = row.batch;
that.$API.wpm.batchlog.dag.req({batch:row.batch,method:'direct'}).then((res) => {
that.limitedWatch = true;
res.nodes.forEach(item => {
@ -384,9 +408,12 @@ export default {
that.nodes.push(obj);
});
that.edges = res.edges;
that.$nextTick(() => {
that.nodeClick(row.batch,'first');
});
})
},
nodeClick(data){
nodeClick(data,tag){
let that = this;
that.params.cbatch = data;
that.params_mlog.cbatch = data;
@ -405,6 +432,17 @@ export default {
that.apiObj_binm = that.$API.inm.warehouse.batch;
that.apiObj_mio = that.$API.inm.mio.list;
}
if(tag&&tag==='first'){
that.$API.wpm.wmaterial.list.req({batch: data, page: 1, page_size: 1}).then(res => {
if(res.results && res.results.length > 0) that.batchItem = res.results[0];
});
that.$API.wpm.mlog.list.req({cbatch: data, page: 1, page_size: 1}).then(res => {
if(res.results && res.results.length > 0) that.mlogItem = res.results[0];
});
that.$API.wpm.handover.list.req({cbatch: data, page: 1, page_size: 1}).then(res => {
if(res.results && res.results.length > 0) that.handoverItem = res.results[0];
});
}
},
search(){
this.$refs.tablets.queryData(this.query)