|  |  | 
 |  |  |         <el-select v-model="form.materialId" placeholder="请选择物料" :disabled="isEdit" clearable @change="selectMaterial"> | 
 |  |  |           <el-option | 
 |  |  |             v-for="item in materials" | 
 |  |  |             :key="item.realMaterialId" | 
 |  |  |             :key="item.materialId" | 
 |  |  |             :label="item.mmodel.name" | 
 |  |  |             :value="item.realMaterialId" | 
 |  |  |             :value="item.materialId" | 
 |  |  |           > | 
 |  |  |           </el-option> | 
 |  |  |         </el-select> | 
 |  |  | 
 |  |  |         minute: '', | 
 |  |  |         second: '', | 
 |  |  |         unqualified: 0, | 
 |  |  |         type: '' | 
 |  |  |         type: 1 | 
 |  |  |       }, | 
 |  |  |       isEdit: false, | 
 |  |  |       type: [ | 
 |  |  | 
 |  |  |           // if (!isEdit) { | 
 |  |  |           //   this.form.materialId = res[0]?res[0].materialId:'' | 
 |  |  |           // } | 
 |  |  |           // this.selectMaterial(this.form.materialId) | 
 |  |  |           if (isEdit) { | 
 |  |  |             this.selectMaterial(this.form.materialId) | 
 |  |  |           } | 
 |  |  |         }) | 
 |  |  |         .catch(err => { | 
 |  |  |           console.log(err) | 
 |  |  | 
 |  |  |       | 
 |  |  |       let routeId; | 
 |  |  |       for (const item of this.materials) { | 
 |  |  |         if (item.realMaterialId === id) { | 
 |  |  |         if (item.materialId === id) { | 
 |  |  |           routeId = item.routeId | 
 |  |  |         } | 
 |  |  |       } |