From ba6fe53d97201c2cf577a1fb0906c819ea3cae33 Mon Sep 17 00:00:00 2001
From: xuxueyang <xuxy@fengyuntec.com>
Date: 星期二, 30 七月 2024 00:05:20 +0800
Subject: [PATCH] 1

---
 sub_pages/supplier/flower-manage/flower-add.vue |   20 +++++++++-----------
 1 files changed, 9 insertions(+), 11 deletions(-)

diff --git a/sub_pages/supplier/flower-manage/flower-add.vue b/sub_pages/supplier/flower-manage/flower-add.vue
index 896afcc..b234d61 100644
--- a/sub_pages/supplier/flower-manage/flower-add.vue
+++ b/sub_pages/supplier/flower-manage/flower-add.vue
@@ -163,17 +163,11 @@
 			<view class="form-item bottom-border-no">
 				<view class="label">商品描述</view>
 				<view class="m-l-a m-r-0 flex">
-					<!-- 	<u-input type="textarea" v-model="dto.description" placeholder="请输入商品描述" type="number"
-						></u-input> -->
-					<!-- 					<u--textarea v-model="dto.description" style="margin-top: 16px;"
-						placeholder="请输入商品描述" count></u--textarea> -->
-					<!-- <uni-easyinput  v-model="dto.description" placeholder="请输入商品描述" ></uni-easyinput> -->
 
 				</view>
 			</view>
 			<view style="min-width: 500rpx;margin-left: 20rpx;margin-right: 20rpx;margin-top: 20rpx;">
-				<u--textarea v-model="dto.description" autoHeight
-					placeholder="请输入商品描述"></u--textarea>
+				<u--textarea v-model="dto.description" autoHeight placeholder="请输入商品描述"></u--textarea>
 			</view>
 
 
@@ -539,16 +533,20 @@
 					return
 				}
 				var tmp = parseFloat(this.dto.price)
-				if (isNaN(tmp) || ('' + tmp) !== ('' + this.dto.price)) {
+				if (isNaN(tmp) || parseFloat('' + tmp).toFixed(3) !== parseFloat('' + this.dto.price).toFixed(3)) {
 					this.$message.showToast('商品价格格式错误,精确到分')
+					console.log('a1', ('' + tmp) )
+					console.log('a1', ('' + this.dto.price))
 					return
 				}
-				if ((tmp.toFixed(2) + '' + '0') !== tmp.toFixed(3)) {
+				if ((tmp.toFixed(2) + '' + '0') !== ('' + tmp.toFixed(3))) {
 					this.$message.showToast('商品价格至多精确到分')
+					console.log('a1', (tmp.toFixed(2) + '' + '0'))
+					console.log('a1', tmp.toFixed(3))
 					// console.log('tmp.toFixed(2)',tmp.toFixed(2),tmp.toFixed(3))
 					return
 				} else {
-					this.dto.price = this.dto.price.toFixed(2)
+					this.dto.price = tmp.toFixed(2)
 				}
 				if (this.dto.price <= 0) {
 					this.$message.showToast('商品价格不能小于等于0')
@@ -626,7 +624,7 @@
 			uploadIcon(key) {
 				console.log('that dto key', key)
 				const that = this
-				if (key == 'video') {
+				if (key === 'video') {
 					uni.chooseVideo({
 						maxDuration: 30,
 						sourceType: ['camera', 'album'],

--
Gitblit v1.9.3