Ver Fonte

app 花材列表

shish há 4 anos atrás
pai
commit
00a95142e6

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

@@ -35,8 +35,6 @@ import AppTabs from "@/components/plugin/tabs";
 import AppWrapperEmpty from "@/components/app-wrapper-empty";
 import Commondity from "@/components/module/app-commodity";
 import { COMMODITY_TYPE } from "@/utils/declare";
-import productMins from "@/mixins/productContrapose";
-
 export default {
   name: "Billing",
   components: {
@@ -45,7 +43,7 @@ export default {
     AppWrapperEmpty,
     Commondity
   },
-  mixins: [productMins],
+  mixins: [],
 	onPullDownRefresh() {
 		this.initDataContrapose();
   	console.error('111')

+ 1 - 2
ghsApp/src/admin/changePrice/list.vue

@@ -55,7 +55,6 @@ import AppSearchModule from "@/components/module/app-search";
 import AppWrapperEmpty from "@/components/app-wrapper-empty";
 import ItemComponent from "./components/Item";
 import productMins from "@/mixins/product";
-import productContraposeMins from "@/mixins/productContrapose";
 import { selectShop } from "@/mixins";
 import { mapGetters } from "vuex";
 import DorpdownSelect from "@/components/module/shopSelect";
@@ -68,7 +67,7 @@ export default {
 		ItemComponent,
 		DorpdownSelect
 	},
-	mixins: [productMins, selectShop,productContraposeMins],
+	mixins: [productMins, selectShop],
 	data() {
 		return {
 			autoLoad: false, //不自动请求数据  自定义请求

+ 1 - 2
ghsApp/src/admin/item/list.vue

@@ -49,7 +49,6 @@ import AppWrapperEmpty from "@/components/app-wrapper-empty";
 import ItemStock from "./components/ItemStock";
 import { STOCK_TYPE } from "@/utils/declare";
 import productMins from "@/mixins/product";
-import productContraposeMins from "@/mixins/productContrapose";
 import { selectShop } from "@/mixins";
 import { mapGetters } from "vuex";
 import DorpdownSelect from "@/components/module/shopSelect";
@@ -66,7 +65,7 @@ export default {
 		ItemStock,
 		DorpdownSelect
 	},
-	mixins: [productMins, selectShop,productContraposeMins],
+	mixins: [productMins, selectShop],
 	data() {
 		return {
 			STOCK_TYPE,

+ 10 - 20
ghsApp/src/admin/ptItem/itemList.vue

@@ -11,12 +11,11 @@
 		</view>
 		<view class="scroll-middle_bx">
 			<block v-if="!$util.isEmpty(globalClassItemListContrapose)">
-				<scroll-view scroll-y class="item_list_bx" @scrolltolower="loadMore" lower-threshold="100" style="width: 100%">
+				<view scroll-y class="item_list_bx" style="width: 100%">
 					<template v-for="(productItem, productIndex) in globalClassItemListContrapose">
 						<view style="padding: 20upx 0">
 						<ptItemInfo
 							:isPrice="false"
-							:type="STOCK_TYPE.WARN"
 							:key="productIndex"
 							:info="productItem"
 							:isEdit="true"
@@ -25,7 +24,7 @@
 						></ptItemInfo>
 						</view>
 					</template>
-				</scroll-view>
+				</view>
 			</block>
 			<block v-else>
 				<view style="width: 100%">
@@ -39,7 +38,6 @@
 import AppSearchModule from "@/components/module/app-search";
 import AppWrapperEmpty from "@/components/app-wrapper-empty";
 import ptItemInfo from "./components/Item";
-import { STOCK_TYPE } from "@/utils/declare";
 import productMins from "@/mixins/product";
 import productContraposeMins from "@/mixins/ptProductContrapose";
 import { selectShop } from "@/mixins";
@@ -58,17 +56,10 @@ export default {
 	mixins: [productMins, selectShop,productContraposeMins],
 	data() {
 		return {
-			STOCK_TYPE,
 			autoLoad: false,
 			pageType: "getPtItem",
 			tabIndex: 0,
 			modifyStock:{},
-			tabs: [
-				{
-					name: "库存预警",
-					key: STOCK_TYPE.WARN
-				}
-			],
 			allClass:[]
 		};
 	},
@@ -76,20 +67,20 @@ export default {
 		...mapGetters(["getMyShopInfo","getLoginInfo"]),
 	},
 	onLoad() {
-		let type = "waring";
-		this.shopId = this.getMyShopInfo.id;
-		this.initDataContrapose({ type, shopId: this.shopId,status:0,delStatus:0});
+		this.ptItemInit()
 	},
-	onPullDownRefresh() {
-		this.page = 1
-		this.globalClassItemListContrapose = []
-		let type = "waring";
+	onReachBottom(){
+		this.page++
 		this.shopId = this.getMyShopInfo.id;
-		this.initDataContrapose({ type, shopId: this.shopId,status:0,delStatus:0});	
+		this.initDataContrapose({ type:'waring', shopId: this.shopId,status:0,delStatus:0})
 	},
 	onShow(){
 	},
 	methods: {
+		ptItemInit(){
+			this.shopId = this.getMyShopInfo.id;
+			this.initDataContrapose({ type:'waring', shopId: this.shopId,status:0,delStatus:0})
+		},
 		init() {
 			let that = this
 			getAllItemClass().then(res => {
@@ -141,7 +132,6 @@ export default {
 	}
 };
 </script>
-
 <style lang="scss" scoped>
 .billing_box_bg {
 	height: 100%;

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

@@ -33,18 +33,6 @@ export default {
 	},
 	methods: {
 		...mapActions(["setSelectInfoByType", "resetSelectInfoByType"]),
-		/**
-		 * 请求商品数据
-		 */
-		loadMore(){
-			if(this.isMore){
-				this.page++;
-				let type = this.tabs[this.tabIndex].key == STOCK_TYPE.WARN ? "waring" : "";
-				if(type=="waring"){
-					this.initDataContrapose({ type,shopId: this.shopId});
-				}
-			}
-		},
 		async initDataContrapose(extendInfo) {
 			let params = {
 				py: this.py,

+ 2 - 16
ghsApp/src/mixins/ptProductContrapose.js

@@ -21,9 +21,6 @@ export default {
 		if (pageType) {
 			this.pageType = pageType;
 		}
-		if (this.autoLoad) {
-			this.initDataContrapose();
-		}
 	},
 	onUnload() {},
 	computed: {
@@ -31,15 +28,6 @@ export default {
 	},
 	methods: {
 		...mapActions(["setSelectInfoByType", "resetSelectInfoByType"]),
-		/**
-		 * 请求商品数据
-		 */
-		loadMore(){
-			if(this.isMore){
-				this.page++;
-				this.initDataContrapose();
-			}
-		},
 		async initDataContrapose(extendInfo) {
 			let params = {
 				name: this.py,
@@ -60,12 +48,10 @@ export default {
 			uni.stopPullDownRefresh();
 			uni.hideLoading();
 		},
-		/**
-		 * 搜索对应花材
-		 */
+		//搜索对应花材
 		searchFnContrapose() {
+			this.page = 1
 			if(!this.$util.isEmpty(this.py)){
-				this.page = 1
 				this.globalClassItemListContrapose = []
 				this.initDataContrapose({shopId: this.shopId});
 			}else{

+ 1 - 2
ghsApp/src/pagesStorehouse/components/CommodityStock.vue

@@ -72,8 +72,7 @@ export default {
 	},
 	methods: {
 		goItem(id,itemId){
-			this.$util.pageTo({url: "/admin/item/detail?id="+id})
-			//this.$util.pageTo({url: "/pagesStorehouse/stockWarn/detailed?id="+itemId})			
+			this.$util.pageTo({url: "/admin/item/detail?id="+id})			
 		},
 		addEvent() {
 			this.$emit("add");

+ 7 - 14
ghsApp/src/pagesStorehouse/stockWarn/manage.vue

@@ -8,13 +8,13 @@
 		</view>
 		<view class="scroll-middle_bx">
 			<block v-if="!$util.isEmpty(globalClassItemListContrapose)">
-				<scroll-view scroll-y class="item_list_bx" @scrolltolower="loadMore" lower-threshold="100" style="width: 100%">
+				<view scroll-y class="item_list_bx" lower-threshold="100" style="width: 100%">
 					<template v-for="(productItem, productIndex) in globalClassItemListContrapose">
 						<view style="padding: 20upx 0">
 							<CommodityStock :isPrice="false" type="01" :key="productIndex" :info="productItem" :isEdit="true" :modifyStock="modifyStock" ></CommodityStock>
 						</view>
 					</template>
-				</scroll-view>
+				</view>
 			</block>
 			<block v-else>
 				<view style="width: 100%">
@@ -28,7 +28,6 @@
 import AppSearchModule from "@/components/module/app-search";
 import AppWrapperEmpty from "@/components/app-wrapper-empty";
 import CommodityStock from "../components/CommodityStock";
-import { STOCK_TYPE } from "@/utils/declare";
 import productMins from "@/mixins/product";
 import productContraposeMins from "@/mixins/productContrapose";
 import { selectShop } from "@/mixins";
@@ -45,7 +44,6 @@ export default {
 	mixins: [productMins, selectShop,productContraposeMins],
 	data() {
 		return {
-			STOCK_TYPE,
 			autoLoad: false, //不自动请求数据  自定义请求
 			pageType: "stock",
 			tabIndex: 0,
@@ -62,20 +60,15 @@ export default {
 		...mapGetters(["getMyShopInfo","getLoginInfo"]),
 	},
 	onLoad() {
-		let type = "waring";
-		this.shopId = this.getMyShopInfo.id;
-		this.initDataContrapose({ type, shopId: this.shopId,status:0,delStatus:0});
-	},
-	onPullDownRefresh() {
-		this.page = 1
-		this.globalClassItemListContrapose = []
-		let type = "waring";
-		this.shopId = this.getMyShopInfo.id;
-		this.initDataContrapose({ type, shopId: this.shopId,status:0,delStatus:0});	
+		this.warnItemInit()
 	},
 	onShow(){
 	},
 	methods: {
+		warnItemInit(){
+			this.shopId = this.getMyShopInfo.id;
+			this.initDataContrapose({ type:'waring', shopId: this.shopId,status:0,delStatus:0});
+		},
 		affirm(val) {
 			if (val.index === 0) {
 				this.modalCancel();