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

+ 1 - 1
ghsApp/src/admin/billing/affirm.vue

@@ -34,7 +34,7 @@
               </view>
             </view>
             <view class="summary-bar">
-              <view class="operate-view" v-if="kdType == 'PDA'" @click="removeMemory(option.customId)"> <text class="iconfont iconshanchu1"></text>清除花材 </view>
+              <view class="operate-view" v-if="kdType == 'SCAN'" @click="removeMemory(option.customId)"> <text class="iconfont iconshanchu1"></text>清除花材 </view>
               <view class="operate-view" v-else @click="gobackEvent"><text class="iconfont icongouwuche"></text>重选花材</view>
               <view class="describe-view">共{{ selectList.length }}种,合计 ¥<text class="price">{{ allPrice }}</text></view>
             </view>

+ 0 - 22
ghsApp/src/admin/billing/customerPlace.vue

@@ -29,28 +29,6 @@
 					@tap.stop="swichClass"
 				>
 					<text>{{ item.className || "" }}</text>
-					<text
-						class="tag"
-						v-if="
-							getSelectClassById(item.classId).bigCount > 0 ||
-								getSelectClassById(item.classId).smallCount > 0
-						"
-					>
-						<text
-							v-if="
-								getSelectClassById(item.classId).bigCount > 0 ||
-									getSelectClassById(item.classId).smallCount > 0
-							"
-						>
-							{{ `${getSelectClassById(item.classId).bigCount}` }}
-						</text>
-						<text v-if="getSelectClassById(item.classId).smallCount > 0">
-							/
-						</text>
-						<text v-if="getSelectClassById(item.classId).smallCount > 0">{{
-							getSelectClassById(item.classId).smallCount
-						}}</text>
-					</text>
 				</div>
 			</scroll-view>
 

+ 3 - 14
ghsApp/src/admin/billing/index.vue

@@ -12,23 +12,15 @@
 		<view class="scroll-middle_bx">
 
 			<scroll-view scroll-y scroll-with-animation class="tab-view" :scroll-top="scrollTop" >
-				<!--分类 start -->
+				<!--分类-->
 				<div v-for="(item, index) in filterProductInfo" :key="index" class="tab-bar-item" :class="classIndex == index ? 'active' : ''" :data-current="index" @tap.stop="swichClass(index)">
 					<text>{{ item.className || "" }}</text>
-					<text class="tag" v-if=" getSelectClassById(item.classId).bigCount > 0 || getSelectClassById(item.classId).smallCount > 0">
-						<text v-if=" getSelectClassById(item.classId).bigCount > 0 || getSelectClassById(item.classId).smallCount > 0 ">
-							{{ `${getSelectClassById(item.classId).bigCount}` }}
-						</text>
-						<text v-if="getSelectClassById(item.classId).smallCount > 0"> / </text>
-						<text v-if="getSelectClassById(item.classId).smallCount > 0">{{ getSelectClassById(item.classId).smallCount }}</text>
-					</text>
 				</div>
-				<!--分类 end -->
 				<view style="height: 120upx"></view>
 			</scroll-view>
 
 			<scroll-view scroll-y class="right-box" :scroll-into-view="scroll_into_view" scroll-with-animation="true" @scroll="scroll_detail" lower-threshold="100" @scrolltolower="scroll_bottom">
-				<!--花材列表 start -->
+				<!--花材列表-->
 				<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_title">{{ classItem.className }}</view>
@@ -38,9 +30,7 @@
 									:checkStock="true"
 									:pageType="pageType"
 									:info="productItem"
-									:bigCount="getSelectItemById(productItem.id, classItem.classId).bigCount"
-									:smallCount="getSelectItemById(productItem.id, classItem.classId).smallCount"
-									:userPrice="getSelectItemById(productItem.id, classItem.classId).userPrice"
+									:storeItem="getSelectItemById(productItem.id, classItem.classId)"
 									@showAddModel="showAddModel"
 									@add="addEvent"
 									@setInfoBeforeShowModel="groupInfoBeforeShowModel"
