shish 2 hari lalu
induk
melakukan
6c2a2f93fe

+ 44 - 4
ghsApp/src/admin/staff/achieve.vue

@@ -1,7 +1,15 @@
+<!--
+  员工业绩:按员工汇总批发/零售笔数与金额;timeType 切换记账时间(bill) / 发货时间(send)。
+-->
 <template>
 <view class="app-content">
 	<view class="ex-page">
 		<view class="top-bar">
+			<!-- 记账时间 / 发货时间:只切换筛字段,不另开时间选择器 -->
+			<view class="time-type-row">
+				<view class="time-type-item" :class="{ active: params.timeType === 'bill' }" @click="changeTimeType('bill')">记账时间</view>
+				<view class="time-type-item" :class="{ active: params.timeType === 'send' }" @click="changeTimeType('send')">发货时间</view>
+			</view>
 			<DateSelect class="bar" top="0" @selectDateFn="selectDateFn" />
 		</view>
 		<scroll-view scroll-y scroll-with-animation class="main-view">
@@ -75,6 +83,8 @@ export default {
 				startTime: "",
 				endTime: "",
 				shopId: "",
+				// bill=记账时间(默认) / send=发货时间
+				timeType: 'bill',
 			},
 		};
 	},
@@ -101,6 +111,12 @@ export default {
 			this.params = {...this.params,...val}
 			this.init();			
 		},
+		/** 切换记账时间 / 发货时间并刷新 */
+		changeTimeType(type) {
+			if (this.params.timeType === type) return
+			this.params.timeType = type
+			this.init()
+		},
 		async init() {
 			this.yjList();
 		},
