Bladeren bron

修复请求方法.then()后未写.catch()报错

hcf 1 jaar geleden
bovenliggende
commit
b1ff998c17

+ 1 - 1
src/views/audit/Information/index.vue

@@ -83,7 +83,7 @@
 					this.baseInfo = res.data.records[0];
 					console.log(this.baseInfo);
 				}
-			})
+			}).catch(() => {});
 		}
 	}
 </script>

+ 4 - 4
src/views/audit/agencyGoods/index.vue

@@ -286,7 +286,7 @@
 							(this as any).$refs.sideTree.request();
 							this.getDataList();
 						} else this.$message.error(res.msg);
-					})
+					}).catch(() => {});
 				} else if (this.popTitle === '编辑') {
 					api.updateList(query, 'maindataMaterialOrganizationCategory').then((res : any) => {
 						if (res.code === 200) {
@@ -294,9 +294,9 @@
 							(this as any).$refs.sideTree.request();
 							this.getDataList();
 						} else this.$message.error(res.msg);
-					})
+					}).catch(() => {});
 				}
-			})
+			}).catch(() => {});
 		}
 		// 获取列表数据
 		getDataList() {
@@ -376,7 +376,7 @@
 						this.getDataList();
 						this.$message.success('删除成功');
 					} else this.$message.error(res.msg);
-				})
+				}).catch(() => {});
 			}).catch(() => this.$message.info('已取消删除'));
 		}
 		// 刷新/重置

+ 3 - 3
src/views/audit/attribute/index.vue

@@ -330,17 +330,17 @@
 							this.$message.success('新增成功');
 							this.getDataList();
 						} else this.$message.error(res.msg);
-					})
+					}).catch(() => {});
 				} else if (this.popTitle === '编辑') {
 					api.updateList(query, 'maindataMaterialAttribute').then((res : any) => {
 						if (res.code === 200) {
 							this.$message.success('编辑成功');
 							this.getDataList();
 						} else this.$message.error(res.msg);
-					})
+					}).catch(() => {});
 				}
 
-			})
+			}).catch(() => {});
 		}
 		// 获取列表数据
 		getDataList() {

+ 5 - 5
src/views/audit/brand/index.vue

@@ -220,16 +220,16 @@
 							this.$message.success('新增成功');
 							this.getDataList();
 						} else this.$message.error(res.msg);
-					})
+					}).catch(() => {});
 				} else if (this.popTitle === '编辑') {
 					api.updateList(query, 'maindataMaterialBrand').then((res : any) => {
 						if (res.code === 200) {
 							this.$message.success('编辑成功');
 							this.getDataList();
 						} else this.$message.error(res.msg);
-					})
+					}).catch(() => {});
 				}
-			})
+			}).catch(() => {});
 		}
 		// 获取列表数据
 		getDataList() {
@@ -306,7 +306,7 @@
 						this.getDataList();
 						this.$message.success('删除成功');
 					} else this.$message.error(res.msg);
-				})
+				}).catch(() => {});
 			}).catch(() => this.$message.info('已取消删除'));
 		}
 		// 操作删除
@@ -322,7 +322,7 @@
 						this.getDataList();
 						this.$message.success('删除成功');
 					} else this.$message.error(res.msg);
-				})
+				}).catch(() => {});
 			}).catch(() => this.$message.info('已取消删除'));
 		}
 		// 刷新/重置

+ 4 - 4
src/views/audit/depots/index.vue

@@ -532,7 +532,7 @@
 									api.single({ id: res.data }, 'maindataStorehouse').then((data : any) => {
 										this.changeTab(data.data);
 										this.onAdd2();
-									})
+									}).catch(() => {});
 								}).catch(() => {
 									let data = {
 										storehouseId: res.data,
@@ -548,7 +548,7 @@
 										if (res.code === 200) {
 											this.$alert('此仓库将新增一个默认仓位');
 										} else this.$message.error(res.msg)
-									})
+									}).catch(() => {});
 								});
 							} else this.$message.error(res.msg)
 						}).catch(() => loading.close());
@@ -563,7 +563,7 @@
 							} else this.$message.error(res.msg)
 						}).catch(() => loading.close());
 					}
-				})
+				}).catch(() => {});
 			}
 		}
 		// 仓位确认注册/编辑
@@ -593,7 +593,7 @@
 						} else this.$message.error(res.msg)
 					}).catch(() => loading.close());
 				}
