Commit a5bb8c8c by lixiaomin

修改店铺

parent 5c7fd7d5
......@@ -38,12 +38,12 @@ export default {
}
},
watch: {
shopId() {
this.getList()
}
// shopId() {
// this.getList()
// }
},
mounted() {
this.getList()
//this.getList()
},
methods: {
getList() {
......
......@@ -59,14 +59,12 @@ export default {
if (id) {
this.getShopInfo(id)
}
}
},
mounted() {
if (this.shopId) {
this.getShopInfo(this.shopId)
}
},
data() {
return {
......@@ -114,7 +112,10 @@ export default {
surplus.zone = province[2]
if (surplus.id != null) {
updateShop(surplus).then((res) => {
if(res.code=="200"){
this.$modal.msgSuccess("修改成功");
this.$emit('getList')
}
});
} else {
addShop(surplus).then(({ data }) => {
......@@ -128,9 +129,7 @@ export default {
},
// 取消按钮
cancel() {
this.$emit('closeDialog')
// this.open = false;
// this.reset();
this.$emit('closeDialog');
},
// 表单重置
reset() {
......
......@@ -97,7 +97,7 @@ export default {
}
},
mounted() {
this.getList()
//this.getList()
},
methods: {
getPicsList(str){
......
......@@ -63,13 +63,13 @@ export default {
}
},
watch: {
shopId() {
this.getList()
}
//shopId() {
//this.getList()
//}
},
mounted() {
if (!this.shopId) return
this.getList()
//this.getList()
},
methods: {
/** 查询列表 */
......
......@@ -38,12 +38,12 @@ export default {
}
},
watch: {
shopId() {
this.getList()
}
//shopId() {
//this.getList()
//}
},
mounted() {
this.getList()
//this.getList()
},
methods: {
getList() {
......
<template>
<div class="app-container">
<SetShop ref="setShop" />
<SetShop ref="setShop" @getList="getList"/>
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="店铺名称" prop="name">
<el-input v-model="queryParams.name" placeholder="请输入店铺名称" clearable @keyup.enter.native="handleQuery" />
......
......@@ -3,7 +3,7 @@
<el-dialog title="店铺设置" :visible.sync="open" width="1200px" append-to-body >
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="店铺信息" name="first">
<AddShop :shopId="shopId" @setShopId="setShopId" @closeDialog="closeHandle"/>
<AddShop :shopId="shopId" @closeDialog="closeHandle" @getList="getList"/>
</el-tab-pane>
<el-tab-pane :disabled="!shopId" label="机器信息" name="second">
<Machine ref="Machine" :shopId="shopId" />
......@@ -66,7 +66,12 @@ export default {
},
closeHandle () {
this.activeName='first';
this.open = false // 控制取消和X按钮,关闭弹窗
this.open = false // 控制取消和X按钮,关闭弹窗;
this.getList();
},
// 店铺列表
getList(){
this.$emit('getList');
}
}
......
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