diff --git a/src/components/templatesFrom/index.vue b/src/components/templatesFrom/index.vue index 6427185..06aa48b 100644 --- a/src/components/templatesFrom/index.vue +++ b/src/components/templatesFrom/index.vue @@ -212,6 +212,10 @@ export default { componentKey: { type: Number, default: 0 + }, + tempType:{ + type: String, + default: 'msgbox' } }, data() { @@ -300,7 +304,8 @@ export default { }, methods: { resetForm(formName) { - this.$msgbox.close() + this.tempType=='msgbox'&&this.$msgbox.close() + this.$emit('resetForm') this.$refs[formName].resetFields() }, onClose(formName) { @@ -439,10 +444,11 @@ export default { this.tempId === 0 ? templateCreateApi(data).then(res => { this.$message.success(res.message) setTimeout(() => { - this.$msgbox.close() + this.tempType=='msgbox'&&this.$msgbox.close() }, 500) setTimeout(() => { this.$emit('getList') + this.$emit('onsubmit') this.$refs[formName].resetFields() }, 600) }).catch(res => { @@ -450,10 +456,11 @@ export default { }) : templateUpdateApi(this.tempId, data).then(res => { this.$message.success(res.message) setTimeout(() => { - this.$msgbox.close() + this.tempType=='msgbox'&&this.$msgbox.close() }, 500) setTimeout(() => { this.$emit('getList') + this.$emit('onsubmit') this.$refs[formName].resetFields() }, 600) }).catch(res => { diff --git a/src/views/product/addProduct/index.vue b/src/views/product/addProduct/index.vue index d4513a4..5ac20c1 100644 --- a/src/views/product/addProduct/index.vue +++ b/src/views/product/addProduct/index.vue @@ -2047,6 +2047,14 @@ @close="closeRecommend" /> + + + @@ -2541,6 +2549,7 @@ export default { width: 95 }, product_id: '', + dialogVisible:false, goodList: [], unitList: [], recommendVisible: false, @@ -2648,6 +2657,13 @@ export default { // console.log(!!this.$route.params.id); // return !!this.$route.params.id // }, + onsubmit(){ + this.dialogVisible = false + }, + resetForm(){ + this.dialogVisible = false + }, + // 规格值变化 handleCost(val,i,e,type){ if(type == 'batchAdd'){ i=='price'?val.cost = (val.price * 0.6).toFixed(2):'' @@ -3219,10 +3235,11 @@ export default { }, // 运费模板 addTem() { - const _this = this - this.$modalTemplates(0, function() { - _this.getShippingList() - }) + // const _this = this + // this.$modalTemplates(0, function() { + // _this.getShippingList() + // }) + this.dialogVisible = true }, // 添加服务保障模板 addServiceTem() {