|
@ -11,28 +11,28 @@ |
|
|
<el-form-item label="工序"> |
|
|
<el-form-item label="工序"> |
|
|
<el-input v-model="form.processCode" disabled /> |
|
|
<el-input v-model="form.processCode" disabled /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label="生产人员"> |
|
|
<el-form-item label="生产人员" required="true"> |
|
|
<el-select v-model="form.personSelected" multiple> |
|
|
<el-select v-model="form.personSelected" multiple> |
|
|
<el-option v-for="item in personOption" :key="item.workerCode" :label="item.workerName" :value="item.workerCode" /> |
|
|
<el-option v-for="item in personOption" :key="item.workerCode" :label="item.workerName" :value="item.workerCode" /> |
|
|
</el-select> |
|
|
</el-select> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label="质检人员"> |
|
|
<el-form-item label="质检人员" required="true" > |
|
|
<el-input v-model="form.checkPerson" /> |
|
|
<el-input v-model="form.checkPerson"/> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label="合格数量" @change="handleCount" :key="qcount"> |
|
|
<el-form-item label="合格数量" @change="handleCount" :key="qcount" required="true"> |
|
|
<el-input-number |
|
|
<el-input-number |
|
|
v-model="form.qualified" |
|
|
v-model="form.qualified" |
|
|
@change="handleCount" |
|
|
@change="handleCount" |
|
|
></el-input-number> |
|
|
></el-input-number> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label="不合格数量"> |
|
|
<el-form-item label="不合格数量" > |
|
|
<el-input-number v-model="form.unqualified" @change="handleCount" :key="qcount"></el-input-number> |
|
|
<el-input-number v-model="form.unqualified" @change="handleCount" :key="qcount"></el-input-number> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label="不合格原因"> |
|
|
<el-form-item label="不合格原因"> |
|
|
<el-input v-model="form.remark"></el-input> |
|
|
<el-input v-model="form.remark"></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-form> |
|
|
</el-form> |
|
|
|
|
|
|
|
|
<template #footer> |
|
|
<template #footer> |
|
|
<el-button @click="dialogVisible = false">关闭</el-button> |
|
|
<el-button @click="dialogVisible = false">关闭</el-button> |
|
|
<el-button type="primary" :disabled="saveFlag" @click="saveReport">保存</el-button> |
|
|
<el-button type="primary" :disabled="saveFlag" @click="saveReport">保存</el-button> |
|
@ -75,7 +75,7 @@ const openDetail = async (row: any, titleName: any,code:string) => { |
|
|
form.id=row.id |
|
|
form.id=row.id |
|
|
planDayCode.value=code |
|
|
planDayCode.value=code |
|
|
getCurrentWorkerList(row.nodeCode) |
|
|
getCurrentWorkerList(row.nodeCode) |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
//获取工序人员 |
|
|
//获取工序人员 |
|
@ -86,7 +86,7 @@ const getCurrentWorkerList = async (val) => { |
|
|
processCode: val |
|
|
processCode: val |
|
|
} |
|
|
} |
|
|
personOption.value = await workschedulingApi.getCurrentWorkerList(params) |
|
|
personOption.value = await workschedulingApi.getCurrentWorkerList(params) |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
const qcount=ref(0) |
|
|
const qcount=ref(0) |
|
|
//数量处理 |
|
|
//数量处理 |
|
@ -97,8 +97,8 @@ const handleCount = () => { |
|
|
form.qualified =rowData.value.planCount - form.unqualified |
|
|
form.qualified =rowData.value.planCount - form.unqualified |
|
|
|
|
|
|
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (form.unqualified> rowData.value.planCount -form.qualified ) { |
|
|
if (form.unqualified> rowData.value.planCount -form.qualified ) { |
|
|
message.alert('不合格数量超限!') |
|
|
message.alert('不合格数量超限!') |
|
|
form.unqualified =rowData.value.planCount-form.qualified |
|
|
form.unqualified =rowData.value.planCount-form.qualified |
|
@ -107,7 +107,18 @@ const handleCount = () => { |
|
|
} |
|
|
} |
|
|
//提交质检 |
|
|
//提交质检 |
|
|
const saveReport = async() => { |
|
|
const saveReport = async() => { |
|
|
|
|
|
if(form.personSelected.length<1){ |
|
|
|
|
|
message.alert('生产人员不能为空') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
if(form.checkPerson==''||form.checkPerson.trim()==''){ |
|
|
|
|
|
message.alert('质检人员不能为空') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
if(form.qualified<1){ |
|
|
|
|
|
message.alert('合格数量不能小于1!') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
saveFlag.value = true |
|
|
saveFlag.value = true |
|
|
try { |
|
|
try { |
|
|
await workschedulingApi.processQualified(form) |
|
|
await workschedulingApi.processQualified(form) |
|
@ -118,7 +129,7 @@ const saveReport = async() => { |
|
|
} |
|
|
} |
|
|
//console.log("report-saveReport-82",data) |
|
|
//console.log("report-saveReport-82",data) |
|
|
//await workschedulingApi.reportWorkByProcess(data) |
|
|
//await workschedulingApi.reportWorkByProcess(data) |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
// 传递给父类 |
|
|
// 传递给父类 |
|
|
const emit = defineEmits(['success', 'close']) |
|
|
const emit = defineEmits(['success', 'close']) |
|
|