Ver Fonte

运费统计

shish há 3 anos atrás
pai
commit
da59c32506
1 ficheiros alterados com 13 adições e 11 exclusões
  1. 13 11
      ghsApp/src/admin/stat/cgFreight.vue

+ 13 - 11
ghsApp/src/admin/stat/cgFreight.vue

@@ -9,16 +9,18 @@
 				<block>
 					<t-table :headerBackgroundColor="'#F0F2F6'">
 						<t-tr header><t-th>时间</t-th><t-th>打包</t-th><t-th>短途</t-th><t-th>长途</t-th><t-th>提货</t-th><t-th>本地</t-th></t-tr>
-						<view v-for="(item, index) in profile.list" :key="index">
-							<t-tr>
-								<t-td><view style="color:#333333;">{{item.entryTime.substr(5,5)}}</view></t-td>
-								<t-td><view style="color:#333333;">{{item.packingCharge?parseFloat(item.packingCharge):0}}</view></t-td>
-								<t-td><view style="color:#333333;">{{item.shortCharge?parseFloat(item.shortCharge):0}}</view></t-td>
-								<t-td><view style="color:#333333;">{{item.longCharge?parseFloat(item.longCharge):0}}</view></t-td>
-								<t-td><view style="color:#333333;">{{item.pickCharge?parseFloat(item.pickCharge):0}}</view></t-td>
-								<t-td><view style="color:#333333;">{{item.localCharge?parseFloat(item.localCharge):0}}</view></t-td>
-							</t-tr>
-						</view>
+						<block v-if=" profile.list && !$util.isEmpty(profile.list)">
+							<view v-for="(item, index) in profile.list" :key="index">
+								<t-tr>
+									<t-td><view style="color:#333333;">{{item.entryTime.substr(5,5)}}</view></t-td>
+									<t-td><view style="color:#333333;">{{item.packingCharge?parseFloat(item.packingCharge):0}}</view></t-td>
+									<t-td><view style="color:#333333;">{{item.shortCharge?parseFloat(item.shortCharge):0}}</view></t-td>
+									<t-td><view style="color:#333333;">{{item.longCharge?parseFloat(item.longCharge):0}}</view></t-td>
+									<t-td><view style="color:#333333;">{{item.pickCharge?parseFloat(item.pickCharge):0}}</view></t-td>
+									<t-td><view style="color:#333333;">{{item.localCharge?parseFloat(item.localCharge):0}}</view></t-td>
+								</t-tr>
+							</view>
+						</block>
 						<t-tr>
 							<t-td><view style="color:black;font-weight:bold;">合计</view></t-td>
 							<t-td><view style="color:black;font-weight:bold;">{{profile.total.packingCharge?parseFloat(profile.total.packingCharge):0}}</view></t-td>
@@ -67,7 +69,7 @@ export default {
 			showShopDropdown: false,
 			dataList: [],
 			params:{ itemId: '', searchTime:'', startTime: "", endTime: "", shopId: "", },
-			profile:[],
+			profile:{total:{packingCharge:0,shortCharge:0,longCharge:0,pickCharge:0,localCharge:0},list:[]},
 			storageData:[],
 			searchContent:'',
 		};