-			})
+			}).catch(() => {});
 		}
 		// 取消仓位注册
 		closeStoringLocation() {

+ 1 - 1
src/views/audit/distributor/index.vue

@@ -389,7 +389,7 @@
 					}).catch(() => loading.close());
 				}
 
-			})
+			}).catch(() => {});
 		}
 		// 获取列表数据
 		getDataList() {

+ 1 - 1
src/views/audit/manufacturer/index.vue

@@ -389,7 +389,7 @@
 					}).catch(() => loading.close());
 				}
 
-			})
+			}).catch(() => {});
 		}
 		// 获取列表数据
 		getDataList() {

+ 1 - 1
src/views/audit/order/index.vue

@@ -451,7 +451,7 @@
 							cancelButtonText: '取消',
 						}).then(() => {
 							this.$router.push('/document/saleOrder');
-						})
+						}).catch(() => {});
 					} else this.$message.error(res.msg)
 				})
 			}).catch(() => this.$message.info('已取消接单'));

+ 1 - 1
src/views/audit/orderTask/components/productModal.vue

@@ -169,7 +169,7 @@
 					};
 					(this.$refs.view as any).setPage(page)
 				}
-			})
+			}).catch(() => {});
 		}
 	}
 </script>

+ 1 - 1
src/views/audit/orderTask/index.vue

@@ -927,7 +927,7 @@
 						} else this.$message.error(res.msg);
 					}).catch(() => loading.close());
 				};
-			})
+			}).catch(() => {});
 		}
 		// 打开新增
 		onAdd(e : any) {

+ 4 - 4
src/views/audit/organClassify/index.vue

@@ -253,7 +253,7 @@
 							(this as any).$refs.sideTree.request();
 							this.getDataList();
 						} else this.$message.error(res.msg);
-					})
+					}).catch(() => {});
 				} else if (this.popTitle === '编辑') {
 					api.updateList(query, 'maindataOrganizationCategory').then((res : any) => {
 						if (res.code === 200) {
@@ -261,9 +261,9 @@
 							(this as any).$refs.sideTree.request();
 							this.getDataList();
 						} else this.$message.error(res.msg);
-					})
+					}).catch(() => {});
 				}
-			})
+			}).catch(() => {});
 		}
 		// 获取列表数据
 		getDataList() {
@@ -341,7 +341,7 @@
 						this.getDataList();
 						this.$message.success('删除成功!');
 					} else this.$message.error(res.msg);
-				})
+				}).catch(() => {});
 			}).catch(() => {
 				this.$message.info('已取消删除');
 			});

+ 1 - 1
src/views/audit/outbound/components/businessType.vue

@@ -25,7 +25,7 @@
 				if (res.code === 200) {
 					this.options = res.data;
 				}
-			});
+			}).catch(() => {});
 		}
 		change(e : any) {
 			this.$emit('onChange', e)

+ 1 - 1
src/views/audit/outbound/index.vue

@@ -1045,7 +1045,7 @@
 					}).catch(() => loading.close());
 				};
 
-			})
+			}).catch(() => {});
 		}
 		// 切换tab栏
 		clickTab(e : any) {

+ 3 - 3
src/views/audit/productClassification/index.vue

@@ -285,7 +285,7 @@
 							(this as any).$refs.sideTree.request();
 							this.getDataList();
 						} else this.$message.error(res.msg);
-					})
+					}).catch(() => {});
 				} else if (this.popTitle === '编辑') {
 					api.updateList(query, 'maindataMaterialCategory').then((res : any) => {
 						if (res.code === 200) {
@@ -293,9 +293,9 @@
 							(this as any).$refs.sideTree.request();
 							this.getDataList();
 						} else this.$message.error(res.msg);
-					})
+					}).catch(() => {});
 				}
-			})
+			}).catch(() => {});
 		}
 		// 获取列表数据
 		getDataList() {

+ 1 - 1
src/views/audit/productManagement/components/brandType.vue

@@ -27,7 +27,7 @@
 				if (res.code === 200) {
 					this.options = res.data.records;
 				}
-			});
+			}).catch(() => {});
 		}
 		change(e : any) {
 			this.$emit('onChange', e)

+ 7 - 7
src/views/audit/productManagement/index.vue

@@ -1258,7 +1258,7 @@
 					}).catch(() => loading.close());
 				}
 
-			});
+			}).catch(() => {});
 		}
 		// 打开新增
 		onAdd() {
@@ -1557,7 +1557,7 @@
 							(this as any).$refs.table.setValue(skuRuleList); // 设置表格数据
 						});
 					}
