Commit 5c216463 by 冒粤蓉

special shop

1 parent 2c8e4fb1
...@@ -21,7 +21,10 @@ const COMMON_API = { ...@@ -21,7 +21,10 @@ const COMMON_API = {
} }
// 特约店接口 // 特约店接口
const SPECIALSHOP_API = { const SPECIALSHOP_API = {
SHOP_SEARCH: '/trialdrive/specialshop/search' SHOP_SEARCH: '/trialdrive/specialshop/search',
GET_FENCE_DETAIL: '/trialdrive/specialshop/info',
SAVE_FENCE: '/trialdrive/specialshop/add',
UPDATE_FENCE: '/trialdrive/specialshop/edit'
} }
// 试驾报表 // 试驾报表
const REPORT_API = { const REPORT_API = {
......
...@@ -7,4 +7,19 @@ function getList (params) { ...@@ -7,4 +7,19 @@ function getList (params) {
return request(params, url) return request(params, url)
} }
export { getList } function getFenceDetailById (params) {
const url = SPECIALSHOP_API.GET_FENCE_DETAIL
return request(params, url)
}
function saveFence (params) {
const url = SPECIALSHOP_API.SAVE_FENCE
return request(params, url, 'post')
}
function updateFence (params) {
const url = SPECIALSHOP_API.UPDATE_FENCE
return request(params, url, 'post')
}
export { getList, getFenceDetailById, saveFence, updateFence }
...@@ -172,7 +172,7 @@ export default { ...@@ -172,7 +172,7 @@ export default {
{ {
type: 'primary', type: 'primary',
name: '查看', name: '查看',
pType: 'edit' pType: 'view'
} }
] ]
} }
...@@ -214,11 +214,24 @@ export default { ...@@ -214,11 +214,24 @@ export default {
this.searchForm = {} this.searchForm = {}
}, },
btnClick(pType, scope) { btnClick(pType, scope) {
console.log(pType) console.log(scope)
const { shopId } = scope;
switch (pType) { switch (pType) {
case 'create': case 'create':
this.$router.push({ name: 'addShop' }) this.$router.push({ name: 'addShop' })
break break
case 'edit':
this.$router.push({
name: 'addShop',
query: {id: shopId}
})
break
case 'view':
this.$router.push({
name: 'addShop',
query: {id: shopId, readonlyStatus: true}
})
break
} }
}, },
change(name, val) { change(name, val) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!