Browse Source

提交质检,增加必填项

master_hella_20240701
TengXF 7 months ago
parent
commit
d2d14953b7
  1. 25
      src/views/mes/workScheduling/components/qualifiedCheck.vue

25
src/views/mes/workScheduling/components/qualifiedCheck.vue

@ -11,21 +11,21 @@
<el-form-item label="工序">
<el-input v-model="form.processCode" disabled />
</el-form-item>
<el-form-item label="生产人员">
<el-select v-model="form.personSelected" multiple>
<el-form-item label="生产人员" required="true">
<el-select v-model="form.personSelected" multiple>
<el-option v-for="item in personOption" :key="item.workerCode" :label="item.workerName" :value="item.workerCode" />
</el-select>
</el-form-item>
<el-form-item label="质检人员">
<el-input v-model="form.checkPerson" />
<el-form-item label="质检人员" required="true" >
<el-input v-model="form.checkPerson"/>
</el-form-item>
<el-form-item label="合格数量" @change="handleCount" :key="qcount">
<el-form-item label="合格数量" @change="handleCount" :key="qcount" required="true">
<el-input-number
v-model="form.qualified"
@change="handleCount"
></el-input-number>
</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-form-item>
<el-form-item label="不合格原因">
@ -107,7 +107,18 @@ const handleCount = () => {
}
//
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
try {
await workschedulingApi.processQualified(form)

Loading…
Cancel
Save