diff --git a/ybf_admin/src/api/in/store.js b/ybf_admin/src/api/in/store.js index e3183a5164039b6e17e0409788d74d211b2724b7..af3db4c4d6287e1fe44f78cca4976a32bb8ec61d 100644 --- a/ybf_admin/src/api/in/store.js +++ b/ybf_admin/src/api/in/store.js @@ -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 }) diff --git a/ybf_admin/src/pages/in/contact/store.vue b/ybf_admin/src/pages/in/contact/store.vue index b70e8834147cec2aaa0cae2a229ac148873ea2ec..933e07ba9880e4077e71db451187000b67dcc7ea 100644 --- a/ybf_admin/src/pages/in/contact/store.vue +++ b/ybf_admin/src/pages/in/contact/store.vue @@ -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