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) {