From 1e262dc0463341923dd56275f9119e61b97873dd Mon Sep 17 00:00:00 2001 From: anthonywj Date: Tue, 16 Aug 2022 16:07:51 +0800 Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/basic/basicCompanyProducts.vue | 2 +- src/views/basic/invWarehouse.vue | 17 +++++--- src/views/userManage/authDept.vue | 17 +++++++- src/views/warehouse/stockOrderError.vue | 50 ------------------------ 4 files changed, 28 insertions(+), 58 deletions(-) diff --git a/src/views/basic/basicCompanyProducts.vue b/src/views/basic/basicCompanyProducts.vue index 81d212a..2601450 100644 --- a/src/views/basic/basicCompanyProducts.vue +++ b/src/views/basic/basicCompanyProducts.vue @@ -1337,7 +1337,7 @@ > { - this.$message.success("已移除"); - for (let i = 0; i < this.userData.length; i++) { - if (this.userData[i].id == id) { - this.userData.splice(i, 1); - return; + + if (res.code == 20000) { + this.$message.success("已移除"); + for (let i = 0; i < this.userData.length; i++) { + if (this.userData[i].id == id) { + this.userData.splice(i, 1); + return; + } } + } else { + this.$message.error(res.message); } + + }).catch((error) => { this.$message.error("移除失败"); }) diff --git a/src/views/userManage/authDept.vue b/src/views/userManage/authDept.vue index 4e8b358..520e5d0 100644 --- a/src/views/userManage/authDept.vue +++ b/src/views/userManage/authDept.vue @@ -129,6 +129,7 @@ @current-change="handleCurrentChange" layout="prev, pager, next" :total="total" + :current-page="filterQuery.page" > @@ -143,7 +144,7 @@ export default { companyName: "", checkType: "", page: 1, - limit: 20, + limit: 10, }, total: 0, loading: false, @@ -193,12 +194,18 @@ export default { this.filterQuery = { name: "", page: 1, - limit: 20, + limit: 10, }; this.getList(); }, formSubmit() { + if (this.$isBlank(this.formData.name)) { + this.$message.error("部门名称不能为空!"); + return; + } + + if (this.formName == "add") { addDept(this.formData) @@ -308,6 +315,12 @@ export default { id: row.id, }; deleteDept(tQuery).then(() => { + + this.filterQuery = { + name: "", + page: 1, + limit: 10, + }; this.getList(); }); }) diff --git a/src/views/warehouse/stockOrderError.vue b/src/views/warehouse/stockOrderError.vue index 92854a6..e4c66b9 100644 --- a/src/views/warehouse/stockOrderError.vue +++ b/src/views/warehouse/stockOrderError.vue @@ -80,56 +80,6 @@ > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -