Parcourir la source

Merge branch 'master' of http://39.101.143.165:8090/hxl13994548489/LocalLivingServicesUniapp

baijunde il y a 8 mois
Parent
commit
4580240a01

+ 10 - 10
pages/groupMeal/users/index.vue

@@ -29,16 +29,16 @@ export default {
 					icon: '/static/groupMeal/icon_user.png',
 					path: '/pages/groupMeal/users/team-member'
 				},
-				{
-					name: '团餐设置',
-					icon: '/static/groupMeal/icon_file.png',
-					path: '/pages/groupMeal/users/settings?isEnterprise=1'
-				},
-				{
-					name: '企业团餐设置',
-					icon: '/static/groupMeal/icon_build.png',
-					path: '/pages/groupMeal/users/settings?isEnterprise=2'
-				},
+				// {
+				// 	name: '团餐设置',
+				// 	icon: '/static/groupMeal/icon_file.png',
+				// 	path: '/pages/groupMeal/users/settings?isEnterprise=1'
+				// },
+				// {
+				// 	name: '企业团餐设置',
+				// 	icon: '/static/groupMeal/icon_build.png',
+				// 	path: '/pages/groupMeal/users/settings?isEnterprise=2'
+				// },
 			]
 		}
 	},

+ 261 - 40
pages/product/creatProduct.vue

@@ -23,7 +23,7 @@
 						商品名称<span v-if="tabIndex == '0'">*</span>
 					</view>
 					<view class="picker">
-						<u-input :disabled="tabIndex == 1" v-model="form.productName" placeholder="输入商品名称" />
+						<u-input :disabled="tabIndex == 1" v-model="form.productName" placeholder="输入" />
 					</view>
 				</view>
 				<view class="item">
@@ -31,7 +31,7 @@
 						商品分类<span v-if="tabIndex == '0'">*</span>
 					</view>
 					<view class="picker" @click="selectProductType">
-						<span v-if="showText == ''">选择商品分类</span>
+						<span v-if="showText == ''">选择</span>
 						<span v-else style="color: #333333;">{{ showText }}</span>
 						<u-icon name="arrow-right"></u-icon>
 					</view>
@@ -47,7 +47,7 @@
 						商品分组<span v-if="tabIndex == '0'">*</span>
 					</view>
 					<view class="picker" @click="selectGrouping">
-						<span v-if="form.groupingName == ''">选择商品分组</span>
+						<span v-if="form.groupingName == ''">选择</span>
 						<span v-else style="color: #333333;">{{ form.groupingName }}</span>
 						<u-icon name="arrow-right"></u-icon>
 					</view>
@@ -193,7 +193,8 @@
 						商品售价<span>*</span>
 					</view>
 					<view class="picker">
-						<u-input v-model="form.price" placeholder="请输入" />
+						<u-input type="number" v-model.number="form.price" placeholder="请输入"
+							@blur="checkPriceAndSoldPrice('price')" />
 					</view>
 					<view class="unit">
@@ -204,7 +205,8 @@
 						商品市场价<span v-if="tabIndex == '1'">*</span>
 					</view>
 					<view class="picker">
-						<u-input type="num" v-model="form.soldPrice" placeholder="请输入" />
+						<u-input type="number" v-model.number="form.soldPrice" placeholder="请输入"
+							@blur="checkPriceAndSoldPrice('soldPrice')" />
 					</view>
 					<view class="unit">
@@ -240,19 +242,62 @@
 									每天
 								</span>
 								<span v-if="form.sellingTimeType == '2'" style="margin-left: 26rpx;">
-									<u-button type="primary" size="mini" @click="selectSaleDate">添加时间段</u-button>
+									<u-button type="primary" size="mini" @click="selectSaleDate">添加时间</u-button>
+								</span>
+							</u-radio>
+							<u-radio @change="form.sellingTimeType = '3'" name="week" style="width: 100%;margin-top: 16rpx;">
+								<span>
+									每周
 								</span>
 							</u-radio>
 						</u-radio-group>
-						<uni-card v-show="form.sellingDay && form.sellingDay.length > 0" :is-shadow="false" is-full
-							style="border:1rpx solid #E5E5E5;">
+						<!-- 每天售卖时间选择 -->
+						<uni-card v-show="form.sellingTimeType == '2' && form.sellingDay && form.sellingDay.length > 0"
+							:is-shadow="false" is-full style="border:1rpx solid #E5E5E5;">
 							<view v-for="item, index in form.sellingDay" :key="index"
 								style="display: flex; justify-content: space-between;">
 								<span>{{ item[0] }}</span>
