shish 4 лет назад
Родитель
Сommit
bff5b74b15

+ 3 - 3
ghsApp/src/admin/changePrice/list.vue

@@ -132,7 +132,7 @@ export default {
 		initProduct(){
 			this.shopId = this.getMyShopInfo.id;
 			let type = '';
-			this.initData({ type, shopId: this.shopId,status:0,requestType:'changePrice'});
+			this.initData({ type, shopId: this.shopId,status:0,requestType:'hasStock'});
 		},
 		commitPrice(){
 			if(this.priceArr.length == 0){
@@ -172,7 +172,7 @@ export default {
 				});
 				this.tabIndex = e.index;
 				let type = "";
-				this.initData({ type, shopId: this.shopId,requestType:'changePrice' });
+				this.initData({ type, shopId: this.shopId,requestType:'hasStock' });
 			}
 		},
 		scrollTop() {},
@@ -186,7 +186,7 @@ export default {
 			this.initProductInfo();
 			let type = "";
 			this.shopId = val.selectItem.id;
-			this.initData({ type, shopId: this.shopId,requestType:'changePrice'})
+			this.initData({ type, shopId: this.shopId,requestType:'hasStock'})
 		}
 	}
 };

+ 1 - 0
ghsApp/src/admin/home/apply.vue

@@ -56,6 +56,7 @@ export default {
                         {name: "客户下单榜",img: `${this.$constant.imgUrl}/ghs/home/jyzk.png`,url: "/admin/stat/customSale"},
                         {name: "采购统计",img: `${this.$constant.imgUrl}/ghs/home/jyzk.png`,url: "/admin/stat/cgStat"},
                         {name: "员工业绩",img: `${this.$constant.imgUrl}/ghs/home/icon_ygyj.png`,url: "/admin/staff/achieve"},
+                        {name: "库存总览",img: `${this.$constant.imgUrl}/ghs/home/jyzk.png`,url: "/admin/stat/stock"},
                     ]
                 },
                 {

+ 19 - 38
ghsApp/src/admin/home/workbench.vue

@@ -7,7 +7,7 @@
 			<div class="user-top">
 				<div class="app-size-28">今日概况</div>
 			</div>
-			<div class="income-amount">
+			<div class="income-amount" @click="pageTo({url:'/admin/stat/profit'})">
 				<div>收入</div>
 				<div class="price">{{ $util.numberFormat(data.todayData.income) }}</div>
 			</div>
@@ -32,24 +32,21 @@
 				</navigator>
 			</div>
 		</div>
-		<div class="module-com order-wrap">
+		<div class="module-com order-wrap" @click="pageTo({url:'/admin/stat/kdIncome'})">
 			<div class="total-blo">
 				<div class="total-list"> 
 					<div class="app-color-3">系统收入</div>
 					<div class="list-num" style="font-weight:normal;font-size:25upx;margin-top:10upx;">{{countStat.systemCount}}笔 ¥{{countStat.systemIncome}}</div>
 				</div>
 				<div class="total-list"> 
-					<div class="app-color-3">现金收入</div>
-					<div class="list-num" style="font-weight:normal;font-size:25upx;margin-top:10upx;">{{countStat.cashCount}}笔 ¥{{countStat.cashIncome}}</div> 
+					<div class="app-color-3">客服收入</div>
+					<div class="list-num" style="font-weight:normal;font-size:25upx;margin-top:10upx;">{{countStat.kfWxCount}}笔 ¥{{countStat.kfWxIncome}}</div> 
 				</div>
 				<div class="total-list"> 
-					<div class="app-color-3">结账收入</div>
-					<div class="list-num" style="font-weight:normal;font-size:25upx;margin-top:10upx;">{{countStat.clearCount}}笔 ¥{{countStat.clearIncome}}</div> 
+					<div class="app-color-3">欠款</div>
+					<div class="list-num" style="font-weight:normal;font-size:25upx;margin-top:10upx;">{{countStat.debtCount}}笔 ¥{{countStat.debtIncome}}</div> 
 				</div>
 			</div>
-			<div style="text-align:center;padding-bottom:12upx;color:#666666;font-size:25upx;">
-				<text style="margin-right:10upx;">实收总计 {{countStat.actTotalCount}}笔 ¥{{countStat.actTotalIncome}}</text> | 今日欠款 ¥{{todayDebt}} | 总欠款 ¥{{totalDebt}}
-			</div>
 		</div>
 
 </template>
@@ -90,17 +87,17 @@
 
 		</view>
 
-<template v-if="(loginInfo.staff && loginInfo.staff.super && loginInfo.staff.super == 1) || (loginInfo.staff && loginInfo.staff.lookStat && loginInfo.staff.lookStat ==1)">
-		<div class="module-com total-wrap">
-			<div class="total-tit">总览</div>
-			<div class="total-blo">
-				<div class="total-list" v-for="(item, index) in totalData" :key="index" @click="pageTo(item)">
-					<div class="list-num">{{ $util.numberFormat(item.value) }}</div>
-					<div class="app-color-3">{{ item.name }}</div>
+		<template v-if="(loginInfo.staff && loginInfo.staff.super && loginInfo.staff.super == 1) || (loginInfo.staff && loginInfo.staff.lookStat && loginInfo.staff.lookStat ==1)">
+			<div class="module-com total-wrap">
+				<div class="total-tit">总览</div>
+				<div class="total-blo">
+					<div class="total-list" v-for="(item, index) in overview" :key="index" @click="pageTo(item)">
+						<div class="list-num">{{ $util.numberFormat(item.value) }}</div>
+						<div class="app-color-3">{{ item.name }}</div>
+					</div>
 				</div>
 			</div>
-		</div>
-</template>
+		</template>
 
 		<NotLogin></NotLogin>
 
@@ -145,14 +142,6 @@ export default {
 				{name : "销售结账单", img : "ghs/home/kcyjs.png", url : "/admin/clear/customList"},
 				{name : "支出登记", img : "ghs/home/kcyjs.png", url : "/admin/expend/addExpend"},
 			],
-			totalData: [
-				{ name: "客户数", value: 0, url:'/admin/home/member', type:4 },
-				{ name: "总访客", value: 0, url:'/admin/custom/visit', type:1, },
-				{ name: "总订单", value: 0, url:'/admin/home/order', type:4 },
-				{ name: "总收入(元)", value: 0.00, url:'/pagesStore/me/income', type:1 },
-				{ name: "总支出(元)", value: 0.00, url:'/pagesStore/me/expend', type:1 },
-				{ name: "总采购(元)", value: 0.00, url:'/admin/stat/cgStat', type:1 }
-			],
 			skSrc: `${this.$constant.imgUrl}/ghs/home/kj.png`,
 			pfSrc: `${this.$constant.imgUrl}/ghs/home/pf.jpg`,
 			skSrc3: `${this.$constant.imgUrl}/ghs/home/sk33.jpg`,
@@ -161,8 +150,8 @@ export default {
 			isMini:0,
 			todayDebt:0,
 			totalDebt:0,
-			todayActIncome:0,
-			countStat:{actTotalIncome:0,actTotalCount:0,cashIncome:0,cashCount:0,systemIncome:0,systemCount:0,debtCount:0,debtAmount:0,clearCount:0,clearIncome:0}
+			countStat:{systemIncome:0,systemCount:0,debtCount:0,debtIncome:0,kfWxCount:0,kfWxIncome:0},
+			overview:[]
 		};
 	},
 	onShareAppMessage(res) {
@@ -256,7 +245,7 @@ export default {
 				if(res.code == 1){
 					that.todayDebt = res.data.todayDebt ? parseFloat(res.data.todayDebt) : 0
 					that.totalDebt = res.data.totalDebt ? parseFloat(res.data.totalDebt) : 0
-					that.todayActIncome = res.data.todayActIncome ? parseFloat(res.data.todayActIncome) : 0
+					that.overview = res.data.overview
 				}
 			})
 
