zhengxin 5 سال پیش
والد
کامیت
642406fffd
2فایلهای تغییر یافته به همراه25 افزوده شده و 135 حذف شده
  1. 0 107
      ghs/src/pagesPurchase/components/CommodityStock.vue
  2. 25 28
      ghs/src/pagesStorehouse/stockWarn/manage.vue

+ 0 - 107
ghs/src/pagesPurchase/components/CommodityStock.vue

@@ -1,107 +0,0 @@
-<template>
-	<view class="item-cmd_bx">
-		<view class="img_bx">
-			<app-img
-				src="https://img.huaml.com/uploads/12358/202005/29/de74c55596d304b85e79154958e8bf57_small.jpeg"
-				alt="商品图"
-				mode="aspectFit"
-				:height="160"
-			/>
-		</view>
-		<view class="cmd-info_bx">
-			<view class="tit">天使美人</view>
-			<view class="kc">B级</view>
-			<view class="num-open_bx">
-				<view class="price"><text class="unit">¥</text><text>42</text></view>
-
-				<view :class="['open-bx', { light: type == STOCK_TYPE.WARN }]">
-					库存2/5
-				</view>
-			</view>
-		</view>
-	</view>
-</template>
-
-<script>
-import { STOCK_TYPE } from "@/utils/declare";
-import AppImg from "@/components/app-img";
-export default {
-	name: "Commodity",
-	components: {
-		AppImg
-	},
-	props: {
-		type: {
-			type: String,
-			default: STOCK_TYPE.WARN
-		}
-	},
-	data() {
-		return {
-			STOCK_TYPE
-		};
-	},
-	methods: {
-		customNum() {
-			this.$emit("customNum");
-		},
-		addEvent() {
-			this.$emit("add");
-		},
-		subtractEvent() {
-			this.$emit("subtract");
-		},
-		delEvent() {
-			this.$emit("del");
-		}
-	}
-};
-</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 {
-		padding-left: 177px;
-		& .tit {
-			font-size: 28px;
-			font-weight: 400;
-			color: #333333;
-			padding-top: 10px;
-		}
-		& .kc {
-			color: #999999;
-			font-size: 24px;
-			padding: 10px 0 24px;
-		}
-		& .num-open_bx {
-			display: flex;
-			align-items: center;
-			justify-content: space-between;
-			& .price {
-				font-size: 32upx;
-				color: #333;
-				.unit {
-					font-size: 22upx;
-				}
-			}
-			& .open-bx {
-				display: flex;
-				align-items: center;
-				font-size: 32upx;
-				&.light {
-					color: $redColor;
-				}
-			}
-		}
-	}
-}
-</style>

+ 25 - 28
ghs/src/pagesStorehouse/stockWarn/manage.vue

@@ -6,22 +6,20 @@
 			@change="change"
 			@change="change"
 			itemWidth="50%"
 			itemWidth="50%"
 		/>
 		/>
-		<view 
-			class="input-wrap">
+		<view class="input-wrap">
 			<!-- <view 
 			<!-- <view 
 				v-if=" == 1"
 				v-if=" == 1"
 				class="city-select text-line">
 				class="city-select text-line">
 				瑞经典<text class="iconfont iconsanjiao_xia"></text>
 				瑞经典<text class="iconfont iconsanjiao_xia"></text>
 			</view> -->
 			</view> -->
-			<view 
-				v-if="loginInfo.super"
-				class="city-select text-line">
-				<DorpdownSelect 
+			<view v-if="loginInfo.super" class="city-select text-line">
+				<DorpdownSelect
 					:menuObj.sync="menuObj"
 					:menuObj.sync="menuObj"
 					:selectItemId.sync="shopId"
 					:selectItemId.sync="shopId"
-					top="40px" 
-					@selectSussess="selectSussess">
-				</DorpdownSelect>	
+					top="40px"
+					@selectSussess="selectSussess"
+				>
+				</DorpdownSelect>
 			</view>
 			</view>
 			<view class="search-bar">
 			<view class="search-bar">
 				<app-search-module
 				<app-search-module
@@ -69,7 +67,7 @@
 						</view>
 						</view>
 						<template v-for="(productItem, productIndex) in classItem.child">
 						<template v-for="(productItem, productIndex) in classItem.child">
 							<CommodityStock
 							<CommodityStock
-								:type="pageType"
+								:type="tabs[tabIndex].key"
 								:key="productIndex"
 								:key="productIndex"
 								:info="productItem"
 								:info="productItem"
 							></CommodityStock>
 							></CommodityStock>