-								<span style="color: #2979ff;" @click="deleteTime(index)"><u-icon name="minus-circle-fill"
+								<!-- <span>{{ item[0] ? item[0] + '-' + item[1] : '' }}</span> -->
+								<span style="color: #dd524d;" @click="deleteTime(index)"><u-icon name="minus-circle-fill"
 										style="margin-left: 17rpx;"></u-icon></span>
 							</view>
 						</uni-card>
+						<view class="item_tips saletime" v-show="form.sellingTimeType == '2' && form.sellingDay.length == 0">
+							请添加起止时间段
+						</view>
+						<!-- 每周售卖时间选择 -->
+						<uni-table v-show="form.sellingTimeType == '3'">
+							<!-- 表头 -->
+							<uni-tr class="table-header">
+								<uni-th width="200rpx" align="left"><u-checkbox v-model:checked="allChecked"
+										@change="handleAllCheckChange"></u-checkbox>工作日</uni-th>
+								<uni-th align="center">时间</uni-th>
+								<uni-th width="100rpx" align="center">操作</uni-th>
+							</uni-tr>
+							<!-- 数据行 -->
+							<uni-tr v-for="(item, index) in form.localProductSellingWeeks" :key="index" class="table-row">
+								<uni-td width="200rpx" align="left">
+									<u-checkbox v-model="item.checked"
+										@change="handleItemCheckChange($event, item, index)"></u-checkbox>{{
+											item.weekDay }}
+								</uni-td>
+								<uni-td align="left">
+									<view v-for="(date, timeIndex) in item.sellingStartTimeList" :key="timeIndex" class="item_weekTime">
+										<span>{{ date[0] }}</span>
+										<!-- <span>{{ date[0] ? date[0] + '-' + date[1] : '' }}</span> -->
+										<span v-show="date[0]" style="color: #dd524d;" @click="deleteWeekTime(item, timeIndex)">
+											<u-icon name="minus-circle-fill" style="margin-left: 17rpx;"></u-icon>
+										</span>
+									</view>
+								</uni-td>
+								<uni-td width="100rpx" align="center">
+									<view class="uni-group">
+										<span style="color: #007aff;" @click="addWeekTime(item)"><u-icon
+												name="plus-circle-fill"></u-icon></span>
+									</view>
+								</uni-td>
+							</uni-tr>
+						</uni-table>
 						<view>
 						</view>
 					</view>
@@ -282,13 +327,11 @@
 					</view>
 				</view>
 				<view class="item upload" style="border: none;">
-					<view class="label">
+					<view class="label" style="margin-bottom: 8rpx;">
 						服务说明<span>*</span>
 					</view>
-					<!-- <view class="radio-group"> -->
 					<uni-data-checkbox multiple v-model="form.serviceDescription"
 						:localdata="optionsDescription"></uni-data-checkbox>
-					<!-- </view> -->
 				</view>
 				<!-- <view class="form" style="margin-bottom: 24rpx;">
 					<view class="titl ">
@@ -398,6 +441,7 @@
 		</view>
 		<rangTime ref="rangTime" :mode="mode" @onSubmit="onEndTimeChange" :title="timeTitle" />
 		<rangTime ref="rangSaleTime" :mode="mode" @onSubmit="onSaleTimeChange" :title="timeTitle" />
+		<rangTime ref="rangWeekTime" :mode="mode" @onSubmit="onWeekTimeChange" :title="timeTitle" />
 		<refund v-show="isRefund" :Confirm="form.refundConfirm" :Label="form.refundLabel" @confirm="saveFound"
 			@close="cutRule" />
 		<view class="popup" v-if="isSelectType">
