shish 2 months ago
parent
commit
be2452bf48

+ 36 - 2
ghsApp/src/admin/item/components/item2.vue

@@ -74,7 +74,12 @@
 			</view>
 			</view>
 		</view>
 		</view>
 	</view>
 	</view>
-	
+
+	<view class="remark-bar" v-if="info.itemRemark">
+		<text class="remark-label">备注</text>
+		<text class="remark-text">{{ info.itemRemark }}</text>
+	</view>
+
 	<view class="bottom-buttons-container">
 	<view class="bottom-buttons-container">
 		<text class="bottom-button" @click.stop="doPrintLabel(info,1)">价码</text>
 		<text class="bottom-button" @click.stop="doPrintLabel(info,1)">价码</text>
 		<text class="bottom-button" @click.stop="doPrintLabel(info,0)">标签</text>
 		<text class="bottom-button" @click.stop="doPrintLabel(info,0)">标签</text>
@@ -147,7 +152,36 @@ export default {
 </script>
 </script>
 <style lang="scss" scoped>
 <style lang="scss" scoped>
 .product{
 .product{
-	height:230upx;
+	min-height:230upx;
+}
+.remark-bar {
+	display: flex;
+	align-items: center;
+	margin-top: 4upx;
+	margin-bottom: 6upx;
+	padding: 6upx 10upx;
+	background: #fff8f2;
+	border-left: 5upx solid #ff8c3a;
+	box-sizing: border-box;
+}
+.remark-label {
+	font-size: 28upx;
+	font-weight: bold;
+	color: #ff8c3a;
+	line-height: 1.2;
+	margin-right: 10upx;
+	flex-shrink: 0;
+}
+.remark-text {
+	font-size: 30upx;
+	font-weight: bold;
+	color: #ff2842;
+	line-height: 1.3;
+	overflow: hidden;
+	white-space: nowrap;
+	text-overflow: ellipsis;
+	flex: 1;
+	min-width: 0;
 }
 }
 .bottom-buttons-container{
 .bottom-buttons-container{
 	display: flex;
 	display: flex;

+ 94 - 3
ghsApp/src/admin/item/list2.vue

@@ -48,7 +48,7 @@
 								<template v-for="(productItem, productIndex) in globalItemData">
 								<template v-for="(productItem, productIndex) in globalItemData">
 									<view class="item_list_title" v-if="productItem.className && productItem.className!=''">{{ productItem.className }}</view>
 									<view class="item_list_title" v-if="productItem.className && productItem.className!=''">{{ productItem.className }}</view>
 									<!-- 下面这个key显示有问题,不要动,动了好像会有问题!!!! -->
 									<!-- 下面这个key显示有问题,不要动,动了好像会有问题!!!! -->
-									<view style="height:255upx" :key="productIndex">
+									<view class="item-row" :class="{ 'item-row--remark': productItem.itemRemark }" :key="productIndex">
 										<ItemStock :info="productItem" @moreAction="moreAction" 
 										<ItemStock :info="productItem" @moreAction="moreAction" 
 										@doPrintLabel="doPrintLabel" @cancelDiscountFn="cancelDiscountFn" @cancelFullOff="cancelFullOff"
 										@doPrintLabel="doPrintLabel" @cancelDiscountFn="cancelDiscountFn" @cancelFullOff="cancelFullOff"
 										:ref="`productRef${productItem.id}`" @hideChangeFn="hideChangeFn" 
 										:ref="`productRef${productItem.id}`" @hideChangeFn="hideChangeFn" 
@@ -154,6 +154,12 @@
 				<view class="action-button-item">
 				<view class="action-button-item">
 					<button class="action-button" @click="doPart()">拆散</button>
 					<button class="action-button" @click="doPart()">拆散</button>
 				</view>
 				</view>
+				<view class="action-button-item">
+					<button class="action-button" @click="addItemRemark()">增加备注</button>
+				</view>
+				<view class="action-button-item">
+					<button class="action-button" @click="clearItemRemarkFn()">清除备注</button>
+				</view>
 				<view class="action-button-item">
 				<view class="action-button-item">
 					<button class="action-button" @click="delItem()">删除</button>
 					<button class="action-button" @click="delItem()">删除</button>
 				</view>
 				</view>
@@ -218,6 +224,18 @@
 			</template>
 			</template>
 		</modal-module>
 		</modal-module>
 
 
+		<modal-module :show="remarkShow" @click="remarkConfirm" :maskClosable="true" title="花材备注" padding="30rpx 30rpx" >
+		<template v-slot:content>
+			<view class="app-modal-input-wrap">
+			<view class="inp-list-line">
+			<view class="line-input">
+			<input type="text" style="width:90%;text-align:center;" @blur="remarkBlur" :focus="remarkFocus" v-model="remarkText" maxlength="200" :adjust-position="false" class="inp-input" placeholder="请输入备注" />
+			</view>
+			</view>
+		</view>
+		</template>
+		</modal-module>
+
 	</view>
 	</view>
 </template>
 </template>
 <script>
 <script>
@@ -229,7 +247,7 @@ import { mapGetters } from "vuex";
 import { getWeixinId } from "@/api/invite";
 import { getWeixinId } from "@/api/invite";
 import { print,cancelDiscountPrice,cancelPreSell,delStatusUpdate,cancelFullOffFn } from '@/api/product';
 import { print,cancelDiscountPrice,cancelPreSell,delStatusUpdate,cancelFullOffFn } from '@/api/product';
 import { cancelLimitBuy } from '@/api/item';
 import { cancelLimitBuy } from '@/api/item';
-import { getHdPoster,getSkPoster,changeFrontHide,applyAuth,moveToLosing } from '@/api/item'
+import { getHdPoster,getSkPoster,changeFrontHide,applyAuth,moveToLosing,updateItemRemark,clearItemRemark } from '@/api/item'
 import uniPopup from '@/uni_modules/uni-popup/components/uni-popup/uni-popup.vue';
 import uniPopup from '@/uni_modules/uni-popup/components/uni-popup/uni-popup.vue';
 import ModalModule from "@/components/plugin/modal"
 import ModalModule from "@/components/plugin/modal"
 import { partItem } from "@/api/part"
 import { partItem } from "@/api/part"
@@ -272,7 +290,10 @@ export default {
 			priceOption:0,
 			priceOption:0,
 			cancelPreSellShow: false,
 			cancelPreSellShow: false,
 			clearStockOption: -1,
 			clearStockOption: -1,
-			cancelPreSellItem: null
+			cancelPreSellItem: null,
+			remarkShow: false,
+			remarkText: '',
+			remarkFocus: false
 		};
 		};
 	},
 	},
 	computed:{
 	computed:{
@@ -578,6 +599,70 @@ export default {
 				}
 				}
 			})
 			})
 		},
 		},