@@ -93,11 +91,11 @@
 import AppSearchModule from "@/components/module/app-search";
 import AppSearchModule from "@/components/module/app-search";
 import AppTabs from "@/components/plugin/tabs";
 import AppTabs from "@/components/plugin/tabs";
 import AppWrapperEmpty from "@/components/app-wrapper-empty";
 import AppWrapperEmpty from "@/components/app-wrapper-empty";
-import CommodityStock from "../components/CommodityStock";
+import CommodityStock from "../components/Commodity";
 import { STOCK_TYPE } from "@/utils/declare";
 import { STOCK_TYPE } from "@/utils/declare";
 import productMins from "@/mixins/product";
 import productMins from "@/mixins/product";
-import { selectShop } from '@/mixins'
-import { mapGetters } from 'vuex'
+import { selectShop } from "@/mixins";
+import { mapGetters } from "vuex";
 import DorpdownSelect from "@/components/module/dorpdownSelect";
 import DorpdownSelect from "@/components/module/dorpdownSelect";
 export default {
 export default {
 	name: "stock_manage", // 开单
 	name: "stock_manage", // 开单
@@ -108,7 +106,7 @@ export default {
 		CommodityStock,
 		CommodityStock,
 		DorpdownSelect
 		DorpdownSelect
 	},
 	},
-	mixins: [productMins,selectShop],
+	mixins: [productMins, selectShop],
 	data() {
 	data() {
 		return {
 		return {
 			STOCK_TYPE,
 			STOCK_TYPE,
@@ -124,16 +122,16 @@ export default {
 					name: "库存管理",
 					name: "库存管理",
 					key: STOCK_TYPE.MANAGE
 					key: STOCK_TYPE.MANAGE
 				}
 				}
-			],
+			]
 		};
 		};
 	},
 	},
 	onLoad() {
 	onLoad() {
 		let type = this.tabs[this.tabIndex].key == STOCK_TYPE.WARN ? "waring" : "";
 		let type = this.tabs[this.tabIndex].key == STOCK_TYPE.WARN ? "waring" : "";
 		// 当前门店
 		// 当前门店
-		this.shopId = this.userInfo.id
-		this.initData({ type,shopId:this.shopId });
+		this.shopId = this.userInfo.id;
+		this.initData({ type, shopId: this.shopId });
 	},
 	},
-	
+
 	methods: {
 	methods: {
 		affirm(val) {
 		affirm(val) {
 			if (val.index === 0) {
 			if (val.index === 0) {
@@ -142,35 +140,34 @@ export default {
 			}
 			}
 		},
 		},
 		change(e) {
 		change(e) {
-			
 			if (this.tabIndex == e.index) {
 			if (this.tabIndex == e.index) {
 				return false;
 				return false;
 			} else {
 			} else {
 				uni.showLoading({
 				uni.showLoading({
-					title: '加载中'
+					title: "加载中"
 				});
 				});
 				this.tabIndex = e.index;
 				this.tabIndex = e.index;
 				this.tabs[this.tabIndex].key;
 				this.tabs[this.tabIndex].key;
 				let type = this.tabs[this.tabIndex].key == STOCK_TYPE.WARN ? "waring" : "";
 				let type = this.tabs[this.tabIndex].key == STOCK_TYPE.WARN ? "waring" : "";
-				this.initData({ type,shopId:this.shopId });
+				this.initData({ type, shopId: this.shopId });
 			}
 			}
 		},
 		},
 		searchFn() {
 		searchFn() {
 			uni.showLoading({
 			uni.showLoading({
-					title: '加载中'
-				});
-			this.initData({ shopId:this.shopId });
+				title: "加载中"
+			});
+			this.initData({ shopId: this.shopId });
 		},
 		},
 		scrollTop() {},
 		scrollTop() {},
-		selectSussess(val){
+		selectSussess(val) {
 			uni.showLoading({
 			uni.showLoading({
-				title: '加载中'
+				title: "加载中"
 			});
 			});
 			let type = this.tabs[this.tabIndex].key == STOCK_TYPE.WARN ? "waring" : "";
 			let type = this.tabs[this.tabIndex].key == STOCK_TYPE.WARN ? "waring" : "";
 			this.shopId = val.selectItem.id;
 			this.shopId = val.selectItem.id;
-			this.initData({ type,shopId:this.shopId });
+			this.initData({ type, shopId: this.shopId });
 		}
 		}
-	},
+	}
 };
 };
 </script>
 </script>