From 0ab8c82c603f14cf69396b54b0471112b9de947b Mon Sep 17 00:00:00 2001
From: xuxueyang <xuxy@fengyuntec.com>
Date: 星期三, 11 九月 2024 10:32:14 +0800
Subject: [PATCH] update 会员优惠券等

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

diff --git a/sub_pages/supplier/flower-manage/flower-add.vue b/sub_pages/supplier/flower-manage/flower-add.vue
index a501662..cfd84fe 100644
--- a/sub_pages/supplier/flower-manage/flower-add.vue
+++ b/sub_pages/supplier/flower-manage/flower-add.vue
@@ -114,15 +114,13 @@
 			<view class="form-item before-line">
 				<view class="label required">售价(元)</view>
 				<view class="m-l-a m-r-0 flex">
-					<input v-model="dto.price" placeholder="请输入数字" type="digit"
-						style="margin-top: 16px;text-align: right;"></input>
+					<input v-model="dto.price" placeholder="请输入数字" type="digit" class="text-right m-t-15"></input>
 				</view>
 			</view>
 			<view class="form-item ">
 				<view class="label required">库存</view>
 				<view class="m-l-a m-r-0 flex">
-					<input v-model="dto.stock" placeholder="请输入数字" type="number"
-						style="margin-top: 16px;text-align: right;"></input>
+					<input v-model="dto.stock" placeholder="请输入数字" type="number" class="text-right m-t-15"></input>
 				</view>
 			</view>
 
@@ -150,8 +148,17 @@
 			</view>
 			<view class="line-gray-big"></view>
 
+			<view class="form-item  before-line">
+				<view class="label">商品描述</view>
+				<view class="m-l-a m-r-0 flex">
 
-			<view class="form-item before-line">
+				</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>
+			</view>
+
+			<view class="form-item bottom-border-no">
 				<view class="label">商品视频</view>
 				<view class="m-l-a m-r-0 flex">
 					<!-- :style="{'background-image':dto.icon&&`url('${dto.icon}')`||''}" -->
@@ -164,18 +171,10 @@
 			<view v-if="dto.video">
 				<video :src="dto.video" :auto-pause-if-navigate="true" style="display: block;margin: 0 auto;"></video>
 			</view>
-			<view class="form-item bottom-border-no">
-				<view class="label">商品描述</view>
-				<view class="m-l-a m-r-0 flex">
-
-				</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>
-			</view>
 
 
-			<view style="min-height: 200rpx;">
+
+			<view style="min-height: 240rpx;">
 				&nbsp;
 			</view>
 			<view class="button-green-1 m-t-20 button-fixed-bottom " @click="submit" v-if="!dto.id">
@@ -366,10 +365,21 @@
 				this.$refs.picker_category.selectedClear()
 			},
 			async PickCategory(item, e) {
-				console.log('PickCategory', item, e)
+				console.log('PickCategory', item, e, this.columns_categorys_dict)
 				if (e.detail.value) {
 					var currentnode = this.columns_categorys_dict['@' + e.detail.value[e.detail.value.length - 1]
 						.value]
+					let levelLimit = currentnode && currentnode.levelLimit || ''
+					if (!levelLimit) {
+						if (currentnode.parentId) {
+							var currentnodeParentNode = this.columns_categorys_dict['@' + currentnode.parentId]
+							if (currentnodeParentNode) {
+								levelLimit = currentnodeParentNode.levelLimit || ''
+							}
+						}
+					}
+
+
 					let tmpe = e
 
 
@@ -384,11 +394,11 @@
 							this.dto.color = currentnode.color
 							//设置等级
 							// console.log('tmpe', currentnode)
-							if (currentnode.levelLimit) {
+							if (levelLimit) {
 
 								this.columns_levels = []
 								var tarr = []
-								var filterLevel = currentnode.levelLimit.split(",")
+								var filterLevel = levelLimit.split(",")
 								for (var t of this.columns_levels_all) {
 									if (filterLevel.indexOf(t.value) >= 0) {
 										tarr.push(t)
@@ -418,11 +428,11 @@
 					} else {
 						//设置等级
 						// console.log('tmpe', currentnode)
-						if (currentnode.levelLimit) {
+						if (levelLimit) {
 
 							this.columns_levels = []
 							var tarr = []
-							var filterLevel = currentnode.levelLimit.split(",")
+							var filterLevel = levelLimit.split(",")
 							for (var t of this.columns_levels_all) {
 								if (filterLevel.indexOf(t.value) >= 0) {
 									tarr.push(t)

--
Gitblit v1.9.3