Commit 7c77b6d7 by wangql

提交代码

2 parents 15e66deb e3ca96ca
import { const path = 'glsx.accounts.admin.merchant.dict.'
GlAxios const methods = {
} from 'glsx-vue-common' Business: `${path}business`,
const path = 'glsx.accounts.admin.merchant' Create: `${path}create`,
const __dictBusiness = `${path}.dict.business` Channel: `${path}channel`,
Type: `${path}type`
const getBusinessList = {
p: [__dictBusiness],
req: params => GlAxios.get(__dictBusiness, { params })
} }
export { export {
getBusinessList methods
} }
const path = '/glsx.accounts.admin.merchant.' const path = 'glsx.accounts.admin.merchant.'
const methods = { const methods = {
Search: `${path}search`, Search: `${path}search`,
Detail: `${path}detail`, Detail: `${path}detail`,
......
...@@ -12,16 +12,25 @@ import { ...@@ -12,16 +12,25 @@ import {
import { import {
methods as groupDetailMethods methods as groupDetailMethods
} from './businessGroupDetail' } from './businessGroupDetail'
import {
methods as businessManagenMethods
} from './businessManagement'
const request = { const request = {
req: params => { req: params => {
params.source = 'glsx-oss-merchant-data' params.source = 'glsx-oss-merchant-data'
const url = process.env.NODE_ENV === 'production' ? 'router' : params.methods params.app_key = '48e5e13229b82c1b4e6e8c96151f0637'
return GlAxios.get(url, { 'params': sign(params) }) params.timestamp = new Date().getTime()
params.v = '1.0.0'
params.format = 'json'
// const url = process.env.NODE_ENV === 'production' ? 'router' : params.methods
// return GlAxios.get(url, { 'params': sign(params) })
return GlAxios.get('router', { 'params': sign(params) })
} }
} }
export { export {
bizMethods, bizMethods,
request, request,
groupMethods, groupMethods,
groupDetailMethods groupDetailMethods,
businessManagenMethods
} }
...@@ -79,9 +79,31 @@ ...@@ -79,9 +79,31 @@
:width="diaWidth" :width="diaWidth"
> >
<span>父商户信息:</span> <span>父商户信息:</span>
<gl-table :table="parentLevelTableData"></gl-table> <gl-table :table="parentLevelTableData">
<gl-table-column align="center" v-for="(i, index) in parentLevelTableData.column" :key="index" :label='i.label' :prop='i.prop' >
<template slot-scope="scope">
<template v-if='i.prop === "merchantName"'>
<a href="#" @click="goBusinessDetail(scope.scope.row)">{{parentLevelTableData.data[scope.scope.$index][i.prop]}}</a>
</template>
<template v-else>
{{parentLevelTableData.data[scope.scope.$index][i.prop]}}
</template>
</template>
</gl-table-column>
</gl-table>
<span>子商户信息:</span> <span>子商户信息:</span>
<gl-table :table="childLevelTableData"></gl-table> <gl-table :table="childLevelTableData">
<gl-table-column align="center" v-for="(i, index) in childLevelTableData.column" :key="index" :label='i.label' :prop='i.prop' >
<template slot-scope="scope">
<template v-if='i.prop === "merchantName"'>
<a href="#" @click="goBusinessDetail(scope.scope.row)">{{childLevelTableData.data[scope.scope.$index][i.prop]}}</a>
</template>
<template v-else>
{{childLevelTableData.data[scope.scope.$index][i.prop]}}
</template>
</template>
</gl-table-column>
</gl-table>
<span slot="footer"> <span slot="footer">
<el-button <el-button
type="primary" type="primary"
...@@ -280,7 +302,12 @@ export default { ...@@ -280,7 +302,12 @@ export default {
this.$parent.to(['商户数据平台', '商户数据平台', '商户数据平台', '业务管理', '业务管理列表']) this.$parent.to(['商户数据平台', '商户数据平台', '商户数据平台', '业务管理', '业务管理列表'])
}, },
goGroupDetail(row) { goGroupDetail(row) {
this.$root.to(['商户数据平台', '商户数据平台', '商户数据平台', '商户分组', '*商户详情'], { merchantId: row.merchantId }) this.$root.to(['商户数据平台', '商户数据平台', '商户数据平台', '商户分组', '*商户分组详情'], { merchantId: row.merchantId })
},
goBusinessDetail(row) {
this.handleDetailClose()
this.activeName = 'first'
this.merchantId = row.merchantId
}, },
// 切换tab // 切换tab
handleClick(tab, event) { handleClick(tab, event) {
...@@ -301,7 +328,7 @@ export default { ...@@ -301,7 +328,7 @@ export default {
// 基本信息 // 基本信息
getBasicInfo() { getBasicInfo() {
const params = ({ merchantId: this.merchantId }) const params = ({ merchantId: this.merchantId })
params.methods = bizMethods.Detail params.method = bizMethods.Detail
request.req(params).then(res => { request.req(params).then(res => {
this.merchantInfo = res this.merchantInfo = res
this.assignBasicInfo() this.assignBasicInfo()
...@@ -330,7 +357,7 @@ export default { ...@@ -330,7 +357,7 @@ export default {
// 员工信息 // 员工信息
getStaffInfo() { getStaffInfo() {
const params = ({ merchantId: this.merchantId }) const params = ({ merchantId: this.merchantId })
params.methods = bizMethods.Personal params.method = bizMethods.Personal
request.req(params).then(res => { request.req(params).then(res => {
this.staffTableData.data = res.merchantPersonals this.staffTableData.data = res.merchantPersonals
this.IdChange[1] = 0 this.IdChange[1] = 0
...@@ -342,7 +369,7 @@ export default { ...@@ -342,7 +369,7 @@ export default {
// 分组信息 // 分组信息
getGroupInfo() { getGroupInfo() {
const params = ({ merchantId: this.merchantId }) const params = ({ merchantId: this.merchantId })
params.methods = bizMethods.Group params.method = bizMethods.Group
request.req(params).then(res => { request.req(params).then(res => {
this.groupTableData.data = res.merchantGroups this.groupTableData.data = res.merchantGroups
this.IdChange[2] = 0 this.IdChange[2] = 0
...@@ -354,7 +381,7 @@ export default { ...@@ -354,7 +381,7 @@ export default {
// 分组信息-详情 // 分组信息-详情
getGroupLevelInfo(groupName) { getGroupLevelInfo(groupName) {
const params = ({ merchantId: this.merchantId, groupId: groupName }) const params = ({ merchantId: this.merchantId, groupId: groupName })
params.methods = bizMethods.GroupLevel params.method = bizMethods.GroupLevel
request.req(params).then(res => { request.req(params).then(res => {
console.log([res.parentMerchantLevel]) console.log([res.parentMerchantLevel])
this.parentLevelTableData.data = [res.parentMerchantLevel] this.parentLevelTableData.data = [res.parentMerchantLevel]
...@@ -388,7 +415,8 @@ export default { ...@@ -388,7 +415,8 @@ export default {
margin: 12px; margin: 12px;
} }
.detail a{ .detail a{
color: #0000FF; /* color: #0000FF; */
text-decoration:underline
} }
.detail-row { .detail-row {
line-height: 36px; line-height: 36px;
......
...@@ -140,6 +140,9 @@ export default { ...@@ -140,6 +140,9 @@ export default {
CityArea CityArea
}, },
watch: { watch: {
'searchParams.merchantId'(val) {
this.getList()
}
}, },
// mixins: [NoticeMixin], // mixins: [NoticeMixin],
data() { data() {
...@@ -239,6 +242,9 @@ export default { ...@@ -239,6 +242,9 @@ export default {
} }
}, },
mounted() { mounted() {
this.$root.eventBus.$on('params', (params) => {
this.searchParams.merchantId = params.merchantId
})
this.getList() this.getList()
this.getMerchantType() this.getMerchantType()
this.eventBus = new Vue() this.eventBus = new Vue()
......
...@@ -134,7 +134,7 @@ export default { ...@@ -134,7 +134,7 @@ export default {
label: '详情', label: '详情',
type: 'text', type: 'text',
callback: (index, rows) => { callback: (index, rows) => {
this.$root.to(['商户数据平台', '商户数据平台', '商户数据平台', '业务管理', '*商户详情'], { merchantId: rows[index].merchantId }) this.$root.to(['商户数据平台', '商户数据平台', '商户数据平台', '商户列表', '*商户详情'], { merchantId: rows[index].merchantId })
} }
}] }]
} }
...@@ -155,7 +155,7 @@ export default { ...@@ -155,7 +155,7 @@ export default {
// 接口请求-start // 接口请求-start
getList() { getList() {
const params = this.getParams() const params = this.getParams()
params.methods = bizMethods.Search params.method = bizMethods.Search
request.req(params).then(res => { request.req(params).then(res => {
this.ListTableData.data = res.merchants this.ListTableData.data = res.merchants
this.totalCount = res.pagination.totalCount this.totalCount = res.pagination.totalCount
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!