瀏覽代碼

订单任务分页问题

AlanWong 2 年之前
父節點
當前提交
71dce748b1
共有 3 個文件被更改,包括 23 次插入8 次删除
  1. 7 3
      src/views/audit/order/index.vue
  2. 8 3
      src/views/audit/orderTask/index.vue
  3. 8 2
      src/views/audit/saleOrder/index.vue

+ 7 - 3
src/views/audit/order/index.vue

@@ -342,8 +342,12 @@
 		}
 		// 分页
 		pagination(e:any){
-			let query = e.page;
-			query.submitState = 1; // 已提交状态
+			let query = {
+				pageNo:e.page.pageNum,
+				pageSize:e.page.pageSize,
+				submitState:1
+			};
+			// query.submitState = 1; // 已提交状态
 			api.pageList(query, 'supplyTaskOrder').then((res : any) => {
 				if (res.code === 200) {
 					(this.$refs.bill as any).setTabTableValue(e.type, res.data.records);
@@ -361,7 +365,7 @@
 			}
 			clearInterval(this.timer)
 			// submitState: 提交状态
-			this.getPageList({pageSize:20,pageNum:1}, 'all'); // 综合数据
+			this.getPageList({pageSize:20,pageNo:1}, 'all'); // 综合数据
 		}
 		// 获取分页数据
 		getPageList(query : any, type : any) {

+ 8 - 3
src/views/audit/orderTask/index.vue

@@ -971,14 +971,19 @@
 				return
 			}
 			clearInterval(this.timer)
-			this.getPageList({pageSize:10,pageNum:1}, 'all'); // 综合数据
+			this.getPageList({pageSize:10,pageNo:1}, 'all'); // 综合数据
 		}
 		// 分页
 		pagination(e:any){
-			console.log(e);
-			api.pageList(e.page, 'supplyTaskOrder').then((res : any) => {
+			let query = {
+				pageNo:e.page.pageNum,
+				pageSize:e.page.pageSize,
+			};
+			let loading = this.$loading({ target: '.main-container' })
+			api.pageList(query, 'supplyTaskOrder').then((res : any) => {
 				if (res.code === 200) {
 					(this.$refs.bill as any).setTabTableValue(e.type, res.data.records);
+					loading.close()
 				} else this.failHandle(res)
 			})
 		}

+ 8 - 2
src/views/audit/saleOrder/index.vue

@@ -361,7 +361,7 @@
 			}
 			clearInterval(this.timer)
 			// submitState: 提交状态
-			this.getPageList({pageSize:20,pageNum:1}, 'all'); // 综合数据
+			this.getPageList({pageSize:20,pageNo:1}, 'all'); // 综合数据
 			// recycleBin
 			// this.getPageList({ submitState: 0 }, 'draftsBox'); // 草稿箱数据
 			// this.getPageList({ submitState: 1 }, 'smt'); // 已提交数据
@@ -369,9 +369,15 @@
 		}
 		pagination(e:any){
 			console.log(e);
-			api.pageList(e.page, 'supplyPurchaseOrder').then((res : any) => {
+			let query = {
+				pageNo:e.page.pageNum,
+				pageSize:e.page.pageSize,
+			};
+			let loading = this.$loading({ target: '.main-container' })
+			api.pageList(query, 'supplyPurchaseOrder').then((res : any) => {
 				if (res.code === 200) {
 					(this.$refs.bill as any).setTabTableValue(e.type, res.data.records);
+					loading.close()
 				} else this.failHandle(res)
 			})
 		}