+		addItemRemark(){
+			this.closeRightShow()
+			this.remarkText = this.currentInfo.itemRemark || ''
+			this.remarkShow = true
+			let that = this
+			setTimeout(() => {
+				that.$nextTick(() => {
+					that.remarkFocus = true
+				})
+			}, 300)
+		},
+		remarkBlur(){
+			this.remarkFocus = false
+		},
+		closeRemarkPop(){
+			this.remarkShow = false
+			this.remarkFocus = false
+			this.remarkText = ''
+		},
+		remarkConfirm(val){
+			let that = this
+			if (val.index == 0) {
+				this.closeRemarkPop()
+				return
+			}
+			const text = (that.remarkText || '').trim()
+			if (!text) {
+				that.$msg('请填写备注')
+				return
+			}
+			updateItemRemark({ id: that.currentInfo.id, itemRemark: text }).then(res => {
+				if (res.code == 1) {
+					that.syncItemRemark(that.currentInfo.id, text)
+					that.closeRemarkPop()
+					that.$msg(res.msg || '保存成功')
+				}
+			})
+		},
+		clearItemRemarkFn(){
+			let that = this
+			this.closeRightShow()
+			if (!that.currentInfo.itemRemark) {
+				that.$msg('暂无备注')
+				return
+			}
+			that.$util.confirmModal({ content: '确定清除备注?' }, () => {
+				clearItemRemark({ id: that.currentInfo.id }).then(res => {
+					if (res.code == 1) {
+						that.syncItemRemark(that.currentInfo.id, '')
+						that.$msg(res.msg || '清除成功')
+					}
+				})
+			})
+		},
+		syncItemRemark(id, itemRemark){
+			this.currentInfo.itemRemark = itemRemark
+			if (!this.$util.isEmpty(this.globalItemData)) {
+				this.globalItemData.forEach((item, index) => {
+					if (item.id == id) {
+						this.$set(this.globalItemData[index], 'itemRemark', itemRemark)
+					}
+				})
+			}
+		},
 		closeRightShow(){
 		closeRightShow(){
 			this.$refs.rightShowMore.close()
 			this.$refs.rightShowMore.close()
 		},
 		},
