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

View File

@ -52,7 +52,14 @@
> >
<el-table-column type="index" width="50"></el-table-column> <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="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="equipment_name" min-width="150"></el-table-column>
<el-table-column label="领料数" prop="count_use"></el-table-column> <el-table-column label="领料数" prop="count_use"></el-table-column>
<el-table-column label="加工数" prop="count_real"></el-table-column> <el-table-column label="加工数" prop="count_real"></el-table-column>
@ -212,6 +219,7 @@ export default {
batchContains:[], batchContains:[],
test_file:'', test_file:'',
deptId: "", deptId: "",
route_code: "",
is_fix:false, is_fix:false,
visible: false, visible: false,
isSaveing: false, isSaveing: false,
@ -232,6 +240,8 @@ export default {
}; };
}, },
mounted() { mounted() {
let that = this;
that.route_code = that.$route.path.split("/")[2];
this.getfmlogItem(); this.getfmlogItem();
this.params.fmlog = this.fmlogId; this.params.fmlog = this.fmlogId;
this.paramsWm.mgroup = this.mgroup; this.paramsWm.mgroup = this.mgroup;

View File

@ -31,9 +31,12 @@
<el-descriptions-item label="部门/车间">{{ <el-descriptions-item label="部门/车间">{{
mlogItem.belong_dept_name mlogItem.belong_dept_name
}}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item label="处理人">{{ <el-descriptions-item label="处理人">
mlogItem.handle_user_name <div v-if="mlogItem.handle_users_&&mlogItem.handle_users_.length>0">
}}</el-descriptions-item> <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="创建时间">{{ <el-descriptions-item label="创建时间">{{
mlogItem.create_time mlogItem.create_time
}}</el-descriptions-item> }}</el-descriptions-item>

View File

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

View File

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