Просмотр исходного кода

Merge branch 'master' of http://git.huaml.com/zhh/front-end

wangn 5 лет назад
Родитель
Сommit
734fab5940

+ 57 - 17
hdApp/src/admin/billing/index.vue

@@ -1,17 +1,60 @@
 <template>
 	<view class="billing_box_bg">
 		<app-tabs :tabs="tabs" :currentTab="tabIndex" @change="change" itemWidth="33.3%" />
-		<view class="input-wrap" v-if="tabIndex == 1">
+		<view class="input-wrap" v-if="tabIndex == 1 || tabIndex == 0">
 			<app-search-module v-model="py" placeholder="请输入关键词,支持拼音首字母搜索" @search="searchFn" />
 		</view>
 		<view class="scroll-middle_bx">
 
-			<block v-if="tabIndex == 0">
-				<view style="width:100%">
-					<AppWrapperEmpty :type="'billing'" :is-empty="true" />
-				</view>
-			</block>
-
+			<scroll-view scroll-y scroll-with-animation class="tab-view" :scroll-top="scrollTop" v-if="tabIndex == 0">
+				<div v-for="(item, index) in suitFilterProductInfo" :key="index" class="tab-bar-item" :class="[suitClassIndex == index ? 'active' : '']" :data-current="index" @tap.stop="suitSwichClass">
+					<text>{{ item.className || "" }}</text>
+					<text class="tag" v-if=" getSuitSelectClassById(item.classId).bigCount > 0">
+						<text v-if=" getSuitSelectClassById(item.classId).bigCount > 0 ">
+							{{ `${getSuitSelectClassById(item.classId).bigCount}` }}
+						</text>
+					</text>
+				</div>
+			</scroll-view>
+			<scroll-view scroll-y class="right-box" v-if="tabIndex == 0" :scroll-into-view="suitScrollClassId">
+				<!--内容部分 start -->
+				<block v-if="!$util.isEmpty(suitFilterProductInfo)">
+					<view class="item_list_bx" v-for="(res,i) in suitFilterProductInfo" :key="i" :id="`class_${res.classId}`">
+						<view class="item_list_title">{{ res.className }}</view>
+						<template v-for="(data,j) in res.child">
+							<view :id="`class_${res.classId}_${data.id}`" :key="j" >
+								<GoodsCommondity
+									:info="data"
+									:bigCount="getSelectItemById(data.id, res.classId).bigCount"
+									:smallCount="getSelectItemById(data.id, res.classId).smallCount"
+									@customNum="customNum"
+									@addGoods="suitAddEvent"
+									@addOneEvent="addCustomNumEvent"
+									@del="delEvent"
+								></GoodsCommondity>
+							</view>
+							<!-- <Commondity
+							:type="COMMODITY_TYPE.CHANGE"
+							@customNum="customNum"
+						></Commondity> -->
+						</template>
+					</view>
+				</block>
+				<block v-else>
+					<app-wrapper-empty
+						title="暂无数据"
+						:is-empty="$util.isEmpty(filterProductInfo)"
+					/>
+				</block>
+				<!--内容部分 end -->
+			</scroll-view>
+<!---------------------------------------------------------------------------------------------------------------------->
+<!---------------------------------------------------------------------------------------------------------------------->
+<!---------------------------------------------------------------------------------------------------------------------->
+<!---------------------------------------------------------------------------------------------------------------------->
+<!---------------------------------------------------------------------------------------------------------------------->
+<!---------------------------------------------------------------------------------------------------------------------->
+<!---------------------------------------------------------------------------------------------------------------------->
 			<scroll-view scroll-y scroll-with-animation class="tab-view" :scroll-top="scrollTop" v-if="tabIndex == 1">
 				<div v-for="(item, index) in filterProductInfo" :key="index" class="tab-bar-item" :class="[classIndex == index ? 'active' : '']" :data-current="index" @tap.stop="swichClass">
 					<text>{{ item.className || "" }}</text>
@@ -87,11 +130,6 @@
 							@deleteInputVal="deleteInputVal" @initAllInput="initAllInput" @moveAllInput="moveAllInput"
 							@deleteInputValOne="deleteInputValOne" @initAllInputOne="initAllInputOne" @moveAllInputOne="moveAllInputOne">
 						</allMoreSelectInput>