@@ -783,6 +868,12 @@ export default {
 	.item_list_bx {
 	.item_list_bx {
 		padding: 40upx 16upx;
 		padding: 40upx 16upx;
 	}
 	}
+	.item-row {
+		min-height: 255upx;
+	}
+	.item-row--remark {
+		min-height: 300upx;
+	}
 	.item_list_title {
 	.item_list_title {
 		margin-bottom: 20upx;
 		margin-bottom: 20upx;
 		font-size: 30upx;
 		font-size: 30upx;

+ 9 - 1
ghsApp/src/api/item/index.js

@@ -145,4 +145,12 @@ export const getCostChangeList = data => {
 
 
 export const changeVirtualStock = data => {
 export const changeVirtualStock = data => {
 	return https.get('/item/change-virtual-stock', data)
 	return https.get('/item/change-virtual-stock', data)
-}
+}
+
+export const updateItemRemark = data => {
+	return https.get('/item/update-item-remark', data)
+}
+
+export const clearItemRemark = data => {
+	return https.get('/item/clear-item-remark', data)
+}

+ 78 - 2
ghsApp/src/pagesPurchase/components/pageSuccess.vue

@@ -57,6 +57,13 @@
 											class="limit-buy-tip"
 											class="limit-buy-tip"
 										>限购{{ res.limitBuy }}</text>
 										>限购{{ res.limitBuy }}</text>
 									</view>
 									</view>
+							<view class="item-remark-row" v-if="res.itemRemark">
+								<view class="item-remark-content">
+									<text class="item-remark-label">备注</text>
+									<text class="item-remark-text">{{ res.itemRemark }}</text>
+								</view>
+								<text class="item-remark-cancel" @click.stop="clearItemRemarkFn(i)">取消备注</text>
+							</view>
 								</view>
 								</view>
 							</view>
 							</view>
 						</view>
 						</view>
@@ -87,7 +94,7 @@
 <script>
 <script>
 import { getAllProductDataApi,batchChangePrice } from "@/api/product";
 import { getAllProductDataApi,batchChangePrice } from "@/api/product";
 import { getCgItemList,getPurchaseDetailApi,confirmPutIn,saveCgPrice } from "@/api/purchase";
 import { getCgItemList,getPurchaseDetailApi,confirmPutIn,saveCgPrice } from "@/api/purchase";
-import { cancelLimitBuy } from "@/api/item";
+import { cancelLimitBuy, clearItemRemark } from "@/api/item";
 import { IMGHOST } from '@/config'
 import { IMGHOST } from '@/config'
 import { mapGetters } from "vuex"
 import { mapGetters } from "vuex"
 export default {
 export default {
@@ -224,6 +231,34 @@ export default {
 				}
 				}
 			})
 			})
 		},
 		},
