shish 6 месяцев назад
Родитель
Сommit
ba94bb696e

+ 28 - 10
ghsApp/src/admin/changePrice/changeHide.vue

@@ -90,7 +90,8 @@
 
         <!-- 底部按钮 -->
         <div class="app-footer">
-            <button class="admin-button-com big blue" @click="commitPrice">批量隐藏 ({{ selectedCount }})</button>
+			<button class="admin-button-com big blue footer-btn-left" @click="commitShow">批量显示</button>
+            <button class="admin-button-com big blue footer-btn-right" @click="commitPrice">批量隐藏</button>
         </div>
 
         <!-- 分类选择弹窗 -->
@@ -243,13 +244,23 @@ export default {
 				return;
 			}
 			this.$util.confirmModal({content:'确认批量隐藏 ' + this.selectedIdsSet.size + ' 个花材?'},() => {
-				this.commitChange()
+				this.commitChange(1)
 			})
 		},
 		
-		commitChange(){
+		commitShow(){
+			if(this.selectedIdsSet.size === 0){
+				this.$msg('请选择花材')
+				return;
+			}
+			this.$util.confirmModal({content:'确认批量显示 ' + this.selectedIdsSet.size + ' 个花材?'},() => {
+				this.commitChange(0)
+			})
+		},
+		
+		commitChange(hideStatus){
             const ids = Array.from(this.selectedIdsSet);
-			batchStopItem({ids:JSON.stringify(ids)}).then(res=>{
+			batchStopItem({ids:JSON.stringify(ids), status: hideStatus}).then(res=>{
 				if(res.code == 1){
 					this.selectedIdsSet.clear()
 					this.$msg(res.msg)
@@ -411,7 +422,7 @@ export default {
 
         .item_list_title {
             margin-bottom: 20upx;
-            font-size: 30upx;
+            font-size: 34upx;
             font-weight: 600;
             color: #3385FF;
 
@@ -428,8 +439,8 @@ export default {
 
             .select-all-btn {
                 color: #3385FF;
-                font-size: 28upx;
-                font-weight: 700;
+                font-size: 34upx;
+                font-weight: bold;
                 padding: 8upx 16upx;
                 white-space: nowrap;
                 background: #E8F2FF;
@@ -439,15 +450,22 @@ export default {
 	}
 
 	.app-footer {
-		justify-content: space-evenly;
+		display: flex;
+		justify-content: center;
+		align-items: center;
 		z-index: 9999;
 		flex-shrink: 0;
 		padding: 20upx;
 		background: white;
 		box-shadow: 0 -2upx 8upx rgba(0, 0, 0, 0.1);
 
-		button {
-			width: 600upx;
+		.footer-btn-left {
+			width: 280upx;
+			margin-right: 40upx;
+		}
+
+		.footer-btn-right {
+			width: 280upx;
 		}
 	}
 }

+ 3 - 11
ghsApp/src/admin/changePrice/components/changeHide.vue

@@ -27,12 +27,10 @@
 			<!-- 价格 -->
 			<view class="kc">¥{{ parseFloat(info.price) }}</view>
 
-			<!-- 隐藏/显示按钮 -->
 			<view class="num-open_bx">
 				<view>
 					<view class="open-bx">
-						<view class="front-hide-color" @click.stop="toggleHideStatus" v-if="info.frontHide == 1">显示</view>
-						<view class="front-hide-color" @click.stop="toggleHideStatus" v-else>隐藏</view>
+						<view class="front-hide-color" @click.stop="toggleHideStatus" v-if="info.frontHide == 1">已隐藏</view>
 					</view>
 				</view>
 			</view>
@@ -182,17 +180,11 @@ export default {
 				.open-bx {
 					display: flex;
 					gap: 8upx;
-
 					.front-hide-color {
 						display: inline-block;
-						width: 50upx;
-						height: 32upx;
-						line-height: 32upx;
-						background-color: #3385ff;
-						color: white;
+						color: #3385ff;
 						text-align: center;
-						border-radius: 6upx;
-						font-size: 22upx;
+						font-size: 28upx;
 						flex-shrink: 0;
 					}
 				}