| | |
| | | placeholder="请先选择车间" |
| | | no-data-text='请先选择车间' |
| | | class="select-width" |
| | | @change='getGroupNumber' |
| | | @change="getGroupNumber(false,'groupNumber')" |
| | | > |
| | | <el-option |
| | | v-for="item in workshopGroupList" |
| | |
| | | } |
| | | }); |
| | | }, |
| | | getGroupNumber(val){ |
| | | getGroupNumber(val,prop){ |
| | | if(this.ruleForm.workshopNumber){ |
| | | //组别 |
| | | getWorkshopManageGroup({number:this.ruleForm.workshopNumber}).then((res) => { |
| | | if (res.code == 200) { |
| | | let workshopGroupList = res.data || {}; |
| | | this.workshopGroupList=[] |
| | | this.ruleForm.groupNumber='' |
| | | if(Object.keys(workshopGroupList).length>0){ |
| | | for(let i in workshopGroupList){ |
| | | this.workshopGroupList.push(workshopGroupList[i]) |
| | | } |
| | | if(prop&&prop!='groupNumber'){ |
| | | this.ruleForm.groupNumber='' |
| | | } |
| | | // 编辑 |
| | | if(val){ |
| | | this.$set(this.ruleForm,'groupNumber',this.ruleForm.groupNumber) |
| | | setTimeout(()=>{ |
| | | this.$set(this.ruleForm,'groupNumber',this.ruleForm.groupNumber) |
| | | },200) |
| | | } |
| | | } |
| | | }else{ |