jf před 5 roky
rodič
revize
aea966c228

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

@@ -29,9 +29,10 @@
 						<view class="item_list_title">
 						<view class="item_list_title">
 							{{ classItem.className }}
 							{{ classItem.className }}
 						</view>
 						</view>
+
 						<template v-for="(productItem, productIndex) in classItem.child">
 						<template v-for="(productItem, productIndex) in classItem.child">
-							<view :id="`class_${classItem.classId}_${productItem.id}`" :key="productIndex">
-								<Commondity
+							<view style="height: 160rpx" :id="`class_${classItem.classId}_${productItem.id}`" :key="productIndex">
+								<Commondity v-if="classItem.isActive"
 									:info="productItem"
 									:info="productItem"
 									:bigCount="
 									:bigCount="
 										getSelectItemById(productItem.id, classItem.classId).bigCount
 										getSelectItemById(productItem.id, classItem.classId).bigCount

+ 1 - 1
ghsApp/src/admin/breakage/info.vue

@@ -43,7 +43,7 @@
 									</text>
 									</text>
 								</view>
 								</view>
 								<view class="info-line">
 								<view class="info-line">
-									<text class="item-type">{{ s.property }}</text>
+									<text class="item-type">{{ s.rank }}</text>
 									<text class="item-count">{{ `${s.bigNum}/${s.smallNum}` }}</text>
 									<text class="item-count">{{ `${s.bigNum}/${s.smallNum}` }}</text>
 								</view>
 								</view>
 							</view>
 							</view>

+ 5 - 1
ghsApp/src/components/module/app-commodity.vue

@@ -3,7 +3,7 @@
 <!--		<view class="img_bx" @click="addEvents">-->
 <!--		<view class="img_bx" @click="addEvents">-->
 <!--			<app-img  :src="info.cover" alt="商品图" mode="aspectFit" :height="160" />-->
 <!--			<app-img  :src="info.cover" alt="商品图" mode="aspectFit" :height="160" />-->
 <!--		</view>-->
 <!--		</view>-->
-		<view class="img_bx" >
+		<view class="img_bx">
 			<image :src="info.cover"></image>
 			<image :src="info.cover"></image>
 		</view>
 		</view>
 		<view class="cmd-info_bx">
 		<view class="cmd-info_bx">
@@ -88,6 +88,10 @@ export default {
 			type: Boolean,
 			type: Boolean,
 			default: false
 			default: false
 		},
 		},