@@ -54,7 +44,6 @@
 				<block v-else>
 					<app-wrapper-empty title="暂无数据" :is-empty="$util.isEmpty(filterProductInfo)" />
 				</block>
-				<!--花材列表 end -->
 			</scroll-view>
 
 		</view>

+ 1 - 9
ghsApp/src/admin/breakage/index.vue

@@ -16,13 +16,6 @@
 				<!--分类 start -->
 				<div v-for="(item, index) in filterProductInfo" :key="index" class="tab-bar-item" :class="classIndex == index ? 'active' : ''" :data-current="index" @tap.stop="swichClass(index)">
 					<text>{{ item.className || "" }}</text>
-					<text class="tag" v-if=" getSelectClassById(item.classId).bigCount > 0 || getSelectClassById(item.classId).smallCount > 0">
-						<text v-if=" getSelectClassById(item.classId).bigCount > 0 || getSelectClassById(item.classId).smallCount > 0 ">
-							{{ `${getSelectClassById(item.classId).bigCount}` }}
-						</text>
-						<text v-if="getSelectClassById(item.classId).smallCount > 0"> / </text>
-						<text v-if="getSelectClassById(item.classId).smallCount > 0">{{ getSelectClassById(item.classId).smallCount }}</text>
-					</text>
 				</div>
 				<!--分类 end -->
 				<view style="height: 120upx"></view>
@@ -38,8 +31,7 @@
 								<Commondity v-if="classItem.isActive"
 									:checkStock="true"
 									:info="productItem"
-									:bigCount="getSelectItemById(productItem.id, classItem.classId).bigCount"
-									:smallCount="getSelectItemById(productItem.id, classItem.classId).smallCount"
+									:storeItem="getSelectItemById(productItem.id, classItem.classId)"
 									@showAddModel="showAddModel"
 									@add="addEvent"
 									@setInfoBeforeShowModel="groupInfoBeforeShowModel"

+ 1 - 1
ghsApp/src/admin/custom/selectCustom.vue