+		clearItemRemarkFn(index) {
+			const item = this.flowersList[index]
+			if (!item || !item.itemRemark) {
+				return
+			}
+			const productId = item.productId
+			if (!productId) {
+				this.$msg('花材信息缺失')
+				return
+			}
+			this.$util.confirmModal({ content: '确认清除备注?' }, () => {
+				let pendingMsg = ''
+				uni.showLoading({ mask: true })
+				clearItemRemark({ id: productId }).then(res => {
+					if (res.code == 1) {
+						this.$set(this.flowersList[index], 'itemRemark', '')
+						pendingMsg = res.msg || '清除成功'
+					}
+				}).finally(() => {
+					uni.hideLoading()
+					if (pendingMsg) {
+						setTimeout(() => {
+							this.$msg(pendingMsg)
+						}, 100)
+					}
+				})
+			})
+		},
 		cancelLimitBuyFn(index){
 		cancelLimitBuyFn(index){
 			const item = this.flowersList[index]
 			const item = this.flowersList[index]
 			if (!item || Number(item.limitBuy) <= 0) {
 			if (!item || Number(item.limitBuy) <= 0) {
@@ -368,7 +403,7 @@ export default {
 }
 }
 .product-area{
 .product-area{
 	width:700upx;
 	width:700upx;
-	height:115upx;
+	min-height:115upx;
 	display:flex;
 	display:flex;
 	align-items:center;
 	align-items:center;
 	.first-area{
 	.first-area{
@@ -481,6 +516,47 @@ export default {
 			}
 			}
 		}
 		}
 	}
 	}
+		.item-remark-row {
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+			margin-top: 8upx;
+			margin-bottom: 6upx;
+			padding: 8upx 10upx;
+			background: #fff8f2;
+			border-left: 5upx solid #ff8c3a;
+			box-sizing: border-box;
+		}
+		.item-remark-content {
+			display: flex;
+			align-items: center;
+			flex: 1;
+			min-width: 0;
+			margin-right: 16upx;
+		}
+		.item-remark-label {
+			font-size: 28upx;
+			font-weight: bold;
+			color: #ff8c3a;
+			margin-right: 10upx;
+			flex-shrink: 0;
+		}
+		.item-remark-text {
+			font-size: 30upx;
+			font-weight: bold;
+			color: #ff2842;
+			overflow: hidden;
+			white-space: nowrap;
+			text-overflow: ellipsis;
+			flex: 1;
+			min-width: 0;
+		}
+		.item-remark-cancel {
+			font-size: 24upx;
+			color: #999;
+			flex-shrink: 0;
+			padding: 6upx 0 6upx 10upx;
+		}
 	.second-area{
 	.second-area{
 		float:left;
 		float:left;
 		color:#646464;
 		color:#646464;

+ 137 - 57
hdApp/src/pagesPurchase/components/item.vue

@@ -1,62 +1,85 @@
 <template>
 <template>
-	<view class="item-cmd_bx" @click="customNum(info.variety)">
-		<view class="img_bx" style="background:#eeeeee" @click.stop="showBigImg">
-			<image :src="info.cover" lazy-load="true" :lazy-load-margin="0"></image>
-		</view>
-		<view class="cmd-info_bx">
-			<view class="tit" >
-				<text style="font-size:20upx;border:1upx solid #3385ff;color:white;background-color:#3385ff;margin-right:5upx;padding-left:5upx;padding-right:5upx;" 
-				v-if="info.presell == 1">预售</text>
+	<view class="product-item">
+		<view class="item-cmd_bx" @click="customNum(info.variety)">
+			<view class="img_bx" style="background:#eeeeee" @click.stop="showBigImg">
+				<image :src="info.cover" lazy-load="true" :lazy-load-margin="0"></image>
+			</view>
+			<view class="cmd-info_bx">
+				<view class="tit" >
+					<text style="font-size:20upx;border:1upx solid #3385ff;color:white;background-color:#3385ff;margin-right:5upx;padding-left:5upx;padding-right:5upx;" 
+					v-if="info.presell == 1">预售</text>
 
 
-				<text style="font-size:20upx;border:1upx solid red;color:white;background-color:red;margin-right:5upx;padding-left:5upx;padding-right:5upx;" 
-				v-if="info.limitBuy > 0">限购{{ info.limitBuy }}份</text>
+					<text style="font-size:20upx;border:1upx solid red;color:white;background-color:red;margin-right:5upx;padding-left:5upx;padding-right:5upx;" 
+					v-if="info.limitBuy > 0">限购{{ info.limitBuy }}份</text>
 
 
-				{{ info.name||''}}
-			</view>
-			<view class="kc num-open_bx flex-space">
-				<view>
-					<view class="flex-space" v-if="Number(info.discountPrice)>0" style="position:absolute;top:14upx;">
-						<view style="padding:2upx 10upx 5upx 10upx;text-align: center;color: red;border: 1px solid red;margin-right: 20upx;line-height: 1;font-size: 20upx">
-							{{parseFloat(((Number(info.discountPrice)/Number(info.prePrice)).toFixed(2)*10).toFixed(1))+'折'}}
-						</view>
-						<text style="text-decoration:line-through;color:#A9A9A9">¥{{parseFloat(info.prePrice)}}</text>
-					</view>
-					<view class="flex-space" style="color:#333333;position:absolute;top:13upx;" v-else>
-						<block v-if="info.ratioType == 0">
-						{{info.ratio}}{{info.smallUnit}}/{{info.bigUnit}}
-						</block>
-						<block v-else>
-						若干{{info.smallUnit}}/{{info.bigUnit}}
-						</block>
-					</view>
-					<view class="price" v-if="info.myLevel && info.myLevel == 2">
-						<!--平潭满天星,不展示原价,比较特殊-->
-						<text style="color:#a7a2a2;text-decoration:line-through;font-size:30upx;font-weight:bold;" v-if="Number(shopId)!=38322">¥{{parseFloat(info.defaultGradePrice) }}</text>
-						<text style="font-weight:bold;margin-left:10upx;font-size:30upx;">会员¥{{ parseFloat(info.price) }}</text>
-					</view>
-					<view class="price" style="font-weight:bold;font-size:30upx;" v-else>¥{{ info.price ? parseFloat(info.price) : 0 }}</view>
+					{{ info.name||''}}
 				</view>
 				</view>
-				<view style="text-align: right" >
-					<view class="open-bx" >
-						<i class="iconfont iconjian" @click.stop="delEvent(info.variety)" v-if="bigCount > 0 || smallCount > 0"></i>
-						<text class="num">
-							<text v-if="bigCount > 0" style="font-weight:bold;color:#3385ff;">{{ `${bigCount}` }}</text>
-							<text v-if="smallCount > 0" >{{ `${smallCount}` }}</text>
-						</text>
-						<i class="iconfont iconzeng" @click.stop="addEvents(info.variety)"></i>
+				<view class="kc num-open_bx flex-space">
+					<view>
+						<view class="flex-space" v-if="Number(info.discountPrice)>0" style="position:absolute;top:14upx;">
+							<view style="padding:2upx 10upx 5upx 10upx;text-align: center;color: red;border: 1px solid red;margin-right: 20upx;line-height: 1;font-size: 20upx">
+								{{parseFloat(((Number(info.discountPrice)/Number(info.prePrice)).toFixed(2)*10).toFixed(1))+'折'}}
+							</view>
+							<text style="text-decoration:line-through;color:#A9A9A9">¥{{parseFloat(info.prePrice)}}</text>
+						</view>
+						<view class="flex-space" style="color:#333333;position:absolute;top:13upx;" v-else>
+							<block v-if="info.ratioType == 0">
+							{{info.ratio}}{{info.smallUnit}}/{{info.bigUnit}}
+							</block>
+							<block v-else>
+							若干{{info.smallUnit}}/{{info.bigUnit}}
+							</block>
+						</view>
+						<view class="price" v-if="info.myLevel && info.myLevel == 2">
+							<text style="color:#a7a2a2;text-decoration:line-through;font-size:30upx;font-weight:bold;" v-if="Number(shopId)!=38322">¥{{parseFloat(info.defaultGradePrice) }}</text>
+							<text style="font-weight:bold;margin-left:10upx;font-size:30upx;">会员¥{{ parseFloat(info.price) }}</text>
+						</view>
+						<view class="price" style="font-weight:bold;font-size:30upx;" v-else>¥{{ info.price ? parseFloat(info.price) : 0 }}</view>
 					</view>
 					</view>
-					<stock v-if="showStock && showStock == '1'">
-						<text v-if="Number(info.stock) > Number(info.stockWarning)" style="color:#333;margin-right:55upx;">还剩 {{ parseFloat(info.stock) }}</text>
-						<text v-else style="color:red;font-weight:bold;margin-right:55upx;">还剩 {{ parseFloat(info.stock) }}</text>
-					</stock>
-					<stock v-else>
-						<stock v-if="showSold && showSold == 1">
-							<text style="color:#333;margin-right:55upx;">已售 {{ info.actualSold ? parseInt(info.actualSold):0 }}</text>
+					<view style="text-align: right" >
+						<view class="open-bx" >
+							<i class="iconfont iconjian" @click.stop="delEvent(info.variety)" v-if="bigCount > 0 || smallCount > 0"></i>
+							<text class="num">
+								<text v-if="bigCount > 0" style="font-weight:bold;color:#3385ff;">{{ `${bigCount}` }}</text>
+								<text v-if="smallCount > 0" >{{ `${smallCount}` }}</text>
+							</text>
+							<i class="iconfont iconzeng" @click.stop="addEvents(info.variety)"></i>
+						</view>
+						<stock v-if="showStock && showStock == '1'">
+							<text v-if="Number(info.stock) > Number(info.stockWarning)" style="color:#333;margin-right:55upx;">还剩 {{ parseFloat(info.stock) }}</text>
+							<text v-else style="color:red;font-weight:bold;margin-right:55upx;">还剩 {{ parseFloat(info.stock) }}</text>
+						</stock>
+						<stock v-else>
+							<stock v-if="showSold && showSold == 1">
+								<text style="color:#333;margin-right:55upx;">已售 {{ info.actualSold ? parseInt(info.actualSold):0 }}</text>
+							</stock>
 						</stock>
 						</stock>
-					</stock>
+					</view>
 				</view>
 				</view>
 			</view>
 			</view>
 		</view>
 		</view>
+		<view class="remark-bar" v-if="info.itemRemark" @click.stop>
+			<text class="remark-label">备注</text>
+			<text class="remark-text">{{ info.itemRemark }}</text>
+		</view>
+		<view class="extra-line extra-line--middle" v-if="showMiddleExtra" @click.stop>
+			<text style="font-weight:bold;" v-if="Number(info.reachNum)>0">
+				满{{info.reachNum}}扎,每扎优惠 ¥{{parseFloat(info.reachNumDiscount)}}<block v-if="info.presell == 0">(提交订单后优惠)</block>
+			</text>
+			<block v-if="info.presell && info.presell == 1"><block v-if="Number(info.reachNum)>0">,</block>到货日期
+				<block v-if="!$util.isEmpty(info.presellDateShow)">
+					<text v-for="(dateItem, dateIndex) in info.presellDateShow" :key="dateIndex">{{dateItem}}<text v-if="dateIndex!=info.presellDateShow.length-1">,</text></text>
+				</block>
+			</block>
+		</view>
+		<view class="extra-line" v-else-if="showMyStock" @click.stop>
+			<text v-if="info.myLack == 0" class="my-stock my-stock--ok">
+				我剩{{info.myStock?info.myStock:0}}<text class="on-road" v-if="info.myOnStock>0">路上{{info.myOnStock?info.myOnStock:0}}</text>
+			</text>
+			<text v-else class="my-stock my-stock--lack">
+				我剩{{info.myStock?info.myStock:0}}<text class="on-road" v-if="info.myOnStock>0">路上{{info.myOnStock?info.myOnStock:0}}</text>
+			</text>
+		</view>
 	</view>
 	</view>
 </template>
 </template>
 
 
@@ -97,6 +120,14 @@ export default {
 			default: false
 			default: false
 		},
 		},
 	},
 	},
+	computed: {
+		showMiddleExtra() {
+			return this.info.presell == 1 || Number(this.info.reachNum) > 0;
+		},
+		showMyStock() {
+			return !this.showMiddleExtra && this.info.myDisplay == 1;
+		}
+	},
 	data() {
 	data() {
 		return {}
 		return {}
 	},
 	},
@@ -106,13 +137,11 @@ export default {
 		},
 		},
 		addEvents(variety) {
 		addEvents(variety) {
 			if(variety == 0){
 			if(variety == 0){
-				const ratio = Number(this.info.ratio);
 				if(this.offVerifyRepertory){
 				if(this.offVerifyRepertory){
 					if(this.info.stock<=0){
 					if(this.info.stock<=0){
 						uni.showToast({title:'没有货了',icon:'none'})
 						uni.showToast({title:'没有货了',icon:'none'})
 						return
 						return
 					}
 					}
-					//如果花材库存剩2.5扎时,一直点加号会显示210扎,暂时在这边限制只能下大单位,而且只能用>=限制才有效,用>无效。本来要在父方法里限制,未来再解决这个问题
 					if (Number(this.bigCount) >= Number(this.info.bigNum)) {
 					if (Number(this.bigCount) >= Number(this.info.bigNum)) {
 						this.$msg("库存只剩"+this.info.bigNum);
 						this.$msg("库存只剩"+this.info.bigNum);
 						return
 						return
@@ -120,7 +149,6 @@ export default {
 				}
 				}
 				this.$emit("add", this.info);
 				this.$emit("add", this.info);
 			}else{
 			}else{
-				//去特殊品种页
 				this.$emit("goToSpecialVariety", this.info);
 				this.$emit("goToSpecialVariety", this.info);
 			}
 			}
 		},
 		},
@@ -128,7 +156,6 @@ export default {
 			if(variety == 0){
 			if(variety == 0){
 				this.$emit("del", this.info);
 				this.$emit("del", this.info);
 			}else{
 			}else{
-				//去特殊品种页
 				this.$emit("goToSpecialVariety", this.info);
 				this.$emit("goToSpecialVariety", this.info);
 			}
 			}
 		},
 		},
@@ -152,7 +179,6 @@ export default {
 					smallCount: this.smallCount
 					smallCount: this.smallCount
 				});
 				});
 			}else{
 			}else{
-				//去特殊品种页
 				this.$emit("goToSpecialVariety", this.info);
 				this.$emit("goToSpecialVariety", this.info);
 			}
 			}
 		}
 		}
