Commit fd3573d5 authored by Z's avatar Z

Z: Dot: store's done.

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