shish 2 лет назад
Родитель
Сommit
caa4db440a

+ 1 - 1
ghsApp/src/admin/changePrice/batchChange.vue

@@ -13,7 +13,7 @@
 			<view class="scroll-middle_bx">
 				<scroll-view scroll-y scroll-with-animation class="tab-view" :scroll-top="scrollTop">
 					<div v-for="(item, index) in globalClassItemList" :key="index" class="tab-bar-item" :class="[classIndex == index ? 'active' : '']" :data-current="index" @tap.stop="swichClass(index)">
-						<text>{{ item.className || "" }}</text>
+						<text style="text-align: center;">{{ item.className || "" }}</text>
 					</div>
 				</scroll-view>
 					<scroll-view scroll-y class="right-box" 

+ 9 - 0
ghsApp/src/admin/changePrice/components/Item.vue

@@ -4,6 +4,9 @@
 		<button v-if="Number(info.discountPrice)>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.reachNum && info.reachNum>0 && info.reachNumDiscount && info.reachNumDiscount>0" @click.stop="cancelFullOff(info)" class="admin-button-com mini-btn blue" 
+			style="position:absolute;bottom:0upx;font-size:24upx;left:10upx;z-index:40;">取消满减</button>
+
 		<view class="img_bx" @click="pageTo({url: '/admin/item/detail?id='+info.id})">
 			<view v-if="info.status == 2" class="sold-out">
 				<view class="sold-out-xj">已下架</view>
@@ -34,6 +37,9 @@
 						<view class="hj-price-area">
 							<input class="change-input" @click.stop @blur="savePrice" placeholder-style="color:#CCCCCC" v-model="hjModifyPrice" type="digit" placeholder="大客价" />
 						</view>
+						<text v-if="info.reachNum && info.reachNum>0 && info.reachNumDiscount && info.reachNumDiscount>0" style="position:absolute;top:140upx;right:210upx;color:#3385FF;">
+							{{info.reachNum}}↓{{info.reachNumDiscount?parseFloat(info.reachNumDiscount):0}}
+						</text>
 					</view>
 				</view>
 			</view>
@@ -122,6 +128,9 @@ export default {
 		cancelPreSellFn(item){
 			this.$emit("cancelPreSellFn",item)
 		},
+		cancelFullOff(item){
+			this.$emit("cancelFullOff",item)
+		},
 		cancelDiscountFn(item){
 			this.$emit("cancelDiscountFn",item)
 		},

+ 12 - 2
ghsApp/src/admin/changePrice/list.vue

@@ -35,7 +35,7 @@
 							<template v-for="(productItem, productIndex) in classItem.child">
 								<view style="height:230upx" :id="`class_${classIndex}`" :key="productIndex">
 									<ItemComponent v-if="classItem.isActive" :isPrice="false" :info="productItem" @hideChangeFn="hideChangeFn" :ref="`productRef${productItem.id}`"
-									@savePrice="savePrice" @cancelDiscountFn="cancelDiscountFn" @cancelPreSellFn="cancelPreSellFn"></ItemComponent>
+									@savePrice="savePrice" @cancelDiscountFn="cancelDiscountFn" @cancelFullOff="cancelFullOff" @cancelPreSellFn="cancelPreSellFn"></ItemComponent>
 								</view>
 							</template>
 
@@ -84,7 +84,7 @@ import AppWrapperEmpty from "@/components/app-wrapper-empty";
 import ItemComponent from "./components/Item";
 import productMins from "@/mixins/product";
 import { mapGetters } from "vuex";
-import { batchChangePrice,generatePriceTable,cancelDiscountPrice,cancelPreSell } from '@/api/product'
+import { batchChangePrice,generatePriceTable,cancelDiscountPrice,cancelFullOffFn,cancelPreSell } from '@/api/product'
 import { changeFrontHide } from '@/api/item'
 export default {
 	name: "item_list",
@@ -141,6 +141,16 @@ export default {
 				})
 			})
 		},
