Переглянути джерело

添加单台机器销售数据可根据支付方式查询

soobin 2 роки тому
батько
коміт
e0c8ce36e7

+ 12 - 1
packageB/pages/char/elseStatistics.vue

@@ -1,7 +1,7 @@
 <!-- 单一统计图表 -->
 <template>
 	<view>
-		<mainStatistics :pname="pnameData" :equipmentId="equipmentIdData" :adminId="adminIdData"></mainStatistics>
+		<mainStatistics :pname="pnameData" :equipmentId="equipmentIdData" :adminId="adminIdData" :isForeign="isForeignData"></mainStatistics>
 	</view>
 </template>
 
@@ -15,6 +15,7 @@
 				equipmentId: '',
 				adminId: '',
 				pname: '',
+				isForeign: 0,
 			}
 		},
 		computed: {
@@ -34,6 +35,12 @@
 					return this.pname;
 				}
 			},
+			isForeignData:{
+				get(){
+					// console.log(this.isForeign);
+					return this.isForeign;
+				}
+			},
 		},
 		onShow() {
 			uni.setNavigationBarTitle({
@@ -41,6 +48,10 @@
 			});	
 		},
 		onLoad(option){
+			var globalUser = uni.getStorageSync("globalUser");
+			console.log(globalUser);
+			this.isForeign = globalUser.ifForeign;
+			console.log(this.isForeign);
 			this.equipmentId = option['equipmentId'];
 			this.adminId = option['adminId'];
 			this.pname = option['pname'];

+ 2 - 1
pages/Charts/mainStatistics.vue

@@ -259,6 +259,7 @@
 			equipmentId: '',
 			adminId: '',
 			pname: '',
+			isForeign: 0,
 		},
 		data() {
 			return {
@@ -300,7 +301,7 @@
 				noticeId: '',
 				msgType: 'success',
 				scrollHeight: uni.getSystemInfoSync().windowHeight - 130,
-				ifForeign:0,
+				ifForeign: this.isForeign,
 				langAbbrs:false,
 				localPname: this.pname,
 			}