-						<!--<allMoreSelectInput :isActive="isActive" :isFocus="isFocus" :value="customData.smallCount"-->
-																										<!--@deleteInputVal="deleteInputVal" @initAllInput="initAllInput" @moveAllInput="moveAllInput">-->
-						<!--</allMoreSelectInput>支-->
-						<!--<input v-model="customData.bigCount" type="number" />扎-->
-						<!--<input v-model="customData.smallCount" type="number" style="margin-left:24upx" />支-->
 					</view>
 				</view>
 			</template>
@@ -106,7 +144,7 @@
 			padding="30rpx 30rpx"
 		>
 		</modal-module>
-		<FooterCart :price="allPrice" :count="allCount" @confirm="confirmSelectEvent" v-if="tabIndex == 1"></FooterCart>
+		<FooterCart :price="allPrice" :count="allCount" @confirm="confirmSelectEvent" v-if="tabIndex == 1 || tabIndex == 0"></FooterCart>
 	</view>
 </template>
 
@@ -115,6 +153,7 @@ import AppSearchModule from "@/components/module/app-search";
 import AppTabs from "@/components/plugin/tabs";
 import AppWrapperEmpty from "@/components/app-wrapper-empty";
 import Commondity from "@/components/module/app-commodity";
+import GoodsCommondity from "@/components/module/app-goods-commodity";
 import PxClassCommondity from "@/components/module/app-pxClass-commodity";
 import FooterCart from "@/components/module/app-footer-cart";
 import ModalModule from "@/components/plugin/modal";
@@ -124,7 +163,7 @@ import allMoreSelectInputMins from "@/mixins/allMoreSelectInput";
 
 import { COMMODITY_TYPE } from "@/utils/declare";
 import productMins from "@/mixins/product";
