Commit fd3573d5 authored by Z's avatar Z

Z: Dot: store's done.

parent 1ae9114c
...@@ -11,7 +11,7 @@ export function ApiStoreGetMainList(inData) { ...@@ -11,7 +11,7 @@ export function ApiStoreGetMainList(inData) {
export function ApiStoreGetStoreDetail(inData) { export function ApiStoreGetStoreDetail(inData) {
return request({ return request({
url: '/admin/auth/stall/get', url: '/admin/auth/stall/getById',
method: 'get', method: 'get',
params: inData params: inData
}) })
...@@ -51,7 +51,7 @@ export function ApiStoreEditStore(inData) { ...@@ -51,7 +51,7 @@ export function ApiStoreEditStore(inData) {
export function ApiStoreGetBarList(inData) { export function ApiStoreGetBarList(inData) {
return request({ return request({
url: '/admin/auth/shop/shopPage', url: '/admin/auth/shop/shopList',
method: 'get', method: 'get',
params: inData params: inData
}) })
......
...@@ -38,17 +38,17 @@ ...@@ -38,17 +38,17 @@
height="calc(100vh - 360px)" height="calc(100vh - 360px)"
> >
<el-table-column type="selection" width="60"></el-table-column> <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="adminStall.name" label="品牌名称" align="center"></el-table-column>
<el-table-column prop="type" label="品牌类型" align="center" width="120"></el-table-column> <el-table-column prop="adminStall.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="adminStall.principal" label="品牌负责人" align="center" width="120"></el-table-column>
<el-table-column prop="shopId" label="所属柜组" align="center" width="120"></el-table-column> <el-table-column prop="shopName" 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="adminStall.location" 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="adminStall.signNum" label="门牌号" align="center" width="120"></el-table-column>
<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" @click="storeGetStoreDetail(scope.row.id)" class="btn">详情</el-button> <el-button type="text" @click="storeGetStoreDetail(scope.row.adminStall.id)" class="btn">详情</el-button>
<el-button type="text" @click="storeEditStore(scope.row.id)" class="btn">编辑</el-button> <el-button type="text" @click="storeEditStore(scope.row.adminStall.id)" class="btn">编辑</el-button>
<el-button type="text" @click="storeDelStore(scope.row.id)" class="listButtonRed">删除</el-button> <el-button type="text" @click="storeDelStore(scope.row.adminStall.id)" class="listButtonRed">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -116,6 +116,7 @@ ...@@ -116,6 +116,7 @@
v-model="zdata.newPost.storeBossId" v-model="zdata.newPost.storeBossId"
placeholder="请选择品牌负责人" placeholder="请选择品牌负责人"
style="width:240px" style="width:240px"
@change="ztestman"
> >
<el-option <el-option
v-for="item in zlist.unGroupMan" v-for="item in zlist.unGroupMan"
...@@ -134,7 +135,7 @@ ...@@ -134,7 +135,7 @@
style="width:240px" style="width:240px"
> >
<el-option <el-option
v-for="item in zlist.storeFromBarId" v-for="item in zlist.bar"
:key="item.id" :key="item.id"
:label="item.name" :label="item.name"
:value="item.id" :value="item.id"
...@@ -631,9 +632,19 @@ export default { ...@@ -631,9 +632,19 @@ export default {
mounted() { mounted() {
// this.storeGetMainList(); // this.storeGetMainList();
this.storeSearch(); this.storeSearch();
this.storeReadyBarList()
this.storeGetUnGroupManList(); this.storeGetUnGroupManList();
}, },
methods: { methods: {
storeReadyBarList(){
ApiStoreGetBarList()
.then(res => {
this.zlist.bar = res.data
})
.catch(err => {
})
},
storeGetUnGroupManList() { storeGetUnGroupManList() {
let postData = {}; let postData = {};
...@@ -665,14 +676,14 @@ export default { ...@@ -665,14 +676,14 @@ export default {
for (let i = 0; i < mainList.length; i++) { for (let i = 0; i < mainList.length; i++) {
if ( if (
this.list.main[i].principal && this.list.main[i].adminStall.principal &&
this.list.main[i].principal != null this.list.main[i].adminStall.principal != null
) { ) {
id = this.list.main[i].principal; id = this.list.main[i].adminStall.principal;
name = this.matchManIdAndManName(id); name = this.matchManIdAndManName(id);
this.list.main[i].principal = name; this.list.main[i].adminStall.principal = name;
} else { } else {
this.list.main[i].principal = "未知"; this.list.main[i].adminStall.principal = "未知";
} }
} }
}, },
...@@ -759,7 +770,8 @@ export default { ...@@ -759,7 +770,8 @@ export default {
.then(res => { .then(res => {
this.zdata.see.storeName = res.data.adminStall.name; this.zdata.see.storeName = res.data.adminStall.name;
this.zdata.see.storeType = res.data.adminStall.type; this.zdata.see.storeType = res.data.adminStall.type;
this.zdata.see.storeFromBar = res.data.adminStall.shopId; // this.zdata.see.storeFromBar = res.data.adminStall.shopId;
this.zdata.see.storeFromBar = res.data.shopName;
this.zdata.see.storeBossName = res.data.principal.userName; this.zdata.see.storeBossName = res.data.principal.userName;
this.zdata.see.storeDoorId = res.data.adminStall.signNum; this.zdata.see.storeDoorId = res.data.adminStall.signNum;
this.zdata.see.storeAddress = res.data.adminStall.location; this.zdata.see.storeAddress = res.data.adminStall.location;
...@@ -866,6 +878,11 @@ export default { ...@@ -866,6 +878,11 @@ export default {
}); });
}, },
ztestman(inData){
console.log('--->ManList =', this.zlist.unGroupMan)
console.log('--->PickId =', inData, ' type =', typeof(inData))
// this.zdata.newPost.storeBossId = Number(inData)
},
dialogNewClose() { dialogNewClose() {
this.zcache.status.newDialog = false; this.zcache.status.newDialog = false;
this.zdata.newPost = JSON.parse( this.zdata.newPost = JSON.parse(
...@@ -879,10 +896,12 @@ export default { ...@@ -879,10 +896,12 @@ export default {
); );
}, },
dialogNewSubmit() { dialogNewSubmit() {
// console.log('--->PostId =', this.zdata.newPost.storeBossId * 1)
let postData = { let postData = {
name: this.zdata.newPost.storeName, name: this.zdata.newPost.storeName,
stallType: Number(this.zdata.newPost.storeTypeId), // stallType: Number(this.zdata.newPost.storeTypeId),
principal: Number(this.zdata.newPost.storeBossId), stallType: this.zdata.newPost.storeTypeId,
principal: this.zdata.newPost.storeBossId,
shopId: this.zdata.newPost.storeFromBarId, shopId: this.zdata.newPost.storeFromBarId,
signNum: this.zdata.newPost.storeDoorCode, signNum: this.zdata.newPost.storeDoorCode,
location: this.zdata.newPost.storeAddress location: this.zdata.newPost.storeAddress
......
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