Ver código fonte

添加数据加载中提示

htc 1 mês atrás
pai
commit
32ccea6bf0
1 arquivos alterados com 15 adições e 1 exclusões
  1. 15 1
      pagesStorage/checkStorage/add.vue

+ 15 - 1
pagesStorage/checkStorage/add.vue

@@ -50,6 +50,9 @@
 						</div>
 					</div>
 				</template>
+				<div v-if="isLoading" class="loading">
+					<u-loading-icon text="数据加载中..." textSize="32"></u-loading-icon>
+				</div>
 			</div>
 		</div>
 		<div class="save">
@@ -77,7 +80,8 @@
 				},
 				page:1,
 				isOver:false,
-				goodsList:[]
+				goodsList:[],
+				isLoading:false
 			}
 		},
 		onLoad(option) {
@@ -92,6 +96,7 @@
 		// },
 		methods:{
 			getGoodList(){
+				this.isLoading = true;
 				this.$api.get('/wms/inventory/boardList/item/?warehouseId='+this.checkDto.warehouseId+'&page='+this.page+'&limit=-1').then(res=>{
 					if(res.data.code===0){
 						// if(this.checkDto.details.length<res.data.data.total){
@@ -99,6 +104,7 @@
 							this.checkDto.details = [...this.checkDto.details,...res.data.data.list];
 							this.checkDto.details.forEach(d=>d.checkQuantity=+d.quantity);
 							this.computeNum();
+							this.isLoading = false;
 						// }else this.isOver = true
 					}else this.$showToast(res.data.msg)
 				})
@@ -322,6 +328,14 @@
 						}
 					}
 				}
+			
+				.loading{
+					width: 100%;
+					padding: 70rpx 0 30rpx;
+					display: flex;
+					align-items: center;
+					justify-content: center;
+				}
 			}
 		}