| | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="3"> |
| | | <el-form-item label="车间" prop="workshopId"> |
| | | <el-form-item label="车间" prop="workshopNumber"> |
| | | <el-select |
| | | v-model="ruleForm.workshopId" |
| | | v-model="ruleForm.workshopNumber" |
| | | placeholder="请选择" |
| | | class="select-width" |
| | | @change='getGroupNumber' |
| | |
| | | circle: "", |
| | | marketId: "", |
| | | fallingSilkCocoonNumber: "", |
| | | workshopId: "", |
| | | workshopNumber: "", |
| | | bucketCocoonNumber: "", |
| | | groupNumber: "", |
| | | vehicleSpeed: "", |
| | |
| | | marketId: [ |
| | | { required: true, message: "请选择", trigger: ["change", "blur"] }, |
| | | ], |
| | | workshopId: [ |
| | | workshopNumber: [ |
| | | { required: true, message: "请选择", trigger: ["change", "blur"] }, |
| | | ], |
| | | groupNumber: [ |
| | |
| | | circle: "", |
| | | marketId: "", |
| | | fallingSilkCocoonNumber: "", |
| | | workshopId: "", |
| | | workshopNumber: "", |
| | | bucketCocoonNumber: "", |
| | | groupNumber: "", |
| | | vehicleSpeed: "", |
| | |
| | | JSON.stringify(response.data ? response.data : {}) |
| | | ); |
| | | this.ruleForm = config; |
| | | this.$set(this.ruleForm,'workshopId',this.ruleForm.workshopId+'') |
| | | this.$set(this.ruleForm,'workshopNumber',this.ruleForm.workshopNumber+'') |
| | | this.tableDataItems=config.items |
| | | ? config.items |
| | | : []; |
| | |
| | | } |
| | | } |
| | | } |
| | | console.log(this.tableData,'==this.tableData') |
| | | this.ruleForm.carNumber=this.tableData.length>0?this.tableData[0].carNumber:'' |
| | | }, |
| | | // 表格的计算问题 |
| | |
| | | JSON.stringify(data ? data : {}) |
| | | ); |
| | | this.ruleForm = config; |
| | | this.$set(this.ruleForm,'workshopId',this.ruleForm.workshopId+'') |
| | | this.$set(this.ruleForm,'workshopNumber',this.ruleForm.workshopNumber+'') |
| | | this.tableDataItems=config.items |
| | | ? config.items |
| | | : []; |
| | |
| | | }).then((res) => { |
| | | if (res.code == 200) { |
| | | this.nameList = res.data || []; |
| | | this.$set(this.ruleForm,'workshopId',this.ruleForm.workshopId+'') |
| | | this.$set(this.ruleForm,'workshopNumber',this.ruleForm.workshopNumber+'') |
| | | } |
| | | }); |
| | | //规格 |
| | |
| | | }); |
| | | }, |
| | | getGroupNumber(val){ |
| | | if(this.ruleForm.workshopId){ |
| | | if(this.ruleForm.workshopNumber){ |
| | | //组别 |
| | | getWorkshopManageGroup({number:this.ruleForm.workshopId}).then((res) => { |
| | | getWorkshopManageGroup({number:this.ruleForm.workshopNumber}).then((res) => { |
| | | if (res.code == 200) { |
| | | this.workshopGroupList=[] |
| | | 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]) |
| | | } |
| | | this.$set(this.ruleForm,'groupNumber',this.ruleForm.groupNumber) |
| | | // 编辑 |
| | | if(val){ |
| | | this.$set(this.ruleForm,'groupNumber',this.ruleForm.groupNumber) |
| | | } |
| | | } |
| | | }else{ |
| | | this.workshopGroupList=[] |
| | | 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){ |
| | | if( this.nameList[i].number==this.ruleForm.workshopNumber){ |
| | | workshopName= this.nameList[i].name |
| | | break; |
| | | } |
| | |
| | | if(val){ |
| | | this.getTableEdit() |
| | | } |
| | | }else{ |
| | | this.tableData=[] |
| | | this.ruleForm.level='' |
| | | this.ruleForm.carNumber='' |
| | | } |
| | | }); |
| | | } |
| | |
| | | circle: "", |
| | | marketId: "", |
| | | fallingSilkCocoonNumber: "", |
| | | workshopId: "", |
| | | workshopNumber: "", |
| | | bucketCocoonNumber: "", |
| | | groupNumber: "", |
| | | vehicleSpeed: "", |
| | |
| | | form.theorySilkAmount=Number(form.theorySilkAmount) |
| | | form.total=Number(form.total) |
| | | form.vehicleSpeed=Number(form.vehicleSpeed) |
| | | form.workshopId =Number(form.workshopId) |
| | | for(let i in tableData){ |
| | | let listItems1={ |
| | | allYield:Number(tableData[i].allYield1)||0, //产量 |