Browse Source

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

chenrui 2 năm trước cách đây
mục cha
commit
6d4e78c889
1 tập tin đã thay đổi với 34 bổ sung0 xóa
  1. 34 0
      pages/statistics/index.vue

+ 34 - 0
pages/statistics/index.vue

@@ -26,6 +26,8 @@
 					</div>
 					<qiun-data-charts 
 					      type="line"
+						  :opts="opts"
+						  :ontouch="true"
 					      :chartData="chartData"
 					    />
 				</div>
@@ -51,6 +53,8 @@
 					</div>
 					<qiun-data-charts 
 					      type="line"
+						  :opts="opts1"
+						  :ontouch="true"
 					      :chartData="chartData1"
 					    />
 				</div>
@@ -76,6 +80,8 @@
 					</div>
 					<qiun-data-charts 
 					      type="line"
+						  :opts="opts2"
+						  :ontouch="true"
 					      :chartData="chartData2"
 					    />
 				</div>
@@ -117,6 +123,9 @@
 				chartData: {},
 				chartData1: {},
 				chartData2: {},
+				opts: {},
+				opts1:{},
+				opts2:{},
 				allData: null,
 				showSearch: false,
 				showDate: false,
@@ -172,7 +181,9 @@
 				this.curCustomerName = data.customerName
 				this.queryPramas.buyerSn = data.customerSn
 			})
+			//#ifdef APP-PLUS
 			this.webView = this.$mp.page.$getAppWebview(); 
+			//#endif
 			// 默认数据
 			this.tabChange(this.placeTab[2])
 		},
@@ -217,9 +228,11 @@
 					this.queryPramas.endDate = ''
 				}
 			},
+			// 重置
 			handleClean(){
 				this.tabChange(this.placeTab[2])
 				this.showSearch = false
+				this.getServerData()
 			},
 			// 查询
 			handleSearch(){
@@ -256,6 +269,21 @@
 					]
 			  }
 			},
+			getOpts(data){
+				return {
+					enableScroll: true,
+					xAxis: {
+					  disableGrid: true,
+					  itemCount: 4,
+					  scrollShow: data.length > 4,
+					  scrollAlign:'right'
+					},
+					yAxis: {
+					  gridType: "dash",
+					  dashLength: 2
+					},
+				}
+			},
 			getQueryDate(){
 				const fun = [
 					getDate.getToday,
@@ -280,8 +308,11 @@
 				  if(res.status == 200){
 					  this.allData = 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,"取货产品金额")
+					  this.opts1 = this.getOpts(res.data.orderDateList)
 					  this.chartData2 = this.getFormatData(res.data.tempDateList,res.data.tempAmountList,"急送产品金额")
+					  this.opts2 = this.getOpts(res.data.tempDateList)
 				  }
 			  })
 			},
@@ -341,6 +372,9 @@
 				}
 			}
 		}
+		.card-body{
+			overflow: auto;
+		}
 	}
 	// 筛选
 	.tabBox{