@@ -461,6 +505,7 @@ export default {
 			video: '',
 			tabIndex: '0',
 			mode: 5,
+			allChecked: false,
 			form: {
 				instructions: '',
 				preBook: 0,
@@ -475,6 +520,7 @@ export default {
 				richText: '',
 				// 为"每天"选项添加单独的时间段数组
 				sellingDay: [],
+				localProductSellingWeeks: []
 				// categoryId:'',
 				// productName: '',
 				// productImage: '',
@@ -538,7 +584,45 @@ export default {
 			timeTitle: '选择售卖时间',
 			// 商品分组列表
 			showGroupPicker: false,
-			groupOptions: []
+			groupOptions: [],
+			// 为"每周"选项添加单独的时间段数组
+			localProductSellingWeeks: [
+				{
+					weekDay: '周一',
+					sellingStartTimeList: [],
+					checked: false
+				},
+				{
+					weekDay: '周二',
+					sellingStartTimeList: [],
+					checked: false
+				},
+				{
+					weekDay: '周三',
+					sellingStartTimeList: [],
+					checked: false
+				},
+				{
+					weekDay: '周四',
+					sellingStartTimeList: [],
+					checked: false
+				},
+				{
+					weekDay: '周五',
+					sellingStartTimeList: [],
+					checked: false
+				},
+				{
+					weekDay: '周六',
+					sellingStartTimeList: [],
+					checked: false
+				},
+				{
+					weekDay: '周日',
+					sellingStartTimeList: [],
+					checked: false
+				}
+			]
 		}
 	},
 	methods: {
@@ -711,7 +795,48 @@ export default {
 			uni.navigateTo({
 				url: '/pages/product/usable'
 			})
+		},
+		// 更新时间
+		updateRangeTime() {
+			uni.getStorage({
+				key: 'smdate',
+				success: (res) => {
+					if (res.data.useType == 2) {
+						this.showSellDate = res.data.availableStartDate + '-' + res.data.availableEndDate
+						this.form.availableStartDate = res.data.availableStartDate
+						this.form.availableEndDate = res.data.availableEndDate
+						this.form.expirationDays = null
+						this.form.useType = 2
+					} else if (res.data.useType == 1) {
+						this.form.expirationDays = res.data.expirationDays
+						this.form.availableEndDate = null
+						this.form.availableStartDate = null
+						this.form.useType = 1
+						this.$nextTick(() => {
+							this.showSellDate = res.data.expirationDays + '天后失效'
+						});
+					} else if (res.data.useType == 3) {
+						this.form.useType = 3
+						this.showSellDate = '长期有效'
+					}
 
+				}
+			})
+		},
+		// 校验商品市场价必须大于商品售价
+		checkPriceAndSoldPrice(field) {
+			if ((field == 'price' && this.form.soldPrice) || (field == 'soldPrice' && this.form.price)) {
+				if (this.form.soldPrice <= this.form.price) {
+					uni.showToast({
+						title: '商品市场价必须大于商品售价',
+						icon: 'none',
+						duration: 2000
+					});
+					this.$nextTick(() => {
+						this.form[field] = '';
+					});
+				}
+			}
 		},
 		// 保存退款规则
 		saveFound(rules) {
@@ -821,7 +946,7 @@ export default {
 		},
 		//获取商品分组列表
 		getProductGroup() {
-			this.$http.get("/localProductGrouping/localProductGrouping/getList").then(res => {
+			this.$http.get("/localProductGrouping/localProductGrouping/getAppList?sourceType=1").then(res => {
 				if (res.data.success) {
 					this.groupOptions = res.data.result || []
 				}
@@ -843,11 +968,14 @@ export default {
 			this.showDate = val.startDate + '-' + val.endDate
 			this.$forceUpdate(); // 强制刷新视图
 		},
+		// 选择售卖时间
 		selectSaleDate() {
 			this.$refs.rangSaleTime.open()
 		},
 		onSaleTimeChange(val) {
 			if (val && val.startDate && val.endDate) {
+				// const timeRange = [val.startDate, val.endDate];
+				// this.form.sellingDay.push(timeRange)
 				const timeRange = `${val.startDate}-${val.endDate}`;
 				this.form.sellingDay.push([timeRange])
 			}
@@ -857,10 +985,93 @@ export default {
 			this.form.sellingDay.splice(index, 1);
 			this.$forceUpdate(); // 强制刷新视图
 		},
+		// 选择每周售卖时间
+		// 全选/全不选处理
+		handleAllCheckChange(e) {
+			const checked = e.value;
+			if (!checked) {
+				// 显示确认提示框
+				uni.showModal({
+					title: '提示',
+					content: '取消全选将清空每周已添加的时间段,是否继续',
+					success: (res) => {
+						if (res.confirm) {
+							// 用户确认取消全选,清空时间段数据
+							this.allChecked = checked;
+							this.form.localProductSellingWeeks.forEach(item => {
+								item.checked = checked;
+								// 当取消全选时,清空所有时间段
+								if (!checked) {
+									item.sellingStartTimeList = [];
+								}
+							});
+						} else {
+							this.allChecked = true;
+						}
+					}
+				});
+			} else {
+				this.allChecked = checked;
+				this.form.localProductSellingWeeks.forEach(item => {
+					item.checked = checked;
+					// 当取消全选时,清空所有时间段
+					if (!checked) {
+						item.sellingStartTimeList = [];
+					}
+				});
+			}
+		},
+		// 单个复选框变化处理
+		handleItemCheckChange(e, row) {
+			// 获取最新的复选框状态
+			const isChecked = e.value;
+			// 判断如果checked状态是false,清空该行的sellingStartTimeList日期
+			if (!isChecked) {
+				// 确保sellingStartTimeList是响应式的
+				if (!row.sellingStartTimeList) {
+					this.$set(row, 'sellingStartTimeList', []);
+				} else {
+					// 清空数组,保持引用
+					row.sellingStartTimeList.splice(0, row.sellingStartTimeList.length);
+				}
+			}
+		},
+		// 每周添加时间
+		addWeekTime(item) {
+			// 判断如果当前行的checked状态是false,提示用户先勾选
+			if (!item.checked) {
+				uni.showToast({
+					title: '请先勾选当前行',
+					icon: 'none'
+				});
+				return; // 终止后续操作
+			}
+			this.addWeekDay = item.weekDay
+			this.$refs.rangWeekTime.open()
+		},
+		// 每周删除时间
+		deleteWeekTime(item, timeIndex) {
+			// 使用splice删除指定索引的时间段
+			item.sellingStartTimeList.splice(timeIndex, 1);
+			this.$forceUpdate(); // 强制刷新视图
+		},
+		onWeekTimeChange(val) {
+			if (val && val.startDate && val.endDate) {
+				const timeRange = `${val.startDate}-${val.endDate}`;
+				// const timeRange = [val.startDate, val.endDate];
+				this.form.localProductSellingWeeks.forEach(item => {
+					if (item.weekDay == this.addWeekDay) {
+						item.sellingStartTimeList.push([timeRange])
+					}
+				})
+			}
+			this.$forceUpdate(); // 强制刷新视图
+		},
 		//提交审核
 		submit() {
 			console.log(this.form)
 			this.form.specItems = this.selectProductSunItem
+			this.form.isApp = '1'
 			this.makeChecked ? this.form.preBook = 1 : this.form.preBook = 0
 			// if (!this.form.saleStartDate) {
 			// 	uni.showToast({
@@ -923,6 +1134,11 @@ export default {
 				});
 				return
 			} else {
+				if(this.form.sellingTimeType == '3') {
+					this.form.sellingDay = []
+				} else if(this.form.sellingTimeType == '2') {
+					this.form.localProductSellingWeeks = this.localProductSellingWeeks
+				}
 				if (this.productId == '') {
 					this.$http.post("/app/product/add", this.form).then(res => {
 						if (res.data.code == 200) {
@@ -976,7 +1192,10 @@ export default {
 		},
 		//回显数据
 		getForm() {
-			this.$http.get("/app/product/queryById?id=" + this.productId, {}).then(res => {
+			this.$http.post("/app/product/queryByIdNew", {
+				id: this.productId,
+				isApp: '1'
+			}).then(res => {
 				if (res.data.code == 200) {
 					this.form = res.data.result
 
@@ -1017,6 +1236,9 @@ export default {
 					if (!res.data.result.sellingDay) {
 						this.form.sellingDay = []
 					}
+					if (!res.data.result.localProductSellingWeeks) {
+						this.form.localProductSellingWeeks = this.localProductSellingWeeks
+					}
 					if (!res.data.result.serviceDescription) {
 						this.form.serviceDescription = []
 					}
@@ -1107,9 +1329,11 @@ export default {
 		}
 	},
 	mounted() {
+		this.form.localProductSellingWeeks = this.localProductSellingWeeks
 		this.getProductGroup()
 		this.getLeftTree()
 		this.getForm()
+		this.updateRangeTime()
 	},
 	onLoad(options) {
 		if (options.productId) {
@@ -1127,30 +1351,7 @@ export default {
 				that.form.merchantId = res.data.merchantId
 			}
 		})
-		uni.getStorage({
-			key: 'smdate',
-			success: (res) => {
-				if (res.data.availableEndDate) {
-					this.showSellDate = res.data.availableStartDate + '-' + res.data.availableEndDate
-					this.form.availableStartDate = res.data.availableStartDate
-					this.form.availableEndDate = res.data.availableEndDate
-					this.form.expirationDays = null
-					this.form.useType = 2
-				} else if (res.data.expirationDays) {
-					this.form.expirationDays = res.data.expirationDays
-					this.form.availableEndDate = null
-					this.form.availableStartDate = null
-					this.form.useType = 1
-					this.$nextTick(() => {
-						this.showSellDate = res.data.expirationDays + '天后失效'
-					});
-				} else if (res.data.useType == 3) {
-					this.form.useType = 3
-					this.showSellDate = '长期有效'
-				}
-
-			}
-		})
+		that.updateRangeTime()
 		uni.getStorage({
 			key: 'group',
 			success: function (res) {
@@ -1604,7 +1805,7 @@ export default {
 	right: 0;
 	top: 5upx;
 
-	color: #FFFFFF;
+	color: #FFFFFF !important;
 	z-index: 999;
 	border-top-right-radius: 20upx;
 	border-bottom-left-radius: 20upx;
@@ -1623,6 +1824,10 @@ export default {
 	margin-top: -15rpx;
 }
 
+.saletime {
+	padding-top: 10rpx;
+}
+
 /* 添加radio样式 */
 .radio-group {
 	display: flex;
@@ -1639,4 +1844,20 @@ export default {
 ::v-deep .editor-container {
 	height: 260rpx;
 }
+
+::v-deep .uni-table-tr .checkbox {
+	padding: 0;
+	width: 30rpx;
+	// width: 24px; /* 可以根据需要调整宽度 */
+	// height: 24px; /* 保持宽高一致 */
+}
+
+::v-deep .uni-table-th[data-v-511e81f9] {
+	padding: 15rpx;
+}
+
+.item_weekTime {
+	display: flex;
+	justify-content: space-around;
+}
 </style>

+ 115 - 6
pages/product/details.vue

@@ -58,10 +58,14 @@
 						</view>
 					</view>
 					<view class="item" v-if="form.richText">
-						<rich-text :nodes="form.richText"></rich-text>
+						<!-- 使用Editor组件代替rich-text -->
+						<Editor :readOnly="true" :toolbarConfig="toolbarConfig" @init="onEditorInit" />
 					</view>
+					<!-- <view class="item" v-if="form.richText">
+						<rich-text :nodes="form.richText"></rich-text>
+					</view> -->
 				</view>
-				<view class="data" style="border:none">
+				<view class="data">
 					<span class="span">搜索关键字</span>{{ form.searchKeywords }}
 				</view>
 				<!-- <view class="data" v-if="form.categoryId != '1945013773786701826'">
@@ -124,6 +128,7 @@
 						<span class="span">售卖时间</span>
 						<span v-if="form.sellingTimeType == '1'">不限制</span>
 						<span v-if="form.sellingTimeType == '2'">每天</span>
+						<span v-if="form.sellingTimeType == '3'">每周</span>
 					</view>
 					<view class="card_data" v-show="form.sellingTimeType == '2' && form.sellingDay && form.sellingDay.length > 0">
 						<uni-card :is-shadow="false" is-full style="border:1rpx solid #E5E5E5;">
@@ -132,6 +137,30 @@
 							</view>
 						</uni-card>
 					</view>
+					<view class="card_data" v-show="form.sellingTimeType == '3'">
+						<!-- 每周售卖时间选择 -->
+						<uni-table v-show="form.sellingTimeType == '3'">
+							<!-- 表头 -->
+							<uni-tr class="table-header">
+								<uni-th width="200rpx" align="left"><u-checkbox disabled></u-checkbox>工作日</uni-th>
+								<uni-th align="center">时间</uni-th>
+							</uni-tr>
+							<!-- 数据行 -->
+							<uni-tr v-for="(item, index) in form.localProductSellingWeeks" :key="index" class="table-row">
+								<uni-td width="200rpx" align="left">
+									<u-checkbox v-model="item.checked" @change="handleItemCheckChange($event, item, index)"
+										disabled></u-checkbox>{{
+											item.weekDay }}
+								</uni-td>
+								<uni-td align="center">
+									<view v-for="(date, timeIndex) in item.sellingStartTimeList" :key="timeIndex" class="item_weekTime">
+										<span>{{ date[0] }}</span>
+										<!-- <span>{{ date[0] ? date[0] + '-' + date[1] : '' }}</span> -->
+									</view>
+								</uni-td>
+							</uni-tr>
+						</uni-table>
+					</view>
 				</view>
 				<!-- <view class="data">
 					<span class="span">库存</span>{{ form.stockQuantity }}
@@ -181,7 +210,12 @@
 </template>
 
 <script>
+import Editor from '@/uni_modules/sp-editor/components/sp-editor/sp-editor.vue';
+
 export default {
+	components: {
+		Editor
+	},
 	data() {
 		return {
 			form: {},
@@ -192,7 +226,52 @@ export default {
 			productId: '',
 			imageHttp: 'http://192.168.0.36:8080/jeecg-boot/',
 			specItems: [],
-			fmImageList: []
+			fmImageList: [],
+			// 编辑器配置
+			toolbarConfig: {
+				keys: [], // 只读模式下不显示工具栏
+				excludeKeys: []
+			},
+			editorCtx: null, // 编辑器上下文
+			editorId: null,   // 编辑器ID
+			// 为"每周"选项添加单独的时间段数组
+			localProductSellingWeeks: [
+				{
+					weekDay: '周一',
+					sellingStartTimeList: [],
+					checked: false
+				},
+				{
+					weekDay: '周二',
+					sellingStartTimeList: [],
+					checked: false
+				},
+				{
+					weekDay: '周三',
+					sellingStartTimeList: [],
+					checked: false
+				},
+				{
+					weekDay: '周四',
+					sellingStartTimeList: [],
+					checked: false
+				},
+				{
+					weekDay: '周五',
+					sellingStartTimeList: [],
+					checked: false
+				},
+				{
+					weekDay: '周六',
+					sellingStartTimeList: [],
+					checked: false
+				},
+				{
+					weekDay: '周日',
+					sellingStartTimeList: [],
+					checked: false
+				}
+			]
 		}
 	},
 	methods: {
@@ -202,11 +281,26 @@ export default {
 				delta: 1
 			});
 		},
+		// 编辑器初始化完成时触发
+		onEditorInit(editorCtx, editorId) {
+			this.editorCtx = editorCtx // 保存编辑器上下文
+			this.editorId = editorId   // 保存编辑器ID
+			console.log('编辑器初始化完成')
+
+			// 初始化编辑器内容
+			if (this.form.richText) {
+				this.editorCtx.setContents({
+					html: this.form.richText
+				})
+			}
+		}
 	},
 	onLoad(options) {
 		this.productId = options.productId
-		this.$http.get("/app/product/queryById?id=" + this.productId, {}).then(res => {
-
+		this.$http.post("/app/product/queryByIdNew", {
+			id: this.productId,
+			isApp: '1'
+		}).then(res => {
 			if (res.data.code == 200) {
 				this.form = res.data.result
 				console.log(this.form)
@@ -215,7 +309,12 @@ export default {
 				}
 				this.form.groupingName = res.data.result.groupingName || ''
 				this.form.serviceDescription = res.data.result.serviceDescription || []
-				this.form.sellingDay = res.data.result.sellingDay || []
+				if (!res.data.result.sellingDay) {
+					this.form.sellingDay = []
+				}
+				if (!res.data.result.localProductSellingWeeks) {
+					this.form.localProductSellingWeeks = this.localProductSellingWeeks
+				}
 				if (res.data.result.productImage) {
 					let productImagelist = []
 					productImagelist = res.data.result.productImage.split(',')
@@ -236,6 +335,12 @@ export default {
 				console.log(this.specItems)
 			}
 		})
+	},
+	onUnload() {
+		// 页面销毁前清空Storage中的'smdate'
+		uni.removeStorage({
+			key: 'smdate'
+		});
 	}
 }
 </script>
@@ -541,4 +646,8 @@ export default {
 	width: 200upx;
 	height: 200upx;
 }
+
+::v-deep .editor-container {
+	height: 260rpx;
+}
 </style>

+ 171 - 170
pages/product/usable.vue

@@ -27,7 +27,8 @@
 						<input type="number" style="background-color:#F7F8FC;margin-top: 16rpx;" v-model="expirationDays" /> 天失效
 					</view>
 				</u-radio>
-				<u-radio @change="radioChange" name="date" style="width: 100%;margin-top: 16rpx;;border-bottom: 1px solid #eeeeee;">
+				<u-radio @change="radioChange" name="date"
+					style="width: 100%;margin-top: 16rpx;;border-bottom: 1px solid #eeeeee;">
 					<view class="title now">
 						固定时间段
 						<view class="picker">
@@ -47,206 +48,206 @@
 	</view>
 </template>
 <script>
-	import rangTime from '../../components/dengrq-datetime-picker/dateSelector/index.vue'
-	export default {
-		components: {
-			rangTime
+import rangTime from '../../components/dengrq-datetime-picker/dateSelector/index.vue'
+export default {
+	components: {
+		rangTime
+	},
+	data() {
+		return {
+			expirationDays: '',
+			isSelectDate: false,
+			selectedTime: {},
+			value: 'now',
+			mode: 1,
+			availableStartDate: '',
+			availableEndDate: '',
+			showDate: ''
+		}
+	},
+	methods: {
+		//返回
+		back() {
+			uni.navigateBack({
+				delta: 1
+			});
+		},
+		// 选中某个单选框时,由radio时触发
+		radioChange(e) {
+			// console.log(e);
+		},
+		// 选中任一radio时,由radio-group触发
+		radioGroupChange(e) {
+			console.log(e);
+			if (e == 'date') {
+				this.valid = ''
+			}
+		},
+		onEndTimeChange(val) {
+			this.availableStartDate = val.startDate
+			this.availableEndDate = val.endDate
+			this.showDate = val.startDate + '-' + val.endDate
+			this.$forceUpdate(); // 强制刷新视图
 		},
-		data() {
-			return {
-				expirationDays: '',
-				isSelectDate: false,
-				selectedTime: {},
-				value: 'now',
-				mode: 1,
-				availableStartDate: '',
-				availableEndDate: '',
-				showDate: ''
+		selectDate() {
+			// this.isSelectDate = true
+			if (this.value == 'date') {
+				this.$refs.rangTime.open()
 			}
 		},
-		methods: {
-			//返回
-			back() {
-				console.log('1111')
-				uni.navigateBack({
-					delta: 1
+		save() {
+			console.log(this.value)
+			if (this.availableStartDate !== '' && this.availableEndDate !== '') {
+				uni.setStorage({
+					key: 'smdate',
+					data: {
+						availableStartDate: this.availableStartDate,
+						availableEndDate: this.availableEndDate,
+						useType: 2
+					}
+				})
+				this.back()
+			} else if (this.expirationDays !== '') {
+				uni.setStorage({
+					key: 'smdate',
+					data: {
+						expirationDays: this.expirationDays,
+						useType: 1
+					}
+				})
+				this.back()
+			} else if (this.value == 'long') {
+				uni.setStorage({
+					key: 'smdate',
+					data: {
+						useType: 3
+					}
+				})
+				this.back()
+			} else {
+				uni.showToast({
+					title: this.value == 'date' ? '请选择时间' : '请输入时间',
+					icon: 'none'
 				});
-			},
-			// 选中某个单选框时,由radio时触发
-			radioChange(e) {
-				// console.log(e);
-			},
-			// 选中任一radio时,由radio-group触发
-			radioGroupChange(e) {
-				console.log(e);
-				if (e == 'date') {
-					this.valid = ''
-				}
-			},
-			onEndTimeChange(val) {
-				this.availableStartDate = val.startDate
-				this.availableEndDate = val.endDate
-				this.showDate = val.startDate + '-' + val.endDate
-				this.$forceUpdate(); // 强制刷新视图
-			},
-			selectDate() {
-				// this.isSelectDate = true
-				if (this.value == 'date') {
-					this.$refs.rangTime.open()
-				}
-			},
-			save() {
-				console.log(this.value)
-				if (this.availableStartDate !== '' && this.availableEndDate !== '') {
-					uni.setStorage({
-						key: 'smdate',
-						data: {
-							availableStartDate: this.availableStartDate,
-							availableEndDate: this.availableEndDate,
-							useType:2
-						}
-					})
-						this.back()
-				} else if (this.expirationDays !== '') {
-					uni.setStorage({
-						key: 'smdate',
-						data: {
-							expirationDays: this.expirationDays,
-							useType:1
-						}
-					})
-						this.back()
-				}else if(this.value == 'long'){
-					uni.setStorage({
-						key: 'smdate',
-						data: {
-							useType:3
-						}
-					})
-					this.back()
-				} else {
-					uni.showToast({
-						title: '请选择时间',
-						icon: 'none'
-					});
-				}
 			}
 		}
 	}
+}
 </script>
 
 <style lang="scss" scoped>
-	.usable {
-		width: 100vw;
-		height: 100vh;
+.usable {
+	width: 100vw;
+	height: 100vh;
+	display: flex;
+	flex-direction: column;
+	justify-content: space-between;
+	background: #F7F8FC;
+
+	/*#ifdef APP-PLUS*/
+	.top {
+		width: 100%;
+		height: var(--status-bar-height);
+		background-color: #fff;
+	}
+
+	/*#endif*/
+
+	.head {
+		width: 100%;
+		padding: 20rpx;
+		background-color: #fff;
 		display: flex;
-		flex-direction: column;
 		justify-content: space-between;
-		background: #F7F8FC;
-		/*#ifdef APP-PLUS*/
-		.top {
-			width: 100%;
-			height: var(--status-bar-height);
-				background-color: #fff;
+		align-items: center;
+		position: relative;
+
+		.head_left {
+			font-size: 40rpx;
 		}
-		
-		/*#endif*/
 
-		.head {
-			width: 100%;
-			padding: 20rpx;
-			background-color: #fff;
-			display: flex;
-			justify-content: space-between;
-			align-items: center;
-			position: relative;
-		
-			.head_left {
-				font-size: 40rpx;
-			}
-		
-			.case {
-				position: absolute;
-				left: 50%;
-				top: 50%;
-				transform: translate(-50%, -50%);
-				font-size: 36rpx;
-				font-weight: 600;
-			}
+		.case {
+			position: absolute;
+			left: 50%;
+			top: 50%;
+			transform: translate(-50%, -50%);
+			font-size: 36rpx;
+			font-weight: 600;
 		}
+	}
 
-		.content {
-			flex: 1;
-			padding: 24rpx;
+	.content {
+		flex: 1;
+		padding: 24rpx;
 
-		}
+	}
 
-		.title {
-			width: 100%;
-			font-weight: 600;
-			font-size: 30rpx;
-			margin-bottom: 16rpx;
-		}
+	.title {
+		width: 100%;
+		font-weight: 600;
+		font-size: 30rpx;
+		margin-bottom: 16rpx;
+	}
 
-		.now {
-			font-weight: normal;
+	.now {
+		font-weight: normal;
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		box-sizing: border-box;
+		margin: 0;
+
+		.picker {
+			flex: 1;
 			display: flex;
 			align-items: center;
-			justify-content: space-between;
-			box-sizing: border-box;
-			margin: 0;
-
-			.picker {
-				flex: 1;
-				display: flex;
-				align-items: center;
-				justify-content: flex-end;
-				font-size: 28rpx;
-				color: #999999;
-
-				::v-deep.u-input {
-					text-align: right !important;
-				}
-			}
+			justify-content: flex-end;
+			font-size: 28rpx;
+			color: #999999;
 
-			input {
-				width: 100rpx;
+			::v-deep.u-input {
+				text-align: right !important;
 			}
 		}
 
-		.foot {
+		input {
+			width: 100rpx;
+		}
+	}
+
+	.foot {
+		width: 100%;
+		height: 112rpx;
+		background-color: #fff;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		padding: 24rpx;
+
+		.btn {
 			width: 100%;
-			height: 112rpx;
-			background-color: #fff;
+			height: 100%;
+			background: linear-gradient(90deg, #77B6FF 0%, #449AFF 100%);
+			border-radius: 75rpx;
+			font-size: 28rpx;
+			color: #FFFFFF;
 			display: flex;
 			align-items: center;
 			justify-content: center;
-			padding: 24rpx;
-
-			.btn {
-				width: 100%;
-				height: 100%;
-				background: linear-gradient(90deg, #77B6FF 0%, #449AFF 100%);
-				border-radius: 75rpx;
-				font-size: 28rpx;
-				color: #FFFFFF;
-				display: flex;
-				align-items: center;
-				justify-content: center;
-			}
 		}
 	}
+}
 
-	.btn {
-		width: 80%;
-		height: 80rpx;
-		background-color: #ccc;
-		margin: 0 auto;
-		text-align: center;
-		line-height: 80rpx;
-	}
+.btn {
+	width: 80%;
+	height: 80rpx;
+	background-color: #ccc;
+	margin: 0 auto;
+	text-align: center;
+	line-height: 80rpx;
+}
 
-	::v-deep .u-radio__label {
-		width: 100%;
-	}
+::v-deep .u-radio__label {
+	width: 100%;
+}
 </style>

+ 5 - 3
uni_modules/uni-table/package.json

@@ -1,7 +1,7 @@
 {
   "id": "uni-table",
   "displayName": "uni-table 表格",
-  "version": "1.2.8",
+  "version": "1.2.9",
   "description": "表格组件,多用于展示多条结构类似的数据,如",
   "keywords": [
     "uni-ui",
@@ -47,8 +47,10 @@
       },
       "client": {
         "App": {
-          "app-vue": "y",
-          "app-nvue": "n"
+            "app-vue": "y",
+            "app-nvue": "n",
+            "app-harmony": "u",
+            "app-uvue": "u"
         },
         "H5-mobile": {
           "Safari": "y",