lilei 2 yıl önce
ebeveyn
işleme
7acc3a2326
1 değiştirilmiş dosya ile 8 ekleme ve 3 silme
  1. 8 3
      pages/statistics/index.vue

+ 8 - 3
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: '',
@@ -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,"取货产品金额")