Bladeren bron

Merge branch 'develop_szhj08' of http://git.chelingzhu.com/jianguan-web/qpls-md-app into develop_szhj08

chenrui 2 jaren geleden
bovenliggende
commit
c28f4eecd2
3 gewijzigde bestanden met toevoegingen van 37 en 26 verwijderingen
  1. 4 2
      pages/shuntBackManage/shelfList.vue
  2. 5 8
      pages/soldOut/shelfList.vue
  3. 28 16
      pages/statistics/index.vue

+ 4 - 2
pages/shuntBackManage/shelfList.vue

@@ -66,13 +66,15 @@ export default {
 			pageSize: 20
 		};
 	},
-	onLoad() {
-		this.getShelfList();
+	onReady() {
 		uni.setNavigationBarColor({
 			frontColor: '#ffffff',
 			backgroundColor: this.$config('primaryColor')
 		})
 	},
+	onLoad() {
+		this.getShelfList();
+	},
 	methods: {
 		clearSearch() {
 			this.pageNo = 1;

+ 5 - 8
pages/soldOut/shelfList.vue

@@ -102,14 +102,11 @@
 				}
 			}
 		},
-		onLoad(opts) {
-			 uni.setNavigationBarColor({
-			 	frontColor: '#ffffff',
-			 	backgroundColor: this.$config('primaryColor')
-			 })
-		},
-		onUnload() {
-			uni.$off("setCustome")
+		onReady() {
+			uni.setNavigationBarColor({
+				frontColor: '#ffffff',
+				backgroundColor: this.$config('primaryColor')
+			})
 		},
 		onShow() {
 			this.search()

+ 28 - 16
pages/statistics/index.vue

@@ -173,6 +173,7 @@
 					}
 				],
 				curTab: '4',
+				searcTab: '', // 实际查询条件
 				webView: null
 			}
 		},
@@ -199,8 +200,13 @@
 		},
 		onNavigationBarButtonTap() {
 			this.showSearch = true
+			this.curTab = this.searcTab
 		},
 		onBackPress() {
+			if(this.showDate){
+				this.showDate = false
+				return true
+			}
 			if(this.showSearch){
 				this.showSearch = false
 				return true
@@ -212,25 +218,10 @@
 				this.dateArray = date.startDate + ' ~ ' + date.endDate
 				this.queryPramas.beginDate = date.startDate + ' 00:00:00'
 				this.queryPramas.endDate = date.endDate + ' 23:59:59'
-				//#ifdef APP-PLUS
-				this.webView.setTitleNViewButtonStyle(0, {
-					"text":"\ue626 "+date.startDate.substr(5)+"至"+date.endDate.substr(5),
-					"color": "#00aaff",
-					"width": "130px"
-				});
-				//#endif
 			},
 			tabChange(data){
 				this.curTab = data.val
-				if(data.val != 6){
-					//#ifdef APP-PLUS
-					this.webView.setTitleNViewButtonStyle(0, {
-						"text":"\ue626 "+data.name,
-						"color": "#00aaff",
-						"width": "80px"
-					});
-					//#endif
-				}else{
+				if(data.val == 6){
 					this.dateArray = ''
 					this.queryPramas.beginDate = ''
 					this.queryPramas.endDate = ''
@@ -239,6 +230,7 @@
 			// 重置
 			handleClean(){
 				this.tabChange(this.placeTab[2])
+				this.searcTab = this.placeTab[2].val
 				this.$refs.rangeDate.init()
 				this.showSearch = false
 				this.getServerData()
@@ -325,6 +317,26 @@
 					  this.opts1 = this.getOpts(res.data.orderDateList)
 					  this.chartData2 = this.getFormatData(res.data.tempDateList,res.data.tempAmountList,"急送产品金额")
 					  this.opts2 = this.getOpts(res.data.tempDateList)
+					  
+					  // 不是自定义时间段
+					  if(this.curTab != 6){
+						  //#ifdef APP-PLUS
+						  this.webView.setTitleNViewButtonStyle(0, {
+						  	"text":"\ue626 "+ this.placeTab[this.curTab].name,
+						  	"color": "#00aaff",
+						  	"width": "80px"
+						  });
+						  //#endif
+					  }else{
+						  //#ifdef APP-PLUS
+						  this.webView.setTitleNViewButtonStyle(0, {
+						  	"text":"\ue626 "+this.queryPramas.beginDate.substr(5,5)+"至"+this.queryPramas.endDate.substr(5,5),
+						  	"color": "#00aaff",
+						  	"width": "130px"
+						  });
+						  //#endif
+					  }
+					  this.searcTab = this.curTab
 				  }
 			  })
 			},