Commit 4f05661c by cpa

修改添加后页面未关闭

parent 3be66547
<template>
<div class="execution">
<basic-container v-loading="loading">
<el-form :model="form" :rules="rules" ref="refForm" label-width="110px" label-position="left">
......@@ -163,18 +161,14 @@
</el-form>
</basic-container>
<span slot="footer" class="dialog-footer">
<el-button @click="handleClose">取 消</el-button>
<el-button type="primary" :loading="loading" @click="onSubmit">确 认</el-button>
</span>
<!-- 规格显示控件 -->
<type-select v-if="this.form.goodsClassId != undefined" :show="showSpecList" :classId="this.form.goodsClassId"
@chosen="onChosen" @close="showSpecList = false" />
</div>
</template>
<script>
......@@ -696,8 +690,9 @@
{headers:{'Content-Type':'application/json;charset=UTF-8'}})
.then((res)=>{
this.$message.success('添加成功')
this.$emit('success')
}).catch(e => {
this.$message.success('添加失败')
this.$message.success('添加失败')
});
}).catch(() => {
this.tableLoading = false
......@@ -705,8 +700,7 @@
}else{
addOrEditGoods(this.form).then(data => {
this.$message.success('修改成功')
done()
this.handleClose()
this.$emit('success')
}).catch(() => {
});
}
......
......@@ -6,7 +6,7 @@
:close-on-click-modal="false"
:before-close="handleClose" append-to-body>
<goods-edit ref="editContent" :id="id" />
<goods-edit ref="editContent" :id="id" @success="onChangeDone"/>
</el-dialog>
</template>
......@@ -23,7 +23,8 @@
},
computed: {
topTitle() {
return "新增商品"
console.log("【ID】:"+this.id)
return this.id?"新增商品":"编辑商品"
}
},
watch: {
......@@ -36,6 +37,9 @@
}
},
methods: {
onChangeDone() {
this.show=false
},
handleClose() {
this.$emit('close')
}
......
......@@ -105,6 +105,7 @@
this.$router.push('/businessGoods/details?id=' + row.id)
},
onChangeDone() {
this.goodsEditVue=false
this.refreshChange()
},
// 列表查询
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment