From 767ca1416d96ff1d2f8d346c0a1bdd36bc6557f5 Mon Sep 17 00:00:00 2001
From: 陶杰 <1378534974@qq.com>
Date: 星期二, 12 十一月 2024 13:18:32 +0800
Subject: [PATCH] 1.增加类别和花名搜索

---
 sub_pages/supplier/wallet/wallet-withdrao-deposit.vue |    4 +-
 sub_pages/supplier/flower-manage/flower-manage.vue    |   62 +++++++++++++++++++++++++++++-
 sub_pages/supplier/wallet/wallet-deduction-record.vue |    3 +
 3 files changed, 63 insertions(+), 6 deletions(-)

diff --git a/sub_pages/supplier/flower-manage/flower-manage.vue b/sub_pages/supplier/flower-manage/flower-manage.vue
index 354a114..6ffbd4b 100644
--- a/sub_pages/supplier/flower-manage/flower-manage.vue
+++ b/sub_pages/supplier/flower-manage/flower-manage.vue
@@ -15,6 +15,33 @@
 				<view v-if="type === 'delete'" class="button" @click.stop="recoverSelected()">恢复</view>
 			</view>
 		</view>
+		<view style="background-color: white; margin: 10rpx;">
+			<view>
+				<u--input
+				    placeholder="请输入商品名称"
+				    border="surround"
+				    v-model="query.name"
+				    @change="flowerLevelChange"
+				  ></u--input>
+			</view>
+			<view style="margin-top: 10px;">
+				<u-radio-group
+				    v-model="query.level"
+				    placement="row"
+				    @change="flowerLevelChange"
+				  >
+				    <u-radio
+				      :customStyle="{marginBottom: '8px'}"
+				      v-for="(item, index) in columns_levels"
+				      :key="index"
+				      :label="item.label"
+				      :name="item.value"
+				 
+				    >
+				    </u-radio>
+				  </u-radio-group>
+			</view>  
+		</view>
 
 		<view class="p15" style="min-height: calc(100vh - 500rpx);">
 			<no-data v-if="!list||list.length==0" style="width: 100%;"></no-data>
@@ -39,8 +66,8 @@
 						<view class="flex1">
 							<view class=" flex">
 								<view class="title">{{item.name}}<span class="level">{{item.levelStr}}</span></view>
-								<view class="m-l-a m-r-0"><span class="label">排名</span><span
-										class="value">{{item.typeRank || '-'}}</span></view>
+								<view class="m-l-a m-r-0"><span class="label t-red">排名</span><span
+										class="value t-red">{{item.typeRank || '-'}}</span></view>
 
 								<view class="m-l-a m-r-0">
 									{{item.categoryStr || '-'}}
@@ -147,7 +174,9 @@
 			return {
 				type: 'all',
 				query: {
-					type: ''
+					type: '',
+					name:'',
+					level:'',
 				},
 				content: '',
 				currentInputDto: {},
@@ -155,15 +184,18 @@
 				inputplaceholder: '',
 				selectedFlowers: [], // 存储选中的花的 ID
 				ids: [],
+				columns_levels:[]
 			}
 		},
 		onShow() {
+			console.log("onShow")
 			if (this.sign['flower']) {
 				this.$store.dispatch('sign_clear', 'flower');
 				this.refreshList()
 			}
 		},
 		async onLoad(options) {
+			console.log("onLoad")
 			this.type = options.type || 'all'
 			var title = ''
 			this.page.size = 20
@@ -199,6 +231,8 @@
 			}
 			await this.$store.dispatch('sign_clear', 'flower');
 			this.getList()
+			// 获取商品等级
+			this.getFlowerLevel()
 		},
 		onReachBottom() {
 			console.log('onReachBottom')
@@ -210,6 +244,28 @@
 			uni.stopPullDownRefresh()
 		},
 		methods: {
+			
+			flowerLevelChange(){
+				this.refreshList()
+			},
+			
+			async getFlowerLevel(){
+				this.$http.request('get', '/api/code/value', {
+					params: {
+						type: 'FLOWER_LEVEL'
+					}
+				}).then(res => {
+					var data = res.data
+					// this.columns_levels_all = data || []
+					let tmp = data || []
+					tmp.unshift({
+						label: '全部',
+						value: ''
+					})
+					this.columns_levels=tmp
+				
+				})
+			},
 			async openValue(item, key) {
 				this.content = item[key] || ''
 				this.currentInputDto = item
diff --git a/sub_pages/supplier/wallet/wallet-deduction-record.vue b/sub_pages/supplier/wallet/wallet-deduction-record.vue
index 4071d06..a636975 100644
--- a/sub_pages/supplier/wallet/wallet-deduction-record.vue
+++ b/sub_pages/supplier/wallet/wallet-deduction-record.vue
@@ -38,7 +38,8 @@
 							<text class="f10">类别:{{item.typeName}}</text>
 						</view>
 						<view slot="label">
-							<text class="f10">时间:{{getYyyyMmDdHh24Mi(item.auditTime)}}</text>
+							<!-- <text class="f10">时间:{{getYyyyMmDdHh24Mi(item.auditTime)}}</text> -->
+							<text class="f10">时间:{{getYyyyMmDdHh24Mi(item.paymentTime)}}</text>
 						</view>
 						<view slot="value" class="content-right">
 							<view class="f10">¥ {{item.fee}}</view>
diff --git a/sub_pages/supplier/wallet/wallet-withdrao-deposit.vue b/sub_pages/supplier/wallet/wallet-withdrao-deposit.vue
index 1ad2586..d5b1e34 100644
--- a/sub_pages/supplier/wallet/wallet-withdrao-deposit.vue
+++ b/sub_pages/supplier/wallet/wallet-withdrao-deposit.vue
@@ -122,8 +122,8 @@
 			           return callback(new Error('提现金额必须是有效的数字(最多两位小数)'));
 			       }
 				   // 提现金额要大于0	
-				   if (value <= 0) {
-						return callback(new Error('提现金额必须大于0'));
+				   if (value < 0.1) {
+						return callback(new Error('提现金额必须大于0.1'));
 					}
 				   if (value > this.wallet.withdrawableAmount) {
 						return callback(new Error('提现金额不能大于可提现金额'));

--
Gitblit v1.9.3