shish 2 дней назад
Родитель
Сommit
46a93fd688
2 измененных файлов с 99 добавлено и 9 удалено
  1. 49 4
      ghsApp/src/admin/stat/customSale.vue
  2. 50 5
      ghsApp/src/admin/stat/productSale.vue

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

@@ -15,6 +15,29 @@
 			<view class="space-view ex-table">
 			<view class="space-view ex-table">
 				<block>
 				<block>
 					<t-table :headerBackgroundColor="'#F0F2F6'">
 					<t-table :headerBackgroundColor="'#F0F2F6'">
+						<!-- 合计在表头上方:五项同一行,颜色用主题蓝,和灰色表头区分 -->
+						<view class="stat-summary">
+							<view class="stat-summary-item">
+								<view class="stat-summary-label">笔数</view>
+								<view class="stat-summary-value">{{profile.totalNum||0}}</view>
+							</view>
+							<view class="stat-summary-item">
+								<view class="stat-summary-label">扎数</view>
+								<view class="stat-summary-value">{{totalCount}}</view>
+							</view>
+							<view class="stat-summary-item">
+								<view class="stat-summary-label">收入</view>
+								<view class="stat-summary-value">¥{{profile.totalAmount||0}}</view>
+							</view>
+							<view class="stat-summary-item">
+								<view class="stat-summary-label">成本</view>
+								<view class="stat-summary-value">¥{{profile.totalCost||0}}</view>
+							</view>
+							<view class="stat-summary-item">
+								<view class="stat-summary-label">利润</view>
+								<view class="stat-summary-value">¥{{profile.totalProfit||0}}</view>
+							</view>
+						</view>
 						<!-- 客户名改为行标题独占一行,表头只保留 5 列指标,避免 6 列均分把长名称挤成单字换行 -->
 						<!-- 客户名改为行标题独占一行,表头只保留 5 列指标,避免 6 列均分把长名称挤成单字换行 -->
 						<t-tr header>
 						<t-tr header>
 							<t-th>笔数</t-th>
 							<t-th>笔数</t-th>
@@ -35,7 +58,6 @@
 									</t-tr>
 									</t-tr>
 								</view>
 								</view>
 							</block>
 							</block>
-							<t-tr><t-td><view class="sale-total">{{profile.totalNum||0}}笔 {{totalCount}}扎 收入¥{{profile.totalAmount||0}} 成本¥{{ profile.totalCost||0 }} 利润¥{{ profile.totalProfit||0 }}</view></t-td></t-tr>
 					</t-table>
 					</t-table>
 				</block>
 				</block>
 			</view>
 			</view>
@@ -201,10 +223,33 @@ export default {
 				font-size: 28upx;
 				font-size: 28upx;
 				white-space: nowrap;
 				white-space: nowrap;
 			}
 			}
-			.sale-total {
-				color: black;
+			/* 合计五项同一行;排不下才换行。数值用主题蓝,和灰色表头区分 */
+			.stat-summary {
+				display: flex;
+				flex-direction: row;
+				flex-wrap: wrap;
+				background: #F7F8FA;
+				padding: 16upx 8upx 4upx;
+				border-bottom: 1upx solid #eeeeee;
+			}
+			.stat-summary-item {
+				flex: 1;
+				min-width: 120upx;
+				display: flex;
+				flex-direction: column;
+				align-items: center;
+				margin-bottom: 12upx;
+			}
+			.stat-summary-label {
+				font-size: 24upx;
+				color: #666666;
+				margin-bottom: 6upx;
+			}
+			.stat-summary-value {
+				font-size: 24upx;
 				font-weight: bold;
 				font-weight: bold;
-				font-size: 28upx;
+				color: #333333;
+				text-align: center;
 				word-break: break-all;
 				word-break: break-all;
 			}
 			}
 		}
 		}

+ 50 - 5
ghsApp/src/admin/stat/productSale.vue

@@ -11,6 +11,23 @@
 			<view class="space-view ex-table">
 			<view class="space-view ex-table">
 				<block v-if="!$util.isEmpty(profile)">
 				<block v-if="!$util.isEmpty(profile)">
 					<t-table :headerBackgroundColor="'#F0F2F6'">
 					<t-table :headerBackgroundColor="'#F0F2F6'">