@@ -267,16 +256,8 @@ export default {
 			// #endif
 			consoleIndex({isMini:this.isMini}).then(res => {
 				this.data = res.data;
-				const { asset,menu } = res.data;
+				const { menu } = res.data;
 				this.tabsData = menu
-				if (!this.$util.isEmpty(asset)) {
-					this.totalData[0].value = asset.totalUser ? parseFloat(asset.totalUser) : 0;
-					this.totalData[1].value = asset.totalVisit ? parseFloat(asset.totalVisit) : 0;
-					this.totalData[2].value = asset.finishOrder ? parseFloat(asset.finishOrder) : 0;
-					this.totalData[3].value = asset.totalIncome || '-';
-					this.totalData[4].value = asset.totalExpend ? parseFloat(asset.totalExpend) : 0;
-					this.totalData[5].value = asset.totalPurchase ? parseFloat(asset.totalPurchase) : 0;
-				}
 			})
 		},
 		goPage (item) {

+ 171 - 0
ghsApp/src/admin/stat/stock.vue

@@ -0,0 +1,171 @@
+<template>
+<view class="app-content">
+	<view class="ex-page">
+        <view class="input-wrap_box">
+            <view>
+                <AppSearchModule placeholder="输入拼音首字母搜索" @input="searchFn"/>
+            </view>
+        </view>
+        <!-- <view class="top-bar"><DateSelect class="bar" top="0" @selectDateFn="selectDateFn" /></view> -->
+        <view class="top-bar" style="margin-left:150upx;">今天</view>
+		<scroll-view scroll-y scroll-with-animation class="main-view">
+			<view class="space-view ex-table">
+                <t-table :headerBackgroundColor="'#F0F2F6'">
+                    <t-tr header><t-th>花材</t-th><t-th>库存</t-th><t-th>操作</t-th></t-tr>
+                    <block v-if="!$util.isEmpty(classItemData)">
+                        <block v-for="(classItem,classIndex) in classItemData" :key="classIndex">
+                                <t-tr>
+                                    <t-td><text style="color:#3385FF">{{ classItem.className }}</text></t-td>
+                                    <t-td></t-td>
+                                    <t-td></t-td>
+                                </t-tr>
+                            <template v-if="classItem.child && !$util.isEmpty(classItem.child)">
+                                <block v-for="(productItem, productIndex) in classItem.child" :key="productIndex">
+                                    <t-tr>
+                                        <t-td><view>{{productItem.name}}</view></t-td>
+                                        <t-td><view>{{productItem.stock}}</view></t-td>
+                                        <t-td></t-td>
+                                    </t-tr>
+                                </block>
+                            </template>
+                        </block>
+                    </block>
+                </t-table>
+			</view>
+		</scroll-view>
+	</view>
+</view>
+</template>
+<script>
+import AppWrapperEmpty from "@/components/app-wrapper-empty";
+import SelectList from "@/components/plugin/selectList";
+import { getProductDataApi } from "@/api/product/index";
+import { list } from "@/mixins";
+import ShopSelect from "@/components/module/shopSelect";
+import DateSelect from "@/components/module/dateSelect";
+import {mapActions, mapGetters} from "vuex";
+import AppSearchModule from "@/components/module/app-search";
+export default {
+	components: { SelectList, AppWrapperEmpty,ShopSelect,DateSelect,AppSearchModule},
+	mixins: [list],
+	computed: {		
+        ...mapGetters(["getDictionariesInfo","getLoginInfo","getMyShopInfo"])	
+    },
+	data() {
+		return {
+			isShow:false,
+			customizationTime:'',
+			shopId:'',
+			itemId:'',
+			nowTime: "",
+			showTimeDropdown: false,
+			nowShop: "",
+			showShopDropdown: false,
+			dataList: [],
+			profile:[],
+			storageData:[],
+			searchContent:'',
+            shopId:0,
+            classItemData:[]
+		};
+	},
+	onLoad(e) {
+        this.shopId = this.getMyShopInfo.id;
+        let type = '';
+
+        let that = this
+        getProductDataApi({ type, shopId: this.shopId,status:0,requestType:'hasStock'}).then(res=>{
+            if(res.code == 1){
+                that.classItemData = res.data
+                console.log(that.classItemData)
+            }
+        })
+
+	},
+	methods: {
+		...mapActions(['setUserShopAll'])
+	}
+};
+</script>
+<style lang="scss" scoped>
+.ex-page {
+	background: white;
+	padding-top:20upx;
+	height: 100%;
+	display: flex;
+	flex-direction: column;
+	.top-bar {
+		position: absolute;
+		left: 0;
+		display: flex;
+		width: 100%;
+		top:116upx;
+		z-index: 20;
+		.bar{
+			width: 50%;
+			height: 100%;
+			text-align: center;
+			&:nth-child(1){
+				border-right: 1upx solid #eeeeec;
+			}
+		}
+	}
+	.main-view {
+		margin-top: 80upx;
+		flex: 1;
+		background-color: #f9fbfc;
+		.space-view {
+			background-color: #fff;
+		}
+		.ex-info {
+			padding: 30upx;
+			.info-cell {
+				display: flex;
+				align-items: center;
+				font-size: 28upx;
+				&:not(:first-child) {
+					margin-top: 20upx;
+				}
+				.cell-label {
+					width: 110upx;
+					color: #666666;
+				}
+				.cell-value {
+					margin-left: 40upx;
+					color: #333;
+					&.warning {
+						color: #ffaf1d;
+					}
+					&.success {
+						color: #27c325;
+					}
+				}
+			}
+		}
+		.ex-table {
+			/deep/.icon-info {
+				color: #333333;
+			}
+		}
+	}
+	.bar-view {
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+		padding: 0 30upx;
+		width: 100%;
+		height: 100upx;
+
+		box-shadow: 0upx -1upx 6upx 0upx rgba(4, 0, 0, 0.06);
+		.info-view {
+			font-size: 26upx;
+		}
+		.btn-view {
+			display: flex;
+			.admin-button-com {
+				margin: 0 10upx;
+			}
+		}
+	}
+}
+</style>

+ 1 - 0
ghsApp/src/pages.json

@@ -222,6 +222,7 @@
 				{"path": "customSale","style": {"navigationBarTitleText": "客户下单排行"}},
 				{"path": "incomeStat","style": {"navigationBarTitleText": "应收款"}},
 				{"path": "cgStat","style": {"navigationBarTitleText": "采购统计"}},
+				{"path": "stock","style": {"navigationBarTitleText": "库存总览"}},
 				{"path": "mayPayStat","style": {"navigationBarTitleText": "应付款"}}
 			]
 		},