shish 4 лет назад
Родитель
Сommit
6077c6f899
2 измененных файлов с 14 добавлено и 6 удалено
  1. 6 0
      ghsApp/src/admin/home/workbench.vue
  2. 8 6
      ghsApp/src/admin/stat/wastage.vue

+ 6 - 0
ghsApp/src/admin/home/workbench.vue

@@ -24,6 +24,12 @@
 						{{ $util.numberFormat(data.todayData.visitCustom) || 0 }}
 						{{ $util.numberFormat(data.todayData.visitCustom) || 0 }}
 					</div>
 					</div>
 				</navigator>
 				</navigator>
+				<navigator url="/admin/stat/wastage" class="info-list">
+					<div class="info-list-name">报损</div>
+					<div class="info-list-value">
+						{{ $util.numberFormat(data.todayData.wastage) || 0 }}
+					</div>
+				</navigator>
 				<navigator url="/admin/stat/profit" class="info-list">
 				<navigator url="/admin/stat/profit" class="info-list">
 					<div class="info-list-name">支出</div>
 					<div class="info-list-name">支出</div>
 					<div class="info-list-value">
 					<div class="info-list-value">

+ 8 - 6
ghsApp/src/admin/stat/wastage.vue

@@ -1,13 +1,10 @@
 <template>
 <template>
 <view class="app-content">
 <view class="app-content">
 	<view class="ex-page">
 	<view class="ex-page">
-
-
-
         <view class="top-bar">
         <view class="top-bar">
             <DateSelect class="bar" top="0" @selectDateFn="selectDateFn" />
             <DateSelect class="bar" top="0" @selectDateFn="selectDateFn" />
         </view>
         </view>
-		<scroll-view scroll-y scroll-with-animation class="main-view">
+		<view scroll-y scroll-with-animation class="main-view">
 			<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'">
@@ -22,7 +19,8 @@
 					</t-table>
 					</t-table>
 				</block>
 				</block>
 			</view>
 			</view>
-		</scroll-view>
+			<view style="margin-top:30upx;margin-left:80upx;font-size:30upx;">合计:{{totalNum}}扎 <text style="margin-left:18upx;">{{totalCost}}元</text></view>
+		</view>
 	</view>
 	</view>
 </view>
 </view>
 </template>
 </template>
@@ -53,7 +51,9 @@ export default {
 				startTime: "",
 				startTime: "",
 				endTime: ""
 				endTime: ""
 			},
 			},
-			profile:[]
+			profile:[],
+			totalNum:0,
+			totalCost:0
 		};
 		};
 	},
 	},
 	onPullDownRefresh() {
 	onPullDownRefresh() {
@@ -81,6 +81,8 @@ export default {
 			getWastage(this.params).then(res => {
 			getWastage(this.params).then(res => {
 				uni.hideLoading()
 				uni.hideLoading()
                 this.profile = res.data.stat
                 this.profile = res.data.stat
+				this.totalNum = res.data.totalNum ? parseFloat(res.data.totalNum) : 0
+				this.totalCost = res.data.totalCost ? parseFloat(res.data.totalCost):0
 			});
 			});
 		}
 		}
 	}
 	}