caiyuqin 1 місяць тому
батько
коміт
bfd6c620c1
2 змінених файлів з 29 додано та 31 видалено
  1. 14 15
      pages/coupon/creatDiscount.vue
  2. 15 16
      pages/coupon/creatReduction.vue

+ 14 - 15
pages/coupon/creatDiscount.vue

@@ -40,14 +40,14 @@
 
 					</view>
 				</view>
-				<!-- <view class="item">
+				<view class="item">
 					<view class="label">
 						库存
 					</view>
 					<view class="picker">
 						<u-input v-model="form.number" placeholder="输入库存" />
 					</view>
-				</view> -->
+				</view>
 				<view class="item">
 					<view class="label">
 						有效时间
@@ -445,20 +445,19 @@ export default {
 					icon: 'none'
 				});
 				return
+			} else if (!this.form.number) {
+				uni.showToast({
+					title: '请输入库存',
+					icon: 'none'
+				});
+				return
+			}  else if (this.form.number == '0' || this.form.number == 0) {
+				uni.showToast({
+					title: '库存不能为0',
+					icon: 'none'
+				});
+				return
 			} 
-			// else if (!this.form.number) {
-			// 	uni.showToast({
-			// 		title: '请输入库存',
-			// 		icon: 'none'
-			// 	});
-			// 	return
-			// }  else if (this.form.number == '0' || this.form.number == 0) {
-			// 	uni.showToast({
-			// 		title: '库存不能为0',
-			// 		icon: 'none'
-			// 	});
-			// 	return
-			// } 
 			else if (!this.form.beginTime && !this.form.endTime) {
 				uni.showToast({
 					title: '请选择有效时间',

+ 15 - 16
pages/coupon/creatReduction.vue

@@ -39,14 +39,14 @@
 
 					</view>
 				</view>
-				<!-- <view class="item">
+				<view class="item">
 					<view class="label">
 						库存
 					</view>
 					<view class="picker">
 						<u-input v-model="form.number" placeholder="输入库存" />
 					</view>
-				</view> -->
+				</view>
 				<view class="item">
 					<view class="label">
 						有效时间
@@ -450,20 +450,19 @@ export default {
 					icon: 'none'
 				});
 				return
-			}  
-			// else if (!this.form.number) {
-			// 	uni.showToast({
-			// 		title: '请输入库存',
-			// 		icon: 'none'
-			// 	});
-			// 	return
-			// }  else if (this.form.number == '0' || this.form.number == 0) {
-			// 	uni.showToast({
-			// 		title: '库存不能为0',
-			// 		icon: 'none'
-			// 	});
-			// 	return
-			// } 
+			} else if (!this.form.number) {
+				uni.showToast({
+					title: '请输入库存',
+					icon: 'none'
+				});
+				return
+			}  else if (this.form.number == '0' || this.form.number == 0) {
+				uni.showToast({
+					title: '库存不能为0',
+					icon: 'none'
+				});
+				return
+			} 
 			else if (this.form.couponWay == null) {
 				uni.showToast({
 					title: '请选择领取方式',