fix:多人处理日志时表单和列表以及详情的显示变更

This commit is contained in:
shijing 2025-05-20 09:18:55 +08:00
parent fdb7dbb8e8
commit 98bfcf2e6e
5 changed files with 31 additions and 9 deletions

View File

@ -312,6 +312,7 @@ const defaultForm = {
shift: null,
wm_in: null,
fmlog:null,
handle_user:null,
handle_users:null,
material_out:'',
count_pn_jgqbl:0,
@ -615,6 +616,7 @@ export default {
Object.assign(this.form, data);
},
handleUsersChange(){
this.form.handle_user = this.form.handle_users.length>0?this.form.handle_users[0]:null;
console.log('handleUsersChange',this.form.handle_users)
},
countUseChange(){

View File

@ -52,7 +52,14 @@
>
<el-table-column type="index" width="50"></el-table-column>
<el-table-column label="批次号" prop="batch" min-width="80"></el-table-column>
<el-table-column label="操作员" prop="handle_user_name" min-width="80"></el-table-column>
<el-table-column label="操作员" min-width="80">
<template #default="scope">
<div v-if="scope.row.handle_users_&&scope.row.handle_users_.length>0">
<span v-for="item in scope.row.handle_users_" :key="item">{{ item.name }}</span>
</div>
<span v-else>{{ scope.row.handle_user_name }}</span>
</template>
</el-table-column>
<el-table-column label="设备" prop="equipment_name" min-width="150"></el-table-column>
<el-table-column label="领料数" prop="count_use"></el-table-column>
<el-table-column label="加工数" prop="count_real"></el-table-column>
@ -212,6 +219,7 @@ export default {
batchContains:[],
test_file:'',
deptId: "",
route_code: "",
is_fix:false,
visible: false,
isSaveing: false,
@ -232,6 +240,8 @@ export default {
};
},
mounted() {
let that = this;
that.route_code = that.$route.path.split("/")[2];
this.getfmlogItem();
this.params.fmlog = this.fmlogId;
this.paramsWm.mgroup = this.mgroup;

View File

@ -31,9 +31,12 @@
<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="处理人">
<div v-if="mlogItem.handle_users_&&mlogItem.handle_users_.length>0">
<span v-for="item in mlogItem.handle_users_" :key="item.id">{{ item.name }}</span>
</div>
<span v-else>{{mlogItem.handle_user_name}}</span>
</el-descriptions-item>
<el-descriptions-item label="创建时间">{{
mlogItem.create_time
}}</el-descriptions-item>

View File

@ -529,6 +529,7 @@ export default {
this.test_file = res.path;
},
handleUsersChange(){
this.form.handle_user = this.form.handle_users.length>0?this.form.handle_users[0]:null;
console.log('handleUsersChange',this.form.handle_users)
},
//

View File

@ -93,11 +93,15 @@
{{scope.row.belong_dept_name}}/{{scope.row.mgroup_name}}
</template>
</el-table-column>
<el-table-column
label="处理人"
prop="handle_user_name"
width="80"
></el-table-column>
<el-table-column label="处理人" prop="handle_user_name" width="80">
<template #default="scope">
<div v-if="scope.row.handle_users_&&scope.row.handle_users_.length>0">
<span v-for="item in scope.row.handle_users_" :key="item">{{ item.name }}</span>
</div>
<span v-else>{{ scope.row.handle_user_name }}</span>
</template>
</el-table-column>
<!-- <el-table-column label="处理人" prop="handle_user_name" width="80" v-else></el-table-column> -->
<el-table-column label="保温剩余时间" v-if="mgroupName=='黑化'||mgroupName=='退火'">
<template #default="scope">
{{ getRemaTime(scope.row) }}
@ -245,11 +249,13 @@ export default {
mtask: "",
mlogId: "",
codeText: "",
route_code: "",
showHidden:false,
};
},
mounted() {
let that = this;
that.route_code = that.$route.path.split("/")[2];
that.params.mgroup = that.mgroupId;
that.apiObj = that.$API.wpm.mlog.list;
},