@@ -160,9 +186,63 @@ export default {
 };
 };
 </script>
 </script>
 <style lang="scss" scoped>
 <style lang="scss" scoped>
-.item-cmd_bx {
+.product-item {
 	position: relative;
 	position: relative;
 	margin-bottom: 20upx;
 	margin-bottom: 20upx;
+}
+.remark-bar {
+	display: flex;
+	align-items: center;
+	margin-top: 4upx;
+	padding: 6upx 10upx;
+	background: #fff8f2;
+	border-left: 5upx solid #ff8c3a;
+	box-sizing: border-box;
+}
+.remark-label {
+	font-size: 28upx;
+	font-weight: bold;
+	color: #ff8c3a;
+	line-height: 1.2;
+	margin-right: 10upx;
+	flex-shrink: 0;
+}
+.remark-text {
+	font-size: 30upx;
+	font-weight: bold;
+	color: #ff2842;
+	line-height: 1.3;
+	overflow: hidden;
+	white-space: nowrap;
+	text-overflow: ellipsis;
+	flex: 1;
+	min-width: 0;
+}
+.extra-line {
+	margin-top: 8upx;
+	font-size: 24upx;
+	color: #3385ff;
+	line-height: 1.4;
+	word-wrap: break-word;
+	white-space: normal;
+}
+.extra-line--middle {
+	font-size: 26upx;
+}
+.my-stock--ok {
+	color: green;
+	font-weight: normal;
+}
+.my-stock--lack {
+	color: #3385ff;
+	font-weight: bold;
+}
+.on-road {
+	margin-left: 9upx;
+}
+.item-cmd_bx {
+	position: relative;
+	margin-bottom: 0;
 	.img_bx {
 	.img_bx {
 		height: 140upx;
 		height: 140upx;
 		width: 140upx;
 		width: 140upx;
@@ -228,4 +308,4 @@ export default {
 		}
 		}
 	}
 	}
 }
 }
