From 88aaaba647e1ba37b703d05785a3308d4ed4f1d5 Mon Sep 17 00:00:00 2001 From: lilu Date: Tue, 10 Jan 2023 11:56:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8F=B0=E8=B4=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/main/ContractnoList/index.vue | 14 ++++++++++++-- src/views/main/ContractnoList/modules/addFrom.vue | 1 + src/views/main/ProductCategoryList/index.vue | 14 ++++++++++++-- .../main/ProductCategoryList/modules/addFrom.vue | 1 + src/views/main/ProductNameList/index.vue | 14 ++++++++++++-- src/views/main/ProductNameList/modules/addFrom.vue | 6 +++--- 6 files changed, 41 insertions(+), 9 deletions(-) diff --git a/src/views/main/ContractnoList/index.vue b/src/views/main/ContractnoList/index.vue index c8aaf96..b53b5ac 100644 --- a/src/views/main/ContractnoList/index.vue +++ b/src/views/main/ContractnoList/index.vue @@ -200,7 +200,12 @@ export default { DeleteParaContractNoInfo(data.id).then(res => { if (res.success) { this.$message.success('删除成功') - this.init() + const { form: { validateFields } } = this + validateFields((err, values) => { + if (!err) { + this.init(values) + } + }) } else { this.$message.error(res.message) } @@ -234,7 +239,12 @@ export default { DeleteParaContractNoInfo(pkIdArr).then(res => { if (res.success) { this.$message.success('删除成功') - this.init() + const { form: { validateFields } } = this + validateFields((err, values) => { + if (!err) { + this.init(values) + } + }) } else { this.$message.error(res.message) } diff --git a/src/views/main/ContractnoList/modules/addFrom.vue b/src/views/main/ContractnoList/modules/addFrom.vue index 4b15494..27ab428 100644 --- a/src/views/main/ContractnoList/modules/addFrom.vue +++ b/src/views/main/ContractnoList/modules/addFrom.vue @@ -4,6 +4,7 @@ :width="900" :visible="visible" :confirmLoading="confirmLoading" + :maskClosable="false" cancelText="关闭" okText="保存" @ok="handleSubmit" diff --git a/src/views/main/ProductCategoryList/index.vue b/src/views/main/ProductCategoryList/index.vue index 554aa65..8bdb384 100644 --- a/src/views/main/ProductCategoryList/index.vue +++ b/src/views/main/ProductCategoryList/index.vue @@ -199,7 +199,12 @@ export default { DeleteParaGoodsCategoryInfo(data.id).then((res) => { if (res.success) { this.$message.success('删除成功') - this.init() + const { form: { validateFields } } = this + validateFields((err, values) => { + if (!err) { + this.init(values) + } + }) } else { this.$message.error(res.message) } @@ -235,7 +240,12 @@ export default { }).then((res) => { if (res.success) { this.$message.success('删除成功') - this.init() + const { form: { validateFields } } = this + validateFields((err, values) => { + if (!err) { + this.init(values) + } + }) } else { this.$message.error(res.message) } diff --git a/src/views/main/ProductCategoryList/modules/addFrom.vue b/src/views/main/ProductCategoryList/modules/addFrom.vue index 060bb71..2d45d66 100644 --- a/src/views/main/ProductCategoryList/modules/addFrom.vue +++ b/src/views/main/ProductCategoryList/modules/addFrom.vue @@ -4,6 +4,7 @@ :width="900" :visible="visible" :confirmLoading="confirmLoading" + :maskClosable="false" cancelText="关闭" okText="保存" @ok="handleSubmit" diff --git a/src/views/main/ProductNameList/index.vue b/src/views/main/ProductNameList/index.vue index a41b2e5..05898fd 100644 --- a/src/views/main/ProductNameList/index.vue +++ b/src/views/main/ProductNameList/index.vue @@ -217,7 +217,12 @@ export default { DeleteParaGoodsInfo([data.id]).then((res) => { if (res.success) { this.$message.success('删除成功') - this.init() + const { form: { validateFields } } = this + validateFields((err, values) => { + if (!err) { + this.init(values) + } + }) } else { this.$message.error(res.message) } @@ -253,7 +258,12 @@ export default { }).then((res) => { if (res.success) { this.$message.success('删除成功') - this.init() + const { form: { validateFields } } = this + validateFields((err, values) => { + if (!err) { + this.init(values) + } + }) } else { this.$message.error(res.message) } diff --git a/src/views/main/ProductNameList/modules/addFrom.vue b/src/views/main/ProductNameList/modules/addFrom.vue index 0fec5c1..fa9ba65 100644 --- a/src/views/main/ProductNameList/modules/addFrom.vue +++ b/src/views/main/ProductNameList/modules/addFrom.vue @@ -4,6 +4,7 @@ :width="900" :visible="visible" :confirmLoading="confirmLoading" + :maskClosable="false" cancelText="关闭" okText="保存" @ok="handleSubmit" @@ -137,9 +138,7 @@ import { if (this.goodsCategory) { const arr = [] this.goodsCategory.map((item, index) => { - if (!arr.includes(item.goodsCategory)) { - arr.push(item.goodsCategory) - } + arr.push(item.goodsCategory) }) return arr } else { @@ -190,6 +189,7 @@ import { }, goodsCategorySelect(value) { const index = this.goodsCategoryArr.indexOf(value) + debugger this.form.setFieldsValue({ goodsCategory: this.goodsCategory[index].goodsCategory || '', goodsCategoryName: this.goodsCategory[index].goodsCategoryName || ''