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

改价,库存预警优化搜索

jf 5 лет назад
Родитель
Сommit
d101ed4e7f

+ 3 - 1
ghsApp/src/admin/billing/priceChange.vue

@@ -20,7 +20,9 @@
 									</view>
 									</view>
         </block>
         </block>
         <block v-else>
         <block v-else>
-          <app-wrapper-empty title="暂无数据" :is-empty="$util.isEmpty(filterProductInfoContrapose)" />
+									<view style="width: 100%">
+										<app-wrapper-empty title="暂无数据" :is-empty="$util.isEmpty(filterProductInfoContrapose)" />
+									</view>
         </block>
         </block>
         <!--内容部分 end -->
         <!--内容部分 end -->
 
 

+ 18 - 0
ghsApp/src/mixins/productContrapose.js

@@ -30,6 +30,24 @@ export default {
 		...mapGetters(["getSelectInfo"]),
 		...mapGetters(["getSelectInfo"]),
 		filterProductInfoContrapose() {
 		filterProductInfoContrapose() {
 			let list = copyObject(this.productInfo);
 			let list = copyObject(this.productInfo);
+			if (this.py) {
+				let commonList = list;
+				if (commonList) {
+					let commonChildList = [];
+					if (!this.$util.isEmpty(commonList)) {
+						commonList.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 = commonChildList;
+					list = commonList
+				}
+			}
 			return list;
 			return list;
 		},
 		},
 		/**
 		/**

+ 6 - 6
ghsApp/src/pagesStorehouse/stockWarn/manage.vue

@@ -20,7 +20,7 @@
 <!--				<view class="item_list_bx" v-for="(classItem, classIndex) in filterProductInfoContrapose" :key="classIndex" :id="`class_${classItem.classId}`">-->
 <!--				<view class="item_list_bx" v-for="(classItem, classIndex) in filterProductInfoContrapose" :key="classIndex" :id="`class_${classItem.classId}`">-->
 <!--				</view>-->
 <!--				</view>-->
 					<!--					<text v-else>当前库存充足</text>-->
 					<!--					<text v-else>当前库存充足</text>-->
-				<view class="item_list_bx">
+				<view class="item_list_bx" style="width: 100%">
 					<template v-for="(productItem, productIndex) in filterProductInfoContrapose">
 					<template v-for="(productItem, productIndex) in filterProductInfoContrapose">
 						<CommodityStock
 						<CommodityStock
 							:isPrice="false"
 							:isPrice="false"
@@ -32,7 +32,8 @@
 				</view>
 				</view>
 			</block>
 			</block>
 			<block v-else>
 			<block v-else>
-				<app-wrapper-empty title="暂无数据" :is-empty="$util.isEmpty(filterProductInfoContrapose)"/>
+				<view style="width: 100%">
+					<app-wrapper-empty title="暂无数据" :is-empty="$util.isEmpty(filterProductInfoContrapose)"/></view>
 			</block>
 			</block>
 		</view>
 		</view>
 		<view v-else class="scroll-middle_bx">
 		<view v-else class="scroll-middle_bx">
@@ -59,10 +60,9 @@
 					</view>
 					</view>
 				</block>
 				</block>
 				<block v-else>
 				<block v-else>
-					<app-wrapper-empty
-						title="暂无数据"
-						:is-empty="$util.isEmpty(filterProductInfo)"
-					/>
+					<view style="width: 100%">
+						<app-wrapper-empty  title="暂无数据" :is-empty="$util.isEmpty(filterProductInfo)"/>
+					</view>
 				</block>
 				</block>
 				<!--内容部分 end -->
 				<!--内容部分 end -->
 			</scroll-view>
 			</scroll-view>