+		isActive: {
+			type: Boolean,
+			default: false
+		},
 	},
 	},
 	data() {
 	data() {
 		return {
 		return {

+ 38 - 15
ghsApp/src/mixins/product.js

@@ -152,6 +152,7 @@ export default {
 				});
 				});
 				this.productInfo = data;
 				this.productInfo = data;
 				this.classIndex = 0;
 				this.classIndex = 0;
+				this.scroll_into_view = 'class_'+0;
 				this.scrollPushList();
 				this.scrollPushList();
 				// console.log(this.filterProductInfo)
 				// console.log(this.filterProductInfo)
 			} catch (error) {
 			} catch (error) {
@@ -164,7 +165,18 @@ export default {
 			* **/
 			* **/
 		scrollPushList(){
 		scrollPushList(){
 			let list = copyObject(this.productInfo);
 			let list = copyObject(this.productInfo);
+			let classList = [];
+			for (let i=0;i<list.length;i++){
+				if(i<2){
 
 
+					classList.push({...list[i],isActive:true});
+				}else{
+					classList.push({...list[i],isActive:false});
+				}
+			}
+			this.filterProductInfo = classList
+			console.log(classList)
+			return
 			if(this.$util.isEmpty(this.filterProductInfo)){	//第一次进入无数据
 			if(this.$util.isEmpty(this.filterProductInfo)){	//第一次进入无数据
 				let classList = [];
 				let classList = [];
 				list.forEach(ele=>{
 				list.forEach(ele=>{
@@ -510,20 +522,24 @@ export default {
 		 */
 		 */
 		swichClass(cur) {
 		swichClass(cur) {
 			this.isCut = true;
 			this.isCut = true;
-			// let cur = e.currentTarget.dataset.current;
-			// if (this.classIndex == cur) {
-			// 	return false;
-			// } else {}
-			clearInterval(this.timeFun)
+			console.log(cur,this.filterProductInfo.length-1);
+
+			this.filterProductInfo[cur].isActive = true;
+			if(cur==this.filterProductInfo.length-1){
+				this.filterProductInfo[cur-1].isActive = true;
+			}
+			if(cur!=0&&cur!=this.filterProductInfo.length-1){
+				this.filterProductInfo[cur-1].isActive = true;
+				this.filterProductInfo[cur+1].isActive = true;
+			}
+			// clearInterval(this.timeFun)
 			this.scroll_into_view = '';
 			this.scroll_into_view = '';
 			this.$nextTick(()=>{
 			this.$nextTick(()=>{
 				this.scroll_into_view = 'class_'+cur;
 				this.scroll_into_view = 'class_'+cur;
 					this.classIndex = cur;
 					this.classIndex = cur;
-
-
 			})
 			})
 
 
-			this.scrollPushList();
+			// this.scrollPushList();
 				//解决最后一个 ***来回*** 问题 (由于点击左侧导航,右侧锚点位置信息变化,此时滚动事件也随之滚动。)
 				//解决最后一个 ***来回*** 问题 (由于点击左侧导航,右侧锚点位置信息变化,此时滚动事件也随之滚动。)
 				uni.setStorageSync("resolve","last");
 				uni.setStorageSync("resolve","last");
 				setTimeout(()=>{
 				setTimeout(()=>{
@@ -564,19 +580,24 @@ export default {
 				let node2 = this.top_list[i+1];
 				let node2 = this.top_list[i+1];
 				if(node2 && top_page >= node1 && top_page < node2){
 				if(node2 && top_page >= node1 && top_page < node2){
 					this.classIndex = i;
 					this.classIndex = i;
-					this.scrollPushList();
+					this.filterProductInfo[this.classIndex].isActive = true;
+					this.filterProductInfo[this.classIndex+1].isActive = true;
+					// this.scrollPushList();
 					break;
 					break;
 				}else if(node2 && top_page === node2){
 				}else if(node2 && top_page === node2){
 					this.classIndex = i + 1;
 					this.classIndex = i + 1;
-					this.scrollPushList();
+					this.filterProductInfo[this.classIndex].isActive = true;
+					this.filterProductInfo[this.classIndex+1].isActive = true;
+					// this.scrollPushList();
 					break;
 					break;
 				}
 				}
-				console.log(this.classIndex,'this.classIndex----')
+				// console.log(this.classIndex,'this.classIndex----')
 			}
 			}
 		},
 		},
 		scroll_bottom(){
 		scroll_bottom(){
 			this.classIndex = this.filterProductInfo.length-1
 			this.classIndex = this.filterProductInfo.length-1
-			this.scrollPushList();
+			this.filterProductInfo[this.classIndex].isActive = true;
+			// this.scrollPushList();
 		},
 		},
 		/**
 		/**
 		 * 搜索对应花材
 		 * 搜索对应花材
@@ -588,7 +609,7 @@ export default {
 				if(this.py.length <=1){
 				if(this.py.length <=1){
 					return
 					return
 				}
 				}
-				clearInterval(this.timeFun)
+				// clearInterval(this.timeFun)
 				let commonChildList = [];
 				let commonChildList = [];
 				list.forEach(ele => {
 				list.forEach(ele => {
 					//过滤常用
 					//过滤常用
@@ -601,13 +622,13 @@ export default {
 								let hasPy = elePy.indexOf(this.py.toLocaleUpperCase()) == 0;
 								let hasPy = elePy.indexOf(this.py.toLocaleUpperCase()) == 0;
 								if (hasName || hasPy) {
 								if (hasName || hasPy) {
 									if(this.$util.isEmpty(commonChildList)){
 									if(this.$util.isEmpty(commonChildList)){
-										commonChildList = [...commonChildList,{classId: ele.classId, className: ele.className,child:[obj]}];
+										commonChildList = [...commonChildList,{classId: ele.classId, className: ele.className,isActive:true,child:[obj]}];
 									}else{
 									}else{
 										commonChildList.forEach(res => {
 										commonChildList.forEach(res => {
 											if(res.classId==ele.classId){
 											if(res.classId==ele.classId){
 												res.child.push(obj)
 												res.child.push(obj)
 											}else{
 											}else{
-												commonChildList.push({classId: ele.classId, className: ele.className,child:[obj]});
+												commonChildList.push({classId: ele.classId, className: ele.className,isActive:true,child:[obj]});
 											}
 											}
 										})
 										})
 									}
 									}
@@ -620,9 +641,11 @@ export default {
 				list = this.$util.unique(commonChildList)
 				list = this.$util.unique(commonChildList)
 				this.filterProductInfo = list;
 				this.filterProductInfo = list;
 				this.classIndex = 0;
 				this.classIndex = 0;
+				this.scroll_into_view = 'class_'+0;
 			}else{
 			}else{
 				this.filterProductInfo = '';
 				this.filterProductInfo = '';
 				this.classIndex = 0;
 				this.classIndex = 0;
+				this.scroll_into_view = 'class_'+0;
 				this.scrollPushList();
 				this.scrollPushList();
 			}
 			}
 		}
 		}

+ 4 - 3
ghsApp/src/pagesOrder/refund.vue

@@ -99,8 +99,8 @@
 							{{res.name}} {{ `${res.bigNum}/${res.smallNum}` }} {{`¥${res.price}`}}
 							{{res.name}} {{ `${res.bigNum}/${res.smallNum}` }} {{`¥${res.price}`}}
 						</view>
 						</view>
 						<view class="flex list-val">
 						<view class="flex list-val">
-							<input type="number" @focus="isMonitor = true" @blur="inputFun" v-model="res.big"><text>扎</text>
-							<input type="number" @focus="isMonitor = true" @blur="inputFun" v-model="res.small"><text>支</text>
+							<input type="number" @focus="isMonitor = true" @blur="inputFun(i)" v-model="res.big"><text>扎</text>
+							<input type="number" @focus="isMonitor = true" @blur="inputFun(i)" v-model="res.small"><text>支</text>
 						</view>
 						</view>
 					</view>
 					</view>
 					</view>
 					</view>
@@ -220,7 +220,8 @@ export default {
 			})
 			})
 
 
 		},
 		},
-		inputFun(e){
+		inputFun(index){
+			this.product[index].isActive = true;
 			this.isMonitor = false
 			this.isMonitor = false
 				this.product.forEach(ele=>{
 				this.product.forEach(ele=>{
 					if(Number(ele.big)>Number(ele.bigNum)){
 					if(Number(ele.big)>Number(ele.bigNum)){

+ 3 - 1
ghsApp/src/pagesPurchase/add.vue

@@ -29,7 +29,8 @@
 							{{ classItem.className }}
 							{{ classItem.className }}
 						</view>
 						</view>
 						<template v-for="(productItem, productIndex) in classItem.child">
 						<template v-for="(productItem, productIndex) in classItem.child">
-							<CommodityPurchase
+							<view style="height: 160rpx" :id="`class_${classItem.classId}_${productItem.id}`" :key="productIndex">
+							<CommodityPurchase v-if="classItem.isActive"
 								:type="pageType"
 								:type="pageType"
 								:key="productIndex"
 								:key="productIndex"
 								:info="productItem"
 								:info="productItem"
@@ -42,6 +43,7 @@
 								@addOneEvent="addCustomNumEvent"
 								@addOneEvent="addCustomNumEvent"
 								@del="delAllEvent"
 								@del="delAllEvent"
 							></CommodityPurchase>
 							></CommodityPurchase>
+							</view>
 						</template>
 						</template>
 					</view>
 					</view>
 				</block>
 				</block>

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

@@ -41,7 +41,9 @@
 							{{ classItem.className }}
 							{{ classItem.className }}
 						</view>
 						</view>
 						<template v-for="(productItem, productIndex) in classItem.child">
 						<template v-for="(productItem, productIndex) in classItem.child">
-							<Commondity
+							<view style="height: 160rpx" :id="`class_${classItem.classId}_${productItem.id}`" :key="productIndex">
+
+							<Commondity v-if="classItem.isActive"
 								:key="productIndex"
 								:key="productIndex"
 								:info="productItem"
 								:info="productItem"
 								:bigCount="
 								:bigCount="
@@ -55,6 +57,7 @@
 								@addOneEvent="addCustomNumEvent"
 								@addOneEvent="addCustomNumEvent"
 								@del="delEvent"
 								@del="delEvent"
 							></Commondity>
 							></Commondity>
+							</view>
 							<!-- <Commondity
 							<!-- <Commondity
 							:type="COMMODITY_TYPE.CHANGE"
 							:type="COMMODITY_TYPE.CHANGE"
 							@customNum="customNum"
 							@customNum="customNum"

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

@@ -42,7 +42,8 @@
 							{{ classItem.className }}
 							{{ classItem.className }}
 						</view>
 						</view>
 						<template v-for="(productItem, productIndex) in classItem.child">
 						<template v-for="(productItem, productIndex) in classItem.child">
-							<Commondity
+							<view style="height: 160rpx" :id="`class_${classItem.classId}_${productItem.id}`" :key="productIndex">
+							<Commondity v-if="classItem.isActive"
 								:offPrice="true"
 								:offPrice="true"
 								:key="productIndex"
 								:key="productIndex"
 								:info="productItem"
 								:info="productItem"
@@ -57,6 +58,7 @@
 								@addOneEvent="addCustomNumEvent"
 								@addOneEvent="addCustomNumEvent"
 								@del="delEvent"
 								@del="delEvent"
 							></Commondity>
 							></Commondity>
+							</view>
 						</template>
 						</template>
 					</view>
 					</view>
 				</block>
 				</block>