feat(wpm): improve sub-process record inputs

This commit is contained in:
caoqianming 2026-08-07 14:33:12 +08:00
parent 363c698ed4
commit 9fcf23f418
2 changed files with 50 additions and 40 deletions

View File

@ -89,7 +89,7 @@ const props = defineProps({
options: { type: Array, default: null },
});
const emit = defineEmits(["update:modelValue", "update:obj", "change", "update::label"]);
const emit = defineEmits(["update:modelValue", "update:obj", "change", "update:label"]);
const selectable = (row) => row.count_canhandover?row.count_canhandover>0:true;
// popover
const showPopover = ref(false);

View File

@ -95,62 +95,82 @@
:addTemplate="addTemplate"
placeholder="暂无数据"
>
<el-table-column label="工序" width="150px">
<el-table-column label="工序" min-width="180px">
<template #default="scope">
<el-select
<xtSelect
v-if="scope.row.isEdit"
v-model="scope.row.process"
v-model:label="scope.row.process_name"
:apiObj="$API.mtm.process.list"
:params="{ parent: process }"
placeholder="请选择子工序"
:tableWidth="520"
class="width-100"
>
<el-option
v-for="item in processOptions"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
<el-table-column prop="name" label="工序名称" min-width="240" />
<el-table-column prop="cate" label="大类" min-width="160" />
</xtSelect>
<div v-else>
<span v-if="scope.row.process!==null">{{ scope.row.process_name}}</span>
</div>
</template>
</el-table-column>
<el-table-column label="操作人" width="150px">
<el-table-column label="操作人" min-width="180px">
<template #default="scope">
<ehsSelect
<xtSelect
v-if="scope.row.isEdit"
v-model="scope.row.handle_user"
:showName="scope.row.handle_user_name"
:apiObj="this.$API.system.user.list"
v-model:label="scope.row.handle_user_name"
:apiObj="$API.system.user.list"
:params="{ depts: dept }"
placeholder="请选择操作人"
:tableWidth="720"
class="width-100"
></ehsSelect>
>
<el-table-column prop="username" label="账号" width="160" />
<el-table-column prop="name" label="姓名" width="140" />
<el-table-column prop="belong_dept_name" label="部门" min-width="180" />
<el-table-column prop="post_name" label="岗位" min-width="150" />
</xtSelect>
<div v-else>
<span v-if="scope.row.handle_user_name!==null">{{ scope.row.handle_user_name}}</span>
</div>
</template>
</el-table-column>
<el-table-column label="使用设备" width="120px">
<el-table-column label="使用设备" min-width="180px">
<template #default="scope">
<el-select
<xtSelect
v-if="scope.row.isEdit"
v-model="scope.row.equipment"
placeholder="设备"
v-model:label="scope.row.equipment_name"
:apiObj="$API.em.equipment.list"
:params="{ belong_dept: dept, exclude_cate_name: '工装' }"
labelField="name"
placeholder="请选择设备"
:tableWidth="720"
class="width-100"
>
<el-option
v-for="item in equipmentOtions"
:key="item.id"
:label="item.name"
:value="item.id"
>
</el-option>
</el-select>
<el-table-column prop="number" label="设备编号" width="160" />
<el-table-column prop="name" label="设备名称" min-width="180" />
<el-table-column prop="model" label="型号" min-width="150" />
<el-table-column prop="cate_name" label="分类" width="120" />
</xtSelect>
<div v-else>
<span v-if="scope.row.equipment!==null">{{ scope.row.equipment_name}}</span>
</div>
</template>
</el-table-column>
<el-table-column label="备注" min-width="180px">
<template #default="scope">
<el-input
v-if="scope.row.isEdit"
v-model="scope.row.note"
placeholder="请输入备注"
clearable
/>
<span v-else>{{ scope.row.note }}</span>
</template>
</el-table-column>
<el-table-column label="操作时间" width="220px">
<template #default="scope">
<el-date-picker
@ -552,7 +572,6 @@ export default {
// shiftOtions:[],
tableDataWm:[],
qct_defects:[],
equipmentOtions:[],
defectOptions:[],
qct_testitems:[],
processLists:[],
@ -595,7 +614,10 @@ export default {
mlog: "",
shift:"",
process: "",
process_name: "",
equipment: "",
equipment_name: "",
note: "",
handle_user: "",
work_start_time: "",
handle_user_name: "",
@ -631,7 +653,6 @@ export default {
that.getMlogItem();
that.getPreocess();
// that.getShift();
that.getEquipment();
that.getProcessList();
},
methods: {
@ -714,17 +735,6 @@ export default {
})
})
},
getEquipment(){
let that = this;
that.equipmentOtions = [];
that.$API.em.equipment.list.req({page:0,belong_dept:that.dept}).then((res) => {
res.forEach((item) => {
if(item.cate_name!=="工装"||item.cate_name==null){
that.equipmentOtions.push(item);
}
})
})
},
//
getcutCount(material_id){
let that = this;