Browse Source

Merge branch 'master' of http://git.zthymaoyi.com/gdc/yiliangyiyun-app

gjy 2 years ago
parent
commit
a300d9d9b2
1 changed files with 5 additions and 4 deletions
  1. 5 4
      pages/dataReport/costbreakdown.vue

+ 5 - 4
pages/dataReport/costbreakdown.vue

@@ -89,9 +89,9 @@
 			}
 		},
 		onLoad(options) {
-			console.log(options.data)
+			console.log(options)
 
-			if (options.type == 1) {
+			if (options.type == 2) {
 				// 获取月份的天数
 				let _days = new Date(options.data.split('-')[0], options.data.split('-')[1], 0).getDate()
 				console.log(_days)
@@ -99,7 +99,7 @@
 					startDate: options.data + '-01',
 					endDate: options.data + '-' + _days
 				}
-			} else if (options.type == 2) {
+			} else if (options.type == 1) {
 				this.expenseInfo = {
 					startDate: options.data + '-01-01',
 					endDate: options.data + '-12-31'
@@ -204,7 +204,8 @@
 					searchType: this.searchType,
 					expenseName: this.expenseName,
 					startDate: this.expenseInfo.startDate,
-					endDate: this.expenseInfo.endDate
+					endDate: this.expenseInfo.endDate,
+					compId:uni.getStorageSync("pcUserInfo").compId
 				}).then(res => {
 					if (res.data.code) {
 						uni.hideLoading()