-import pxClassMins from "@/mixins/product";
+import suitProductMins from "@/mixins/suitProduct";
 export default {
 	name: "Billing", // 开单
 	components: {
@@ -133,13 +172,13 @@ export default {
 		AppWrapperEmpty,
 		Commondity,
 		ModalModule,
-		FooterCart,allMoreSelectInput,PxClassCommondity
+		FooterCart,allMoreSelectInput,PxClassCommondity,GoodsCommondity
 	},
-	mixins: [productMins,allMoreSelectInputMins,pxClassMins],
+	mixins: [productMins,allMoreSelectInputMins,suitProductMins],
 	data() {
 		return {
 			COMMODITY_TYPE,
-			tabIndex: 1,
+			tabIndex: 0,
 			tabs: [
 				{	name: "成品"	},
 				{	name: "组合"	},
@@ -239,6 +278,7 @@ export default {
 			}
 		},
 		change(e) {
+			this.resetSelectInfoByType(this.pageType);
 			if (this.tabIndex == e.index) {
 				return false;
 			} else {

+ 6 - 0
hdApp/src/api/product/index.js

@@ -39,3 +39,9 @@ export const changePriceByIdApi = data => {
 export const getPxClassDataApi = data => {
 	return https.get("/px-class/list", data);
 };
+/** *
+	* 成品开单列表
+	*/
+export const getGoodsDataApi = data => {
+	return https.get("/goods/index", data);
+};

+ 209 - 0
hdApp/src/components/module/app-goods-commodity.vue

@@ -0,0 +1,209 @@
+<template>
+	<view class="item-cmd_bx">
+		<view class="img_bx" @click="addEvents">
+			<app-img  :src="info.smallImgList[0]" alt="商品图" mode="aspectFit" :height="160" />
+		</view>
+		<view class="cmd-info_bx">
+			<view class="tit" @click="addEvents">{{ info.goodsName || "" }}</view>
+<!--			<view class="kc" @click="addEvents">库存 {{ info.stock }}</view>-->
+			<view class="num-open_bx">
+				<view class="price">¥{{ showPrice }}</view>
+				<view class="open-bx" >
+					<i class="iconfont iconjian" :class="delAnimationData?'animation':''" @click="delEvent" v-if="bigCount > 0"></i>
+					<text class="num" >
+						<text >{{ bigCount }}</text>
+					</text>
+					<i class="iconfont iconzeng" :class="addAnimationData?'animation':''" @click="addEvents"></i>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+import { COMMODITY_TYPE } from "@/utils/declare";
+import AppImg from "@/components/app-img";
+import { autoPriceByIdApi, changePriceByIdApi } from '@/api/product/index'
+import productMins from "@/mixins/product";
+import animationMins from "@/mixins/animation";
+
+import allSelectInput from "@/components/module/allSelectInput";
+import allSelectInputMins from "@/mixins/allSelectInput";
+export default {
+	name: "Commodity",
+	components: {
+		AppImg,allSelectInput
+	},
+	mixins: [productMins,animationMins,allSelectInputMins],
+	props: {
+		info: {
+			required: true,
+			type: Object,
+			default() {
+				return {};
+			}
+		},
+		bigCount: {
+			type: Number,
+			default: 0
+		}
+	},
+	data() {
+		return {
+			COMMODITY_TYPE,
+			// isAllActive: false,
+			// isAllFocus: false,
+			isAloneAllActive: false,
+			isAloneAllFocus: false,
+
+			isShowSucceed:false,
+			changeAutoPrice:'',
+			showPrice:0.00,
+			ifFocus:false
+		};
+	},
+	created() {},
+	mounted() {
+		if(this.info.priceLabel == 2){
+			this.changeAutoPrice = this.info.price
+		}
+		this.showPrice = this.info.price
+	},
+	methods: {
+		addEvents() {
+			this.animationFun('add');
+			this.$emit("addGoods", this.info);
+		},
+		delEvent() {
+			this.animationFun('del');
+			this.$emit("del", this.info);
+		},
+		async changePriceEvent(event) {
+			this.isFocus = false;
+			let self = this
+			await 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{
+					self.$msg(res.msg)
+				}
+			})
+		},
+		customNum() {
+			// if(!this.info.bigCount){
+			if(!this.bigCount && !this.smallCount){
+				let params = {
+					...this.info,
+					bigCount: this.bigCount,
+					smallCount: this.smallCount
+				};
+				this.$emit("addOneEvent", this.info,params);
+			}
+			this.$emit("customNum", {
+				...this.info,
+				bigCount: this.bigCount,
+				smallCount: this.smallCount
+			});
+		}
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+.item-cmd_bx {
+	position: relative;
+	margin-bottom: 20px;
+	.img_bx {
+		height: 160px;
+		width: 160px;
+		position: absolute;
+		left: 0px;
+		top: 0px;
+	}
+	.cmd-info_bx {
+		position: relative;
+		padding-left: 177px;
+		height: 170rpx;
+		& .tit {
+			font-size: 28px;
+			font-weight: 400;
+			color: #333333;
+			padding-top: 10px;
+		}
+		& .kc {
+			color: #999999;
+			font-size: 24px;
+			padding: 8px 0 24px;
+		}
+		& .num-open_bx {
+			position: absolute;
+			width: calc(100% - 177px);
+			bottom: 0;
+			display: flex;
+			align-items: center;
+			& .price {
+				font-size: 28px;
+				color: #ff2842;
+				flex: 1;
+			}
+			& .open-bx {
+				display: flex;
+				align-items: center;
+				& .iconfont {
+					//margin-left: 15rpx;
+					color: #3385ff;
+					font-size: 42px;
+				}
+
+				.position{
+					display: block;
+					width: 70rpx;
+					text-align: center;
+				}
+				.iconcachu {
+					margin: 0 6px 0 20px;
+					color: #ccc;
+					&.edit {
+						color: #3385ff;
+					}
+				}
+				& > .num {
+					display: inline-block;
+					width: 80rpx;
+					height:45rpx;
+					text-align:center;
+					color: #868686;
+					font-size: 25rpx;
+				}
+				.change-input {
+					width: 164px;
+					height: 60px;
+					line-height: 60px;
+					text-align: center;
+					background: #ffffff;
+					border: 1px solid #dddddd;
+					border-radius: 4px;
+					font-size: 25px;
+				}
+				.btn-box{
+					width: 100rpx;
+					height: 60rpx;
+					line-height: 60rpx;
+					color: #ffffff;
+					background: #3385ff;
+					text-align: center;
+					border-radius: 10rpx;
+				}
+			}
+		}
+	}
+}
+
+</style>

+ 1 - 1
hdApp/src/mixins/animation.js

@@ -19,7 +19,7 @@ export default {
 			}else{
 				this.delAnimationData = true;
 				this.$nextTick(()=>{
-					this.addAnimationData = false;
+					this.delAnimationData = false;
 				})
 				// setTimeout(()=>{this.delAnimationData = false;},100)
 			}

+ 1 - 1
hdApp/src/mixins/product.js

@@ -89,7 +89,7 @@ export default {
 		},
 		//选择商品总数
 		allCount() {
-			console.log(444444, this.selectList);
+			// console.log(444444, this.selectList);
 			return this.selectList.length;
 		},
 		/**

+ 0 - 3
hdApp/src/mixins/productContrapose.js

@@ -36,9 +36,6 @@ export default {
 		 * 当前页面选中的商品列表
 		 */
 		selectList() {
-			console.log('this.getSelectInfo',this.getSelectInfo)
-			console.log('this.pageType',this.pageType)
-			console.log('this.getSelectInfo[this.pageType]',this.getSelectInfo[this.pageType])
 			return this.getSelectInfo[this.pageType] || [];
 		},
 		scrollClassId() {

+ 405 - 0
hdApp/src/mixins/suitProduct.js

@@ -0,0 +1,405 @@
+import { getGoodsDataApi } from "@/api/product/index";
+import { mapGetters, mapActions } from "vuex";
+import { copyObject } from "@/utils/util";
+export default {
+	data() {
+		return {
+			pageType: "bill", //选择商品页面类别  用于区分不同功能的数据
+
+			suitInfo: [], //成品-商品信息
+			suitClassIndex: 0, //成品-当前商品类别下标
+
+			py: "", //拼音搜索条件
+			type: "", //库存预警时,固定为waring,其他情况不传或者传空
+			autoLoad: true, //自动获取商品信息
+			isLimit: true //选择数量不能大于库存限制
+		};
+	},
+	onLoad(options) {
+		const { pageType } = options;
+		if (pageType) {
+			this.pageType = pageType;
+		}
+		if (this.autoLoad) {
+			this.initGoodsData();
+		}
+	},
+	onUnload() {},
+	computed: {
+		...mapGetters(["getSelectInfo"]),
+		/**
+			* 搜索、初始化数据
+			* */
+		suitFilterProductInfo() {
+			let list = copyObject(this.suitInfo);
+			if (this.py) {
+				let commonList = list.find(ele => {
+					//在常用中过滤
+					return ele.classId == -2;
+				});
+				if (commonList) {
+					let commonChildList = [];
+					if (!this.$util.isEmpty(commonList.child)) {
+						commonList.child.forEach(ele => {
+							let hasName = ele.itemName && ele.itemName.indexOf(this.py) >= 0;
+							let elePy = (ele.py && ele.py.toLocaleUpperCase()) || "";
+							let hasPy = elePy.indexOf(this.py.toLocaleUpperCase()) >= 0;
+							if (hasName || hasPy) {
+								commonChildList.push(ele);
+							}
+						});
+					}
+					commonList.child = commonChildList;
+					list = [commonList];
+				}
+			}
+			return list;
+		},
+		/**
+		 * 当前页面选中的商品列表
+		 */
+		// selectList() {
+		// 	return this.getSelectInfo[this.pageType] || [];
+		// },
+		/**
+			* 描点-定位分类
+			* */
+		suitScrollClassId() {
+			const curClass = this.suitInfo[this.suitClassIndex];
+			if (curClass) {
+				return `class_${curClass.classId}`;
+			}
+
+			return "";
+		},
+
+
+		//选择商品总价
+		// allPrice() {
+		// 	let price = 0;
+		//
+		// 	if (this.selectList) {
+		// 		for (const item of this.selectList) {
+		// 			const itemInfo = this.getSelectItemById(item.id, item.classId);
+		// 			if (
+		// 				itemInfo &&
+		// 				!this.$util.isEmpty(itemInfo.bigPrice) &&
+		// 				!this.$util.isEmpty(itemInfo.smallPrice)
+		// 			) {
+		// 				price += item.bigCount * Number(itemInfo.bigPrice);
+		// 				price += item.smallCount * Number(itemInfo.smallPrice);
+		// 			}
+		// 		}
+		// 	}
+		//
+		// 	return Math.round(price * 100) / 100;
+		// },
+		//选择商品总数
+		// allCount() {
+		// 	console.log(444444, this.selectList);
+		// 	return this.selectList.length;
+		// },
+		/**
+		 * 当前选中商品列表中是否有没有库存的商品
+		 */
+		// hasNoStock() {
+		// 	let has = false;
+		// 	if (this.selectList) {
+		// 		for (const item of this.selectList) {
+		// 			const {
+		// 				bigCount,
+		// 				smallCount,
+		// 				bigNum,
+		// 				bigUnit,
+		// 				smallNum,
+		// 				smallUnit,
+		// 				ratio
+		// 			} = item;
+		// 			const ratioNum = Number(ratio);
+		// 			if (
+		// 				Number(bigCount) * ratioNum + Number(smallCount) >
+		// 				Number(bigNum) * ratioNum + Number(smallNum)
+		// 			) {
+		// 				has = true;
+		// 				break;
+		// 			}
+		// 		}
+		// 	}
+		// 	return has;
+		// }
+	},
+	methods: {
+		...mapActions(["setSelectInfoByType", "resetSelectInfoByType"]),
+		/**
+		 * 成品-请求商品数据
+		 */
+		async initGoodsData(extendInfo) {
+			//extendInfo调用时的扩展参数  如  shopId
+			try {
+				let params = {
+					py: this.py,
+					type: this.type
+				};
+				if (extendInfo) {
+					params = { ...params, ...extendInfo };
+				}
+				const { data } = await getGoodsDataApi(params);
+				data.forEach(element => {
+					element.child &&
+						element.child.forEach(child => {
+							child.classId = element.classId;
+							child.className = element.className;
+						});
+				});
+				this.suitInfo = data;
+				this.suitClassIndex = 0;
+			} catch (error) {
+			} finally {
+				uni.hideLoading();
+			}
+		},
+
+		/**
+		 * 获取当前选中商品总价
+		 */
+		// getSelectItemPrice(item) {
+		// 	let price = 0;
+		// 	const { bigCount, smallCount, bigPrice, smallPrice } = item;
+		// 	let sum =
+		// 		Number(bigCount) * Number(bigPrice) +
+		// 		Number(smallCount) * Number(smallPrice);
+		// 	price = Math.round(sum * 100) / 100;
+		// 	return price;
+		// },
+		/**
+		 * 通过id获取当前选中的商品信息
+		 */
+		// getSelectItemById(id, classId) {
+		// 	let info = {
+		// 		bigCount: 0, //扎数
+		// 		smallCount: 0, //支数
+		// 		autoPrice: 0, //调价价格
+		// 		itemPrice: 0 //调价价格
+		// 	};
+		// 	const item =
+		// 		this.selectList &&
+		// 		this.selectList.find(ele => {
+		// 			return ele.id == id && ele.classId == classId;
+		// 		});
+		// 	if (item) {
+		// 		info = {
+		// 			...item,
+		// 			bigCount: Number(item.bigCount),
+		// 			smallCount: Number(item.smallCount),
+		// 			autoPrice: Number(item.autoPrice),
+		// 			itemPrice: Number(item.itemPrice),
+		// 		};
+		// 	}
+		// 	return info;
+		// },
+		/**
+		 * 通过id获取当前选中的商品类别信息  左边菜单角标  当前选中该类别商品多少件
+		 */
+		getSuitSelectClassById(classId) {
+			let info = {
+				bigCount: 0, //扎数
+				smallCount: 0 //支数
+			};
+
+			const productItem =
+				this.suitInfo &&
+				this.suitInfo.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;
+		},
+
+		/**
+		 * 添加商品
+		 */
+		suitAddEvent(item) {
+			const list = this.selectList;
+
+			let has = false;
+			for (let index = 0; index < list.length; index++) {
+				const element = list[index];
+				if (element.id == item.id && element.classId == item.classId) {
+					has = true;
+					list[index] = { ...element, bigCount: ++element.bigCount };
+
+					break;
+				}
+			}
+			if (!has) {
+				let info = { classId: item.classId, id: item.id };
+
+				const classInfo =
+					this.suitInfo &&
+					this.suitInfo.find(element => {
+						return element.classId == item.classId && element.child;
+					});
+				if (classInfo) {
+					info = classInfo.child.find(ele => {
+						return ele.id == item.id;
+					});
+				}
+
+				let params = {
+					...info,
+					bigCount: 1, //扎数
+					smallCount: 0, //支数
+					autoPrice: 0 //调价价格
+				};
+				list.push(params);
+
+				// if (info.bigNum && info.bigNum > 0) {
+				// } else {
+				// 	this.$msg("库存不足");
+				// }
+			}
+
+			this.setSelectInfoByType({ type: this.pageType, info: list });
+			// this.$forceUpdate();
+		},
+
+		/**
+		 * 减去商品
+		 */
+		// delEvent(item) {
+		// 	const list = this.selectList;
+		// 	let has = false;
+		// 	for (let index = 0; index < list.length; index++) {
+		// 		const element = list[index];
+		// 		if (element.id == item.id && element.classId == item.classId) {
+		// 			has = true;
+		//
+		// 			if (element.bigCount > 0) {
+		// 				list[index] = { ...element, bigCount: --element.bigCount };
+		// 			} else if (element.smallCount > 0) {
+		// 				list[index] = { ...element, smallCount: 0 };
+		// 			}
+		//
+		// 			if (this.isLimit) {
+		// 				const { bigCount, smallCount } = list[index];
+		// 				//超过库存时 设置为库存最大值
+		// 				const ratio = Number(item.ratio);
+		// 				if (
+		// 					Number(bigCount) * ratio + Number(smallCount) >
+		// 					Number(item.bigNum) * ratio + Number(item.smallNum)
+		// 				) {
+		// 					list[index].bigCount = Number(item.bigNum);
+		// 					list[index].smallCount = Number(item.smallNum);
+		// 				}
+		// 			}
+		// 			if (element.bigCount == 0 && element.smallCount == 0) {
+		// 				list.splice(index, 1);
+		// 			}
+		//
+		// 			break;
+		// 		}
+		// 	}
+		// 	if (!has) {
+		// 		let info = { classId: item.classId, id: item.id };
+		//
+		// 		const classInfo =
+		// 			this.productInfo &&
+		// 			this.productInfo.find(element => {
+		// 				return element.classId == item.classId && element.child;
+		// 			});
+		// 		if (classInfo) {
+		// 			info = classInfo.child.find(ele => {
+		// 				return ele.id == item.id;
+		// 			});
+		// 		}
+		// 		let params = {
+		// 			...info,
+		// 			bigCount: 1, //扎数
+		// 			smallCount: 0, //支数
+		// 			autoPrice: 0 //调价价格
+		// 		};
+		//
+		// 		list.push(params);
+		// 	}
+		// 	this.setSelectInfoByType({ type: this.pageType, info: list });
+		// 	// this.$forceUpdate();
+		// },
+		//减去所有商品
+		// delAllEvent(item) {
+		// 	const list = this.selectList;
+		// 	for (let index = 0; index < list.length; index++) {
+		// 		const element = list[index];
+		// 		if (element.id == item.id ) {
+		//
+		// 			list.splice(index, 1);
+		//
+		// 			break;
+		// 		}
+		// 	}
+		// 	this.setSelectInfoByType({ type: this.pageType, info: list });
+		// },
+		/**
+		 * 更新商品
+		 */
+		// updateItemEvent(item) {
+		// 	const list = this.selectList;
+		// 	for (let index = 0; index < list.length; index++) {
+		// 		const element = list[index];
+		// 		if (element.id == item.id && element.classId == item.classId) {
+		// 			const { bigCount, smallCount } = list[index];
+		// 			//超过库存时 设置为库存最大值
+		// 			const ratio = Number(item.ratio);
+		// 			if (this.isLimit) {
+		// 				if (
+		// 					Number(bigCount) * ratio + Number(smallCount) >
+		// 					Number(item.bigNum) * ratio + Number(item.smallNum)
+		// 				) {
+		// 					list[index].bigCount = Number(item.bigNum);
+		// 					list[index].smallCount = Number(item.smallNum);
+		// 					list[index].itemPrice = item.itemPrice?Number(item.itemPrice):'';
+		// 				}
+		// 			}
+		//
+		// 			list[index] = {
+		// 				...element,
+		// 				bigCount: Number(item.bigCount),
+		// 				smallCount: Number(item.smallCount),
+		// 				itemPrice: item.itemPrice?Number(item.itemPrice):''
+		// 			};
+		//
+		// 			break;
+		// 		}
+		// 	}
+		//
+		// 	this.setSelectInfoByType({ type: this.pageType, info: list });
+		// 	// this.$forceUpdate();
+		// },
+		/**
+		 * 切换左侧商品类别
+		 */
+		suitSwichClass(e) {
+			let cur = e.currentTarget.dataset.current;
+			if (this.suitClassIndex == cur) {
+				return false;
+			} else {
+				this.suitClassIndex = cur;
+			}
+		},
+		/**
+		 * 搜索对应花材
+		 */
+		searchFn() {},
+
+
+	}
+};