Commit 2e64d5eb authored by Z's avatar Z

Z: Dot: In/Store's mainList done(includ trans manName).

parent ade29c86
......@@ -60,7 +60,7 @@
<el-table-column type="selection" width="60"></el-table-column>
<el-table-column prop="name" label="门店名称" align="center"></el-table-column>
<el-table-column prop="type" label="门店类型" align="center" width="120"></el-table-column>
<el-table-column prop=“principal” label="门店负责人" align="center" width="120"></el-table-column>
<el-table-column prop="principal" label="门店负责人" align="center" width="120"></el-table-column>
<el-table-column prop="signNum" label="所属柜组" align="center" width="120"></el-table-column>
<el-table-column prop="location" label="位置" align="center" width="120"></el-table-column>
<el-table-column prop="shopId" label="门牌号" align="center" width="120"></el-table-column>
......@@ -68,7 +68,7 @@
<el-table-column label="操作" align="center" fixed="right" width="200">
<template slot-scope="scope">
<el-button type="text" @click="storeGetStoreDetail(scope.row.id)" class="btn">详情</el-button>
<el-button type="text" @click="testButtonClick(scope.row)" class="btn" >编辑</el-button>
<el-button type="text" @click="testButtonClick(scope.row.id)" class="btn">编辑</el-button>
<el-button type="text" @click="storeDelStore(scope.row.id)" class="listButtonRed">删除</el-button>
</template>
</el-table-column>
......@@ -172,6 +172,7 @@ export default {
}
],
main: [],
man: [],
search: {
bar: [
{
......@@ -208,7 +209,7 @@ export default {
}
},
msgId: "",
detailDialog: false,
detailDialog: false
};
},
......@@ -220,15 +221,50 @@ export default {
this.storeGetMainList();
},
methods: {
matchManIdAndManName(inId) {
let manList = this.list.man;
let manName = "未知";
for (let i = 0; i < this.list.man.length; i++) {
let item = manList[i];
if (item.id == inId) {
manName = item.userName;
}
}
return manName;
},
transManIdToManName() {
let mainList = this.list.main;
let id = "";
let name = "";
for (let i = 0; i < mainList.length; i++) {
console.log("--->list: Num =", i);
id = this.list.main[i].principal;
console.log("id =", id);
name = this.matchManIdAndManName(id);
console.log("name =", name);
this.list.main[i].principal = name;
}
},
storeGetMainList() {
// zlog("--->In Get API!");
let postData = {
pageNum: 1
}
};
ApiStoreGetMainList(postData).then(res => {
// this.list.mainV = res.data.adminStalls;
this.list.main = res.data.pageInfo_adminStalls.list[0];
this.list.man = res.data.pageInfo_principals.list[0];
console.log("===>Main: Length =", this.list.main.length);
console.log("===>Man: Length =", this.list.man.length);
this.transManIdToManName();
});
},
storeGetStoreDetail(inData) {
......
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