Commit 3e5c8148 authored by Z's avatar Z

Z: Dot: store's done.

parents fd3573d5 6a6a624b
<template> <template>
<div class="main"> <div class="main">
<div class="title">全部柜组( 共5个 )</div> <div class="title">全部柜组( 共<span>{{page.total}}</span>个 )</div>
<div class="searchs"> <div class="searchs">
<div class="buttons"> <div class="buttons">
<el-button class="button buttonlight" size="small" @click="addCounter">添加柜组</el-button> <el-button class="button buttonlight" size="small" @click="addCounter">添加柜组</el-button>
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
align="center" align="center"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
prop="principal" prop="principalName"
label="柜组负责人" label="柜组负责人"
align="center" align="center"
></el-table-column> ></el-table-column>
...@@ -60,18 +60,9 @@ ...@@ -60,18 +60,9 @@
<el-table-column label="创建时间" width="120" align="center" prop="createDate"/> <el-table-column label="创建时间" width="120" align="center" prop="createDate"/>
<el-table-column label="操作" align="center" fixed="right" width="200"> <el-table-column label="操作" align="center" fixed="right" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" class="btn" @click="handleDetail(scope.row.id)" <el-button type="text" class="btn" @click="handleDetail(scope.row.id)" >详情</el-button>
>详情</el-button <el-button type="text" class="btn" @click="handleEdit(scope.row.id)" >编辑</el-button >
> <el-button type="text" @click="handleDelete(scope.row.id)" class="listButtonRed">删除</el-button>
<el-button type="text" class="btn" @click="handleEdit(scope.row.id)"
>编辑</el-button
>
<el-button
type="text"
@click="handleDelete(scope.row.id)"
class="listButtonRed"
>删除</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -160,8 +151,16 @@ export default { ...@@ -160,8 +151,16 @@ export default {
_this.tableData = [] _this.tableData = []
} }
if(res.result == 'success'){ if(res.result == 'success'){
_this.tableData = res.data.adminShops.list let data = res.data.pageInfo.list
_this.page.total = Number(res.data.adminShops.total) _this.tableData = data.map((v,i)=>{
let obj = {}
for(let key in v.adminShop){
obj[key] = v.adminShop[key]
obj.principalName = v.principal
}
return obj
})
_this.page.total = Number(res.data.pageInfo.total)
} }
}) })
}, },
...@@ -179,7 +178,12 @@ export default { ...@@ -179,7 +178,12 @@ export default {
this.$confirm('确定删除该柜组吗?', { this.$confirm('确定删除该柜组吗?', {
}).then(() => { }).then(() => {
stallDel({shopIds:id}).then(res=>{ stallDel({shopIds:id}).then(res=>{
_this.$message(res.data) if(res.result == 'fail'){
_this.$message.error(res.errorMsg)
}
if(res.result == 'success'){
_this.getListData()
}
}) })
}).catch(() => { }).catch(() => {
this.$message.info("取消删除") this.$message.info("取消删除")
...@@ -194,7 +198,12 @@ export default { ...@@ -194,7 +198,12 @@ export default {
this.$confirm('确定批量删除柜组吗?', { this.$confirm('确定批量删除柜组吗?', {
}).then(() => { }).then(() => {
stallDel({shopIds:delIds}).then(res=>{ stallDel({shopIds:delIds}).then(res=>{
_this.$message(res.data) if(res.result == 'fail'){
_this.$message.error(res.errorMsg)
}
if(res.result == 'success'){
_this.getListData()
}
}) })
}).catch(() => { }).catch(() => {
this.$message.info("取消删除") this.$message.info("取消删除")
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<span class="number">{{ allNumber }}</span> <span class="number">{{ allNumber }}</span>
</div> </div>
</div> </div>
<div class="ty" style="margin:15px 0;" @click="getNoGroupMember(1,1)"> <div class="ty" style="margin:12px 0;" @click="getNoGroupMember(1,1)">
<div> <div>
<span>未分组</span> <span>未分组</span>
<span class="number">{{ wNumber }}</span> <span class="number">{{ wNumber }}</span>
...@@ -26,9 +26,6 @@ ...@@ -26,9 +26,6 @@
expand-on-click-node expand-on-click-node
@node-click="handleTreeClick" @node-click="handleTreeClick"
> >
<!-- <span class="custom-tree-node" slot-scope="{ node, data }">
<span>{{ node.label }}</span>
</span> -->
</el-tree> </el-tree>
</div> </div>
</div> </div>
...@@ -549,6 +546,7 @@ export default { ...@@ -549,6 +546,7 @@ export default {
id: "id" id: "id"
}, },
type: 1, type: 1,
sType: 1,
idList: [], idList: [],
storeId: "", storeId: "",
groupId: "", groupId: "",
...@@ -589,7 +587,7 @@ export default { ...@@ -589,7 +587,7 @@ export default {
}, },
getGroupMember(page,ctPage) { getGroupMember(page,ctPage) {
this.page.currentPage = ctPage this.page.currentPage = ctPage
this.type = 3 this.type = this.sType = 3
let params = { let params = {
pageNum: page, pageNum: page,
shopId: this.groupId shopId: this.groupId
...@@ -601,7 +599,7 @@ export default { ...@@ -601,7 +599,7 @@ export default {
}, },
getStoreMember(page,ctPage) { getStoreMember(page,ctPage) {
this.page.currentPage = ctPage this.page.currentPage = ctPage
this.type = 4 this.type = this.sType = 5
let params = { let params = {
pageNum: page, pageNum: page,
stallId: this.storeId stallId: this.storeId
...@@ -625,12 +623,12 @@ export default { ...@@ -625,12 +623,12 @@ export default {
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
let ctPage = val let ctPage = val
this.handleTypeChange(val,ctPage) this.handleTypeChange(val,ctPage)
}, },
getMailList(page,ctPage) { getMailList(page,ctPage) {
this.formData.keywords = '' this.formData.keywords = ''
this.title = "全部" this.title = "全部"
this.type = 1; this.type = this.sType = 1;
this.page.currentPage = ctPage this.page.currentPage = ctPage
let params = { let params = {
pageNum: page pageNum: page
...@@ -643,10 +641,10 @@ export default { ...@@ -643,10 +641,10 @@ export default {
}, },
handleShopowner() {}, handleShopowner() {},
getNoGroupMember(page,ctPage) { getNoGroupMember(page,ctPage) {
this.formData.keywords = '' this.formData.keywords = ''
this.page.currentPage = ctPage this.page.currentPage = ctPage
this.title = "未分组" this.title = "未分组"
this.type = 2; this.type = this.sType = 2;
let params = { let params = {
pageNum: page pageNum: page
}; };
...@@ -660,20 +658,20 @@ export default { ...@@ -660,20 +658,20 @@ export default {
let ids = [] let ids = []
val.map(function(item) { val.map(function(item) {
ids.push(item.id) ids.push(item.id)
}); });
this.idList = ids this.idList = ids
console.log(this.idList,","); console.log(this.idList,",");
}, },
handleTypeChange(val,ctPage) { handleTypeChange(val,ctPage) {
if(this.type == 1) { if(this.type == 1) {
this.getMailList(val,ctPage) this.getMailList(val,ctPage)
}else if (this.type == 2) { }else if (this.type == 2) {
this.getNoGroupMember(val,ctPage) this.getNoGroupMember(val,ctPage)
}else if (this.type == 3) { }else if (this.type == 3) {
this.getGroupMember(val,ctPage) this.getGroupMember(val,ctPage)
}else if (this.type == 4) { }else if (this.type == 4) {
this.handleSearch(val,ctPage) this.handleSearch(val,ctPage)
} }
else { else {
...@@ -683,7 +681,7 @@ export default { ...@@ -683,7 +681,7 @@ export default {
handleSearch(page,ctPage) { handleSearch(page,ctPage) {
this.type = 4 this.type = 4
this.page.currentPage = ctPage this.page.currentPage = ctPage
switch (this.type) { switch (this.sType) {
case 1: case 1:
this.counterId = 0; this.counterId = 0;
break break
...@@ -693,16 +691,18 @@ export default { ...@@ -693,16 +691,18 @@ export default {
case 3: case 3:
this.counterId = this.groupId; this.counterId = this.groupId;
break break
case 5:
this.counterId = this.groupId;
} }
let params = { let params = {
keyWords: this.formData.keywords, keyWords: this.formData.keywords,
stallId: this.counterId, stallId: this.counterId,
pageNum: page pageNum: page
} }
search(params).then(res=>{ search(params).then(res=>{
this.tableData = res.data.list this.tableData = res.data.list
this.page.total = Number(res.data.total); this.page.total = Number(res.data.total);
}) })
} }
} }
}; };
...@@ -710,12 +710,12 @@ export default { ...@@ -710,12 +710,12 @@ export default {
<style scoped> <style scoped>
.trees >>> .el-tree-node__content { .trees >>> .el-tree-node__content {
padding: 10px; padding: 5px;
border-bottom: 1px solid #fff; /*border-bottom: 1px solid #fff;*/
} }
.trees >>> .el-tree-node__children .el-tree-node__content { .trees >>> .el-tree-node__children .el-tree-node__content {
background-color: #dadad97a; /*background-color: #dadad97a;*/
} }
.btn >>> .el-button + .el-button { .btn >>> .el-button + .el-button {
margin-left: 5px; margin-left: 5px;
......
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