gjy 3 年之前
父節點
當前提交
18c579b609
共有 5 個文件被更改,包括 66 次插入9 次删除
  1. 2 2
      config/index.js
  2. 4 2
      pages.json
  3. 30 1
      pages/user/contractLook/purchaseContract.vue
  4. 27 1
      pages/user/contractLook/salesContract.vue
  5. 3 3
      pages/user/report.vue

+ 2 - 2
config/index.js

@@ -2,8 +2,8 @@ const dev = {
 	baseUrl: 'https://www.zthymaoyi.com',
 	// baseUrl: 'http://localhost:8080/',
 	// baseUrlNew: 'http://192.168.1.119:9100/',
-	// baseUrlNew: 'http://192.168.1.117:8090/',
-	baseUrlNew: 'http://api1.eliangeyun.com/',
+	baseUrlNew: 'http://192.168.1.117:8090/',
+	// baseUrlNew: 'http://api1.eliangeyun.com/',
 	h5Appid: 'wxb66b599f7f61b46f',
 	debug: false
 }

+ 4 - 2
pages.json

@@ -375,13 +375,15 @@
 		{
 			"path": "pages/user/contractLook/purchaseContract",
 			"style": {
-				"navigationBarTitleText": "采购合同"
+				"navigationBarTitleText": "采购合同",
+				"enablePullDownRefresh": true
 			}
 		},
 		{
 			"path": "pages/user/contractLook/salesContract",
 			"style": {
-				"navigationBarTitleText": "销售合同"
+				"navigationBarTitleText": "销售合同",
+				"enablePullDownRefresh": true
 			}
 		},
 		{

+ 30 - 1
pages/user/contractLook/purchaseContract.vue

@@ -67,8 +67,29 @@
 				title: "加载中",
 				mask: true
 			})
+			
 			this.init()
 		},
+		
+		onReachBottom() {
+			let _self = this
+			uni.showLoading({
+				title: "加载中",
+				mask: true
+			})
+			setTimeout(function() {
+				_self.currentPage++;
+				_self.init();
+			}, 2000);
+		},
+		onPullDownRefresh() {
+			let _self = this
+				setTimeout(function() {
+					uni.stopPullDownRefresh();//停止当前页面下拉刷新
+					_self.currentPage=0;
+					_self.init();
+				}, 1000);
+		},
 		methods: {
 			keyWordChange(e){
 				this.searchKeyWord=e
@@ -77,13 +98,21 @@
 					mask: true
 				})
 				this.init()
+				
 			},
 			init() {
 				this.$api.doRequest('get', '/contractManagementInfo/selectInfo',
 				{compId:uni.getStorageSync('pcUserInfo').compId,
 				contractType: this.contractType,goodsType:1,currentPage: this.currentPage,pageSize: this.pageSize,searchKeyWord:this.searchKeyWord}).then(res => {
 					uni.hideLoading()
-					this.contractList=res.data.data.records
+					if(res.data.data.records.length==0){
+						uni.showToast({title:'没有更多数据了',icon:"none"});
+					}
+					if(this.currentPage!=0){
+						this.contractList=this.contractList.concat(res.data.data.records)
+					}else{
+						this.contractList=res.data.data.records
+					}
 				})
 			},
 			getdata(e) {

+ 27 - 1
pages/user/contractLook/salesContract.vue

@@ -69,6 +69,25 @@
 			})
 			this.init()
 		},
+		onReachBottom() {
+			let _self = this
+			uni.showLoading({
+				title: "加载中",
+				mask: true
+			})
+			setTimeout(function() {
+				_self.currentPage++;
+				_self.init();
+			}, 2000);
+		},
+		onPullDownRefresh() {
+			let _self = this
+				setTimeout(function() {
+					uni.stopPullDownRefresh();//停止当前页面下拉刷新
+					_self.currentPage=0;
+					_self.init();
+				}, 1000);
+		},
 		methods: {
 			keyWordChange(e){
 				this.searchKeyWord=e
@@ -83,7 +102,14 @@
 				{compId:uni.getStorageSync('pcUserInfo').compId,
 				contractType: this.contractType,goodsType:1,currentPage: this.currentPage,pageSize: this.pageSize,searchKeyWord:this.searchKeyWord}).then(res => {
 					uni.hideLoading()
-					this.contractList=res.data.data.records
+					if(res.data.data.records.length==0){
+						uni.showToast({title:'没有更多数据了',icon:"none"});
+					}
+					if(this.currentPage!=0){
+						this.contractList=this.contractList.concat(res.data.data.records)
+					}else{
+						this.contractList=res.data.data.records
+					}
 				})
 			},
 			getdata(e) {

+ 3 - 3
pages/user/report.vue

@@ -389,7 +389,7 @@
 		},
 		methods: {
 			goToPage(index) {
-				console.log(index)
+				// console.log(index)
 				if (index == 4) {
 					uni.navigateTo({
 						url: '/pages/user/contractLook/warehouseReserves'
@@ -416,7 +416,7 @@
 					'&seachMoth=' + this.seachMoth
 				this.$api.doRequest('get', '/biInfoController/selectBiInfo?compId=' + uni.getStorageSync('pcUserInfo')
 					.compId + '&seachMoth=' + this.seachMoth).then(res => {
-					console.log(res)
+					// console.log(res)
 					uni.hideLoading()
 					let _list = []
 					this.dataList = res.data.data
@@ -770,7 +770,7 @@
 				let _inHeight = ''
 				let obj = uni.createSelectorQuery().select('.content7')
 				obj.boundingClientRect(function(data) {
-					console.log(data)
+					// console.log(data)
 					_outHeight = data.height
 				}).exec()
 				setTimeout(function() {