-</style>
+</style>

+ 4 - 24
hdApp/src/pagesPurchase/ghsProduct.vue

@@ -46,7 +46,7 @@
 				<block v-if="!$util.isEmpty(filterProductInfo)">
 				<block v-if="!$util.isEmpty(filterProductInfo)">
 					<view class="item_list_bx selectAll" v-for="(classItem, classIndex) in filterProductInfo" :key="classIndex" :id="`class_${classIndex}`">
 					<view class="item_list_bx selectAll" v-for="(classItem, classIndex) in filterProductInfo" :key="classIndex" :id="`class_${classIndex}`">
 						<view class="item_list_title">{{ classItem.className }}</view>
 						<view class="item_list_title">{{ classItem.className }}</view>
-						<view v-for="(productItem, productIndex) in classItem.child" :key="productIndex" style="position: relative;" :class="[productItem.variety == 1 ? 'big-box' : (productItem.presell == 1 || Number(productItem.reachNum)>0) ? 'middle-box' : 'box']"  :id="`class_${classItem.classId}_${productItem.id}`">
+						<view v-for="(productItem, productIndex) in classItem.child" :key="productIndex" style="position: relative;" :class="['product-row', productItem.variety == 1 ? 'big-box' : (productItem.presell == 1 || Number(productItem.reachNum)>0) ? 'middle-box' : 'box', productItem.itemRemark ? 'has-item-remark' : '']"  :id="`class_${classItem.classId}_${productItem.id}`">
 							<Commondity v-if="classItem.isActive"
 							<Commondity v-if="classItem.isActive"
 								:info="productItem"
 								:info="productItem"
 								:offVerifyRepertory="true"
 								:offVerifyRepertory="true"
