| | |
| | | v-model="ruleForm.marketId" |
| | | placeholder="请选择" |
| | | class="select-width" |
| | | @change='getGroupNumber' |
| | | > |
| | | <el-option |
| | | v-for="item in marketList" |
| | |
| | | width="60" |
| | | align="center" |
| | | > |
| | | |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="pieceNumber12" |
| | |
| | | </el-table-column> |
| | | </el-table-column> |
| | | <el-table-column prop="oneYield" label="台产量" align="center"> |
| | | <template slot-scope="scope"> |
| | | {{getOneYield(scope.row)}} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="peopleYield" |
| | |
| | | width="60" |
| | | align="center" |
| | | > |
| | | <template slot-scope="scope"> |
| | | {{getPeopleYield(scope.row)}} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="hourYield" |
| | |
| | | width="60" |
| | | align="center" |
| | | > |
| | | <template slot-scope="scope"> |
| | | {{getHourYield(scope.row)}} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="personReelingdiscount" |
| | |
| | | width="60" |
| | | align="center" |
| | | > |
| | | <template slot-scope="scope"> |
| | | {{getallYield(scope.row,1)}} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="oneYield1" |
| | |
| | | width="60" |
| | | align="center" |
| | | > |
| | | <template slot-scope="scope"> |
| | | {{getoneYield(scope.row,1)}} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="reelingdiscount1" |
| | |
| | | width="60" |
| | | align="center" |
| | | > |
| | | <template slot-scope="scope"> |
| | | {{getallYield(scope.row,2)}} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="oneYield2" |
| | |
| | | width="60" |
| | | align="center" |
| | | > |
| | | <template slot-scope="scope"> |
| | | {{getoneYield(scope.row,2)}} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="reelingdiscount2" |
| | |
| | | width="60" |
| | | align="center" |
| | | > |
| | | <template slot-scope="scope"> |
| | | {{getallYield(scope.row,3)}} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="oneYield3" |
| | |
| | | width="60" |
| | | align="center" |
| | | > |
| | | <template slot-scope="scope"> |
| | | {{getoneYield(scope.row,3)}} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="reelingdiscount3" |
| | |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | |
| | | </div> |
| | | <!-- 仪器连接正常弹窗 --> |
| | | <addProductDialog ref="addProductDialog" |
| | |
| | | @changeForm='changeForm' |
| | | @changeTableInput='changeTableInput' /> |
| | | </div> |
| | | |
| | | </template> |
| | | |
| | | <script> |
| | |
| | | this.getSelectDataList(); |
| | | }, |
| | | methods: { |
| | | // 表格的计算问题 |
| | | getOneYield(row){ |
| | | let string=''; |
| | | if(row.pieceNumber11||row.pieceNumber12||row.pieceNumber13||row.pieceNumber14||row.pieceNumber21||row.pieceNumber22||row.pieceNumber23||row.pieceNumber24||row.pieceNumber31||row.pieceNumber32||row.pieceNumber33||row.pieceNumber34){ |
| | | if(row.pieceNumber11){ |
| | | string=Number(row.pieceNumber11) |
| | | } |
| | | if(row.pieceNumber12){ |
| | | string=string+Number(row.pieceNumber12) |
| | | } |
| | | if(row.pieceNumber13){ |
| | | string=string+Number(row.pieceNumber13) |
| | | } |
| | | if(row.pieceNumber14){ |
| | | string=string+Number(row.pieceNumber14) |
| | | } |
| | | if(row.pieceNumber21){ |
| | | string=string+Number(row.pieceNumber21) |
| | | } |
| | | if(row.pieceNumber22){ |
| | | string=string+Number(row.pieceNumber22) |
| | | } |
| | | if(row.pieceNumber23){ |
| | | string=string+Number(row.pieceNumber23) |
| | | } |
| | | if(row.pieceNumber24){ |
| | | string=string+Number(row.pieceNumber24) |
| | | } |
| | | if(row.pieceNumber31){ |
| | | string=string+Number(row.pieceNumber31) |
| | | } |
| | | if(row.pieceNumber32){ |
| | | string=string+Number(row.pieceNumber32) |
| | | } |
| | | if(row.pieceNumber33){ |
| | | string=string+Number(row.pieceNumber33) |
| | | } |
| | | if(row.pieceNumber34){ |
| | | string=string+Number(row.pieceNumber34) |
| | | } |
| | | } |
| | | return string; |
| | | }, |
| | | getPeopleYield(row){ |
| | | let string=0 |
| | | if(row.perList){ |
| | | if(row.perList.length>0){ |
| | | let carNumber=row.perList[row.perList.length-1] |
| | | for(let i in this.tableData){ |
| | | for(let j in row.perList){ |
| | | if(row.perList[j]==this.tableData[i].carNumber){ |
| | | string=string+this.tableData[i].oneYield |
| | | } |
| | | if(j==row.perList.length-1){ |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | for(let k in this.tableData){ |
| | | if(this.tableData[k ].carNumber==carNumber){ |
| | | this.$set(this.tableData[k],'peopleYield',string) |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | getHourYield(row){ |
| | | let hourYield='' |
| | | if(this.ruleForm.record&&this.ruleForm.record!=0){ |
| | | hourYield=row.oneYield/this.ruleForm.record |
| | | } |
| | | return hourYield; |
| | | }, |
| | | getallYield(row,val){ |
| | | let string=''; |
| | | if(row['pieceNumber'+val+'1']||row['pieceNumber'+val+'2']||row['pieceNumber'+val+'3']||row['pieceNumber'+val+'4']){ |
| | | if(row['pieceNumber'+val+'1']){ |
| | | string=Number(row['pieceNumber'+val+'1']) |
| | | } |
| | | if(row['pieceNumber'+val+'2']){ |
| | | string=string+Number(row['pieceNumber'+val+'2']) |
| | | } |
| | | if(row['pieceNumber'+val+'3']){ |
| | | string=string+Number(row['pieceNumber'+val+'3']) |
| | | } |
| | | if(row['pieceNumber'+val+'4']){ |
| | | string=string+Number(row['pieceNumber'+val+'4']) |
| | | } |
| | | } |
| | | return string; |
| | | }, |
| | | getoneYield(row,val){ |
| | | let oneYield='' |
| | | if(this.ruleForm.record&&this.ruleForm.record!=0){ |
| | | oneYield=row['allYield'+val]/this.ruleForm.record |
| | | } |
| | | return oneYield; |
| | | }, |
| | | changeForm(form,val){ |
| | | if(val){ |
| | | this.ruleForm.createTime=form.createTime |
| | |
| | | } |
| | | } |
| | | }); |
| | | if(this.ruleForm.groupNumber){ |
| | | if(this.ruleForm.groupNumber&&this.ruleForm.marketId){ |
| | | let workshopName='' |
| | | for(let i in this.nameList){ |
| | | if( this.nameList[i].number==this.ruleForm.workshopId){ |
| | | workshopName= this.nameList[i].name |
| | | break; |
| | | } |
| | | } |
| | | let marketName='' |
| | | for(let i in this.marketList){ |
| | | if( this.marketList[i].ID==this.ruleForm.marketId){ |
| | | marketName= this.marketList[i].name |
| | | break; |
| | | } |
| | | } |
| | | getWorkshopManageCar({ |
| | | workshopNumber:this.ruleForm.workshopId+'', |
| | | workshopName:workshopName, |
| | | marketName:marketName, |
| | | groupNumber:this.ruleForm.groupNumber, |
| | | }).then((res) => { |
| | | if (res.code == 200) { |
| | | this.tableData=[] |
| | | let data = JSON.parse(JSON.stringify(res.data)) || {}; |
| | | this.ruleForm.level=res.data.level||'' |
| | | let data = JSON.parse(JSON.stringify(res.data.car)) || []; |
| | | if(Object.keys(data).length>0){ |
| | | for(let i in data){ |
| | | for(let j in data[i]){ |
| | |
| | | <style lang="scss" scoped> |
| | | .add-product-page { |
| | | height: 100%; |
| | | position:relative; |
| | | ::v-deep .el-table .el-table__cell { |
| | | padding: 6px 0 !important; |
| | | height: 35px; |
| | | text-align: center; |
| | | } |
| | | .top-view { |
| | | margin: 20px 30px; |
| | | height: 52px; |