Browse Source

涨价设置

shish 1 năm trước cách đây
mục cha
commit
7995d00a7a
1 tập tin đã thay đổi với 26 bổ sung36 xóa
  1. 26 36
      hdApp/src/admin/goods/price-increase.vue

+ 26 - 36
hdApp/src/admin/goods/price-increase.vue

@@ -11,16 +11,22 @@
 			<div class="input-line-wrap new-wrap">
 				<tui-list-cell class="line-cell" :hover="false">
 					<div class="tui-title">涨价方式</div>
-					<radio-group class="tui-input flex-center-between" @change="radioChange">
-						<label class="list" for="customLink">
-							<radio id="customLink" value="0" :checked="form.riseType == 0" />
-							<span class="checkbox-text">按百分比</span>
-						</label>
-						<label class="list" for="goodsLink">
-							<radio id="goodsLink" value="1" :checked="form.riseType == 1" />
-							<span class="checkbox-text">按金额</span>
-						</label>
-					</radio-group>
+					<div class="button-selector flex-center-between">
+						<button 
+							class="admin-button-com big"
+							:class="form.riseType == 0 ? 'blue' : 'default'"
+							@click="selectRiseType(0)"
+						>
+							按百分比
+						</button>
+						<button 
+							class="admin-button-com big"
+							:class="form.riseType == 1 ? 'blue' : 'default'"
+							@click="selectRiseType(1)"
+						>
+							按金额
+						</button>
+					</div>
 				</tui-list-cell>
 				<block v-if="form.riseType == 0">
 					<tui-list-cell class="line-cell" :hover="false">
@@ -89,20 +95,13 @@
 					this.$msg('更新成功!')
 				})
 			},
-			selFestFn(item) {
-				let index = this.form.festIdList.findIndex(e => e == item.id)
-				if (index == -1) {
-					this.form.festIdList.push(item.id)
-				} else {
-					this.form.festIdList.splice(index, 1)
-				}
-			},
+
 			switchChangeFn(e) {
 				this.form.riseSwitch = e.detail.value ? '1' : '0'
 			},
-			radioChange(e) {
+			selectRiseType(type) {
 				this.form.riseAmount = ''
-				this.form.riseType = e.detail.value
+				this.form.riseType = type
 			},
 			goBack() {
 				uni.navigateBack()
@@ -116,16 +115,13 @@
 		color: $fontColor3;
 		padding-bottom: 20upx;
 		padding-left: 30upx;
-		font-size:29upx;
+		font-size:30upx;
 	}
 	.module-com {
 		margin-bottom: 20upx;
 		padding: 30upx;
 		background-color: #fff;
 		color: $fontColor2;
-		.module-tit {
-			font-size: 28upx;
-		}
 	}
 	.button-group {
 		display: flex;
@@ -141,18 +137,12 @@
 	}
 	.new-wrap {
 		margin-bottom: 20upx;
-		.checkbox-text {
-			color: $fontColor2;
-		}
-		.button-wrap {
-			justify-content: flex-start;
-			flex-wrap: wrap;
-			.admin-button-com {
-				padding-top: 12upx;
-				padding-bottom: 12upx;
-				margin-right: 20upx;
-				border-radius: 4upx;
-			}
+	}
+	
+	.button-selector {
+		gap: 20upx;
+		.admin-button-com {
+			flex: 1;
 		}
 	}
 </style>