瀏覽代碼

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

chenrui 2 年之前
父節點
當前提交
8d69cea571
共有 3 個文件被更改,包括 19 次插入9 次删除
  1. 9 4
      pages/statistics/index.vue
  2. 7 3
      pages/vinAnalyse/fitProductlist.vue
  3. 3 2
      pages/vinAnalyse/shelfAnalyse.vue

+ 9 - 4
pages/statistics/index.vue

@@ -29,6 +29,7 @@
 						  :opts="opts"
 						  :ontouch="true"
 					      :chartData="chartData"
+						  @complete="complete"
 					    />
 				</div>
 			</div>
@@ -56,6 +57,7 @@
 						  :opts="opts1"
 						  :ontouch="true"
 					      :chartData="chartData1"
+						  @complete="complete"
 					    />
 				</div>
 			</div>
@@ -83,6 +85,7 @@
 						  :opts="opts2"
 						  :ontouch="true"
 					      :chartData="chartData2"
+						  @complete="complete"
 					    />
 				</div>
 			</div>
@@ -111,11 +114,9 @@
 </template>
 
 <script>
-	import chooseShelf from './chooseShelf.vue'
 	import { salesStatistics } from '@/api/sales.js'
 	import getDate from '@/libs/getDate.js'
 	export default {
-		components: { chooseShelf },
 		data() {
 			return {
 				customerSn: '',
@@ -126,7 +127,7 @@
 				opts: {},
 				opts1:{},
 				opts2:{},
-				allData: null,
+				allData: {xprhFlag:true},
 				showSearch: false,
 				showDate: false,
 				dateArray: '',
@@ -180,6 +181,7 @@
 				this.customerSn = data.customerSn
 				this.curCustomerName = data.customerName
 				this.queryPramas.buyerSn = data.customerSn
+				this.getServerData()
 			})
 			//#ifdef APP-PLUS
 			this.webView = this.$mp.page.$getAppWebview(); 
@@ -240,6 +242,9 @@
 				this.showSearch = false
 				this.getServerData()
 			},
+			complete(data){
+				console.log(data)
+			},
 			// 查询
 			handleSearch(){
 				if(this.curTab == 6){
@@ -312,7 +317,7 @@
 			  }
 			  salesStatistics(Object.assign(this.queryPramas,params)).then(res => {
 				  if(res.status == 200){
-					  this.allData = res.data
+					  this.allData = JSON.parse(JSON.stringify(res.data))
 					  this.chartData = this.getFormatData(res.data.salesDateList,res.data.salesAmountList,"销售金额")
 					  this.opts = this.getOpts(res.data.salesDateList)
 					  this.chartData1 = this.getFormatData(res.data.orderDateList,res.data.orderAmountList,"取货产品金额")

+ 7 - 3
pages/vinAnalyse/fitProductlist.vue

@@ -88,6 +88,7 @@ export default {
 			isSortFlag: 0,
 			list: [],
 			shelfSn: '',
+			shelfName: '',
 			pageNo: 1,
 			pageSize: 10,
 			noDataText: '暂无数据',
@@ -99,21 +100,24 @@ export default {
 				borderColor: this.$config('primaryColor'),
 				backgroundColor: this.$config('primaryColor'),
 				color: '#fff'
-			}
+			},
 		};
 	},
 	onLoad(options) {
 		this.theme = getApp().globalData.theme;
 		this.shelfSn = options.shelfSn;
+		this.shelfName = options.shelfName;
 		let ajaxData = {
 			pageNo: this.pageNo,
 			pageSize: this.pageSize,
 			shelfSn: this.shelfSn
 		};
 		this.loadData(ajaxData);
+	},
+	onReady() {
 		uni.setNavigationBarTitle({
-			title: options.shelfName
-		});
+			title: this.shelfName
+		})
 	},
 	onBackPress(e) {
 		if (this.sortShow) {

+ 3 - 2
pages/vinAnalyse/shelfAnalyse.vue

@@ -186,7 +186,6 @@
 		onLoad(option) {
 			this.shelfSn = option.shelfSn
 			this.shelfName = option.shelfName
-			console.log('222:',option.shelfName)
 			let ajaxData={
 				shelfSn:option.shelfSn,
 				pageNo: this.pageNo, 
@@ -194,8 +193,10 @@
 			}
 			this.getList(ajaxData);
 			this.theme = getApp().globalData.theme;
+		},
+		onReady() {
 			uni.setNavigationBarTitle({
-				title:option.shelfName
+				title: this.shelfName
 			})
 		},
 		methods:{