chenrui 4 年 前
コミット
a770296747

+ 5 - 0
pages/cleared/chooseNetwork.vue

@@ -160,6 +160,10 @@
 			},
 			// 搜索查询
 			searchHandle (pageNo) {
+				uni.showLoading({
+					mask: true,
+				    title: '加载中'
+				})
 				this.status = "loading"
 				pageNo ? this.pageNo = pageNo : null,
 				waitToCleanList({
@@ -168,6 +172,7 @@
 					stationName: this.searchForm.stationName,
 					orderType: this.searchForm.orderType
 				}).then(res => {
+					uni.hideLoading()
 					if (res.status == 200) {
 						res.data.list.map(item => {
 							item.checked = false

+ 10 - 0
pages/cleared/details.vue

@@ -83,8 +83,12 @@
 				noDataText: '暂无数据',  //  列表请求状态提示语
 				status: 'loadmore',  //  加载中状态
 				scrollTop: 0,  //  滚动条位置
+				createDate: ''  //  时间
 			}
 		},
+		onLoad(options) {
+			this.createDate = options.createDate
+		},
 		onShow() {
 			this.refresh()
 		},
@@ -97,12 +101,18 @@
 			},
 			// 搜索查询
 			searchHandle (pageNo) {
+				uni.showLoading({
+					mask: true,
+				    title: '加载中'
+				})
 				this.status = "loading"
 				pageNo ? this.pageNo = pageNo : null
 				getAlreadyCleanDetails({
 					pageNo: this.pageNo,
 					pageSize: this.pageSize,
+					createDate: this.createDate
 				}).then(res => {
+					uni.hideLoading()
 					if (res.status == 200) {
 						if(this.pageNo>1){
 							this.listdata = this.listdata.concat(res.data.list || [])

+ 6 - 1
pages/cleared/index.vue

@@ -68,12 +68,17 @@
 			},
 			// 搜索查询
 			searchHandle (pageNo) {
+				uni.showLoading({
+					mask: true,
+				    title: '加载中'
+				})
 				this.status = "loading"
 				pageNo ? this.pageNo = pageNo : null
 				getAlreadyCleanList({
 					pageNo: this.pageNo,
 					pageSize: this.pageSize,
 				}).then(res => {
+					uni.hideLoading()
 					if (res.status == 200) {
 						if(this.pageNo>1){
 							this.listdata = this.listdata.concat(res.data.list || [])
@@ -94,7 +99,7 @@
 			//  查看详情
 			goPage(row){
 				uni.navigateTo({
-				    url: '/pages/cleared/details'
+				    url: '/pages/cleared/details?createDate='+row.cleanDate
 				})
 			},
 			// scroll-view到底部加载更多

+ 11 - 3
pages/index/index.vue

@@ -158,6 +158,7 @@
 			},
 			//  确定清运
 			submitFun(){
+				const _this = this
 				uni.showLoading({
 					mask: true,
 				    title: '加载中'
@@ -168,9 +169,11 @@
 				cleanDevice(obj).then(res => {
 					uni.hideLoading()
 					if(res.status == 200){
-						this.refresh()
-						this.messagePop = false
-						uni.showToast({ icon:'none', title: res.message })
+						uni.showToast({ icon:'none', title: '清运成功,库存重量已重置为0' })
+						_this.messagePop = false
+						setTimeout(()=>{
+							_this.refresh()
+						},1000)
 					}else{
 						uni.showToast({ icon:'none', title: res.message })
 					}
@@ -190,12 +193,17 @@
 			},
 			// 搜索查询
 			searchHandle (pageNo) {
+				uni.showLoading({
+					mask: true,
+				    title: '加载中'
+				})
 				this.status = "loading"
 				pageNo ? this.pageNo = pageNo : null
 				getSelfCleanTaskList({
 					pageNo: this.pageNo,
 					pageSize: this.pageSize
 				}).then(res => {
+					uni.hideLoading()
 					if (res.status == 200) {
 						if(this.pageNo>1){
 							this.listdata = this.listdata.concat(res.data.list || [])