From 458cd3b7cdfb191026395655dff2466976fad6ad Mon Sep 17 00:00:00 2001 From: guoxing <1369478551@qq.com> Date: Mon, 22 Jul 2024 14:41:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E5=88=9D=E5=A7=8B=E5=8C=96?= =?UTF-8?q?=E5=BF=85=E5=A1=AB=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/goods/brands/brandsAdd.vue | 8 ++++++++ src/views/goods/category/categoryAdd.vue | 18 +++++++++++++----- src/views/goods/category/index.vue | 2 +- src/views/goods/factory/factoryAdd.vue | 11 ++++++++++- src/views/goods/goods/goodsAdd2.vue | 11 ++++++++++- src/views/goods/unit/unitAdd.vue | 12 +++++++++++- 6 files changed, 53 insertions(+), 9 deletions(-) diff --git a/src/views/goods/brands/brandsAdd.vue b/src/views/goods/brands/brandsAdd.vue index a7faa0c..5a9dc5e 100644 --- a/src/views/goods/brands/brandsAdd.vue +++ b/src/views/goods/brands/brandsAdd.vue @@ -237,8 +237,16 @@ showAdd() { console.log("this.imgList", this.imgList) this.hideUploadBtn = this.imgList.length != 0 + this.$nextTick(() => { + this.$refs['form_obj'].clearValidate() + }) + }, showEdit(row) { + this.$nextTick(() => { + this.$refs['form_obj'].clearValidate() + }) + req.initBrands(row.sid) .then(resp => { if (resp.success) { diff --git a/src/views/goods/category/categoryAdd.vue b/src/views/goods/category/categoryAdd.vue index 3451952..de04da5 100644 --- a/src/views/goods/category/categoryAdd.vue +++ b/src/views/goods/category/categoryAdd.vue @@ -66,8 +66,8 @@
* 出库规则
- - + @@ -168,7 +168,7 @@ percentageRate: '', percentageAmount: '', outStockRule: '', - outStockRuleValue: '', + outStockRuleVaule: '', sids: '', pname: '', sortNo: '', @@ -190,7 +190,7 @@ message: '类别编码不能为空', trigger: 'blur' }], - outStockRuleValue: [{ + outStockRuleVaule: [{ required: true, message: '请选择出库规则', trigger: 'change' @@ -309,8 +309,16 @@ }, showAdd() { this.initData() + this.$nextTick(() => { + this.$refs['form_obj'].clearValidate() + }) + }, showEdit(row) { + this.$nextTick(() => { + this.$refs['form_obj'].clearValidate() + }) + this.initData() req.initTypes(row.sid) .then(resp => { @@ -335,7 +343,7 @@ const choose = this.outStockRuleList.filter((item) => item.dictKey == val) console.log('>>>>>>>>>selectOutStockRuleChange', choose) this.formobj.outStockRule = choose[0].dictKey - this.formobj.outStockRuleValue = choose[0].dictValue + this.formobj.outStockRuleVaule = choose[0].dictValue }, } } diff --git a/src/views/goods/category/index.vue b/src/views/goods/category/index.vue index 90818e7..3d560cd 100644 --- a/src/views/goods/category/index.vue +++ b/src/views/goods/category/index.vue @@ -68,7 +68,7 @@ - + diff --git a/src/views/goods/factory/factoryAdd.vue b/src/views/goods/factory/factoryAdd.vue index e574993..31091f0 100644 --- a/src/views/goods/factory/factoryAdd.vue +++ b/src/views/goods/factory/factoryAdd.vue @@ -185,8 +185,17 @@ } this.$emit('doback') }, - showAdd() {}, + showAdd() { + this.$nextTick(() => { + this.$refs['form_obj'].clearValidate() + }) + + }, showEdit(row) { + this.$nextTick(() => { + this.$refs['form_obj'].clearValidate() + }) + req.initFacturer(row.sid) .then(resp => { if (resp.success) { diff --git a/src/views/goods/goods/goodsAdd2.vue b/src/views/goods/goods/goodsAdd2.vue index 46b8430..24a4880 100644 --- a/src/views/goods/goods/goodsAdd2.vue +++ b/src/views/goods/goods/goodsAdd2.vue @@ -429,12 +429,21 @@ // var sid = require('uuid').v1() // console.log('>>>>>>>>>showAdd', sid) - // this.formobj.sid = sid + // this.formobj.sid = sid this.$nextTick(() => { + this.$nextTick(() => { + this.$refs['form_obj'].clearValidate() + }) + + }, indexMethod(index) { return index + 1 }, showEdit(row) { + this.$nextTick(() => { + this.$refs['form_obj'].clearValidate() + }) + req.initGoods(row.sid) .then(resp => { if (resp.success) { diff --git a/src/views/goods/unit/unitAdd.vue b/src/views/goods/unit/unitAdd.vue index b36ab52..d5c4dfe 100644 --- a/src/views/goods/unit/unitAdd.vue +++ b/src/views/goods/unit/unitAdd.vue @@ -124,8 +124,18 @@ } this.$emit('doback') }, - showAdd() {}, + showAdd() { + + this.$nextTick(() => { + this.$refs['form_obj'].clearValidate() + }) + + }, showEdit(row) { + this.$nextTick(() => { + this.$refs['form_obj'].clearValidate() + }) + req.initUnits(row.sid) .then(resp => { if (resp.success) {