+		cancelFullOff(item){
+			let that = this
+			this.$util.confirmModal({content:'确认取消满减?'},() => {
+				cancelFullOffFn({id:item.id}).then(res=>{
+					if(res.code == 1){
+						that.$msg(res.msg)
+					}
+				})
+			})
+		},
 		cancelDiscountFn(item){
 			let that = this
 			this.$util.confirmModal({content:'确认取消特价?'},() => {

+ 9 - 2
ghsApp/src/admin/item/components/item.vue

@@ -5,6 +5,9 @@
 		<button v-if="Number(info.discountPrice)>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.reachNum && info.reachNum>0 && info.reachNumDiscount && info.reachNumDiscount>0" @click.stop="cancelFullOff(info)" class="admin-button-com mini-btn blue" 
+			style="position:absolute;bottom:0upx;font-size:24upx;left:10upx;z-index:30;">取消满减</button>
+
         <image :src="`${constant.imgUrl}/icon/official8.png`" v-if="info.auth && info.auth == 1" mode="widthFix" class="official"></image>
 
 		<view class="img_bx" @click="pageTo({url: '/admin/item/detail?id='+info.id})">
@@ -25,8 +28,9 @@
 			</view>
 			<view class="kc">
 				<text style="color:green;font-weight:normal;">¥{{ info.hjPrice?parseFloat(info.hjPrice):0 }}</text>
-				<text style="margin-left:13upx;color:red;font-weight:bold;font-size:28upx;">¥{{ info.price?parseFloat(info.price):0 }}</text>
-				<text style="margin-left:13upx;color:#333333;11upx;font-weight:normal;">¥{{ info.skPrice?parseFloat(info.skPrice):0 }}</text>
+				<text style="margin-left:11upx;color:red;font-weight:bold;font-size:28upx;">¥{{ info.price?parseFloat(info.price):0 }}</text>
+				<text style="margin-left:11upx;color:#333333;11upx;font-weight:normal;">¥{{ info.skPrice?parseFloat(info.skPrice):0 }}</text>
+				<text style="margin-left:13upx;color:#3385FF;11upx;font-weight:normal;" v-if="info.reachNum && info.reachNum>0 && info.reachNumDiscount && info.reachNumDiscount>0">{{info.reachNum}}↓{{info.reachNumDiscount?parseFloat(info.reachNumDiscount):0}}</text>
 			</view>
 			<view class="num-open_bx">
 				<template>
@@ -78,6 +82,9 @@ export default {
 		cancelDiscountFn(item){
 			this.$emit("cancelDiscountFn",item)
 		},
+		cancelFullOff(item){
+			this.$emit("cancelFullOff",item)
+		},
 		moreAction(item){
 			this.$emit('moreAction', item)
 		},

+ 12 - 2
ghsApp/src/admin/item/list.vue

@@ -31,7 +31,7 @@
 								<template v-for="(productItem, productIndex) in classItem.child">
 									<view style="height:255upx" :id="`class_${classIndex}`" :key="productIndex">
 										<ItemStock v-if="classItem.isActive" :info="productItem" @moreAction="moreAction" 
-										@doPrintLabel="doPrintLabel" @cancelDiscountFn="cancelDiscountFn" 
+										@doPrintLabel="doPrintLabel" @cancelDiscountFn="cancelDiscountFn" @cancelFullOff="cancelFullOff"
 										:ref="`productRef${productItem.id}`" @hideChangeFn="hideChangeFn" 
 										@cancelPreSellFn="cancelPreSellFn" @breakSingleItem="breakSingleItem">
 										</ItemStock>
@@ -127,7 +127,7 @@ import ItemStock from "./components/item";
 import productMins from "@/mixins/product";
 import { mapGetters } from "vuex";
 import { getWeixinId } from "@/api/invite";
-import { print,cancelDiscountPrice,cancelPreSell,delStatusUpdate } from '@/api/product';
+import { print,cancelDiscountPrice,cancelPreSell,delStatusUpdate,cancelFullOffFn } from '@/api/product';
 import { getHdPoster,getSkPoster,breakItem,changeFrontHide,applyAuth } from '@/api/item'
 import uniPopup from '@/uni_modules/uni-popup/components/uni-popup/uni-popup.vue';
 import ModalModule from "@/components/plugin/modal"
@@ -266,6 +266,16 @@ export default {
 				})
 			})
 		},
+		cancelFullOff(item){
+			let that = this
+			this.$util.confirmModal({content:'确认取消满减?'},() => {
+				cancelFullOffFn({id:item.id}).then(res=>{
+					if(res.code == 1){
+						that.$msg(res.msg)
+					}
+				})
+			})
+		},
 		closePoster(){
 			this.$refs.posterShow.close()
 		},

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

@@ -16,6 +16,10 @@ export const changePresell = data => {
 	return https.post("/product/change-presell", data);
 };
 
+export const cancelFullOffFn = data => {
+	return https.get("/product/cancel-full-off", data);
+};
+
 export const cancelDiscountPrice = data => {
 	return https.get("/product/cancel-discount", data);
 };