feat(wpm): improve sub-process record inputs
This commit is contained in:
parent
363c698ed4
commit
9fcf23f418
|
|
@ -89,7 +89,7 @@ const props = defineProps({
|
||||||
options: { type: Array, default: null },
|
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;
|
const selectable = (row) => row.count_canhandover?row.count_canhandover>0:true;
|
||||||
// 控制 popover 显示与隐藏的状态
|
// 控制 popover 显示与隐藏的状态
|
||||||
const showPopover = ref(false);
|
const showPopover = ref(false);
|
||||||
|
|
|
||||||
|
|
@ -95,62 +95,82 @@
|
||||||
:addTemplate="addTemplate"
|
:addTemplate="addTemplate"
|
||||||
placeholder="暂无数据"
|
placeholder="暂无数据"
|
||||||
>
|
>
|
||||||
<el-table-column label="工序" width="150px">
|
<el-table-column label="工序" min-width="180px">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-select
|
<xtSelect
|
||||||
v-if="scope.row.isEdit"
|
v-if="scope.row.isEdit"
|
||||||
v-model="scope.row.process"
|
v-model="scope.row.process"
|
||||||
|
v-model:label="scope.row.process_name"
|
||||||
|
:apiObj="$API.mtm.process.list"
|
||||||
|
:params="{ parent: process }"
|
||||||
placeholder="请选择子工序"
|
placeholder="请选择子工序"
|
||||||
|
:tableWidth="520"
|
||||||
class="width-100"
|
class="width-100"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-table-column prop="name" label="工序名称" min-width="240" />
|
||||||
v-for="item in processOptions"
|
<el-table-column prop="cate" label="大类" min-width="160" />
|
||||||
:key="item.id"
|
</xtSelect>
|
||||||
:label="item.name"
|
|
||||||
:value="item.id"
|
|
||||||
></el-option>
|
|
||||||
</el-select>
|
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<span v-if="scope.row.process!==null">{{ scope.row.process_name}}</span>
|
<span v-if="scope.row.process!==null">{{ scope.row.process_name}}</span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作人" width="150px">
|
<el-table-column label="操作人" min-width="180px">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<ehsSelect
|
<xtSelect
|
||||||
v-if="scope.row.isEdit"
|
v-if="scope.row.isEdit"
|
||||||
v-model="scope.row.handle_user"
|
v-model="scope.row.handle_user"
|
||||||
:showName="scope.row.handle_user_name"
|
v-model:label="scope.row.handle_user_name"
|
||||||
:apiObj="this.$API.system.user.list"
|
:apiObj="$API.system.user.list"
|
||||||
:params="{ depts: dept }"
|
:params="{ depts: dept }"
|
||||||
|
placeholder="请选择操作人"
|
||||||
|
:tableWidth="720"
|
||||||
class="width-100"
|
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>
|
<div v-else>
|
||||||
<span v-if="scope.row.handle_user_name!==null">{{ scope.row.handle_user_name}}</span>
|
<span v-if="scope.row.handle_user_name!==null">{{ scope.row.handle_user_name}}</span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="使用设备" width="120px">
|
<el-table-column label="使用设备" min-width="180px">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-select
|
<xtSelect
|
||||||
v-if="scope.row.isEdit"
|
v-if="scope.row.isEdit"
|
||||||
v-model="scope.row.equipment"
|
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"
|
class="width-100"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-table-column prop="number" label="设备编号" width="160" />
|
||||||
v-for="item in equipmentOtions"
|
<el-table-column prop="name" label="设备名称" min-width="180" />
|
||||||
:key="item.id"
|
<el-table-column prop="model" label="型号" min-width="150" />
|
||||||
:label="item.name"
|
<el-table-column prop="cate_name" label="分类" width="120" />
|
||||||
:value="item.id"
|
</xtSelect>
|
||||||
>
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<span v-if="scope.row.equipment!==null">{{ scope.row.equipment_name}}</span>
|
<span v-if="scope.row.equipment!==null">{{ scope.row.equipment_name}}</span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</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">
|
<el-table-column label="操作时间" width="220px">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
|
|
@ -552,7 +572,6 @@ export default {
|
||||||
// shiftOtions:[],
|
// shiftOtions:[],
|
||||||
tableDataWm:[],
|
tableDataWm:[],
|
||||||
qct_defects:[],
|
qct_defects:[],
|
||||||
equipmentOtions:[],
|
|
||||||
defectOptions:[],
|
defectOptions:[],
|
||||||
qct_testitems:[],
|
qct_testitems:[],
|
||||||
processLists:[],
|
processLists:[],
|
||||||
|
|
@ -595,7 +614,10 @@ export default {
|
||||||
mlog: "",
|
mlog: "",
|
||||||
shift:"",
|
shift:"",
|
||||||
process: "",
|
process: "",
|
||||||
|
process_name: "",
|
||||||
equipment: "",
|
equipment: "",
|
||||||
|
equipment_name: "",
|
||||||
|
note: "",
|
||||||
handle_user: "",
|
handle_user: "",
|
||||||
work_start_time: "",
|
work_start_time: "",
|
||||||
handle_user_name: "",
|
handle_user_name: "",
|
||||||
|
|
@ -631,7 +653,6 @@ export default {
|
||||||
that.getMlogItem();
|
that.getMlogItem();
|
||||||
that.getPreocess();
|
that.getPreocess();
|
||||||
// that.getShift();
|
// that.getShift();
|
||||||
that.getEquipment();
|
|
||||||
that.getProcessList();
|
that.getProcessList();
|
||||||
},
|
},
|
||||||
methods: {
|
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){
|
getcutCount(material_id){
|
||||||
let that = this;
|
let that = this;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue