From 2b9edf55376bcc4a962c5654bfef886258c68c13 Mon Sep 17 00:00:00 2001 From: x_z Date: Sat, 25 Jun 2022 08:50:00 +0800 Subject: [PATCH] =?UTF-8?q?1.=E5=88=86=E5=BA=93=E6=B7=BB=E5=8A=A0=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E6=93=8D=E4=BD=9C=E6=B7=BB=E5=8A=A0=E6=A0=A1=E9=AA=8C?= =?UTF-8?q?=EF=BC=8C=E4=B8=8D=E9=80=89=E6=8B=A9=E7=94=A8=E6=88=B7=E6=97=B6?= =?UTF-8?q?=E7=BB=99=E5=87=BA=E6=8F=90=E7=A4=BA=EF=BC=8C=E4=B8=8D=E5=85=B3?= =?UTF-8?q?=E9=97=AD=E5=BC=B9=E7=AA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/basic/invWarehouse.vue | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/src/views/basic/invWarehouse.vue b/src/views/basic/invWarehouse.vue index 0b08a26..6c3560f 100644 --- a/src/views/basic/invWarehouse.vue +++ b/src/views/basic/invWarehouse.vue @@ -1028,7 +1028,6 @@ export default { if (response.code != 20000) { this.$message.error(response.message); } else { - // console.log(files[0] + "\n" + this.fileList[0] + "\n" + fileList[0]); this.$message.success(response.data); this.getList(); } @@ -1161,24 +1160,26 @@ export default { }) }, addUserData() { - this.userFormVisible = false; let query = { code: this.currentCode, userList: JSON.stringify(this.selectUserList) }; saveWarehouseUser(query).then((res) => { - this.$message.success("添加成功"); - let loadParam = { - code: this.currentCode - }; - //重新加载数据 - warehouseUserList(loadParam).then((res) => { - this.userData = res.data; - }).catch((error) => { - console.log(error) - }); + if (res.code === 20000) { + this.userFormVisible = false; + this.$message.success("添加成功"); + let loadParam = { + code: this.currentCode + }; + //重新加载数据 + warehouseUserList(loadParam).then((res) => { + this.userData = res.data; + }).catch((error) => { + }); + } else { + this.$message.error(res.message); + } }).catch((error) => { - console.log(error); this.$message.error("添加失败"); }); },