@@ -85,7 +85,7 @@ export default {
 	},
   methods: {
     pdaKd(custom){
-      this.$util.pageTo({url: '/admin/billing/affirm',type:2,query:{customId:custom.id,kdType:'PDA'}})
+      this.$util.pageTo({url: '/admin/billing/affirm',type:2,query:{customId:custom.id,kdType:'SCAN'}})
     },
     selectCurrent(item){
       let style = this.option.style ? this.option.style : 1

+ 1 - 1
ghsApp/src/admin/home/workbench.vue

@@ -254,7 +254,7 @@ export default {
 					success: function (respond) {
 						let currentIndex = respond.tapIndex
 						if(currentIndex == 0){
-							self.$util.pageTo({url: "/admin/billing/affirm",query: {customId: currentId,kdType:'PDA'}})
+							self.$util.pageTo({url: "/admin/billing/affirm",query: {customId: currentId,kdType:'SCAN'}})
 						}else{
 							self.$util.pageTo({url: "/admin/billing/index",query: {customId: currentId}})
 						}

+ 23 - 100
ghsApp/src/components/module/app-commodity.vue

@@ -1,55 +1,34 @@
 <template>
 	<view class="item-cmd_bx" @click="changeItemNum(info.variety)">
 		<view class="img_bx" style="background:#eeeeee">
-			<image :src="info.cover" v-if="isImg"></image>
+			<image :src="info.cover"></image>
 		</view>
 		<view class="cmd-info_bx">
 			<view class="tit" >{{ info.itemName || "" }}</view>
-			<view class="kc num-open_bx flex-end" v-if="type == COMMODITY_TYPE.COMMON">
+			<view class="kc num-open_bx flex-end">
 				<view class="price csss">¥{{ parseFloat(info.price) }}</view>
 				<view style="text-align: right" >
 					<view class="open-bx" >
-						<i class="iconfont iconjian" :class="delAnimationData?'animation':''" @click.stop="delEvent(info.variety)" v-if="bigCount > 0 || smallCount > 0"></i>
+						<i class="iconfont iconjian" @click.stop="delEvent(info.variety)" v-if="bigCount > 0 || smallCount > 0"></i>
 						<text class="num" >
 							<text v-if="bigCount > 0 || smallCount > 0">{{ `${bigCount}` }}</text>
 							<text v-if="smallCount > 0">/</text>
 							<text v-if="smallCount > 0">{{ `${smallCount}` }}</text>
 						</text>
-						<i class="iconfont iconzeng" :class="addAnimationData?'animation':''" @click.stop="addEvents(info.variety)"></i>
+						<i class="iconfont iconzeng" @click.stop="addEvents(info.variety)"></i>
 					</view>
 					<text v-if="Number(info.stock) > Number(info.stockWarning)" style="padding-right: 55upx">还剩 {{ parseFloat(info.stock) }}</text>
 					<text v-else style="padding-right: 55upx;color:red;font-weight:450;">还剩 {{ parseFloat(info.stock) }}</text>
 				</view>
 			</view>
-			<view class="num-open_bx flex-space" v-if="type == COMMODITY_TYPE.CHANGE">
-				<view class="price cs" v-if="!offPrice">¥{{	oldPrice }}</view>
-				<view class="price" v-else></view>
-				<view class="open-bx" style="padding-bottom: 40upx" >
-					<input class="change-input"  @focus="showPrice = null"  v-model="showPrice" type="digit" placeholder="自动调价"   />
-					<view style="width: 80upx;text-align: center;color: red">
-						{{Number(oldPrice)>Number(showPrice)&&Number(showPrice)>0?((Number(showPrice)/Number(oldPrice)).toFixed(2)*10).toFixed(1)+'折':''}}
-					</view>
-					<i :class="isShowSucceed?'position iconfont iconjihuo':'position'" ></i>
-					<view class="btn-box" @click="changePriceEvent">确定</view>
-				</view>
-			</view>
 		</view>
 	</view>
 </template>
-
 <script>
-import { COMMODITY_TYPE } from "@/utils/declare";
-import AppImg from "@/components/app-img";
-import { changePriceByIdApi } from '@/api/product/index'
-import animationMins from "@/mixins/animation";
-import allSelectInput from "@/components/module/allSelectInput";
-import allSelectInputMins from "@/mixins/allSelectInput";
 export default {
 	name: "Commodity",
-	components: {
-		AppImg,allSelectInput
-	},
-	mixins: [animationMins,allSelectInputMins],
+	components: {},
+	mixins: [],
 	props: {
 		info: {
 			required: true,
@@ -58,25 +37,16 @@ export default {
 				return {};
 			}
 		},
-		type: {
-			type: String,
-			default: COMMODITY_TYPE.COMMON
-		},
-		bigCount: {
-			type: Number,
-			default: 0
+		storeItem:{
+			type: Object,
+			default() {
+				return {bigCount:0,smallCount:0,userPrice:0};
+			}
 		},
 		scrollTop: {
 			type: Number,
 			default: 0
 		},
-		smallCount: {
-			type: Number,
-			default: 0
-		},userPrice: {
-			type: Number,
-			default: 0
-		},
 		autoPrice: {},
 		offPrice: {
 			type: Boolean,
@@ -101,58 +71,33 @@ export default {
 	},
 	data() {
 		return {
-			COMMODITY_TYPE,
-			isImg:false,
 			isAlterMoney:false,
 			isAloneAllActive: false,
 			isAloneAllFocus: false,
-			isShowSucceed:false,
 			changeAutoPrice:'',
 			showPrice:0.00,
 			oldPrice:0.00,
-			ifFocus:false
+			ifFocus:false,
+			bigCount:0,
+			smallCount:0,
+			userPrice:0
 		};
 	},
 	created() {},
 	mounted() {
-		setTimeout(()=>{
-			this.isImg = true;
-		},100)
+
 		if(this.info.priceLabel == 2){
 			this.changeAutoPrice = this.info.price
 		}
 		this.showPrice = this.info.priceLabel==1?null:this.info.price
 		this.oldPrice = (Number(this.info.cost) + Number(this.info.addPrice)).toFixed(2)
+
+		this.bigCount = this.storeItem.bigCount
+		this.smallCount = this.storeItem.smallCount
+		this.userPrice = this.storeItem.userPrice
+
 	},
 	methods: {
-		//input点击删除按键
-		deleteInputVal(){
-			this.isAloneAllActive=false;
-			this.changeAutoPrice = '';
-		},
-		//离开input
-		moveAllInput(e){
-			this.isAloneAllActive=false;
-			this.isAloneAllFocus=false;
-			this.changeAutoPrice = e?e:0;
-			if(this.isAlterMoney){
-				this.isAlterMoney = false;
-				changePriceByIdApi({
-					productId: this.info.id,
-					price: this.changeAutoPrice
-				}).then(res => {
-					if(res.code == 1){
-						this.showPrice = res.data.price
-						this.isShowSucceed = true
-						setTimeout(()=>{
-							this.isShowSucceed = false
-						},1000)
-					}else{
-						this.$msg(res.msg)
-					}
-				})
-			}
-		},
 		addEvents(variety) {
 			if(variety == 0 || this.pageType != 'bill'){
 				const ratio = Number(this.info.ratio);
@@ -168,7 +113,6 @@ export default {
 						return
 					}
 				}
-				this.animationFun('add');
 				this.$emit("add", this.info);
 			}else{
 				//去特殊品种页
@@ -177,36 +121,19 @@ export default {
 		},
 		delEvent(variety) {
 			if(variety == 0 || this.pageType != 'bill'){
-				this.animationFun('del');
-				this.$emit("del", this.info);				
+				this.$emit("del", this.info)				
 			}else{
 				//去特殊品种页
 				this.$emit("goToSpecialVariety", this.info);
 			}
 		},
-		changePriceEvent(event) {
-			changePriceByIdApi({
-				productId: this.info.id,
-				price: this.showPrice
-			}).then(res => {
-				if(res.code == 1){
-					this.showPrice = res.data.price
-					this.isShowSucceed = true
-					setTimeout(()=>{
-						this.isShowSucceed = false
-					},1000)
-				}else{
-					this.$msg(res.msg)
-				}
-			})
-			this.isAlterMoney = true;
-		},
 		//通过弹框来修改花材数据(区别于点+-号修改花材)
 		changeItemNum(variety) {
 			//不是小菊或者是小菊但不是在开单
 			if(variety == 0 || this.pageType != 'bill'){
 				if(this.checkStock){
 					if(this.info.stock<=0){
+						this.$util.noStockRemind()
 						uni.showToast({title:'库存不足',icon:'none'})
 						return;
 					}
@@ -263,7 +190,6 @@ export default {
 				left: 0;
 				bottom: 0;
 			}
-			//padding: 8upx 0 24upx;
 		}
 		& .num-open_bx {
 			display: flex;
@@ -277,11 +203,9 @@ export default {
 				display: flex;
 				align-items: center;
 				& .iconfont {
-					//margin-left: 15upx;
 					color: #3385ff;
 					font-size: 42upx;
 				}
-
 				.position{
 					display: block;
 					width: 70upx;
@@ -329,5 +253,4 @@ export default {
 		}
 	}
 }
-
 </style>

+ 1 - 13
ghsApp/src/mixins/allSelectInput.js

@@ -6,19 +6,7 @@ export default {
 	},
 
 	methods: {
-		// // 离开全选input alone
-		// moveAloneAllInput(e){
-		// 	this.isAloneAllActive=false;
-		// 	this.isAloneAllFocus=false;
-		// 	if(e==''){return}
-		// 	this.changeAutoPrice = e;
-		// },
-		// //input点击删除按键
-		// deleteAloneInputVal(){
-		// 	this.isAloneAllActive=false;
-		// 	this.changeAutoPrice = '';
-		// },
-		// 选中input
+		// 离开全选input alone
 		initAloneAllInput(){
 			this.isAloneAllActive=true;
 			this.isAloneAllFocus=true;

+ 1 - 10
ghsApp/src/mixins/animation.js

@@ -6,24 +6,15 @@ export default {
 		};
 	},
 	methods: {
-		/**
-		* 加减商品动画效果
-		* */
+		//加减商品动画效果
 		animationFun(type){
 			if(type=='add'){
 				this.addAnimationData = true;
-				// this.$nextTick(()=>{
-				// 	this.addAnimationData = false;
-				// })
 				setTimeout(()=>{this.addAnimationData = false;},300)
 			}else{
 				this.delAnimationData = true;
-				// this.$nextTick(()=>{
-				// 	this.addAnimationData = false;
-				// })
 				setTimeout(()=>{this.delAnimationData = false;},300)
 			}
-
 		},
 	}
 };

+ 2 - 2
ghsApp/src/mixins/globalMixins.js

@@ -191,7 +191,7 @@ export default {
 			let that = this
 			this.allProduct.forEach(function(product,index,array){
 				if(Number(product.id) == Number(productIdCode)){
-					that.kdType = 'PDA'
+					that.kdType = 'SCAN'
 					product.userPrice = product.bigPrice
 
           //已经选择过的花材,先从storage取出,跳转到下一页/admin/billing/affirm 时selectList才有数据
@@ -218,7 +218,7 @@ export default {
 			var pages = getCurrentPages()
 			let currentRoute  = pages[pages.length-1].route;
 			if(currentRoute != 'admin/billing/affirm'){
-				that.$util.pageTo({url: "/admin/billing/affirm",query:{customId:that.skCustomId,kdType:'PDA'}})
+				that.$util.pageTo({url: "/admin/billing/affirm",query:{customId:that.skCustomId,kdType:'SCAN'}})
 			}
     },
 		// #endif

+ 14 - 40
ghsApp/src/mixins/product.js

@@ -154,10 +154,10 @@ export default {
 				success: function (res) {
 					if (res.confirm) {
 						that.removeMemoryDirect(customId)
+						that.$msg('已清除')
 					}
 				}
 			})
-			that.$msg('已清除')
 		},
 		//直接清除记忆花材不提示
 		removeMemoryDirect(customId=0){
@@ -266,17 +266,8 @@ export default {
 		 * 通过id获取当前选中的商品信息
 		 */
 		getSelectItemById(id, classId) {
-			let info = {
-				bigCount: null, //扎数
-				smallCount: null, //支数
-				autoPrice: null, //调价价格
-				itemPrice: null //调价价格
-			};
-			const item =
-				this.selectList &&
-				this.selectList.find(ele => {
-					return ele.id == id && ele.classId == classId;
-				});
+			let info = { bigCount: null, smallCount: null, autoPrice: null, itemPrice: null }
+			const item = this.selectList && this.selectList.find(ele => { return ele.id == id && ele.classId == classId })
 			if (item) {
 				info = {
 					...item,
@@ -288,33 +279,6 @@ export default {
 			}
 			return info;
 		},
-		/**
-		 * 通过id获取当前选中的商品类别信息  左边菜单角标  当前选中该类别商品多少件
-		 */
-		getSelectClassById(classId) {
-			let info = {
-				bigCount: 0, //扎数
-				smallCount: 0 //支数
-			};
-
-			const productItem =
-				this.productInfoList &&
-				this.productInfoList.find(ele => {
-					return ele.classId == classId;
-				});
-			if (productItem && productItem.child) {
-				for (const item of productItem.child) {
-					for (const selectItem of this.selectList) {
-						if (item.id == selectItem.id && item.classId == selectItem.classId) {
-							info.bigCount += Number(selectItem.bigCount);
-							info.smallCount += Number(selectItem.smallCount);
-							info.itemPrice += selectItem.itemPrice?Number(selectItem.itemPrice):'';
-						}
-					}
-				}
-			}
-			return info;
-		},
 		//添加花材
 		addEvent(item) {
 			console.log('新增花材',item)
@@ -377,7 +341,7 @@ export default {
 					if (classInfo) {
 						info = classInfo.child.find(ele => { return ele.id == item.id });
 					}
-				}else if(this.kdType == 'PDA'){
+				}else if(this.kdType == 'SCAN'){
 					info = item
 				}
 				let params = { ...info, bigCount: 1, smallCount: 0 }
@@ -402,6 +366,11 @@ export default {
 				}
 			})
 
+			if(this.kdType != 'SCAN'){
+				this.$util.hitRemind()
+			}
+			
+
 			this.setSelectInfoByType({ type: this.pageType, info: list });
 
 			//记忆已经选择的花材
@@ -474,6 +443,11 @@ export default {
 				}
 			});
 
+			if(this.kdType != 'SCAN'){
+				this.$util.hitRemind()
+			}
+			
+
 			this.setSelectInfoByType({ type: this.pageType, info: list });
 
 			//记忆已经选择的花材

+ 0 - 7
ghsApp/src/pagesOrder/select.vue

@@ -29,13 +29,6 @@
 					@tap.stop="swichClass"
 				>
 					<text>{{ item.className || "" }}</text>
-					<text class="tag" v-if=" getSelectClassById(item.classId).bigCount > 0 || getSelectClassById(item.classId).smallCount > 0">
-						<text v-if="getSelectClassById(item.classId).bigCount > 0 || getSelectClassById(item.classId).smallCount > 0">
-							{{ `${getSelectClassById(item.classId).bigCount}` }}
-						</text>
-						<text v-if="getSelectClassById(item.classId).smallCount > 0">/</text>
-						<text v-if="getSelectClassById(item.classId).smallCount > 0">{{getSelectClassById(item.classId).smallCount}}</text>
-					</text>
 				</div>
 			</scroll-view>
 

+ 0 - 7
ghsApp/src/pagesPurchase/add.vue

@@ -16,13 +16,6 @@
 			<scroll-view scroll-y scroll-with-animation class="tab-view" :scroll-top="scrollTop">
 				<div v-for="(item, index) in filterProductInfo" :key="index" class="tab-bar-item" :class="[classIndex == index ? 'active' : '']" :data-current="index" @tap.stop="swichClass(index)">
 					<text>{{ item.className || "" }}</text>
-					<text class="tag" v-if="getSelectClassById(item.classId).bigCount > 0 || getSelectClassById(item.classId).smallCount > 0">
-						<text v-if="getSelectClassById(item.classId).bigCount > 0 || getSelectClassById(item.classId).smallCount > 0">
-							{{ `${getSelectClassById(item.classId).bigCount}` }}
-						</text>
-						<text v-if="getSelectClassById(item.classId).smallCount > 0">/</text>
-						<text v-if="getSelectClassById(item.classId).smallCount > 0">{{getSelectClassById(item.classId).smallCount}}</text>
-					</text>
 				</div>
 			</scroll-view>
 			<scroll-view scroll-y class="right-box" :scroll-into-view="scroll_into_view" scroll-with-animation="true" @scroll="scroll_detail" lower-threshold="100" @scrolltolower="scroll_bottom">

+ 1 - 9
ghsApp/src/pagesStorehouse/allot/exSelect.vue

@@ -11,13 +11,6 @@
 			<scroll-view scroll-y scroll-with-animation class="tab-view" :scroll-top="scrollTop">
 				<div v-for="(item, index) in filterProductInfo" :key="index" class="tab-bar-item" :class="[classIndex == index ? 'active' : '']" :data-current="index" @tap.stop="swichClass(index)">
 					<text>{{ item.className || "" }}</text>
-					<text class="tag" v-if=" getSelectClassById(item.classId).bigCount > 0 || getSelectClassById(item.classId).smallCount > 0">
-						<text v-if="getSelectClassById(item.classId).bigCount > 0 || getSelectClassById(item.classId).smallCount > 0">
-							{{ `${getSelectClassById(item.classId).bigCount}` }}
-						</text>
-						<text v-if="getSelectClassById(item.classId).smallCount > 0">/</text>
-						<text v-if="getSelectClassById(item.classId).smallCount > 0">{{getSelectClassById(item.classId).smallCount}}</text>
-					</text>
 				</div>
 				<view style="height: 120upx"></view>
 			</scroll-view>
@@ -36,8 +29,7 @@
 							<Commondity v-if="classItem.isActive"
 								:key="productIndex"
 								:info="productItem"
-								:bigCount="getSelectItemById(productItem.id, classItem.classId).bigCount"
-								:smallCount="getSelectItemById(productItem.id, classItem.classId).smallCount"
+								:storeItem="getSelectItemById(productItem.id, classItem.classId)"
 								@showAddModel="showAddModel"
 								@add="addEvent"
 								@setInfoBeforeShowModel="groupInfoBeforeShowModel"

+ 1 - 10
ghsApp/src/pagesStorehouse/inventory/select.vue

@@ -8,14 +8,6 @@
 			<scroll-view scroll-y scroll-with-animation class="tab-view" :scroll-top="scrollTop">
 				<div v-for="(item, index) in filterProductInfo" :key="index" class="tab-bar-item" :class="[classIndex == index ? 'active' : '']" :data-current="index" @tap.stop="swichClass(index)" >
 					<text>{{ item.className || "" }}</text>
-					<text class="tag"
-						v-if=" getSelectClassById(item.classId).bigCount > 0 || getSelectClassById(item.classId).smallCount > 0">
-						<text v-if="getSelectClassById(item.classId).bigCount > 0 || getSelectClassById(item.classId).smallCount > 0">
-							{{ `${getSelectClassById(item.classId).bigCount}` }}
-						</text>
-						<text v-if="getSelectClassById(item.classId).smallCount > 0">/</text>
-						<text v-if="getSelectClassById(item.classId).smallCount > 0">{{getSelectClassById(item.classId).smallCount}}</text>
-					</text>
 				</div>
 				<view style="height: 120upx"></view>
 			</scroll-view>
@@ -36,8 +28,7 @@
 								:offPrice="true"
 								:key="productIndex"
 								:info="productItem"
-								:bigCount="getSelectItemById(productItem.id, classItem.classId).bigCount"
-								:smallCount="getSelectItemById(productItem.id, classItem.classId).smallCount"
+								:storeItem="getSelectItemById(productItem.id, classItem.classId)"
 								@showAddModel="showAddModel"
 								@add="addEvent"
 								@setInfoBeforeShowModel="groupInfoBeforeShowModel"

+ 21 - 1
ghsApp/src/utils/util.js

@@ -315,6 +315,25 @@ export const noStockRemind = () =>{
 	})
 }
 
+//点击声效 shish
+export const hitRemind = () =>{
+	//没有库存声音提醒
+	const innerAudioContext = uni.createInnerAudioContext();
+	innerAudioContext.autoplay = true;
+	innerAudioContext.src = `${CONSTANT.imgUrl}/hit.mp3`;
+	innerAudioContext.onPlay(() => {
+	console.log('开始播放');
+	});
+	innerAudioContext.onError((res) => {
+	console.log(res.errMsg);
+	console.log(res.errCode);
+	});
+	innerAudioContext.onPause(function() {
+		console.log('end');
+		innerAudioContext.destroy();
+	})
+}
+
 /**
 	* 去重
 	* 姜枫 2021.05.05
@@ -349,5 +368,6 @@ export default {
 	isMoney,
 	isNumber,
 	noStockRemind,
-	callUp
+	callUp,
+	hitRemind
 };