From ea7e4ddb276930541a7bdf7e8c33cffd92dfc906 Mon Sep 17 00:00:00 2001 From: admin <> Date: Mon, 22 Jul 2024 17:14:00 +0800 Subject: [PATCH] =?UTF-8?q?update:=20=E5=8D=95=E4=BB=B7=E5=92=8C=E5=AE=9E?= =?UTF-8?q?=E9=99=85=E9=87=91=E9=A2=9D=20=E7=BB=93=E7=AE=97=E5=8D=95?= =?UTF-8?q?=E4=BB=B7=20=E7=BB=93=E7=AE=97=E9=87=91=E9=A2=9D=E6=8E=A7?= =?UTF-8?q?=E5=88=B6=E5=B0=8F=E6=95=B0=E4=BD=8D=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pagesApp/receiveSpl.vue | 19 +++- src/pagesApp/shipmentSpl.vue | 1 + src/pagesReceive/form/pricingForm.vue | 34 +++++-- src/pagesShipment/form/settlementForm.vue | 35 ++++++- src/utils/index.ts | 109 ++++++++++++---------- 5 files changed, 133 insertions(+), 65 deletions(-) diff --git a/src/pagesApp/receiveSpl.vue b/src/pagesApp/receiveSpl.vue index cd9ec5a..4ffca4f 100644 --- a/src/pagesApp/receiveSpl.vue +++ b/src/pagesApp/receiveSpl.vue @@ -127,12 +127,10 @@ import { DeviceApi, PictureApi, - ProfileApi, ReceiveApi, ReceiveProductApi, - SupplierApi, } from "@/services"; -import { countDots, formatDate } from "@/utils"; +import { countDots, formatDate, isTwoDecimalPlaces } from "@/utils"; import { DeviceType, ImagesType, OrderType } from "@/utils/enum"; import _ from "underscore"; import ProductDialog from "@/components/Dialog/ProductDialog.vue"; @@ -570,6 +568,21 @@ const save = () => { }); return; } + + if (countDots(model1.order.price) === 1 && isTwoDecimalPlaces(model1.order.price)) { + uni.showToast({ + title: "单价最多只能输入2位小数", + icon: "none", + }); + return + } + if (countDots(model1.order.balanceTotalPrice) === 1 && isTwoDecimalPlaces(model1.order.balanceTotalPrice)) { + uni.showToast({ + title: "实际付款最多只能输入2位小数", + icon: "none", + }); + return + } check().then((res) => { if (res) { startSave(); diff --git a/src/pagesApp/shipmentSpl.vue b/src/pagesApp/shipmentSpl.vue index 2230bb8..45c08bd 100644 --- a/src/pagesApp/shipmentSpl.vue +++ b/src/pagesApp/shipmentSpl.vue @@ -546,6 +546,7 @@ const save = () => { }); return; } + check().then((res) => { if (res) { startSave(); diff --git a/src/pagesReceive/form/pricingForm.vue b/src/pagesReceive/form/pricingForm.vue index c864995..ab2e324 100644 --- a/src/pagesReceive/form/pricingForm.vue +++ b/src/pagesReceive/form/pricingForm.vue @@ -137,18 +137,13 @@