| | |
| | | </div> |
| | | </div> |
| | | <!-- 仪器连接正常弹窗 --> |
| | | <addProductDialog ref="addProductDialog" /> |
| | | <addProductDialog ref="addProductDialog" |
| | | :marketList='marketList' |
| | | :nameList='nameList' |
| | | :form='ruleForm' |
| | | :specList='specList' |
| | | @changeForm='changeForm' |
| | | @changeTableInput='changeTableInput' /> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | this.getSelectDataList(); |
| | | }, |
| | | methods: { |
| | | changeForm(form,val){ |
| | | if(val){ |
| | | this.ruleForm.createTime=form.createTime |
| | | this.ruleForm.groupNumber=form.groupNumber |
| | | this.ruleForm.spec=form.spec |
| | | this.ruleForm.marketId=form.marketId |
| | | this.getGroupNumber() |
| | | } |
| | | }, |
| | | changeTableInput(form){ |
| | | debugger |
| | | let string='' |
| | | for(let i in this.tableData){ |
| | | if(this.tableData[i].carNumber==form.carNumber){ |
| | | string=i |
| | | if(Number(form.pieceNumber)>0&&Number(form.pieces)<5){ |
| | | this.$set(this.tableData[i],'pieceNumber'+form.pieceNumber+form.pieces,form.netWeight) |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | if(form.pieceNumber==3&&form.pieces==4){ |
| | | this.$refs.addProductDialog.proForm.carNumber=this.tableData[Number(string)+1].carNumber |
| | | }else{ |
| | | if(form.pieces==4){ |
| | | this.$refs.addProductDialog.proForm.pieceNumber=Number(form.pieceNumber)+1 |
| | | this.$refs.addProductDialog.proForm.pieces=1 |
| | | }else{ |
| | | this.$refs.addProductDialog.proForm.pieces=Number(form.pieces)+1 |
| | | } |
| | | } |
| | | this.$refs.addProductDialog.proForm.netWeight='' |
| | | this.$forceUpdate(); |
| | | }, |
| | | getSelectDataList() { |
| | | //车间 |
| | | getDictList({ |
| | |
| | | } |
| | | } |
| | | } |
| | | this.ruleForm.carNumber=this.tableData.length>0?this.tableData[0].carNumber:'' |
| | | } |
| | | }); |
| | | } |
| | |
| | | // 仪器连接弹窗 |
| | | deviceConnectClick() { |
| | | if (this.isDeviceConnectStatus) { |
| | | this.$refs.addProductDialog.proForm.pieceNumber=1 |
| | | this.$refs.addProductDialog.proForm.pieces=1 |
| | | this.$forceUpdate(); |
| | | this.$refs.addProductDialog.editDialogVisible = true; |
| | | } |
| | | }, |
| | |
| | | }, |
| | | // 放弃 |
| | | cancelClickOne() { |
| | | this.form = { |
| | | this.ruleForm = { |
| | | number: "", |
| | | finishDate: "", |
| | | market: "", |
| | | name: "", |
| | | spec: "", |
| | | workshopGroup: "", |
| | | circleTwo: "", |
| | | record: "", |
| | | createTime: "", |
| | | circle: "", |
| | | totalCircle: "", |
| | | position: "", |
| | | marketId: "", |
| | | fallingSilkCocoonNumber: "", |
| | | workshopId: "", |
| | | bucketCocoonNumber: "", |
| | | groupNumber: "", |
| | | vehicleSpeed: "", |
| | | spec: "", |
| | | timeYi: "", |
| | | jieZhuang: "", |
| | | timeJia: "", |
| | | level: "", |
| | | groupReelingdiscount: "", |
| | | fallingSilkBucket: "", |
| | | fallingSilkBucketOne: "", |
| | | isfallingSilkBucketOne: "", |
| | | fallingSilkBucketTwo: "", |
| | | isfallingSilkBucketTwo: "", |
| | | fallingSilkBucketThree: "", |
| | | isfallingSilkBucketThree: "", |
| | | back: "", |
| | | oneBack: "", |
| | | twoBack: "", |
| | | threeBack: "", |
| | | theorySilkAmount: "", |
| | | total: "", |
| | | hourYield: "", |
| | | }; |
| | | this.$refs.form.resetFields(); |
| | | this.productId = 1; |
| | | this.tableList.tableData = [ |
| | | { |
| | | productId: 1, |
| | | position: "", |
| | | fineness: 0, |
| | | quantity: 0, |
| | | sum: "", |
| | | }, |
| | | ]; |
| | | this.$refs.ruleForm.resetFields(); |
| | | this.tableData = []; |
| | | }, |
| | | // 保存 |
| | | saveClickOne(formName) { |