shish 3 lat temu
rodzic
commit
aefb0b1f36

+ 8 - 9
ghsApp/src/admin/changePrice/changeStock.vue

@@ -31,7 +31,7 @@
 
 
 							<template v-for="(productItem, productIndex) in classItem.child">
 							<template v-for="(productItem, productIndex) in classItem.child">
 								<view style="height:190upx" :id="`class_${classIndex}`" :key="productIndex">
 								<view style="height:190upx" :id="`class_${classIndex}`" :key="productIndex">
-									<ItemComponent v-if="classItem.isActive" :isPrice="false" :info="productItem" @saveStock="saveStock" @cancelDiscountFn="cancelDiscountFn" @cancelPreSellFn="cancelPreSellFn"></ItemComponent>
+									<ItemComponent v-if="classItem.isActive" :isPrice="false" :info="productItem" @saveStock="saveStock" @hideChangeFn="hideChangeFn" @cancelPreSellFn="cancelPreSellFn"></ItemComponent>
 								</view>
 								</view>
 							</template>
 							</template>
 
 
@@ -80,6 +80,7 @@ import ItemComponent from "./components/changeStockItem";
 import productMins from "@/mixins/product";
 import productMins from "@/mixins/product";
 import { mapGetters } from "vuex";
 import { mapGetters } from "vuex";
 import { checkOrderApi } from "@/api/inventory";
 import { checkOrderApi } from "@/api/inventory";
+import { changeFrontHide } from "@/api/item";
 import { batchChangePrice,generatePriceTable,cancelDiscountPrice,cancelPreSell } from '@/api/product'
 import { batchChangePrice,generatePriceTable,cancelDiscountPrice,cancelPreSell } from '@/api/product'
 export default {
 export default {
 	name: "item_list",
 	name: "item_list",
@@ -125,14 +126,12 @@ export default {
 				})
 				})
 			})
 			})
 		},
 		},