-				})
+				}).catch(() => {});
 			}).catch(() => { });
 		}
 		// 关联金蝶财务系统物料选择
@@ -1619,7 +1619,7 @@
 					this.$message.error(res.msg);
 					this.tableloading = false;
 				}
-			})
+			}).catch(() => {});
 		}
 		// 确定关联金蝶财务系统物料
 		doConfirm() {
@@ -1838,7 +1838,7 @@
 				if (res.code === 200) {
 					this.selectList = res.data.records
 				} else this.$message.error(res.msg);
-			})
+			}).catch(() => {});
 		}
 		// 获取列表数据
 		getDataList() {
@@ -1926,7 +1926,7 @@
 						(this as any).$refs.sideTree.request();
 						this.getDataList();
 					} else this.$message.error(res.msg);
-				})
+				}).catch(() => {});
 			}).catch(() => this.$message.info('已取消删除'));
 		}
 		// 工具栏删除
@@ -1951,7 +1951,7 @@
 						this.getDataList();
 						this.$message.success('删除成功');
 					} else this.$message.error(res.msg);
-				})
+				}).catch(() => {});
 			}).catch(() => this.$message.info('已取消删除'));
 		}
 		// 操作删除
@@ -1968,7 +1968,7 @@
 						this.getDataList();
 						this.$message.success('删除成功');
 					} else this.$message.error(res.msg);
-				})
+				}).catch(() => {});
 			}).catch(() => this.$message.info('已取消删除'));
 		}
 		// 刷新

+ 3 - 3
src/views/audit/saleOrder/components/settingConfig.vue

@@ -908,7 +908,7 @@
 						} else loading.close();
 					}).catch(() => loading.close());
 					
-				})
+				}).catch(() => {});
 			}
 			if (this.type == "setCForm") {
 				(this as any).$refs.setCForm.validate().then(() => {
@@ -954,9 +954,9 @@
 							} else loading.close();
 						}).catch(() => loading.close());
 						
-					})
+					}).catch(() => {});
 					
-				})
+				}).catch(() => {});
 			}
 		}
 	}

+ 1 - 1
src/views/audit/sku/index.vue

@@ -425,7 +425,7 @@
 					this.isShow = 'home';
 					this.getDataList();
 				} else this.$message.error(res.msg);
-			})
+			}).catch(() => {});
 		}
 		// 获取列表数据
 		getDataList() {

+ 1 - 1
src/views/audit/supplier/index.vue

@@ -387,7 +387,7 @@
 					}).catch(() => loading.close());
 				}
 
-			})
+			}).catch(() => {});
 		}
 		// 获取列表数据
 		getDataList() {

+ 5 - 5
src/views/audit/virtually/index.vue

@@ -283,7 +283,7 @@
 							(this as any).$refs.sideTree.request();
 							this.getDataList();
 						} else this.$message.error(res.msg);
-					})
+					}).catch(() => {});
 				} else if (this.popTitle === '编辑') {
 					api.updateList(query, 'maindataMaterialVmcategory').then((res : any) => {
 						if (res.code === 200) {
@@ -291,9 +291,9 @@
 							(this as any).$refs.sideTree.request();
 							this.getDataList();
 						} else this.$message.error(res.msg);
-					})
+					}).catch(() => {});
 				}
-			})
+			}).catch(() => {});
 		}
 		// 获取列表数据
 		getDataList() {
@@ -356,7 +356,7 @@
 							console.log(data, 'data');
 							setTimeout(() => { (this as any).$refs.addFormId.setValue(data) }, 0);
 						}
-					})
+					}).catch(() => {});
 				}
 			}).catch(() => loading.close());
 		}
@@ -374,7 +374,7 @@
 						this.getDataList();
 						this.$message.success('删除成功');
 					} else this.$message.error(res.msg);
-				})
+				}).catch(() => {});
 			}).catch(() => this.$message.info('已取消删除'));
 		}
 		// 刷新/重置

+ 1 - 1
src/views/audit/warehousing/components/businessType.vue

@@ -25,7 +25,7 @@
 				if (res.code === 200) {
 					this.options = res.data;
 				}
-			});
+			}).catch(() => {});
 		}
 		change(e : any) {
 			this.$emit('onChange', e)

+ 1 - 1
src/views/audit/warehousing/index.vue

@@ -835,7 +835,7 @@
 					}).catch(() => loading.close());
 				};
 
-			})
+			}).catch(() => {});
 		}
 		// 打开新增
 		onAdd(e : any) {