shish 2 лет назад
Родитель
Сommit
02fa7de03f
1 измененных файлов с 7 добавлено и 0 удалено
  1. 7 0
      hdApp/src/admin/stat/cgItem.vue

+ 7 - 0
hdApp/src/admin/stat/cgItem.vue

@@ -14,6 +14,11 @@
 				<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>
+						<t-tr>
+							<t-td><view style="color:black;">合计</view></t-td>
+							<t-td><view style="color:black;">{{info.totalNum?parseFloat(info.totalNum):0}}</view></t-td>
+							<t-td><view style="color:black;">{{info.totalAmount?parseFloat(info.totalAmount):0}}</view></t-td>
+						</t-tr>
 						<view v-for="(item, index) in profile" :key="index" @click="goDetail(item)">
 							<t-tr>
 								<t-td><view>{{item.name}}</view></t-td>
@@ -62,6 +67,7 @@ export default {
 			profile:[],
 			storageData:[],
 			searchContent:'',
+			info:{}
 		};
 	},
 	onPullDownRefresh() {
@@ -117,6 +123,7 @@ export default {
 				uni.hideLoading()
 				if (!this.$util.isEmpty(res.data.list)) {
 					that.storageData = res.data.list
+					that.info = res.data ? res.data : []
 					that.filterStat()
 				}else{
 					that.storageData=[]