From 8b154f4de01a1b8a75e9f4cfa4496d7fbec6e992 Mon Sep 17 00:00:00 2001 From: dingtalk_umvbsp Date: Mon, 20 Feb 2023 11:33:25 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E4=BA=A4=E6=98=93=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=20=20=E4=BF=AE=E6=94=B9=E4=BA=A4=E6=98=93=E6=95=B0?= =?UTF-8?q?=E9=87=8F=E8=A1=A8=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/massif/add_transaction.vue | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/pages/massif/add_transaction.vue b/pages/massif/add_transaction.vue index 793c1e0..a06c312 100644 --- a/pages/massif/add_transaction.vue +++ b/pages/massif/add_transaction.vue @@ -59,7 +59,7 @@ / - + @@ -103,6 +103,11 @@ export default { eventChannel:null, } }, + computed:{ + tradeNum(){ + return Math.round((parseFloat(this.formData.tradeWeight)/parseFloat(this.formData.specification)||0)*100)/100 + }, + }, onLoad(options){ this.eventChannel=this.getOpenerEventChannel() this.eventChannel.on("detail", e=>{ @@ -148,7 +153,10 @@ export default { if(valid){ var res=await request("/api/plantTrade/add",{ method:"post", - body: this.formData + body: { + ...this.formData, + tradeNum: this.tradeNum + } }) if(res.statu){ uni.navigateBack()