shish před 6 měsíci
rodič
revize
32fd8ecc70

+ 8 - 23
ghsApp/src/admin/changePrice/changeHide.vue

@@ -71,7 +71,6 @@
                                     :info="productItem" 
                                     :isChecked="isItemChecked(productItem.id)"
                                     @checkChange="handleItemCheck(productItem, $event)"
-                                    @hideChangeFn="hideChangeFn" 
                                     @cancelPreSellFn="cancelPreSellFn">
                                 </ItemComponent>
                             </view>
@@ -91,7 +90,7 @@
         <!-- 底部按钮 -->
         <div class="app-footer">
 			<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>
+            <button class="admin-button-com big blue footer-btn-right" @click="commitHide">批量隐藏</button>
         </div>
 
         <!-- 分类选择弹窗 -->
@@ -114,7 +113,7 @@ import AppWrapperEmpty from "@/components/app-wrapper-empty";
 import ItemComponent from "./components/changeHide";
 import productMins from "@/mixins/product2";
 import { mapGetters } from "vuex";
-import { changeFrontHide, batchStopItem } from "@/api/item";
+import { batchChangeFrontHide } from "@/api/item";
 import { cancelPreSell } from '@/api/product'
 
 export default {
@@ -221,54 +220,40 @@ export default {
 					}
 				})
 			})
-		},
-		
-		hideChangeFn(item,status){
-			changeFrontHide({id:item.id,status:status}).then(res=>{
-				if(res.code == 1){
-					this.$msg('操作成功')
-					item.frontHide = status
-				}
-			})
-		},
-		
+		},		
 		initProduct(){
 			this.globalRequestType = 'itemList'
 			this.initData()
 			uni.hideLoading()
 		},
 		
-		commitPrice(){
+		commitHide(){
 			if(this.selectedIdsSet.size === 0){
 				this.$msg('请选择花材')
 				return;
 			}
-			this.$util.confirmModal({content:'确认批量隐藏 ' + this.selectedIdsSet.size + ' 个花材?'},() => {
+			this.$util.confirmModal({content:'确认隐藏 ' + this.selectedIdsSet.size + ' 个花材?'},() => {
 				this.commitChange(1)
 			})
 		},
-		
 		commitShow(){
 			if(this.selectedIdsSet.size === 0){
 				this.$msg('请选择花材')
 				return;
 			}
-			this.$util.confirmModal({content:'确认批量显示 ' + this.selectedIdsSet.size + ' 个花材?'},() => {
+			this.$util.confirmModal({content:'确认显示 ' + this.selectedIdsSet.size + ' 个花材?'},() => {
 				this.commitChange(0)
 			})
 		},
-		
 		commitChange(hideStatus){
             const ids = Array.from(this.selectedIdsSet);
-			batchStopItem({ids:JSON.stringify(ids), status: hideStatus}).then(res=>{
+			batchChangeFrontHide({ids:JSON.stringify(ids), frontHide: hideStatus}).then(res=>{
 				if(res.code == 1){
-					this.selectedIdsSet.clear()
 					this.$msg(res.msg)
-					this.reGetGlobalProductList()
+					this.initData()
 				}
 			})
 		},
-		
 		currentSwitchClass(index,item){
 			this.globalSwitchClass(index,item)
 		},

+ 6 - 18
ghsApp/src/admin/changePrice/components/changeHide.vue

@@ -8,11 +8,6 @@
 					<view class="sold-out-xj">已下架</view>
 				</view>
 			</block>
-			<block v-else>
-				<view v-if="info.frontHide == 1" class="sold-out">
-					<view class="hide">隐</view>
-				</view>
-			</block>
 			<image :src="info.cover" style="width:160upx;height:160upx;" lazy-load="true" :lazy-load-margin="0"></image>
 		</view>
 
@@ -30,7 +25,7 @@
 			<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" v-if="info.frontHide == 1">已隐藏</view>
 					</view>
 				</view>
 			</view>
@@ -73,13 +68,6 @@ export default {
 			// 触发父组件的 checkChange 事件,传递新的状态
 			this.$emit("checkChange", !this.isChecked);
 		},
-
-		// 切换隐藏/显示状态
-		toggleHideStatus() {
-			const newStatus = this.info.frontHide === 1 ? 0 : 1;
-			this.$emit("hideChangeFn", this.info, newStatus);
-		},
-
 		cancelPreSellFn(item) {
 			this.$emit("cancelPreSellFn", item)
 		}
@@ -142,8 +130,8 @@ export default {
 			justify-content: flex-start;
 
 			.tit {
-				font-size: 28upx;
-				font-weight: 600;
+				font-size:32upx;
+				font-weight:700;
 				color: #333333;
 				overflow: hidden;
 				white-space: nowrap;
@@ -167,7 +155,7 @@ export default {
 			// 价格
 			.kc {
 				color: red;
-				font-size: 28upx;
+				font-size:30upx;
 				font-weight: 700;
 				margin-bottom: 8upx;
 			}
@@ -176,7 +164,6 @@ export default {
 			.num-open_bx {
 				display: flex;
 				align-items: center;
-
 				.open-bx {
 					display: flex;
 					gap: 8upx;
@@ -184,8 +171,9 @@ export default {
 						display: inline-block;
 						color: #3385ff;
 						text-align: center;
-						font-size: 28upx;
+						font-size:30upx;
 						flex-shrink: 0;
+						font-weight:bold;
 					}
 				}
 			}

+ 4 - 0
ghsApp/src/api/item/index.js

@@ -95,6 +95,10 @@ export const batchStopItem = data => {
 	return https.post('/item/batch-stop', data)
 }
 
+export const batchChangeFrontHide = data => {
+	return https.post('/item/batch-change-front-hide', data)
+}
+
 export const getSkPoster = data => {
 	return https.get('/item/get-sk-poster', data)
 }

+ 3 - 3
ghsApp/src/manifest.json

@@ -2,8 +2,8 @@
     "name" : "销花宝",
     "appid" : "__UNI__BD781B0",
     "description" : "鲜花批发销售管理系统",
-    "versionName" : "1.2.68",
-    "versionCode" : 1268,
+    "versionName" : "1.2.77",
+    "versionCode" : 1277,
     "transformPx" : true,
     /* 5+App特有相关 */
     "app-plus" : {
@@ -235,7 +235,7 @@
         "optimization" : {
             "subPackages" : true
         },
-        "lazyCodeLoading" : "requiredComponents",
+        "lazyCodeLoading":"requiredComponents",
         "uniStatistics" : {
             "enable" : false
         },