+						<!-- 合计在表头上方:三项同一行,标签在上数值在下 -->
+						<view class="stat-summary">
+							<view class="stat-summary-row">
+								<view class="stat-summary-item">
+									<view class="stat-summary-label">扎数</view>
+									<view class="stat-summary-value">{{profile.totalNum||0}}</view>
+								</view>
+								<view class="stat-summary-item">
+									<view class="stat-summary-label">收入</view>
+									<view class="stat-summary-value">¥{{profile.totalAmount||0}}</view>
+								</view>
+								<view class="stat-summary-item">
+									<view class="stat-summary-label">总毛利</view>
+									<view class="stat-summary-value">¥{{profile.totalMl?parseFloat(profile.totalMl):0}}</view>
+								</view>
+							</view>
+						</view>
 						<t-tr header>
 						<t-tr header>
 						<t-th>花材</t-th>
 						<t-th>花材</t-th>
 						<t-th><view @click="rankByFn('num')">总数量<i class="iconfont iconsanjiao_xia"></i></view></t-th>
 						<t-th><view @click="rankByFn('num')">总数量<i class="iconfont iconsanjiao_xia"></i></view></t-th>
@@ -18,11 +35,6 @@
 						<t-th><view @click="rankByFn('gross')">毛利<i class="iconfont iconsanjiao_xia"></i></view></t-th>
 						<t-th><view @click="rankByFn('gross')">毛利<i class="iconfont iconsanjiao_xia"></i></view></t-th>
 						<t-th><view @click="rankByFn('mll')">毛利率<i class="iconfont iconsanjiao_xia"></i></view></t-th>
 						<t-th><view @click="rankByFn('mll')">毛利率<i class="iconfont iconsanjiao_xia"></i></view></t-th>
 						</t-tr>
 						</t-tr>
-						<t-tr>
-							<t-td>
-								<view style="color:black;font-weight:bold;font-size:28upx;">{{profile.totalNum||0}}扎 收入¥{{profile.totalAmount||0}} 总毛利¥{{profile.totalMl?parseFloat(profile.totalMl):0}}</view>
-							</t-td>
-						</t-tr>
 						<block v-if="profile.list && !$util.isEmpty(profile.list)">
 						<block v-if="profile.list && !$util.isEmpty(profile.list)">
 							<view v-for="(item, index) in profile.list" :key="index">
 							<view v-for="(item, index) in profile.list" :key="index">
 								<t-tr>
 								<t-tr>
@@ -59,6 +71,10 @@
 </view>
 </view>
 </template>
 </template>
 <script>
 <script>
+/**
+ * ghsApp 花材销售排行:按花材汇总数量/金额/毛利/毛利率。
+ * 工作台进入;合计条与客户业绩页同一套「标签+数值」排版。
+ */
 import AppWrapperEmpty from "@/components/app-wrapper-empty";
 import AppWrapperEmpty from "@/components/app-wrapper-empty";
 import { getStatItemShow } from "@/api/stat";
 import { getStatItemShow } from "@/api/stat";
 import { getAllStaff } from "@/api/shop-admin";
 import { getAllStaff } from "@/api/shop-admin";
@@ -203,6 +219,35 @@ export default {
 			::v-deep.icon-info {
 			::v-deep.icon-info {
 				color: #333333;
 				color: #333333;
 			}
 			}
+			/* 合计条:扎数/收入/总毛利三项均分,标签在上数值在下 */
+			.stat-summary {
+				background: #F7F8FA;
+				padding: 20upx 16upx 8upx;
+				border-bottom: 1upx solid #eeeeee;
+			}
+			.stat-summary-row {
+				display: flex;
+				flex-direction: row;
+			}
+			.stat-summary-item {
+				flex: 1;
+				display: flex;
+				flex-direction: column;
+				align-items: center;
+				margin-bottom: 12upx;
+			}
+			.stat-summary-label {
+				font-size: 22upx;
+				color: #999999;
+				margin-bottom: 8upx;
+			}
+			.stat-summary-value {
+				font-size: 28upx;
+				font-weight: bold;
+				color: #333333;
+				text-align: center;
+				word-break: break-all;
+			}
 		}
 		}
 	}
 	}
 	.bar-view {
 	.bar-view {