|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<div class="shop">
|
|
|
- <module-view :propConfig="config" ref="view" v-loading="load" style="height:100%" @pagination="pagination" @modalHandle="modalHandle" @onRefresh="getList"
|
|
|
+ <module-view :propConfig="config" ref="view" v-loading="load" @pagination="pagination" @modalHandle="modalHandle" @onRefresh="getList"
|
|
|
@resert="queryList" @search="queryList" @clickHandle="clickHandle" @detail="detail" />
|
|
|
</div>
|
|
|
</template>
|
|
@@ -693,6 +693,7 @@ export default class Shop extends Vue {
|
|
|
this.getList()
|
|
|
})
|
|
|
}
|
|
|
+ //删除
|
|
|
del(item:any){
|
|
|
this.$confirm('此操作将永久删除 “'+item.shopName+'” 店铺, 是否继续?', '提示', {
|
|
|
confirmButtonText: '确定',
|
|
@@ -713,6 +714,7 @@ export default class Shop extends Vue {
|
|
|
}).catch(() => {});
|
|
|
|
|
|
}
|
|
|
+ //分页
|
|
|
pagination(){
|
|
|
if(this.isSearch){
|
|
|
this.queryList();
|
|
@@ -720,6 +722,7 @@ export default class Shop extends Vue {
|
|
|
this.getList()
|
|
|
}
|
|
|
}
|
|
|
+ //列表请求(只有分页,不包含搜素条件)
|
|
|
getList(){
|
|
|
if(!this.$refs.view){
|
|
|
if(this.timeNum > 5){
|
|
@@ -735,7 +738,7 @@ export default class Shop extends Vue {
|
|
|
let data = (this.$refs.view as any).getPage();
|
|
|
this.requestList(data);
|
|
|
}
|
|
|
-
|
|
|
+ //列表请求(包含分页和搜素条件)
|
|
|
queryList(){
|
|
|
this.isSearch = true;
|
|
|
let data = (this.$refs.view as any).getQuery();
|
|
@@ -757,6 +760,7 @@ export default class Shop extends Vue {
|
|
|
this.load = false;
|
|
|
})
|
|
|
}
|
|
|
+ //修改店铺数据
|
|
|
onSave(){
|
|
|
let data = (this.$refs.view as any).getFormValue();
|
|
|
this.load = true;
|
|
@@ -772,6 +776,7 @@ export default class Shop extends Vue {
|
|
|
this.load = false;
|
|
|
})
|
|
|
}
|
|
|
+ //表单工具栏按钮事件
|
|
|
modalHandle(n:string){
|
|
|
if(n == 'onAdd'){
|
|
|
(this.$refs.view as any).getFormValidate(this.addShop)
|
|
@@ -781,6 +786,7 @@ export default class Shop extends Vue {
|
|
|
this.onSave();
|
|
|
}
|
|
|
}
|
|
|
+ //表格工具栏按钮事件
|
|
|
clickHandle(n:string){
|
|
|
if(n == 'onAdd'){
|
|
|
this.config.modal.tool.tools.add = true;
|
|
@@ -788,6 +794,7 @@ export default class Shop extends Vue {
|
|
|
(this.$refs.view as any).initFormTool();
|
|
|
}
|
|
|
}
|
|
|
+ //添加店铺
|
|
|
addShop(){
|
|
|
let value = (this.$refs.view as any).getFormValue();
|
|
|
if(value){
|
|
@@ -805,6 +812,7 @@ export default class Shop extends Vue {
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
+ //点击详情
|
|
|
detail(){
|
|
|
this.config.modal.tool.tools.save = true;
|
|
|
delete this.config.modal.tool.tools.add;
|