-		cancelDiscountFn(item){
+		hideChangeFn(item,status){
 			let that = this
 			let that = this
-			this.$util.confirmModal({content:'确认取消特价?'},() => {
-				cancelDiscountPrice({id:item.id}).then(res=>{
-					if(res.code == 1){
-						that.$msg(res.msg)
-					}
-				})
+			changeFrontHide({id:item.id,status:status}).then(res=>{
+				if(res.code == 1){
+					that.$msg(res.msg)
+				}
 			})
 			})
 		},
 		},
 		downloadTable(){
 		downloadTable(){
@@ -177,7 +176,7 @@ export default {
 		initProduct(){
 		initProduct(){
 			this.shopId = this.getMyShopInfo.id;
 			this.shopId = this.getMyShopInfo.id;
 			let type = '';
 			let type = '';
-			this.initData({ type, shopId: this.shopId,status:0,delStatus:0,requestType:'itemList'});
+			this.initData({ type, shopId: this.shopId,status:0,delStatus:0,requestType:'changeStock'});
 		},
 		},
 		commitPrice(){
 		commitPrice(){
 			let that = this
 			let that = this

+ 21 - 14
ghsApp/src/admin/changePrice/components/changeStockItem.vue

@@ -1,11 +1,16 @@
 <template>
 <template>
 <view class="product">
 <view class="product">
 	<view class="item-cmd_bx">
 	<view class="item-cmd_bx">
-		<button v-if="Number(info.discountPrice)>0 && info.presell == 0" @click.stop="cancelDiscountFn(info)" class="admin-button-com mini-btn blue" 
-			style="position:absolute;bottom:0upx;font-size:24upx;left:10upx;z-index:20;">取消特价</button>
+		<button v-if="info.frontHide == 0" @click.stop="hideChangeFn(info,1)" class="admin-button-com mini-btn default" 
+			style="width:141upx;position:absolute;bottom:0upx;font-size:24upx;left:10upx;z-index:20;padding-top:16upx;padding-bottom:16upx;">
+			隐藏
+			</button>
+
+		<button v-else @click.stop="hideChangeFn(info,0)" class="admin-button-com mini-btn default" 
+			style="width:141upx;position:absolute;bottom:0upx;font-size:24upx;left:10upx;z-index:20;padding-top:16upx;padding-bottom:16upx;">
+			取消隐藏
+			</button>
 
 
-		<button v-if="info.presell == 1" @click.stop="cancelPreSellFn(info)" class="admin-button-com mini-btn blue" 
-			style="position:absolute;bottom:0upx;font-size:24upx;left:10upx;z-index:20;">取消预售</button>
 		<view class="img_bx">
 		<view class="img_bx">
 			<view v-if="info.status == 2" class="sold-out">
 			<view v-if="info.status == 2" class="sold-out">
 				<view class="sold-out-xj">已下架</view>
 				<view class="sold-out-xj">已下架</view>
@@ -18,7 +23,7 @@
 				v-if="info.presell == 1">预售</text>
 				v-if="info.presell == 1">预售</text>
 				{{ info.name || "" }}
 				{{ info.name || "" }}
 			</view>
 			</view>
-			<text v-if="info.variety && info.variety ==1" class="show-color"></text>
+			<text v-if="info.frontHide == 1" class="front-hide-color">隐</text>
 			<view class="kc">¥{{ parseFloat(info.price) }}</view>
 			<view class="kc">¥{{ parseFloat(info.price) }}</view>
 			<view class="num-open_bx">
 			<view class="num-open_bx">
 				<view>
 				<view>
@@ -67,8 +72,8 @@ export default {
 		cancelPreSellFn(item){
 		cancelPreSellFn(item){
 			this.$emit("cancelPreSellFn",item)
 			this.$emit("cancelPreSellFn",item)
 		},
 		},
-		cancelDiscountFn(item){
-			this.$emit("cancelDiscountFn",item)
+		hideChangeFn(item,status){
+			this.$emit("hideChangeFn",item,status)
 		},
 		},
 		saveStock() {
 		saveStock() {
 			if(Number(this.modifyStock)>0){
 			if(Number(this.modifyStock)>0){
@@ -145,17 +150,19 @@ export default {
 			text-overflow: ellipsis;
 			text-overflow: ellipsis;
 			width:360upx;
 			width:360upx;
 		}
 		}
-		.show-color{
+		.front-hide-color{
 			position:absolute;
 			position:absolute;
-			top:84upx;
-			right:190upx;
+			top:52upx;
+			right:206upx;
 			display:inline-block;
 			display:inline-block;
-			width:25upx;
-			height:25upx;
-			background-color:rgb(9, 199, 9);
-			border-radius:15upx;
+			width:56upx;
+			padding:10upx 0;
+			background-color:#3385FF;
 			border:none;
 			border:none;
 			margin-left:8upx;
 			margin-left:8upx;
+			color:white;
+			text-align:center;
+			border-radius:10upx;
 		}
 		}
 		& .kc {
 		& .kc {
 			color:red;
 			color:red;

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

@@ -1,5 +1,9 @@
 import https from '@/plugins/luch-request_0.0.7/request'
 import https from '@/plugins/luch-request_0.0.7/request'
 
 
+export const changeFrontHide = data => {
+	return https.get('/item/change-front-hide', data)
+}
+
 export const batchRecover = data => {
 export const batchRecover = data => {
 	return https.post('/item/batch-recover', data)
 	return https.post('/item/batch-recover', data)
 }
 }

+ 2 - 2
ghsApp/src/manifest.json

@@ -60,7 +60,7 @@
                     "entitlements" : {
                     "entitlements" : {
                         "com.apple.developer.associated-domains" : [ "applinks:fronttg.wixhb.com" ]
                         "com.apple.developer.associated-domains" : [ "applinks:fronttg.wixhb.com" ]
                     }
                     }
-                }
+                }          
             },
             },
             /* SDK配置 */
             /* SDK配置 */
             "sdkConfigs" : {
             "sdkConfigs" : {
@@ -169,7 +169,7 @@
         "optimization" : {
         "optimization" : {
             "subPackages" : true
             "subPackages" : true
         },
         },
-        "lazyCodeLoading" : "requiredComponents"
+        "lazyCodeLoading":"requiredComponents"
     },
     },
     "mp-alipay" : {
     "mp-alipay" : {
         "usingComponents" : true
         "usingComponents" : true