From 3917bfce75349ac3fb0d0e5e4078dc99072a2d8e Mon Sep 17 00:00:00 2001 From: haoxuan <haoxuan> Date: 星期三, 10 四月 2024 18:52:33 +0800 Subject: [PATCH] 产量登记表连接设备的弹框样式开发+字段调试,下拉数据的接口联调问题 --- src/views/productManage/productRegisterForm/addProductRegisterPage.vue | 97 ++++++++++++++++++++++++++++++++++++++---------- 1 files changed, 76 insertions(+), 21 deletions(-) diff --git a/src/views/productManage/productRegisterForm/addProductRegisterPage.vue b/src/views/productManage/productRegisterForm/addProductRegisterPage.vue index a54c344..bddc310 100644 --- a/src/views/productManage/productRegisterForm/addProductRegisterPage.vue +++ b/src/views/productManage/productRegisterForm/addProductRegisterPage.vue @@ -544,7 +544,13 @@ </div> </div> <!-- 浠櫒杩炴帴姝e父寮圭獥 --> - <addProductDialog ref="addProductDialog" /> + <addProductDialog ref="addProductDialog" + :marketList='marketList' + :nameList='nameList' + :form='ruleForm' + :specList='specList' + @changeForm='changeForm' + @changeTableInput='changeTableInput' /> </div> </template> @@ -637,6 +643,40 @@ 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({ @@ -692,6 +732,7 @@ } } } + this.ruleForm.carNumber=this.tableData.length>0?this.tableData[0].carNumber:'' } }); } @@ -708,6 +749,9 @@ // 浠櫒杩炴帴寮圭獥 deviceConnectClick() { if (this.isDeviceConnectStatus) { + this.$refs.addProductDialog.proForm.pieceNumber=1 + this.$refs.addProductDialog.proForm.pieces=1 + this.$forceUpdate(); this.$refs.addProductDialog.editDialogVisible = true; } }, @@ -717,29 +761,40 @@ }, // 鏀惧純 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) { -- Gitblit v1.8.0