@@ -122,15 +138,39 @@ export default {
 		position: absolute;
 		left: 0;
 		display: flex;
+		align-items: center;
 		width: 100%;
 		z-index: 20;
+		padding: 0 16upx;
+		box-sizing: border-box;
+		.time-type-row {
+			display: flex;
+			align-items: center;
+			flex-shrink: 0;
+			margin-right: 12upx;
+		}
+		.time-type-item {
+			height: 56upx;
+			line-height: 56upx;
+			padding: 0 18upx;
+			font-size: 26upx;
+			color: #666;
+			background: #f5f5f5;
+			border-radius: 8upx;
+			margin-right: 10upx;
+			&:last-child {
+				margin-right: 0;
+			}
+			&.active {
+				color: #fff;
+				background: #08b955;
+			}
+		}
 		.bar{
-			width: 50%;
+			flex: 1;
+			min-width: 0;
 			height: 100%;
 			text-align: center;
-			&:nth-child(1){
-				border-right: 1upx solid #eeeeec;
-			}
 		}
 	}
 	.main-view {

+ 44 - 5
ghsApp/src/admin/stat/cgFreight.vue

@@ -1,7 +1,15 @@
+<!--
+  采购运费统计:按日汇总打包/短途/长途/提货/本地费用;timeType 切换记账时间(bill) / 发货时间(send)。
+-->
 <template>
 <view class="app-content">
 	<view class="ex-page">
 		<view class="top-bar">
+			<!-- 记账时间 / 发货时间:只切换筛字段,不另开时间选择器 -->
+			<view class="time-type-row">
+				<view class="time-type-item" :class="{ active: params.timeType === 'bill' }" @click="changeTimeType('bill')">记账时间</view>
+				<view class="time-type-item" :class="{ active: params.timeType === 'send' }" @click="changeTimeType('send')">发货时间</view>
+			</view>
 			<DateSelect class="bar" top="0" @selectDateFn="selectDateFn" />
 		</view>
 		<view class="main-view">
@@ -67,7 +75,8 @@ export default {
 			nowShop: "",
 			showShopDropdown: false,
 			dataList: [],
-			params:{ itemId: '', searchTime:'', startTime: "", endTime: "", shopId: "", },
+			// timeType: bill=记账时间(默认) / send=发货时间
+			params:{ itemId: '', searchTime:'', startTime: "", endTime: "", shopId: "", timeType: 'bill', },
 			profile:{total:{packingCharge:0,shortCharge:0,longCharge:0,pickCharge:0,localCharge:0},list:[]},
 			storageData:[],
 			searchContent:'',
@@ -79,6 +88,12 @@ export default {
 			this.params = {...this.params,...val}
 			this.init();			
 		},
+		/** 切换记账时间 / 发货时间并刷新 */
+		changeTimeType(type) {
+			if (this.params.timeType === type) return
+			this.params.timeType = type
+			this.init()
+		},
 		init() {
 			this.getList();
 		},
@@ -107,15 +122,39 @@ export default {
 		left: 0;
 		top:30upx;
 		display: flex;
+		align-items: center;
 		width: 100%;
 		z-index: 20;
+		padding: 0 16upx;
+		box-sizing: border-box;
+		.time-type-row {
+			display: flex;
+			align-items: center;
+			flex-shrink: 0;
+			margin-right: 12upx;
+		}
+		.time-type-item {
+			height: 56upx;
+			line-height: 56upx;
+			padding: 0 18upx;
+			font-size: 26upx;
+			color: #666;
+			background: #f5f5f5;
+			border-radius: 8upx;
+			margin-right: 10upx;
+			&:last-child {
+				margin-right: 0;
+			}
+			&.active {
+				color: #fff;
+				background: #08b955;
+			}
+		}
 		.bar{
-			width: 50%;
+			flex: 1;
+			min-width: 0;
 			height: 100%;
 			text-align: center;
-			&:nth-child(1){
-				border-right: 1upx solid #eeeeec;
-			}
 		}
 	}
 	.main-view {

+ 43 - 5
ghsApp/src/admin/stat/cgItem.vue

@@ -1,5 +1,6 @@
 <!--
   采购花材排行:入库日净量 + 跨天通过日扣数量/金额(可为负)。
+  timeType 切换记账时间(bill) / 发货时间(send)。
 -->
 <template>
 <view class="app-content">
@@ -10,6 +11,11 @@
       </view>
     </view>
 	<view class="top-bar">
+		<!-- 记账时间 / 发货时间:只切换筛字段,不另开时间选择器 -->
+		<view class="time-type-row">
+			<view class="time-type-item" :class="{ active: params.timeType === 'bill' }" @click="changeTimeType('bill')">记账时间</view>
+			<view class="time-type-item" :class="{ active: params.timeType === 'send' }" @click="changeTimeType('send')">发货时间</view>
+		</view>
 		<DateSelect class="bar" top="0" @selectDateFn="selectDateFn" />
 	</view>
 		<scroll-view scroll-y scroll-with-animation class="main-view">
@@ -80,7 +86,9 @@ export default {
 				searchTime:'',
 				startTime: "",
 				endTime: "",
-				sort:"num"
+				sort:"num",
+				// bill=记账时间(默认) / send=发货时间
+				timeType: 'bill',
 			},
 			profile:{},
 			searchContent: '',
@@ -108,6 +116,12 @@ export default {
 			this.params = {...this.params,...val}
 			this.init();			
 		},
+		/** 切换记账时间 / 发货时间并刷新 */
+		changeTimeType(type) {
+			if (this.params.timeType === type) return
+			this.params.timeType = type
+			this.init()
+		},
 		rankByFn(rank){
 			this.getStatList(rank)
 		},
@@ -138,16 +152,40 @@ export default {
 		position: absolute;
 		left: 0;
 		display: flex;
+		align-items: center;
 		width: 100%;
 		top:130upx;
 		z-index: 20;
+		padding: 0 16upx;
+		box-sizing: border-box;
+		.time-type-row {
+			display: flex;
+			align-items: center;
+			flex-shrink: 0;
+			margin-right: 12upx;
+		}
+		.time-type-item {
+			height: 56upx;
+			line-height: 56upx;
+			padding: 0 18upx;
+			font-size: 26upx;
+			color: #666;
+			background: #f5f5f5;
+			border-radius: 8upx;
+			margin-right: 10upx;
+			&:last-child {
+				margin-right: 0;
+			}
+			&.active {
+				color: #fff;
+				background: #08b955;
+			}
+		}
 		.bar{
-			width: 50%;
+			flex: 1;
+			min-width: 0;
 			height: 100%;
 			text-align: center;
-			&:nth-child(1){
-				border-right: 1upx solid #eeeeec;
-			}
 		}
 	}
 	.main-view {

+ 42 - 5
ghsApp/src/admin/stat/cgStat.vue

@@ -1,5 +1,6 @@
 <!--
   供货业绩:按供货商汇总采购金额(含跨天售后通过日扣减,金额可为负)。
+  timeType 切换记账时间(bill) / 发货时间(send)。
 -->
 <template>
 <view class="app-content">
@@ -10,6 +11,11 @@
 		</view>
 		</view>
 		<view class="top-bar">
+			<!-- 记账时间 / 发货时间:只切换筛字段,不另开时间选择器 -->
+			<view class="time-type-row">
+				<view class="time-type-item" :class="{ active: params.timeType === 'bill' }" @click="changeTimeType('bill')">记账时间</view>
+				<view class="time-type-item" :class="{ active: params.timeType === 'send' }" @click="changeTimeType('send')">发货时间</view>
+			</view>
 			<DateSelect class="bar" top="0" @selectDateFn="selectDateFn" />
 		</view>
 		<view class="main-view">
@@ -85,7 +91,8 @@ export default {
 				{ name: "开单数", dataIndex: "num", color: "info", align: "center" }
 			],
 			dataList: [],
-			params:{ itemId: '', searchTime:'', startTime: "", endTime: "", shopId: "", },
+			// timeType: bill=记账时间(默认) / send=发货时间
+			params:{ itemId: '', searchTime:'', startTime: "", endTime: "", shopId: "", timeType: 'bill', },
 			storageData:[],
 			searchContent:'',
 			totalActPrice:0,
@@ -122,6 +129,12 @@ export default {
 			this.params = {...this.params,...val}
 			this.init();			
 		},
+		/** 切换记账时间 / 发货时间并刷新 */
+		changeTimeType(type) {
+			if (this.params.timeType === type) return
+			this.params.timeType = type
+			this.init()
+		},
 		async init() {
 			this.getList();
 		},
@@ -156,15 +169,39 @@ export default {
 		left: 0;
 		top:130upx;
 		display: flex;
+		align-items: center;
 		width: 100%;
 		z-index: 20;
+		padding: 0 16upx;
+		box-sizing: border-box;
+		.time-type-row {
+			display: flex;
+			align-items: center;
+			flex-shrink: 0;
+			margin-right: 12upx;
+		}
+		.time-type-item {
+			height: 56upx;
+			line-height: 56upx;
+			padding: 0 18upx;
+			font-size: 26upx;
+			color: #666;
+			background: #f5f5f5;
+			border-radius: 8upx;
+			margin-right: 10upx;
+			&:last-child {
+				margin-right: 0;
+			}
+			&.active {
+				color: #fff;
+				background: #08b955;
+			}
+		}
 		.bar{
-			width: 50%;
+			flex: 1;
+			min-width: 0;
 			height: 100%;
 			text-align: center;
-			&:nth-child(1){
-				border-right: 1upx solid #eeeeec;
-			}
 		}
 	}
 	.main-view {

+ 43 - 5
ghsApp/src/admin/stat/cgYj.vue

@@ -1,5 +1,6 @@
 <!--
   采购人业绩:按采购员汇总(跨天售后通过日扣金额,订单数不减;金额可为负)。
+  timeType 切换记账时间(bill) / 发货时间(send)。
 -->
 <template>
 <view class="app-content">
@@ -10,6 +11,11 @@
       </view>
     </view>
 	<view class="top-bar">
+		<!-- 记账时间 / 发货时间:只切换筛字段,不另开时间选择器 -->
+		<view class="time-type-row">
+			<view class="time-type-item" :class="{ active: params.timeType === 'bill' }" @click="changeTimeType('bill')">记账时间</view>
+			<view class="time-type-item" :class="{ active: params.timeType === 'send' }" @click="changeTimeType('send')">发货时间</view>
+		</view>
 		<DateSelect class="bar" top="0" @selectDateFn="selectDateFn" />
 	</view>
 		<scroll-view scroll-y scroll-with-animation class="main-view">
@@ -71,7 +77,9 @@ export default {
 				searchTime:'',
 				startTime: "",
 				endTime: "",
-				sort:"num"
+				sort:"num",
+				// bill=记账时间(默认) / send=发货时间
+				timeType: 'bill',
 			},
 			profile:{},
 			nextDayDeduct: 0
@@ -98,6 +106,12 @@ export default {
 			this.params = {...this.params,...val}
 			this.init();			
 		},
+		/** 切换记账时间 / 发货时间并刷新 */
+		changeTimeType(type) {
+			if (this.params.timeType === type) return
+			this.params.timeType = type
+			this.init()
+		},
 		rankByFn(rank){
 			this.getStatList(rank)
 		},
@@ -128,16 +142,40 @@ export default {
 		position: absolute;
 		left: 0;
 		display: flex;
+		align-items: center;
 		width: 100%;
 		top:130upx;
 		z-index: 20;
+		padding: 0 16upx;
+		box-sizing: border-box;
+		.time-type-row {
+			display: flex;
+			align-items: center;
+			flex-shrink: 0;
+			margin-right: 12upx;
+		}
+		.time-type-item {
+			height: 56upx;
+			line-height: 56upx;
+			padding: 0 18upx;
+			font-size: 26upx;
+			color: #666;
+			background: #f5f5f5;
+			border-radius: 8upx;
+			margin-right: 10upx;
+			&:last-child {
+				margin-right: 0;
+			}
+			&.active {
+				color: #fff;
+				background: #08b955;
+			}
+		}
 		.bar{
-			width: 50%;
+			flex: 1;
+			min-width: 0;
 			height: 100%;
 			text-align: center;
-			&:nth-child(1){
-				border-right: 1upx solid #eeeeec;
-			}
 		}
 	}
 	.main-view {

+ 44 - 4
ghsApp/src/admin/stat/classProfit.vue

@@ -1,7 +1,15 @@
+<!--
+  分类利润:按花材分类汇总销售收入/采购成本/利润;timeType 切换记账时间(bill) / 发货时间(send)。
+-->
 <template>
 <view class="app-content">
 	<view class="ex-page">
 		<view class="top-bar">
+			<!-- 记账时间 / 发货时间:只切换筛字段,不另开时间选择器 -->
+			<view class="time-type-row">
+				<view class="time-type-item" :class="{ active: params.timeType === 'bill' }" @click="changeTimeType('bill')">记账时间</view>
+				<view class="time-type-item" :class="{ active: params.timeType === 'send' }" @click="changeTimeType('send')">发货时间</view>
+			</view>
 			 <DateSelect class="bar" top="0" @selectDateFn="selectDateFn" /> 
 		</view>
 		<scroll-view scroll-y scroll-with-animation class="main-view">
@@ -181,6 +189,8 @@ export default {
 				startTime: "",
 				endTime: "",
 				shopId: "",
+				// bill=记账时间(默认) / send=发货时间
+				timeType: 'bill',
 			},
 			profit:[],
 			tbSaleIncome:[],
@@ -212,6 +222,12 @@ export default {
 			this.params = {...this.params,...val}
 			this.init();			
 		},
+		/** 切换记账时间 / 发货时间并刷新 */
+		changeTimeType(type) {
+			if (this.params.timeType === type) return
+			this.params.timeType = type
+			this.init()
+		},
 		async init() {
 			this.getStatList();
 		},
@@ -247,15 +263,39 @@ export default {
 		left: 0;
 		top:18upx;
 		display: flex;
+		align-items: center;
 		width: 100%;
 		z-index: 20;
+		padding: 0 16upx;
+		box-sizing: border-box;
+		.time-type-row {
+			display: flex;
+			align-items: center;
+			flex-shrink: 0;
+			margin-right: 12upx;
+		}
+		.time-type-item {
+			height: 56upx;
+			line-height: 56upx;
+			padding: 0 18upx;
+			font-size: 26upx;
+			color: #666;
+			background: #f5f5f5;
+			border-radius: 8upx;
+			margin-right: 10upx;
+			&:last-child {
+				margin-right: 0;
+			}
+			&.active {
+				color: #fff;
+				background: #08b955;
+			}
+		}
 		.bar{
-			width: 50%;
+			flex: 1;
+			min-width: 0;
 			height: 100%;
 			text-align: center;
-			&:nth-child(1){
-				border-right: 1upx solid #eeeeec;
-			}
 		}
 	}
 	.main-view {

+ 42 - 4
ghsApp/src/admin/stat/customSale.vue

@@ -1,5 +1,6 @@
 <!--
   小程序客户业绩:按客户汇总金额/成本/利润;跨天售后记通过日扣减(后端 statCustomCg)。
+  timeType 切换记账时间(bill) / 发货时间(send)。
 -->
 <template>
 <view class="app-content">
@@ -11,6 +12,11 @@
 		</view>
 
 		<view class="top-bar">
+			<!-- 记账时间 / 发货时间:只切换筛字段,不另开时间选择器 -->
+			<view class="time-type-row">
+				<view class="time-type-item" :class="{ active: params.timeType === 'bill' }" @click="changeTimeType('bill')">记账时间</view>
+				<view class="time-type-item" :class="{ active: params.timeType === 'send' }" @click="changeTimeType('send')">发货时间</view>
+			</view>
 			<DateSelect class="bar" top="0" @selectDateFn="selectDateFn" />
 		</view>
 
@@ -89,6 +95,8 @@ export default {
 				searchTime:'today',
 				startTime: "",
 				endTime: "",
+				// bill=记账时间(默认) / send=发货时间
+				timeType: 'bill',
 			},
 			profile:{},
 			searchText:'',
@@ -114,6 +122,12 @@ export default {
 			this.params = {...this.params,...val}
 			this.init();			
 		},
+		/** 切换记账时间 / 发货时间并刷新 */
+		changeTimeType(type) {
+			if (this.params.timeType === type) return
+			this.params.timeType = type
+			this.init()
+		},
 		async init() {
 			this.getList();
 		},
@@ -144,15 +158,39 @@ export default {
 		left: 0;
 		top:130upx;
 		display: flex;
+		align-items: center;
 		width: 100%;
 		z-index: 20;
+		padding: 0 16upx;
+		box-sizing: border-box;
+		.time-type-row {
+			display: flex;
+			align-items: center;
+			flex-shrink: 0;
+			margin-right: 12upx;
+		}
+		.time-type-item {
+			height: 56upx;
+			line-height: 56upx;
+			padding: 0 18upx;
+			font-size: 26upx;
+			color: #666;
+			background: #f5f5f5;
+			border-radius: 8upx;
+			margin-right: 10upx;
+			&:last-child {
+				margin-right: 0;
+			}
+			&.active {
+				color: #fff;
+				background: #08b955;
+			}
+		}
 		.bar{
-			width: 50%;
+			flex: 1;
+			min-width: 0;
 			height: 100%;
 			text-align: center;
-			&:nth-child(1){
-				border-right: 1upx solid #eeeeec;
-			}
 		}
 	}
 	.main-view {

+ 44 - 4
ghsApp/src/admin/stat/distSale.vue

@@ -1,3 +1,6 @@
+<!--
+  片区业绩:按片区汇总笔数/扎数/金额/成本/利润;timeType 切换记账时间(bill) / 发货时间(send)。
+-->
 <template>
 <view class="app-content">
 	<view class="ex-page">
@@ -8,6 +11,11 @@
 		</view>
 
 		<view class="top-bar">
+			<!-- 记账时间 / 发货时间:只切换筛字段,不另开时间选择器 -->
+			<view class="time-type-row">
+				<view class="time-type-item" :class="{ active: params.timeType === 'bill' }" @click="changeTimeType('bill')">记账时间</view>
+				<view class="time-type-item" :class="{ active: params.timeType === 'send' }" @click="changeTimeType('send')">发货时间</view>
+			</view>
 			<DateSelect class="bar" top="0" @selectDateFn="selectDateFn" />
 		</view>
 
@@ -62,6 +70,8 @@ export default {
 				searchTime:'',
 				startTime: "",
 				endTime: "",
+				// bill=记账时间(默认) / send=发货时间
+				timeType: 'bill',
 			},
 			profile:[],
 			searchText:'',
@@ -82,6 +92,12 @@ export default {
 			this.params = {...this.params,...val}
 			this.init();			
 		},
+		/** 切换记账时间 / 发货时间并刷新 */
+		changeTimeType(type) {
+			if (this.params.timeType === type) return
+			this.params.timeType = type
+			this.init()
+		},
 		async init() {
 			this.getList();
 		},
@@ -108,15 +124,39 @@ export default {
 		left: 0;
 		top:130upx;
 		display: flex;
+		align-items: center;
 		width: 100%;
 		z-index: 20;
+		padding: 0 16upx;
+		box-sizing: border-box;
+		.time-type-row {
+			display: flex;
+			align-items: center;
+			flex-shrink: 0;
+			margin-right: 12upx;
+		}
+		.time-type-item {
+			height: 56upx;
+			line-height: 56upx;
+			padding: 0 18upx;
+			font-size: 26upx;
+			color: #666;
+			background: #f5f5f5;
+			border-radius: 8upx;
+			margin-right: 10upx;
+			&:last-child {
+				margin-right: 0;
+			}
+			&.active {
+				color: #fff;
+				background: #08b955;
+			}
+		}
 		.bar{
-			width: 50%;
+			flex: 1;
+			min-width: 0;
 			height: 100%;
 			text-align: center;
-			&:nth-child(1){
-				border-right: 1upx solid #eeeeec;
-			}
 		}
 	}
 	.main-view {

+ 45 - 5
ghsApp/src/admin/stat/kdIncome.vue

@@ -1,7 +1,15 @@
+<!--
+  收入统计:按渠道汇总笔数/金额;timeType 切换记账时间(bill) / 发货时间(send)。
+-->
 <template>
 <view class="app-content">
 	<view class="ex-page">
 		<view class="top-bar">
+			<!-- 记账时间 / 发货时间:只切换筛字段,不另开时间选择器 -->
+			<view class="time-type-row">
+				<view class="time-type-item" :class="{ active: params.timeType === 'bill' }" @click="changeTimeType('bill')">记账时间</view>
+				<view class="time-type-item" :class="{ active: params.timeType === 'send' }" @click="changeTimeType('send')">发货时间</view>
+			</view>
 			<DateSelect class="bar" top="0" @selectDateFn="selectDateFn" />
 		</view>
 		<view  class="main-view">
@@ -133,7 +141,9 @@ export default {
 				startTime: "",
 				endTime: "",
 				shopId: "",
-				contain:0
+				contain:0,
+				// bill=记账时间(默认) / send=发货时间
+				timeType: 'bill',
 			},
 			profile:[],
 			totalIncome:0,
@@ -180,6 +190,12 @@ export default {
 			this.params = {...this.params,...val}
 			this.init();			
 		},
+		/** 切换记账时间 / 发货时间并刷新 */
+		changeTimeType(type) {
+			if (this.params.timeType === type) return
+			this.params.timeType = type
+			this.init()
+		},
 		async init() {
 			this._list();
 		},
@@ -209,15 +225,39 @@ export default {
 		left: 0;
 		top:18upx;
 		display: flex;
+		align-items: center;
 		width: 100%;
 		z-index: 20;
+		padding: 0 16upx;
+		box-sizing: border-box;
+		.time-type-row {
+			display: flex;
+			align-items: center;
+			flex-shrink: 0;
+			margin-right: 12upx;
+		}
+		.time-type-item {
+			height: 56upx;
+			line-height: 56upx;
+			padding: 0 18upx;
+			font-size: 26upx;
+			color: #666;
+			background: #f5f5f5;
+			border-radius: 8upx;
+			margin-right: 10upx;
+			&:last-child {
+				margin-right: 0;
+			}
+			&.active {
+				color: #fff;
+				background: #08b955;
+			}
+		}
 		.bar{
-			width: 50%;
+			flex: 1;
+			min-width: 0;
 			height: 100%;
 			text-align: center;
-			&:nth-child(1){
-				border-right: 1upx solid #eeeeec;
-			}
 		}
 	}
 	.main-view {

+ 107 - 20
ghsApp/src/admin/stat/productSale.vue

@@ -1,12 +1,34 @@
+<!--
+  花材销售排行:按花材汇总数量/金额/毛利;timeType 切换记账时间(bill) / 发货时间(send)。
+-->
 <template>
 <view class="app-content">
 <view class="ex-page">
-	<view class="top-bar">
-		<DateSelect class="bar" top="0" @selectDateFn="selectDateFn" />
-		<button class="admin-button-com middle blue" style="margin-left:30upx;position: absolute;top:0;right:130upx;" @click="changeStaff()">
-			{{selectStaff.id == 0 ?'选采购人':selectStaff.name}}
-		</button>
-	</view>
+		<!-- 筛选区两行:上时间类型+采购人,下日期选择,避免互相遮挡 -->
+		<view class="filter-panel">
+			<view class="filter-row filter-row-main">
+				<view class="time-type-row">
+					<view
+						class="time-type-item"
+						:class="{ active: params.timeType === 'bill' }"
+						@click="changeTimeType('bill')"
+					>记账时间</view>
+					<view
+						class="time-type-item"
+						:class="{ active: params.timeType === 'send' }"
+						@click="changeTimeType('send')"
+					>发货时间</view>
+				</view>
+				<button
+					class="admin-button-com staff-btn"
+					:class="selectStaff.id == 0 ? 'default' : 'blue'"
+					@click="changeStaff()"
+				>{{ selectStaff.id == 0 ? '选采购人' : selectStaff.name }}</button>
+			</view>
+			<view class="filter-row filter-row-date">
+				<DateSelect class="bar" top="0" @selectDateFn="selectDateFn" />
+			</view>
+		</view>
 		<scroll-view scroll-y scroll-with-animation class="main-view">
 			<view class="space-view ex-table">
 				<block v-if="!$util.isEmpty(profile)">
@@ -98,7 +120,9 @@ export default {
 				endTime: "",
 				sort:"num",
 				staffId:0,
-				staffName:''
+				staffName:'',
+				// bill=记账时间(默认) / send=发货时间
+				timeType: 'bill',
 			},
 			profile:[],
 			staffData:[],
@@ -144,6 +168,12 @@ export default {
 			this.params = {...this.params,...val}
 			this.init();			
 		},
+		/** 切换记账时间 / 发货时间并刷新 */
+		changeTimeType(type) {
+			if (this.params.timeType === type) return
+			this.params.timeType = type
+			this.init()
+		},
 		rankByFn(rank){
 			this.getStatList(rank)
 		},
@@ -168,27 +198,84 @@ export default {
 <style lang="scss" scoped>
 .ex-page {
 	background: white;
-	padding-top:20upx;
+	padding-top: 12upx;
 	height: 100%;
 	display: flex;
 	flex-direction: column;
-	.top-bar {
-		position: absolute;
-		left: 0;
+	.filter-panel {
+		position: relative;
+		z-index: 20;
+		padding: 8upx 20upx 16upx;
+		background: #fff;
+		box-sizing: border-box;
+	}
+	.filter-row {
 		display: flex;
+		align-items: center;
 		width: 100%;
-		z-index: 20;
-		.bar{
-			width: 50%;
-			height: 100%;
-			text-align: center;
-			&:nth-child(1){
-				border-right: 1upx solid #eeeeec;
-			}
+	}
+	.filter-row-main {
+		justify-content: space-between;
+		margin-bottom: 12upx;
+	}
+	.filter-row-date {
+		min-height: 56upx;
+		padding: 0 8upx;
+		background: #f7f8fa;
+		border-radius: 12upx;
+		box-sizing: border-box;
+	}
+	.time-type-row {
+		display: flex;
+		align-items: center;
+		flex-shrink: 0;
+	}
+	.time-type-item {
+		height: 56upx;
+		line-height: 56upx;
+		padding: 0 22upx;
+		font-size: 26upx;
+		color: #666;
+		background: #f0f2f5;
+		border-radius: 28upx;
+		margin-right: 12upx;
+		&:last-child {
+			margin-right: 0;
 		}
+		&.active {
+			color: #fff;
+			background: #08b955;
+			font-weight: 600;
+		}
+	}
+	.staff-btn {
+		flex-shrink: 0;
+		height: 56upx;
+		line-height: 56upx;
+		min-width: 160upx;
+		max-width: 240upx;
+		padding: 0 24upx;
+		margin: 0;
+		font-size: 26upx;
+		border-radius: 28upx;
+		overflow: hidden;
+		text-overflow: ellipsis;
+		white-space: nowrap;
+		&.default {
+			color: #3385ff;
+			background: #eef5ff;
+			border: 1upx solid #b7d4ff;
+		}
+	}
+	.bar {
+		flex: 1;
+		min-width: 0;
+		width: 100%;
+		height: 100%;
+		text-align: center;
 	}
 	.main-view {
-		margin-top: 90upx;
+		margin-top: 0;
 		flex: 1;
 		background-color: #f9fbfc;
 		.space-view {

+ 44 - 5
hdApp/src/admin/stat/cgStat.vue

@@ -1,3 +1,6 @@
+<!--
+  供货商业绩:按供货商汇总数量/金额;timeType 切换记账时间(bill) / 发货时间(send)。
+-->
 <template>
 <view class="app-content">
 	<view class="ex-page">
@@ -7,6 +10,11 @@
 		</view>
 		</view>
 		<view class="top-bar">
+			<!-- 记账时间 / 发货时间:只切换筛字段,不另开时间选择器 -->
+			<view class="time-type-row">
+				<view class="time-type-item" :class="{ active: params.timeType === 'bill' }" @click="changeTimeType('bill')">记账时间</view>
+				<view class="time-type-item" :class="{ active: params.timeType === 'send' }" @click="changeTimeType('send')">发货时间</view>
+			</view>
 			<DateSelect class="bar" top="0" @selectDateFn="selectDateFn" />
 		</view>
 		<view class="main-view">
@@ -57,7 +65,8 @@ export default {
 				{ name: "开单数", dataIndex: "num", color: "info", align: "center" }
 			],
 			dataList: [],
-			params:{ itemId: '', searchTime:'', startTime: "", endTime: "", shopId: "", },
+			// timeType: bill=记账时间(默认) / send=发货时间
+			params:{ itemId: '', searchTime:'', startTime: "", endTime: "", shopId: "", timeType: 'bill', },
 			profile:[],
 			storageData:[],
 			searchContent:'',
@@ -106,6 +115,12 @@ export default {
 			this.params = {...this.params,...val}
 			this.init();			
 		},
+		/** 切换记账时间 / 发货时间并刷新 */
+		changeTimeType(type) {
+			if (this.params.timeType === type) return
+			this.params.timeType = type
+			this.init()
+		},
 		async init() {
 			this.getList();
 		},
@@ -137,15 +152,39 @@ export default {
 		left: 0;
 		top:116upx;
 		display: flex;
+		align-items: center;
 		width: 100%;
 		z-index: 20;
+		padding: 0 16upx;
+		box-sizing: border-box;
+		.time-type-row {
+			display: flex;
+			align-items: center;
+			flex-shrink: 0;
+			margin-right: 12upx;
+		}
+		.time-type-item {
+			height: 56upx;
+			line-height: 56upx;
+			padding: 0 18upx;
+			font-size: 26upx;
+			color: #666;
+			background: #f5f5f5;
+			border-radius: 8upx;
+			margin-right: 10upx;
+			&:last-child {
+				margin-right: 0;
+			}
+			&.active {
+				color: #fff;
+				background: #08b955;
+			}
+		}
 		.bar{
-			width: 50%;
+			flex: 1;
+			min-width: 0;
 			height: 100%;
 			text-align: center;
-			&:nth-child(1){
-				border-right: 1upx solid #eeeeec;
-			}
 		}
 	}
 	.main-view {

+ 44 - 4
hdApp/src/admin/stat/customSale.vue

@@ -1,3 +1,6 @@
+<!--
+  客户下单排行:按客户汇总数量/金额;timeType 切换记账时间(bill) / 发货时间(send)。
+-->
 <template>
 <view class="app-content">
 	<view class="ex-page">
@@ -8,6 +11,11 @@
 		</view>
 
 		<view class="top-bar">
+			<!-- 记账时间 / 发货时间:只切换筛字段,不另开时间选择器 -->
+			<view class="time-type-row">
+				<view class="time-type-item" :class="{ active: params.timeType === 'bill' }" @click="changeTimeType('bill')">记账时间</view>
+				<view class="time-type-item" :class="{ active: params.timeType === 'send' }" @click="changeTimeType('send')">发货时间</view>
+			</view>
 			<DateSelect class="bar" top="0" @selectDateFn="selectDateFn" />
 		</view>
 
@@ -89,6 +97,8 @@ export default {
 				startTime: "",
 				endTime: "",
 				shopId: "",
+				// bill=记账时间(默认) / send=发货时间
+				timeType: 'bill',
 			},
 			profile:[],
 			storageData:[],
@@ -138,6 +148,12 @@ export default {
 			this.params = {...this.params,...val}
 			this.init();			
 		},
+		/** 切换记账时间 / 发货时间并刷新 */
+		changeTimeType(type) {
+			if (this.params.timeType === type) return
+			this.params.timeType = type
+			this.init()
+		},
 		async init() {
 			this.getList();
 		},
@@ -189,15 +205,39 @@ export default {
 		left: 0;
 		top:116upx;
 		display: flex;
+		align-items: center;
 		width: 100%;
 		z-index: 20;
+		padding: 0 16upx;
+		box-sizing: border-box;
+		.time-type-row {
+			display: flex;
+			align-items: center;
+			flex-shrink: 0;
+			margin-right: 12upx;
+		}
+		.time-type-item {
+			height: 56upx;
+			line-height: 56upx;
+			padding: 0 18upx;
+			font-size: 26upx;
+			color: #666;
+			background: #f5f5f5;
+			border-radius: 8upx;
+			margin-right: 10upx;
+			&:last-child {
+				margin-right: 0;
+			}
+			&.active {
+				color: #fff;
+				background: #08b955;
+			}
+		}
 		.bar{
-			width: 50%;
+			flex: 1;
+			min-width: 0;
 			height: 100%;
 			text-align: center;
-			&:nth-child(1){
-				border-right: 1upx solid #eeeeec;
-			}
 		}
 	}
 	.main-view {

+ 45 - 5
hdApp/src/admin/stat/kdIncome.vue

@@ -1,7 +1,15 @@
+<!--
+  收入统计:按渠道汇总笔数/金额;timeType 切换记账时间(bill) / 发货时间(send)。
+-->
 <template>
 <view class="app-content">
 	<view class="ex-page">
 		<view class="top-bar">
+			<!-- 记账时间 / 发货时间:只切换筛字段,不另开时间选择器 -->
+			<view class="time-type-row">
+				<view class="time-type-item" :class="{ active: params.timeType === 'bill' }" @click="changeTimeType('bill')">记账时间</view>
+				<view class="time-type-item" :class="{ active: params.timeType === 'send' }" @click="changeTimeType('send')">发货时间</view>
+			</view>
 			<DateSelect class="bar" top="0" @selectDateFn="selectDateFn" />
 		</view>
 		<view  class="main-view">
@@ -129,7 +137,9 @@ export default {
 				startTime: "",
 				endTime: "",
 				shopId: "",
-				contain:0
+				contain:0,
+				// bill=记账时间(默认) / send=发货时间
+				timeType: 'bill',
 			},
 			profile:[],
 			totalIncome:0,
@@ -173,6 +183,12 @@ export default {
 			this.params = {...this.params,...val}
 			this.init();			
 		},
+		/** 切换记账时间 / 发货时间并刷新 */
+		changeTimeType(type) {
+			if (this.params.timeType === type) return
+			this.params.timeType = type
+			this.init()
+		},
 		async init() {
 			this.getIncomeList();
 		},
@@ -201,16 +217,40 @@ export default {
 		position: absolute;
 		left: 0;
 		display: flex;
+		align-items: center;
 		width: 100%;
 		top:20upx;
 		z-index: 20;
+		padding: 0 16upx;
+		box-sizing: border-box;
+		.time-type-row {
+			display: flex;
+			align-items: center;
+			flex-shrink: 0;
+			margin-right: 12upx;
+		}
+		.time-type-item {
+			height: 56upx;
+			line-height: 56upx;
+			padding: 0 18upx;
+			font-size: 26upx;
+			color: #666;
+			background: #f5f5f5;
+			border-radius: 8upx;
+			margin-right: 10upx;
+			&:last-child {
+				margin-right: 0;
+			}
+			&.active {
+				color: #fff;
+				background: #08b955;
+			}
+		}
 		.bar{
-			width: 50%;
+			flex: 1;
+			min-width: 0;
 			height: 100%;
 			text-align: center;
-			&:nth-child(1){
-				border-right: 1upx solid #eeeeec;
-			}
 		}
 	}
 	.main-view {