shish 2 лет назад
Родитель
Сommit
6f81add0ef

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

@@ -60,7 +60,8 @@ export default {
                         {name: "花材销量",img: `${this.$constant.imgUrl}/ghs/home/jyzk.png`,url: "/admin/stat/productSale"},
                         {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/jyzk.png`,url: "/admin/stat/cgItem"},
+                        {name: "采购人业绩",img: `${this.$constant.imgUrl}/ghs/home/jyzk.png`,url: "/admin/stat/cgYj"},
+                        {name: "采购花材",img: `${this.$constant.imgUrl}/ghs/home/jyzk.png`,url: "/admin/stat/cgItem"},
                         {name: "采购运费",img: `${this.$constant.imgUrl}/ghs/home/jyzk.png`,url: "/admin/stat/cgFreight"},
                         {name: "库存总览",img: `${this.$constant.imgUrl}/ghs/home/jyzk.png`,url: "/admin/stat/stock"},
                         {name: "损耗花材",img: `${this.$constant.imgUrl}/ghs/home/jyzk.png`,url: "/admin/stat/wastage"},

+ 0 - 6
ghsApp/src/admin/stat/cgItem.vue

@@ -18,12 +18,6 @@
 						<t-th><view @click="rankByFn('num')">总数量<i class="iconfont iconsanjiao_xia"></i></view></t-th>
 						<t-th><view @click="rankByFn('amount')">总金额<i class="iconfont iconsanjiao_xia"></i></view></t-th>
 						</t-tr>
-						<view style="padding:15upx 0 10upx 20upx;font-size:28upx;">
-							<view v-for="(cgItem,cgIndex) in profile.staffCg">
-							<text style="width:180upx;overflow:hidden;display:inline-block;">{{cgItem.cgStaffName?cgItem.cgStaffName:'未记名'}}</text>
-							<text>总采购:{{cgItem.itemNum?parseFloat(cgItem.itemNum):0}}扎 {{cgItem.num}}笔 ¥{{cgItem.amount?parseFloat(cgItem.amount):0}}</text>
-							</view>
-						</view>
 						<block v-if="profile.list && !$util.isEmpty(profile.list)">
 							<view v-for="(item, index) in profile.list" :key="index">
 								<t-tr>

+ 178 - 0
ghsApp/src/admin/stat/cgYj.vue

@@ -0,0 +1,178 @@
+<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>
+		<scroll-view scroll-y scroll-with-animation class="main-view">
+			<view class="space-view ex-table">
+				<block v-if="!$util.isEmpty(profile)">
+					<t-table :headerBackgroundColor="'#F0F2F6'">
+						<t-tr header>
+						<t-th>姓名</t-th>
+						<t-th>订单数</t-th>
+						<t-th>金额</t-th>
+						</t-tr>
+						<block v-if="profile.staffCg && !$util.isEmpty(profile.staffCg)">
+							<view v-for="(cgItem, index) in profile.staffCg" :key="index">
+								<t-tr>
+									<t-td><view style="color:black;font-size:26upx;">{{cgItem.cgStaffName?cgItem.cgStaffName:'未记名'}}</view></t-td>
+									<t-td><view style="color:black;font-size:28upx;">{{cgItem.num?parseFloat(cgItem.num):0}}</view></t-td>
+									<t-td><view style="color:black;font-size:28upx;">¥{{cgItem.amount?parseFloat(cgItem.amount):0}}</view></t-td>
+								</t-tr>
+							</view>
+						</block>
+					</t-table>
+				</block>
+			</view>
+		</scroll-view>
+	</view>
+</view>
+</template>
+<script>
+import AppWrapperEmpty from "@/components/app-wrapper-empty";
+import SelectList from "@/components/plugin/selectList";
+import { getStatCgYj } from "@/api/stat";
+import { list } from "@/mixins";
+import ShopSelect from "@/components/module/shopSelect";
+import DateSelect from "@/components/module/dateSelect";
+import AppSearchModule from "@/components/module/app-search";
+export default {
+	components: { SelectList, AppWrapperEmpty,ShopSelect,DateSelect,AppSearchModule},
+	mixins: [list],
+	computed: {	
+
+	},
+	data() {
+		return {
+			params:{
+				searchTime:'',
+				startTime: "",
+				endTime: "",
+				sort:"num"
+			},
+			profile:[]
+		};
+	},
+	onPullDownRefresh() {
+		this.resetList();
+		this.getStatList().then(res => {
+			uni.stopPullDownRefresh();
+		});
+	},
+	methods: {
+		searchFn(e){
+
+		},
+		selectShopFn(val){
+			this.init();
+		},
+		selectDateFn(val) {
+			this.params = {...this.params,...val}
+			this.init();			
+		},
+		rankByFn(rank){
+			this.getStatList(rank)
+		},
+		async init() {
+			this.getStatList("num");
+		},
+		getStatList(rank) {
+			let that = this
+			uni.showLoading()
+			this.params.sort = rank
+			getStatCgYj(this.params).then(res => {
+				uni.hideLoading()
+				that.profile = res.data
+			})
+		}
+	}
+};
+</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:130upx;
+		z-index: 20;
+		.bar{
+			width: 50%;
+			height: 100%;
+			text-align: center;
+			&:nth-child(1){
+				border-right: 1upx solid #eeeeec;
+			}
+		}
+	}
+	.main-view {
+		margin-top: 90upx;
+		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 {
+			::v-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>

+ 4 - 0
ghsApp/src/api/stat/index.js

@@ -1,5 +1,9 @@
 import https from '@/plugins/luch-request_0.0.7/request'
 
+export const getStatCgYj = data => {
+	return https.get('/stat-cg/yj', data)
+}
+
 export const getStatCgItem = data => {
 	return https.get('/stat-cg/profit', data)
 }

+ 2 - 1
ghsApp/src/pages.json

@@ -273,7 +273,8 @@
 				{"path": "clear","style": {"navigationBarTitleText": "结账跟踪"}},
 				{"path": "incomeStat","style": {"navigationBarTitleText": "应收款"}},
 				{"path": "cgStat","style": {"navigationBarTitleText": "供货商业绩"}},
-				{"path": "cgItem","style": {"navigationBarTitleText": "采购人业绩"}},
+				{"path": "cgItem","style": {"navigationBarTitleText": "采购花材"}},
+				{"path": "cgYj","style": {"navigationBarTitleText": "采购人业绩"}},
 				{"path": "cgFreight","style": {"navigationBarTitleText": "采购运费统计"}},
 				{"path": "stock","style": {"navigationBarTitleText": "库存总览"}},
 				{"path": "mayPayStat","style": {"navigationBarTitleText": "应付款"}},