shish 4 лет назад
Родитель
Сommit
9d46cbd720

+ 0 - 2
hdApp/src/admin/billing/affirmGhs.vue

@@ -182,11 +182,9 @@ export default {
 	onShow() {
 		if(this.selectedHb.hbId && this.selectedHb.hbId > 0) {
 			this.form.hbId = this.selectedHb.hbId
-			this.calcPrice()
 		}else{
 			this.form.hbId = 0
 			this.hasCoupon()
-			this.calcPrice()
 		}
 	},
 	computed: {

+ 4 - 1
hdApp/src/components/module/app-footer-cart.vue

@@ -1,7 +1,7 @@
 <template>
 	<div class="cart-ft_bx">
 		<div class="cart-ct_bx">
-			<view class="cart-lf_bx" @click="confirmEvent">
+			<view class="cart-lf_bx" @click="showCartItem">
 				<view class="cart-dot_bx">
 					<i class="iconfont icongouwuche"></i>
 				</view>
@@ -40,6 +40,9 @@ export default {
 	methods: {
 		confirmEvent() {
 			this.$emit("confirm");
+		},
+		showCartItem(){
+			this.$emit('showCartItem')
 		}
 	}
 };

+ 232 - 2
hdApp/src/pagesPurchase/ghsProduct.vue

@@ -31,7 +31,7 @@
 				<app-search-module v-model="py" placeholder="输入拼音首字母搜索" @input="searchFn" />
 			</view>
 			<view style="padding:0 0upx 0 20upx;" >
-				<button class="admin-button-com middle blue" @click="removeMemory(option.id)">清除已选</button>
+				<button class="admin-button-com middle blue" @click="delMemory()">清除已选</button>
 			</view>
 		</view>
 
@@ -111,11 +111,47 @@
 			</template>
 		</modal-module>
 
-		<FooterCart :price="allPrice" :count="allCount" @confirm="confirmSelectEvent" ></FooterCart>
+		<FooterCart :price="allPrice" :count="allCount" @confirm="confirmSelectEvent" @showCartItem="showCartItem"></FooterCart>
 		<wangCg :show.sync="notOpenShop" @bthClick="goToCg()"></wangCg>
     	<sel-popup :show="popupShow" :info="infoData" @close="hidePopup" />
 		<app-activily-coupon :show.sync="isNewCustom" :info="newCustomGift" :ghsId="ghsId" />
 
+		<view v-if="cartItemShow == true" style="position: fixed;z-index: 190;top: 0;left: 0;width: 100vw;height: 100vh;background: rgba(0, 0, 0, 0.6);color: #fff;">
+			<view style="position: fixed;bottom: 108upx;width:100vw;heigh:300upx;background-color:white;">
+				<view class="commodity-view">
+					<view class="summary-bar">
+						<view class="operate-view" @click="delMemory()"> 清空花材 </view>
+					</view>
+					<view class="commodity-list">
+						<view class="commodity-item" v-for="(item, index) in selectList" :key="index">
+							<image class="item-icon" :src="item.cover" alt="" />
+							<view class="item-info">
+								<view class="info-line">
+									<text class="item-name">{{ item.itemName }}</text>
+									<text class="item-price">
+										<text class="unit">¥</text>
+										<text class="price">
+											{{ parseFloat(item.bigPrice)||0 }}
+										</text>
+									</text>
+								</view>
+								<view style="text-align:right;">
+									<view class="open-bx" >
+										<i class="iconfont iconjian" @click="delItem(item)" v-if="item.bigCount > 0 || item.smallCount > 0"></i>
+										<text class="num" @click="customUpdate(item)">
+										<text v-if="item.bigCount > 0" style="font-size:24upx;font-weight:bold;color:#3385ff;">{{ item.bigCount }}</text>
+										<text v-if="item.smallCount > 0" style="font-size:24upx;">{{ item.smallCount }}</text>
+										</text>
+										<i class="iconfont iconzeng" @click="addEvents(item)"></i>
+									</view>
+								</view>
+							</view>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+
 	</view>
 </template>
 
@@ -189,6 +225,7 @@ export default {
 			showInvite:false,
 			//推荐新人福利
 			tjFl:0,
+			cartItemShow:false
 		};
 	},
 	onPullDownRefresh() {
@@ -288,6 +325,57 @@ export default {
 
 	},
 	methods: {
+		delMemory(id){
+			this.cartItemShow = false
+			this.removeMemory(this.option.id)
+		},
+		delItem(item) {
+			if(item.variety == 0){
+				this.delEvent(item)
+			}else{
+				this.$msg('小菊请在列表里修改')
+			}
+		},
+		addEvents(item) {
+			if(item.variety == 0){
+				const ratio = Number(item.ratio);
+				if(this.offVerifyRepertory){
+					if(item.stock<=0){
+						uni.showToast({title:'没有货了',icon:'none'})
+						return
+					}
+					if (Number(this.bigCount) * ratio + Number(this.smallCount) >Number(item.bigNum) * ratio + Number(item.smallNum)) {
+						this.$msg("库存只剩"+item.bigNum);
+						return
+					}
+				}
+				this.addEvent(item)
+			}else{
+				this.$msg('小菊请在列表里修改')
+			}
+		},
+		customUpdate(item) {
+			if(item.variety == 0){
+				if(item.stock<=0){
+					uni.showToast({title:'没有货了',icon:'none'})
+					return
+				}
+				this.customNum({ ...item, bigCount: item.bigCount, smallCount: item.smallCount })
+			}else{
+				this.$msg('小菊请在列表里修改')
+			}
+		},
+		showCartItem(){
+			if(this.cartItemShow == true){
+				this.cartItemShow = false
+			}else{
+				if(!this.$util.isEmpty(this.selectList)){
+					if(this.cartItemShow == false){
+						this.cartItemShow = true
+					}
+				}
+			}
+		},
 		closeInvite(){
 			this.showInvite = false
 		},
@@ -788,4 +876,146 @@ export default {
     }
   }
 }
+
+		.commodity-view {
+			display: flex;
+			flex-direction: column;
+			.commodity-list {
+				overflow:scroll;
+				height:50vh;
+				padding: 20upx;
+				.commodity-item {
+					display: flex;
+					margin-bottom: 20upx;
+					.item-icon {
+						flex-shrink: 0;
+						width: 140upx;
+						height: 140upx;
+					}
+					.item-info {
+						display: flex;
+						flex-direction: column;
+						justify-content: center;
+						flex: 1;
+						margin-left: 20upx;
+						.info-line {
+							margin-bottom: 20upx;
+							display: flex;
+							justify-content: space-between;
+							align-items: flex-end;
+							.item-name {
+								color: #666;
+								font-size: 28upx;
+								overflow: hidden;
+								white-space: nowrap;
+								text-overflow: ellipsis;
+								width:400upx;
+							}
+							.item-price {
+								color: #333;
+								font-size: 22upx;
+								.price {
+									font-size: 32upx;
+									font-weight: bold;
+								}
+							}
+							.item-type {
+								color: #999;
+								font-size: 24upx;
+							}
+							.item-count {
+								color: #666;
+								font-size: 24upx;
+							}
+						}
+
+
+			.open-bx {
+				align-items: center;
+				& .iconfont {
+					color: #3385ff;
+					font-size: 42upx;
+				}
+
+				.position{
+					display: block;
+					width: 70upx;
+					text-align: center;
+				}
+				.iconcachu {
+					margin: 0 6upx 0 20upx;
+					color: #ccc;
+					&.edit {
+						color: #3385ff;
+					}
+				}
+				& > .num {
+					display: inline-block;
+					width: 120upx;
+					height:45upx;
+					text-align:center;
+					margin: 0 8upx;
+					color: #868686;
+					border-radius: 22upx;
+					background-color: #f5f5f5;
+					padding: 3upx 0;
+					font-size: 25upx;
+				}
+				.change-input {
+					width: 164upx;
+					height: 60upx;
+					line-height: 60upx;
+					text-align: center;
+					background: #ffffff;
+					border: 1upx solid #dddddd;
+					border-radius: 4upx;
+					font-size: 25upx;
+				}
+				.btn-box{
+					width: 100upx;
+					height: 60upx;
+					line-height: 60upx;
+					color: #ffffff;
+					background: #3385ff;
+					text-align: center;
+					border-radius: 10upx;
+				}
+			}
+
+					}
+				}
+			}
+			.summary-bar {
+				padding: 0 20upx;
+				height: 90upx;
+				display: flex;
+
+				align-items: center;
+				justify-content: space-between;
+				border-top: 1px solid #eeeeee;
+				.operate-view {
+					display: flex;
+
+					align-items: center;
+					color: #3385ff;
+					font-size: 26upx;
+					.iconfont {
+						margin-right: 20upx;
+						font-size: 40upx;
+					}
+				}
+				.describe-view {
+					display: flex;
+
+					align-items: center;
+					color: #333;
+					font-size: 24upx;
+					.price {
+						font-weight: bold;
+						font-size: 36upx;
+					}
+				}
+			}
+		}
+
 </style>