@@ -66,26 +66,6 @@
 							<view v-if="productItem.variety && productItem.variety == 1" class="has-color" @click="goToSpecialVariety(productItem)">
 							<view v-if="productItem.variety && productItem.variety == 1" class="has-color" @click="goToSpecialVariety(productItem)">
 								<view class="has-color-button">选颜色</view>
 								<view class="has-color-button">选颜色</view>
 							</view>
 							</view>
-							<view v-if="productItem.presell == 1 || Number(productItem.reachNum)>0" style="position:absolute;top:145upx;font-size:26upx;color:#3385ff;white-space: normal;word-wrap: break-word;">
-								<text style="font-weight:bold;" v-if="Number(productItem.reachNum)>0">
-									满{{productItem.reachNum}}扎,每扎优惠 ¥{{parseFloat(productItem.reachNumDiscount)}}<block v-if="productItem.presell == 0">(提交订单后优惠)</block>
-								</text>
-								<block v-if="productItem.presell && productItem.presell == 1"><block v-if="Number(productItem.reachNum)>0">,</block>到货日期
-									<block v-if="!$util.isEmpty(productItem.presellDateShow)">
-										<text v-for="(dateItem, dateIndex) in productItem.presellDateShow" :key="dateIndex">{{dateItem}}<text v-if="dateIndex!=productItem.presellDateShow.length-1">,</text></text>
-									</block>
-								</block>
-							</view>
-							<view v-else style="position:absolute;top:145upx;font-size:24upx;color:#3385ff;white-space: normal;word-wrap: break-word;">
-								<block v-if="productItem.myDisplay == 1">
-									<text v-if="productItem.myLack == 0" style="color:green;font-weight:normal;">
-										我剩{{productItem.myStock?productItem.myStock:0}}<text style="margin-left:9upx;" v-if="productItem.myOnStock>0">路上{{productItem.myOnStock?productItem.myOnStock:0}}</text>
-									</text>
-									<text v-else style="color:#3385ff;font-weight:bold;">
-										我剩{{productItem.myStock?productItem.myStock:0}}<text style="margin-left:9upx;" v-if="productItem.myOnStock>0">路上{{productItem.myOnStock?productItem.myOnStock:0}}</text>
-									</text>
-								</block>
-							</view>
 						</view>
 						</view>
 					</view>
 					</view>
 				</block>
 				</block>
@@ -881,14 +861,14 @@ export default {
 	.item_list_bx {
 	.item_list_bx {
 		padding: 20upx 16upx 20upx 16upx;
 		padding: 20upx 16upx 20upx 16upx;
 		.box{
 		.box{
-			height: 185upx
+			min-height: 185upx;
 		}
 		}
 		.middle-box{
 		.middle-box{
-			height: 225upx;
+			min-height: 225upx;
 			position:relative;
 			position:relative;
 		}
 		}
 		.big-box{
 		.big-box{
-			height: 270upx
+			min-height: 270upx;
 		}
 		}
 		.has-color{
 		.has-color{
 			display:flex;
 			display:flex;