| | |
| | | placeholder="请先选择车间" |
| | | no-data-text='请先选择车间' |
| | | class="select-width" |
| | | @change='getGroupNumber' |
| | | @change="getGroupNumber(false,'groupNumber')" |
| | | > |
| | | <el-option |
| | | v-for="item in workshopGroupList" |
| | |
| | | align="center" |
| | | > |
| | | <template slot-scope="scope"> |
| | | {{scope.row.peopleYield!=0?scope.row.peopleYield:''}} |
| | | {{scope.row.peopleYield!=0?scope.row.peopleYield.toFixed(2):''}} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | |
| | | } |
| | | this.getPeopleYield(row) |
| | | row.oneYield=Number(string); |
| | | return string; |
| | | return string.toFixed(2); |
| | | }, |
| | | getPeopleYield(row){ |
| | | let string=0 |
| | |
| | | } |
| | | } |
| | | row['allYield'+val]=Number(string); |
| | | return string; |
| | | return string.toFixed(2); |
| | | }, |
| | | changeForm(form,val,data){ |
| | | if(val){ |
| | |
| | | } |
| | | }); |
| | | }, |
| | | 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{ |