From 659dbb171df548be4fb777bb90f1b043ab2e77ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=98huanghaiixia=E2=80=99?= <980486410@.com> Date: Wed, 25 Mar 2026 09:06:47 +0800 Subject: [PATCH] =?UTF-8?q?=E5=87=BA=E5=BA=93=E5=B0=8F=E6=95=B0=E4=BD=8D?= =?UTF-8?q?=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LngInventoryOut/components/createForm.vue | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/views/inventory/LngInventoryOut/components/createForm.vue b/src/views/inventory/LngInventoryOut/components/createForm.vue index 4673226..ed93093 100644 --- a/src/views/inventory/LngInventoryOut/components/createForm.vue +++ b/src/views/inventory/LngInventoryOut/components/createForm.vue @@ -278,32 +278,32 @@ if (formState.uomCode == 'GJ') { if (!formState.qtyTon) { - formState.qtyTon = (Number(formState.rateTonGj) ? Number(formState.qtyGj || 0)/Number(formState.rateTonGj) : 0).toFixed(3) + formState.qtyTon = Number(formState.rateTonGj) ? Number(formState.qtyGj || 0)/Number(formState.rateTonGj) : 0 amountCount() } if (!formState.amount) { - formState.amount = (Number(formState.qtyGj || 0)*Number(formState.priceGj || 0)).toFixed(2) + formState.amount = Number(formState.qtyGj || 0)*Number(formState.priceGj || 0) amountCount() } } if (formState.uomCode == 'TON') { if (!formState.qtyGj) { - formState.qtyGj = (Number(formState.qtyTon || 0)*Number(formState.rateTonGj || 0)).toFixed(3) + formState.qtyGj = Number(formState.qtyTon || 0)*Number(formState.rateTonGj || 0) amountCount() } if (!formState.amount) { - formState.amount = (Number(formState.qtyTon || 0)*Number(formState.priceTon || 0)).toFixed(2) + formState.amount = Number(formState.qtyTon || 0)*Number(formState.priceTon || 0) amountCount() } } } const amountCount = () => { if (!formState.priceTon) { - formState.priceTon = (Number(formState.qtyTon) ? Number(formState.amount || 0)/Number(formState.qtyTon) : 0).toFixed(4) + formState.priceTon = Number(formState.qtyTon) ? Number(formState.amount || 0)/Number(formState.qtyTon) : 0 } if (!formState.priceGj) { - formState.priceGj = (Number(formState.qtyGj) ? Number(formState.amount || 0)/Number(formState.qtyGj) : 0).toFixed(4) + formState.priceGj = Number(formState.qtyGj) ? Number(formState.amount || 0)/Number(formState.qtyGj) : 0 } } const onSearchStation = (val)=> { @@ -336,6 +336,11 @@ await formRef.value.validateFields(); let obj = { ...formState, + qtyTon: formState.qtyTon ? formState.qtyTon.toFixed(3) : formState.qtyTon, + amount: formState.amount ? formState.amount.toFixed(2) : formState.amount, + qtyGj: formState.qtyGj ? formState.qtyGj.toFixed(3) : formState.qtyGj, + priceTon: formState.priceTon ? formState.priceTon.toFixed(4) : formState.priceTon, + priceGj: formState.priceGj ? formState.priceGj.toFixed(4) : formState.priceGj, lngFileUploadList: dataFile.value, } spinning.value = true;