Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx-web
/
glsx-oss-merchant-data
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 6d448750
authored
Mar 25, 2019
by
wangql
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
提交代码
2 parents
0fe5e70a
232e3b4e
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
373 additions
and
263 deletions
package-lock.json
package.json
src/api/businessGroup.js
src/api/businessGroupDetail.js
src/api/bussinessListApi.js
src/api/index.js
src/api/sign.js
src/base.js
src/views/customer/businessDetails/index.vue
src/views/customer/businessGroup/index.vue
src/views/customer/businessGroupDetail/index.vue
src/views/customer/businessList/index.vue
src/views/customer/businessManagement/index.vue
src/views/customer/components/src/cityArea.vue
package-lock.json
View file @
6d44875
...
@@ -2270,6 +2270,11 @@
...
@@ -2270,6 +2270,11 @@
"integrity"
:
"sha1-2VUfnemPH82h5oPRfukaBgLuLrk="
,
"integrity"
:
"sha1-2VUfnemPH82h5oPRfukaBgLuLrk="
,
"dev"
:
true
"dev"
:
true
},
},
"blueimp-md5"
:
{
"version"
:
"2.10.0"
,
"resolved"
:
"https://registry.npmjs.org/blueimp-md5/-/blueimp-md5-2.10.0.tgz"
,
"integrity"
:
"sha512-EkNUOi7tpV68TqjpiUz9D9NcT8um2+qtgntmMbi5UKssVX2m/2PLqotcric0RE63pB3HPN/fjf3cKHN2ufGSUQ=="
},
"bn.js"
:
{
"bn.js"
:
{
"version"
:
"4.11.8"
,
"version"
:
"4.11.8"
,
"resolved"
:
"http://registry.npm.taobao.org/bn.js/download/bn.js-4.11.8.tgz"
,
"resolved"
:
"http://registry.npm.taobao.org/bn.js/download/bn.js-4.11.8.tgz"
,
...
@@ -6025,9 +6030,9 @@
...
@@ -6025,9 +6030,9 @@
}
}
},
},
"glsx-vue-common"
:
{
"glsx-vue-common"
:
{
"version"
:
"1.2.
0
"
,
"version"
:
"1.2.
1
"
,
"resolved"
:
"http
://registry.npm.taobao.org/glsx-vue-common/download/glsx-vue-common-1.2.0
.tgz"
,
"resolved"
:
"http
s://registry.npmjs.org/glsx-vue-common/-/glsx-vue-common-1.2.1
.tgz"
,
"integrity"
:
"sha
1-wyMWhUiCwyjsQjM2kih4NuTbMgM
="
,
"integrity"
:
"sha
512-QlTi29xq4lwV4I0l7FgdEaIyXyCbdKMUF6JvlYT0S/7rdfHzZRR3Y1GtO3e3y62S3dyku+7EQLXbr7y9Qd27Xw=
="
,
"requires"
:
{
"requires"
:
{
"vue"
:
"^2.5.10"
"vue"
:
"^2.5.10"
}
}
...
@@ -7304,6 +7309,11 @@
...
@@ -7304,6 +7309,11 @@
"resolved"
:
"http://registry.npm.taobao.org/js-base64/download/js-base64-2.4.9.tgz"
,
"resolved"
:
"http://registry.npm.taobao.org/js-base64/download/js-base64-2.4.9.tgz"
,
"integrity"
:
"sha1-dIkR+wT0imDEdxs3XKxFqA3xHAM="
"integrity"
:
"sha1-dIkR+wT0imDEdxs3XKxFqA3xHAM="
},
},
"js-md5"
:
{
"version"
:
"0.7.3"
,
"resolved"
:
"https://registry.npmjs.org/js-md5/-/js-md5-0.7.3.tgz"
,
"integrity"
:
"sha512-ZC41vPSTLKGwIRjqDh8DfXoCrdQIyBgspJVPXHBGu4nZlAEvG3nf+jO9avM9RmLiGakg7vz974ms99nEV0tmTQ=="
},
"js-message"
:
{
"js-message"
:
{
"version"
:
"1.0.5"
,
"version"
:
"1.0.5"
,
"resolved"
:
"http://registry.npm.taobao.org/js-message/download/js-message-1.0.5.tgz"
,
"resolved"
:
"http://registry.npm.taobao.org/js-message/download/js-message-1.0.5.tgz"
,
...
...
package.json
View file @
6d44875
...
@@ -9,8 +9,10 @@
...
@@ -9,8 +9,10 @@
},
},
"dependencies"
:
{
"dependencies"
:
{
"axios"
:
"^0.18.0"
,
"axios"
:
"^0.18.0"
,
"glsx-vue-common"
:
"^1.1.14"
,
"glsx-vue-common"
:
"^1.2.1"
,
"blueimp-md5"
:
"^2.10.0"
,
"glsx-vue-components"
:
"^1.0.13"
,
"glsx-vue-components"
:
"^1.0.13"
,
"js-md5"
:
"^0.7.3"
,
"node-sass"
:
"^4.9.3"
,
"node-sass"
:
"^4.9.3"
,
"sass-loader"
:
"^7.1.0"
,
"sass-loader"
:
"^7.1.0"
,
"vee-validate"
:
"^2.1.7"
,
"vee-validate"
:
"^2.1.7"
,
...
...
src/api/businessGroup.js
View file @
6d44875
import
{
const
path
=
'/glsx.accounts.admin.merchant.group.'
GlAxios
const
methods
=
{
}
from
'glsx-vue-common'
Search
:
`
${
path
}
dict`
,
const
path
=
'/glsx.accounts.admin.merchant.group'
Create
:
`
${
path
}
create`
const
__groupList
=
`
${
path
}
.dict`
const
__create
=
`
${
path
}
.create`
const
getMerchantGroupList
=
{
p
:
[
__groupList
],
req
:
params
=>
GlAxios
.
get
(
__groupList
,
{
params
})
}
}
const
createGroup
=
{
p
:
[
__create
],
req
:
params
=>
GlAxios
.
get
(
__groupList
,
{
params
})
}
export
{
export
{
getMerchantGroupList
,
methods
createGroup
}
}
src/api/businessGroupDetail.js
View file @
6d44875
import
{
const
path
=
'/glsx.accounts.admin.merchant.group.'
GlAxios
const
methods
=
{
}
from
'glsx-vue-common'
Search
:
`
${
path
}
search`
const
path
=
'/glsx.accounts.admin.merchant.group'
const
__groupDetailList
=
`
${
path
}
.search`
const
getMerchantGroupDetailList
=
{
p
:
[
__groupDetailList
],
req
:
params
=>
GlAxios
.
get
(
__groupDetailList
,
{
params
})
}
}
export
{
export
{
getMerchantGroupDetailList
methods
}
}
src/api/bussinessListApi.js
View file @
6d44875
import
{
GlAxios
}
from
'glsx-vue-common'
const
path
=
'/glsx.accounts.admin.merchant.'
const
path
=
'/glsx.accounts.admin.merchant.'
const
__sGetList
=
`
${
path
}
search`
const
methods
=
{
const
__sDetail
=
`
${
path
}
detail`
Search
:
`
${
path
}
search`
,
const
__sPersonal
=
`
${
path
}
personal`
Detail
:
`
${
path
}
detail`
,
const
__sGroup
=
`
${
path
}
group`
Personal
:
`
${
path
}
personal`
,
const
__sSaveMerchant
=
`
${
path
}
create`
Group
:
`
${
path
}
group`
,
const
__sLevel
=
`
${
path
}
group.level`
Create
:
`
${
path
}
create`
,
GroupLevel
:
`
${
path
}
group.level`
// 获取商户列表(根据条件获取商户列表)
const
getList
=
{
p
:
[
__sGetList
],
req
:
params
=>
GlAxios
.
get
(
__sGetList
,
{
params
})
}
}
// 获取商户详情(通过商户id获取商户详情)
const
merchantDetail
=
{
p
:
[
__sDetail
],
req
:
params
=>
GlAxios
.
get
(
__sDetail
,
{
params
})
}
// 获取员工信息(通过商户id获取员工信息)
const
merchantPersonal
=
{
p
:
[
__sPersonal
],
req
:
params
=>
GlAxios
.
get
(
__sPersonal
,
{
params
})
}
// 获取分组信息(通过商户id获取分组信息)
const
merchantGroup
=
{
p
:
[
__sGroup
],
req
:
params
=>
GlAxios
.
get
(
__sGroup
,
{
params
})
}
// 新增商户
const
saveMerchant
=
{
p
:
[
__sSaveMerchant
],
req
:
params
=>
GlAxios
.
get
(
__sSaveMerchant
,
{
params
})
}
// 根据分组跟商户查询父子商户
const
merchantGroupLevel
=
{
p
:
[
__sLevel
],
req
:
params
=>
GlAxios
.
get
(
__sLevel
,
{
params
})
}
export
{
export
{
getList
,
methods
merchantDetail
,
merchantPersonal
,
merchantGroup
,
saveMerchant
,
merchantGroupLevel
}
}
src/api/index.js
View file @
6d44875
import
{
import
{
getBusinessList
GlAxios
}
from
'./businessManagement'
}
from
'glsx-vue-common'
import
{
sign
}
from
'./sign'
import
{
import
{
getList
,
methods
as
bizMethods
merchantDetail
,
merchantPersonal
,
merchantGroup
,
saveMerchant
,
merchantGroupLevel
}
from
'./bussinessListApi'
}
from
'./bussinessListApi'
import
{
import
{
getMerchantGroupList
,
methods
as
groupMethods
createGroup
}
from
'./businessGroup'
}
from
'./businessGroup'
import
{
import
{
getMerchantGroupDetailList
methods
as
groupDetailMethods
}
from
'./businessGroupDetail'
}
from
'./businessGroupDetail'
const
request
=
{
req
:
params
=>
{
const
url
=
process
.
env
.
NODE_ENV
===
'production'
?
'router'
:
params
.
methods
return
GlAxios
.
get
(
url
,
{
'params'
:
sign
(
params
)
})
}
}
export
{
export
{
getBusinessList
,
bizMethods
,
getList
,
request
,
saveMerchant
,
groupMethods
,
getMerchantGroupList
,
groupDetailMethods
createGroup
,
getMerchantGroupDetailList
,
merchantDetail
,
merchantPersonal
,
merchantGroup
,
merchantGroupLevel
}
}
src/api/sign.js
0 → 100644
View file @
6d44875
import
MD5
from
'js-md5'
const
sign
=
params
=>
{
const
secret
=
'c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b'
const
keys
=
Object
.
keys
(
params
).
sort
()
var
str
=
[]
keys
.
forEach
(
e
=>
{
str
.
push
(
e
+
params
[
e
])
})
params
.
sign
=
MD5
(
secret
+
str
.
join
(
''
)
+
secret
)
return
params
}
export
{
sign
}
src/base.js
View file @
6d44875
...
@@ -35,7 +35,19 @@ Vue.use(VeeValidate, {
...
@@ -35,7 +35,19 @@ Vue.use(VeeValidate, {
var
mixin
=
{
var
mixin
=
{
data
()
{
data
()
{
return
{
return
{
flag
:
true
flag
:
true
,
// paramsTrans: '',
/**
* 定义一个事件传输总线
* 提示:页面与子组件间的参数都可以用之来互相传递
* 如:
* this.$root.eventBus.$emit('params', {id:123});
*
this.$root.eventBus.$on('params', (params)=>{
console.log(params);
});
*/
eventBus
:
new
Vue
()
}
}
},
},
mounted
()
{
mounted
()
{
...
@@ -86,21 +98,10 @@ var mixin = {
...
@@ -86,21 +98,10 @@ var mixin = {
})
})
}
}
}
}
},
// getParamsTrans() {
data
()
{
// console.log(this.paramsTrans)
return
{
// return this.paramsTrans
/**
// }
* 定义一个事件传输总线
* 提示:页面与子组件间的参数都可以用之来互相传递
* 如:
* this.$root.eventBus.$emit('params', {id:123});
*
this.$root.eventBus.$on('params', (params)=>{
console.log(params);
});
*/
eventBus
:
new
Vue
()
}
}
}
}
}
const
URL
=
' http://192.168.3.171:7300/mock/5be17454f31545347559d499/config'
const
URL
=
' http://192.168.3.171:7300/mock/5be17454f31545347559d499/config'
...
...
src/views/customer/businessDetails/index.vue
View file @
6d44875
<
template
>
<
template
>
<div
class=
"detail"
>
<div
class=
"detail"
>
<gl-breadcrumb
separator=
'/'
>
<gl-breadcrumb
separator=
'/'
>
<gl-breadcrumb-item><a
href=
'#'
@
click=
'back'
>
商户列表
</a></gl-breadcrumb-item>
<gl-breadcrumb-item><a
href=
'#'
@
click=
'back'
>
商户列表
</a></gl-breadcrumb-item>
<gl-breadcrumb-item>
商户详情
</gl-breadcrumb-item>
<gl-breadcrumb-item>
商户详情
</gl-breadcrumb-item>
<gl-breadcrumb-item>
{{
nam
e
}}
</gl-breadcrumb-item>
<gl-breadcrumb-item>
{{
List
[
0
].
valu
e
}}
</gl-breadcrumb-item>
</gl-breadcrumb>
</gl-breadcrumb>
<!--
<gl-button
type=
'text'
@
click=
'back'
>
商户列表
</gl-button>
<!--
<gl-button
type=
'text'
@
click=
'back'
>
商户列表
</gl-button>
<span>
\ 商户详情 \
{{
name
}}
</span>
-->
<span>
\ 商户详情 \
{{
name
}}
</span>
-->
<gl-tabs
v-model=
'activeName'
@
tab-click=
'handleClick'
>
<gl-tabs
<gl-tab-pane
label=
'基本信息'
name=
'first'
>
v-model=
'activeName'
<gl-col
class=
"detail-row"
:span=
"i.isMap || i.img? 24 : 12"
v-for=
"(i, index) in List"
:key=
"index+''"
>
@
tab-click=
'handleClick'
>
<gl-tab-pane
label=
'基本信息'
name=
'first'
>
<gl-col
class=
"detail-row"
:span=
"i.isMap || i.img? 24 : 12"
v-for=
"(i, index) in List"
:key=
"index+''"
>
<span>
{{
i
.
label
}}
:
<span>
{{
i
.
label
}}
:
<div
v-if=
"i.isMap"
class=
'amap-page-container'
>
<div
<el-amap
vid=
'amapDemo'
:center=
'center'
:amap-manager=
'amapManager'
:zoom=
'zoom'
:events=
'events'
class=
'amap-demo'
>
v-if=
"i.isMap"
class=
'amap-page-container'
>
<el-amap
vid=
'amapDemo'
:center=
'center'
:amap-manager=
'amapManager'
:zoom=
'zoom'
class=
'amap-demo'
>
</el-amap>
</el-amap>
</div>
</div>
<img
v-else-if=
"i.isImg"
class=
"detail-logo"
:src=
"i.value"
alt=
""
>
<img
v-else-if=
"i.isImg"
class=
"detail-logo"
:src=
"i.value"
alt=
""
>
<span
v-else
>
{{
i
.
value
}}
</span>
<span
v-else
>
{{
i
.
value
}}
</span>
</span>
</span>
</gl-col>
</gl-col>
...
@@ -23,11 +51,17 @@
...
@@ -23,11 +51,17 @@
</gl-col>
-->
</gl-col>
-->
</gl-tab-pane>
</gl-tab-pane>
<gl-tab-pane
label=
'员工信息'
name=
'second'
>
配置管理
<gl-tab-pane
label=
'员工信息'
name=
'second'
>
<gl-table
:table=
"staffTableData"
></gl-table>
<gl-table
:table=
"staffTableData"
></gl-table>
</gl-tab-pane>
</gl-tab-pane>
<gl-tab-pane
label=
'分组信息'
name=
'third'
>
角色管理
<gl-tab-pane
label=
'分组信息'
name=
'third'
>
<gl-table
:table=
"groupTableData"
></gl-table>
</gl-tab-pane>
</gl-tab-pane>
</gl-tabs>
</gl-tabs>
</div>
</div>
...
@@ -36,7 +70,7 @@
...
@@ -36,7 +70,7 @@
<
script
>
<
script
>
import
VueAMap
from
'vue-amap'
import
VueAMap
from
'vue-amap'
import
Vue
from
'vue'
import
Vue
from
'vue'
import
{
merchant
Personal
}
from
'@/api/index'
import
{
merchant
Detail
,
merchantPersonal
,
merchantGroup
}
from
'@/api/index'
import
notice
from
'@/common/notice'
import
notice
from
'@/common/notice'
const
amapManager
=
new
VueAMap
.
AMapManager
()
const
amapManager
=
new
VueAMap
.
AMapManager
()
VueAMap
.
initAMapApiLoader
({
VueAMap
.
initAMapApiLoader
({
...
@@ -47,60 +81,68 @@ Vue.use(VueAMap)
...
@@ -47,60 +81,68 @@ Vue.use(VueAMap)
export
default
{
export
default
{
name
:
'BusinessDetails'
,
name
:
'BusinessDetails'
,
data
()
{
data
()
{
const
_this
=
this
return
{
return
{
name
:
''
,
merchantId
:
''
,
// 标记merchantId是否改变
IdChange
:
[
0
,
0
,
0
],
activeName
:
'first'
,
activeName
:
'first'
,
merchantInfo
:
{},
List
:
[
List
:
[
{
{
name
:
'merchantName'
,
label
:
'商户名称'
,
label
:
'商户名称'
,
value
:
'
深圳市安卓讯航科技有限公司
'
value
:
''
},
{
},
{
name
:
'merchantId'
,
label
:
'商户号'
,
label
:
'商户号'
,
value
:
'
44186213
'
value
:
''
},
{
},
{
name
:
'address'
,
label
:
'商户地址'
,
label
:
'商户地址'
,
value
:
'
广东省深圳市南山区科兴科学园C3单元
'
value
:
''
},
{
},
{
name
:
'merchantChannelName'
,
label
:
'商户渠道'
,
label
:
'商户渠道'
,
value
:
'
自有渠道
'
value
:
''
},
{
},
{
name
:
'contactor'
,
label
:
'联系人'
,
label
:
'联系人'
,
value
:
'
彭裕
'
value
:
''
},
{
},
{
name
:
'createTime'
,
label
:
'注册时间'
,
label
:
'注册时间'
,
value
:
'
2018-03-16
'
value
:
''
},
{
},
{
name
:
'contactPhone'
,
label
:
'联系电话'
,
label
:
'联系电话'
,
value
:
'
15999682114
'
value
:
''
},
{
},
{
label
:
'POI位置点'
,
label
:
'POI位置点'
,
value
:
'
深圳市安卓讯航科技有限公司
'
,
value
:
''
,
isMap
:
true
isMap
:
true
},
{
},
{
name
:
'phone'
,
label
:
'服务电话'
,
label
:
'服务电话'
,
value
:
'
0755-88888888
'
value
:
''
},
{
},
{
name
:
'email'
,
label
:
'邮箱'
,
label
:
'邮箱'
,
value
:
'
GLSX@didihu.com
'
value
:
''
},
{
},
{
label
:
'商户LOGO'
,
label
:
'商户LOGO'
,
value
:
'
http://www.pptbz.com/pptpic/UploadFiles_6909/201203/2012031220134655.jpg
'
,
value
:
''
,
isImg
:
true
isImg
:
true
}
}
],
],
zoom
:
12
,
zoom
:
12
,
center
:
[
121.59996
,
31.197646
],
// 地图中心点
// 地图中心点(初始化得有值);也是标记点
center
:
[
121.59996
,
31.197646
],
amapManager
,
amapManager
,
events
:
{
// 员工状态:0可用,1不可用
init
(
o
)
{
status
:
{
const
marker
=
new
AMap
.
Marker
({
0
:
'启用'
,
position
:
_this
.
point
1
:
'停用'
})
marker
.
setMap
(
o
)
}
},
},
point
:
[
116.397428
,
39.90923
],
// 赋值的点,有接口可删
// 员工信息
// 员工信息
staffTableData
:
{
staffTableData
:
{
border
:
true
,
border
:
true
,
...
@@ -124,54 +166,126 @@ export default {
...
@@ -124,54 +166,126 @@ export default {
prop
:
'phone'
prop
:
'phone'
},
{
},
{
label
:
'状态'
,
label
:
'状态'
,
prop
:
'status'
prop
:
'status'
,
formatter
:
(
cellValue
)
=>
{
return
this
.
status
[
cellValue
.
status
]
}
}]
}]
},
// 分组信息
groupTableData
:
{
border
:
true
,
height
:
parseInt
(
this
.
$client_height
()
-
140
),
align
:
'center'
,
data
:
[],
column
:
[{
label
:
'ID'
,
prop
:
'id'
},
{
label
:
'加入分组名称'
,
prop
:
'groupName'
},
{
label
:
'业务名称'
,
prop
:
'bussinessName'
},
{
label
:
'商户类型'
,
prop
:
'merchantTypeName'
},
{
label
:
'加入分组时间'
,
prop
:
'createTime'
}],
console
:
{
show
:
true
,
label
:
'操作'
,
button
:
[{
label
:
'详情'
,
type
:
'text'
,
callback
:
(
index
,
rows
)
=>
{
console
.
log
(
rows
[
index
])
}
}]
}
}
}
}
}
},
},
watch
:
{
merchantId
(
val
)
{
// 标记merchantId改变
this
.
IdChange
=
[
1
,
1
,
1
]
this
.
getBasicInfo
()
}
},
mounted
()
{
mounted
()
{
console
.
log
(
this
)
this
.
$root
.
eventBus
.
$on
(
'params'
,
(
params
)
=>
{
this
.
$root
.
eventBus
.
$on
(
'params'
,
(
params
)
=>
{
console
.
log
(
params
)
if
(
params
.
merchantId
!==
this
.
merchantId
)
{
this
.
name
=
params
.
name
this
.
activeName
=
'first'
this
.
merchantId
=
params
.
merchantId
}
})
})
// setTimeout(() => {
// const theme = new this.$Theme()
// theme.change('#FF0000')
// }, 1000)
// const theme = new this.$Theme()
// console.log(theme)
// theme.change('#FF0000')
// this.center = this.point
// 链接,接受参数
// var url = location.search
// var theRequest = {}
// if (url.indexOf('?') !== -1) {
// // substr()方法返回从参数值开始到结束的字符串
// var str = url.substr(1)
// var strs = str.split('&')
// const text = []
// for (var i = 0; i < strs.length; i++) {
// // 处理乱码
// text[i] = decodeURI(strs[i])
// theRequest[text[i].split('=')[0]] = (text[ i ].split('=')[1])
// }
// this.name = theRequest.name
// }
},
},
methods
:
{
methods
:
{
back
()
{
back
()
{
// history.back()
this
.
$parent
.
to
([
'商户数据平台'
,
'商户数据平台'
,
'商户数据平台'
,
'业务管理'
,
'业务管理列表'
])
this
.
$parent
.
to
([
'商户数据平台'
,
'商户数据平台'
,
'商户数据平台'
,
'业务管理'
,
'业务管理列表'
])
},
},
// 切换tab
handleClick
(
tab
,
event
)
{
handleClick
(
tab
,
event
)
{
console
.
log
(
tab
,
event
)
// console.log(tab, event)
// console.log(this.IdChange)
switch
(
tab
.
name
)
{
case
'first'
:
this
.
IdChange
[
0
]
&&
this
.
getBasicInfo
()
break
case
'second'
:
this
.
IdChange
[
1
]
&&
this
.
getStaffInfo
()
break
case
'third'
:
this
.
IdChange
[
2
]
&&
this
.
getGroupInfo
()
break
}
},
// 基本信息
getBasicInfo
()
{
merchantDetail
.
req
({
merchantId
:
this
.
merchantId
}).
then
(
res
=>
{
this
.
merchantInfo
=
res
this
.
assignBasicInfo
()
this
.
IdChange
[
0
]
=
0
// notice.okTips()
}).
catch
(
err
=>
{
notice
.
errorTips
(
err
)
})
},
assignBasicInfo
()
{
for
(
var
i
in
this
.
List
)
{
if
(
this
.
List
[
i
].
isMap
)
{
this
.
center
=
[
+
this
.
merchantInfo
.
lng
,
+
this
.
merchantInfo
.
lat
]
const
o
=
amapManager
.
getMap
()
const
marker
=
new
AMap
.
Marker
({
position
:
this
.
center
})
marker
.
setMap
(
o
)
}
else
if
(
this
.
List
[
i
].
isImg
)
{
this
.
List
[
i
].
value
=
'http://www.pptbz.com/pptpic/UploadFiles_6909/201203/2012031220134655.jpg'
}
else
{
this
.
List
[
i
].
value
=
this
.
merchantInfo
[
this
.
List
[
i
].
name
]
}
}
},
// 员工信息
getStaffInfo
()
{
merchantPersonal
.
req
({
merchantId
:
this
.
merchantId
}).
then
(
res
=>
{
this
.
staffTableData
.
data
=
res
.
merchantPersonals
this
.
IdChange
[
1
]
=
0
// notice.okTips()
}).
catch
(
err
=>
{
notice
.
errorTips
(
err
)
})
},
},
// 员工信息-接口
// 分组信息
getStaffList
()
{
getGroupInfo
()
{
merchantPersonal
.
req
().
then
(
res
=>
{
merchantGroup
.
req
({
merchantId
:
this
.
merchantId
}).
then
(
res
=>
{
notice
.
okTips
(
res
)
this
.
groupTableData
.
data
=
res
.
merchantGroups
this
.
IdChange
[
2
]
=
0
// notice.okTips()
}).
catch
(
err
=>
{
}).
catch
(
err
=>
{
notice
.
errorTips
(
err
)
notice
.
errorTips
(
err
)
})
})
...
...
src/views/customer/businessGroup/index.vue
View file @
6d44875
...
@@ -100,9 +100,10 @@
...
@@ -100,9 +100,10 @@
<
script
>
<
script
>
// import Edit from './Edit'
// import Edit from './Edit'
// import { fn, treeCheckKeys, deleteEmptyAttribute } from '@/common/common'
// import { fn, treeCheckKeys, deleteEmptyAttribute } from '@/common/common'
import
{
getMerchantGroupList
,
createGroup
}
from
'@/api/index'
//
import { getMerchantGroupList, createGroup } from '@/api/index'
// import { NoticeMixin } from '@/mixins'
// import { NoticeMixin } from '@/mixins'
// import Vue from 'vue'
// import Vue from 'vue'
import
{
groupMethods
,
request
}
from
'@/api'
export
default
{
export
default
{
name
:
'businessGroup'
,
name
:
'businessGroup'
,
components
:
{
components
:
{
...
@@ -220,8 +221,10 @@ export default {
...
@@ -220,8 +221,10 @@ export default {
// },
// },
getList
()
{
getList
()
{
// const params = this.getParams()
// const params = this.getParams()
getMerchantGroupList
const
params
=
{}
.
req
({})
params
.
methods
=
groupMethods
.
Search
request
.
req
(
params
)
.
then
(
res
=>
{
.
then
(
res
=>
{
this
.
total
=
res
.
pagination
.
totalCount
this
.
total
=
res
.
pagination
.
totalCount
this
.
tableData
.
data
=
res
.
groupDicts
this
.
tableData
.
data
=
res
.
groupDicts
...
@@ -255,8 +258,10 @@ export default {
...
@@ -255,8 +258,10 @@ export default {
}
}
})
})
},
},
createGroup
(
params
)
{
createGroup
(
pas
)
{
createGroup
const
params
=
pas
params
.
methods
=
groupMethods
.
Create
request
.
req
(
params
)
.
req
(
params
)
.
then
(
res
=>
{
.
then
(
res
=>
{
console
.
log
(
res
)
console
.
log
(
res
)
...
...
src/views/customer/businessGroupDetail/index.vue
View file @
6d44875
...
@@ -125,9 +125,10 @@
...
@@ -125,9 +125,10 @@
<
script
>
<
script
>
// import Edit from './Edit'
// import Edit from './Edit'
// import { fn, treeCheckKeys, deleteEmptyAttribute } from '@/common/common'
// import { fn, treeCheckKeys, deleteEmptyAttribute } from '@/common/common'
import
{
getMerchantGroupDetailList
}
from
'@/api/index'
//
import { getMerchantGroupDetailList } from '@/api/index'
// import { NoticeMixin } from '@/mixins'
// import { NoticeMixin } from '@/mixins'
// import Vue from 'vue'
// import Vue from 'vue'
import
{
groupDetailMethods
,
request
}
from
'@/api'
import
AddBusiness
from
'./addBusiness'
import
AddBusiness
from
'./addBusiness'
export
default
{
export
default
{
name
:
'detail'
,
name
:
'detail'
,
...
@@ -244,7 +245,8 @@ export default {
...
@@ -244,7 +245,8 @@ export default {
},
},
getList
()
{
getList
()
{
const
params
=
this
.
getParams
()
const
params
=
this
.
getParams
()
getMerchantGroupDetailList
params
.
methods
=
groupDetailMethods
.
Search
request
.
req
(
params
)
.
req
(
params
)
.
then
(
res
=>
{
.
then
(
res
=>
{
this
.
total
=
res
.
pagination
.
totalCount
this
.
total
=
res
.
pagination
.
totalCount
...
...
src/views/customer/businessList/index.vue
View file @
6d44875
...
@@ -44,7 +44,7 @@
...
@@ -44,7 +44,7 @@
<
script
>
<
script
>
import
SearchDialog
from
'./SearchDialog'
import
SearchDialog
from
'./SearchDialog'
import
AddDialog
from
'./AddDialog'
import
AddDialog
from
'./AddDialog'
import
{
getList
,
saveMerchant
}
from
'@/api/bussinessListA
pi'
import
{
bizMethods
,
request
}
from
'@/a
pi'
import
notice
from
'@/common/notice'
import
notice
from
'@/common/notice'
export
default
{
export
default
{
name
:
'businessList'
,
name
:
'businessList'
,
...
@@ -128,8 +128,7 @@ export default {
...
@@ -128,8 +128,7 @@ export default {
label
:
'详情'
,
label
:
'详情'
,
type
:
'text'
,
type
:
'text'
,
callback
:
(
index
,
rows
)
=>
{
callback
:
(
index
,
rows
)
=>
{
const
url
=
encodeURI
(
`../../customer/businessDetails.html?id=
${
rows
[
index
].
merchantId
}
&name=
${
rows
[
index
].
merchantName
}
`
)
this
.
$root
.
to
([
'商户数据平台'
,
'商户数据平台'
,
'商户数据平台'
,
'业务管理'
,
'商户详情'
],
{
merchantId
:
rows
[
index
].
merchantId
})
location
.
href
=
url
}
}
}]
}]
}
}
...
@@ -150,7 +149,8 @@ export default {
...
@@ -150,7 +149,8 @@ export default {
// 接口请求-start
// 接口请求-start
getList
()
{
getList
()
{
const
params
=
this
.
getParams
()
const
params
=
this
.
getParams
()
getList
.
req
(
params
).
then
(
res
=>
{
params
.
methods
=
bizMethods
.
Search
request
.
req
(
params
).
then
(
res
=>
{
this
.
ListTableData
.
data
=
res
.
merchants
this
.
ListTableData
.
data
=
res
.
merchants
this
.
total
=
res
.
pagination
.
totalCount
this
.
total
=
res
.
pagination
.
totalCount
this
.
reset
(
this
.
merchantSearch
)
this
.
reset
(
this
.
merchantSearch
)
...
@@ -161,7 +161,7 @@ export default {
...
@@ -161,7 +161,7 @@ export default {
})
})
},
},
saveMerchant
()
{
saveMerchant
()
{
saveMerchan
t
.
req
(
this
.
merchantForm
).
then
(
res
=>
{
reques
t
.
req
(
this
.
merchantForm
).
then
(
res
=>
{
notice
.
okTips
()
notice
.
okTips
()
this
.
reset
(
this
.
merchantForm
)
this
.
reset
(
this
.
merchantForm
)
}).
catch
(
err
=>
{
}).
catch
(
err
=>
{
...
...
src/views/customer/businessManagement/index.vue
View file @
6d44875
...
@@ -54,7 +54,7 @@
...
@@ -54,7 +54,7 @@
>
{{
errorBags
.
first
(
'businessDescription'
)
}}
</span>
>
{{
errorBags
.
first
(
'businessDescription'
)
}}
</span>
</gl-form-item>
</gl-form-item>
<gl-form-item
label=
"地址"
>
<gl-form-item
label=
"地址"
>
<city-area
@
cityArea=
"getCityArea"
></city-area>
<city-area
ref=
"c"
:showCity=
"showCity"
:eventBus=
"$root.eventBus"
:validateCity=
"validateCity"
@
cityArea=
"getCityArea"
></city-area>
</gl-form-item>
</gl-form-item>
</gl-form>
</gl-form>
<div
<div
...
@@ -77,7 +77,7 @@
...
@@ -77,7 +77,7 @@
<
script
>
<
script
>
import
{
CityArea
}
from
'../components'
import
{
CityArea
}
from
'../components'
import
addBusiness
from
'./addBusiness'
import
addBusiness
from
'./addBusiness'
import
{
jumpLink
}
from
'../../../common/common.js'
//
import { jumpLink } from '../../../common/common.js'
export
default
{
export
default
{
name
:
'BusinessManagement'
,
name
:
'BusinessManagement'
,
components
:
{
components
:
{
...
@@ -85,7 +85,6 @@ export default {
...
@@ -85,7 +85,6 @@ export default {
CityArea
CityArea
},
},
data
()
{
data
()
{
const
_this
=
this
return
{
return
{
tableData
:
{
tableData
:
{
border
:
true
,
border
:
true
,
...
@@ -151,19 +150,45 @@ export default {
...
@@ -151,19 +150,45 @@ export default {
businessDescription
:
[{
required
:
true
}]
businessDescription
:
[{
required
:
true
}]
},
},
// 商户分组组件数据
// 商户分组组件数据
addDialogVisible
:
false
addDialogVisible
:
false
,
// 省市区
showCity
:
[
1
,
1
],
validateCity
:
[
1
,
1
]
}
},
provide
()
{
return
{
$validator
:
this
.
$validator
}
},
watch
:
{
dialogFormVisible
(
val
)
{
if
(
val
)
{
this
.
form
=
{
businessName
:
''
,
businessDescription
:
''
,
area
:
''
}
}
else
{
this
.
$validator
.
errors
.
clear
()
this
.
$refs
[
'c'
].
$validator
.
errors
.
clear
()
}
},
'this.$root.eventBus'
(
val
)
{
console
.
log
(
val
,
11212
)
if
(
val
)
{
this
.
$root
.
eventBus
.
$emit
(
'reset'
)
}
}
}
},
},
methods
:
{
methods
:
{
// 显示隐藏弹窗
// 显示隐藏弹窗
showDialog
()
{
showDialog
()
{
this
.
dialogFormVisible
=
!
this
.
dialogFormVisible
this
.
dialogFormVisible
=
!
this
.
dialogFormVisible
this
.
$validator
.
errors
.
clear
()
},
},
// 提交表单
// 提交表单
submit
()
{
submit
()
{
this
.
$validator
.
validateAll
().
then
((
result
)
=>
{
Promise
.
all
([
if
(
result
)
{
this
.
$refs
[
'c'
].
$validator
.
validateAll
(),
this
.
$validator
.
validateAll
()
]).
then
((
result
)
=>
{
if
(
result
[
0
]
&&
result
[
1
])
{
console
.
log
(
'提交成功'
)
console
.
log
(
'提交成功'
)
console
.
log
(
this
.
form
)
console
.
log
(
this
.
form
)
this
.
showDialog
()
this
.
showDialog
()
...
...
src/views/customer/components/src/cityArea.vue
View file @
6d44875
<
template
>
<
template
>
<!--
<div>
-->
<gl-row
<gl-row
style=
"margin-left: 0"
style=
"margin-left: 0"
:gutter=
"10"
:gutter=
"10"
>
>
<gl-col
:span=
"showCity[2] ? 8 : showCity[1] ? 12 : 24"
>
<gl-col
:span=
"8"
>
<gl-select
<gl-select
v-show=
"showCity[0]"
filterable
filterable
clearable
clearable
v-model=
"province"
v-model=
"province"
name=
"province"
v-validate=
"validateCity[0] ? 'required' : false"
data-vv-as=
"省"
@
change=
"selectProvince"
@
change=
"selectProvince"
placeholder=
"请选择省"
placeholder=
"请选择省"
>
>
<gl-option
<gl-option
v-for=
"(item, k) in provinceList"
v-for=
"(item, k) in provinceList"
:key=
"k"
:key=
"k"
:label=
"item.provinceName"
:label=
"item.provinceName"
:value=
"item.provinceId"
:value=
"item.provinceId"
>
>
</gl-option>
</gl-option>
</gl-select>
</gl-select>
<span
v-show=
"errorBags.has('province')"
class=
"error"
>
{{
errorBags
.
first
(
'province'
)
}}
</span>
</gl-col>
</gl-col>
<gl-col
:span=
"
8
"
>
<gl-col
:span=
"
showCity[2]? 8 : 12
"
>
<gl-select
<gl-select
v-show=
"showCity[1]"
filterable
filterable
clearable
clearable
v-model=
"city"
v-model=
"city"
name=
"city"
v-validate=
"validateCity[1] ? 'required' : false"
data-vv-as=
"市"
@
change=
"selectCity"
@
change=
"selectCity"
placeholder=
"请选择市"
placeholder=
"请选择市"
>
>
<gl-option
<gl-option
v-for=
"item in cityList"
v-for=
"item in cityList"
:key=
"item.cityId"
:key=
"item.cityId"
:label=
"item.cityName"
:label=
"item.cityName"
:value=
"item.cityId"
:value=
"item.cityId"
>
>
</gl-option>
</gl-option>
</gl-select>
</gl-select>
<span
v-show=
"errorBags.has('city')"
class=
"error"
>
{{
errorBags
.
first
(
'city'
)
}}
</span>
</gl-col>
</gl-col>
<gl-col
:span=
"
8
"
>
<gl-col
:span=
"
showCity[2]? 8 : 12
"
>
<gl-select
<gl-select
v-show=
"showCity[2]"
filterable
filterable
clearable
clearable
v-model=
"area"
v-model=
"area"
name=
"area"
v-validate=
"validateCity[2] ? 'required' : false"
data-vv-as=
"区"
@
change=
"selectArea"
@
change=
"selectArea"
placeholder=
"请选择区"
placeholder=
"请选择区"
>
>
<gl-option
<gl-option
v-for=
"item in areaList"
v-for=
"item in areaList"
:key=
"item.areaId"
:key=
"item.areaId"
:label=
"item.areaName"
:label=
"item.areaName"
:value=
"item.areaId"
:value=
"item.areaId"
>
>
</gl-option>
</gl-option>
</gl-select>
</gl-select>
<span
v-show=
"errorBags.has('area')"
class=
"error"
>
{{
errorBags
.
first
(
'area'
)
}}
</span>
</gl-col>
</gl-col>
</gl-row>
</gl-row>
<!--
</div>
-->
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
export
default
{
name
:
'CityArea'
,
name
:
'CityArea'
,
inject
:
[
'$validator'
],
data
()
{
data
()
{
return
{
return
{
AllData
:
[],
AllData
:
[],
...
@@ -72,65 +79,74 @@ export default {
...
@@ -72,65 +79,74 @@ export default {
city
:
''
,
// 市值
city
:
''
,
// 市值
area
:
''
,
// 区值
area
:
''
,
// 区值
mutIndex
:
[],
// 存储下标
mutIndex
:
[],
// 存储下标
mutArray
:
[]
//
mutArray
:
[]
//
传值给父组件的数组
}
}
},
},
props
:
{
props
:
{
// value: Array
showCity
:
Array
,
validateCity
:
Array
,
eventBus
:
Object
},
},
mounted
()
{
watch
:
{
const
URL
=
' http://192.168.3.171:7300/mock/5be17454f31545347559d499/config'
// 监听省市被clear清空市区数组
const
getConfig
=
(
url
=
URL
+
'/area_config'
)
=>
{
province
(
val
)
{
return
new
Promise
(
resolve
=>
{
console
.
log
(
val
)
const
xhr
=
new
XMLHttpRequest
()
!
val
?
this
.
cityList
=
[]
&&
(
this
.
areaList
=
[])
:
false
xhr
.
onreadystatechange
=
()
=>
{
},
if
(
xhr
.
readyState
===
4
&&
xhr
.
status
===
200
)
{
city
(
val
)
{
resolve
({
'config'
:
JSON
.
parse
(
xhr
.
responseText
)
})
!
val
?
this
.
areaList
=
[]
:
false
},
eventBus
:
{
handler
(
__eventBus
)
{
if
(
__eventBus
)
{
__eventBus
.
$on
(
'reset'
,
()
=>
{
console
.
log
(
'虫豸'
)
})
}
}
}
}
xhr
.
open
(
'GET'
,
url
)
xhr
.
send
()
})
}
}
},
mounted
()
{
console
.
log
(
this
.
showCity
)
// 初始化
// 初始化
getConfig
().
then
(
data
=>
{
this
.
$request
({
url
:
'http://192.168.3.171:7300/mock/5be17454f31545347559d499/config/area_config'
}).
then
(
data
=>
{
console
.
log
(
data
.
config
)
this
.
AllData
=
JSON
.
parse
(
data
.
data
).
provinceInfoList
this
.
AllData
=
JSON
.
parse
(
JSON
.
stringify
(
data
.
config
.
provinceInfoList
))
this
.
AllData
.
forEach
(
element
=>
{
this
.
AllData
.
forEach
(
element
=>
{
this
.
provinceList
.
push
({
provinceId
:
element
.
provinceId
,
provinceName
:
element
.
provinceName
})
this
.
provinceList
.
push
({
provinceId
:
element
.
provinceId
,
provinceName
:
element
.
provinceName
})
})
})
this
.
getCity
(
0
)
// this.getCity(0)
this
.
getArea
(
0
,
0
)
// this.getArea(0, 0)
})
})
},
},
methods
:
{
methods
:
{
// 选择省
// 选择省
selectProvince
(
val
)
{
selectProvince
(
val
)
{
this
.
mutArray
=
[
val
,
,
]
this
.
mutArray
=
[
val
,
null
,
null
]
this
.
AllData
.
forEach
((
element
,
index
)
=>
{
this
.
AllData
.
forEach
((
element
,
index
)
=>
{
if
(
element
.
provinceId
===
val
)
{
if
(
element
.
provinceId
===
val
)
{
this
.
mutIndex
[
0
]
=
index
this
.
mutIndex
[
0
]
=
index
}
}
})
})
this
.
mutIndex
[
1
]
=
''
this
.
mutIndex
[
2
]
=
''
this
.
getCity
(
this
.
mutIndex
[
0
])
this
.
getCity
(
this
.
mutIndex
[
0
])
this
.
getArea
(
this
.
mutIndex
[
0
],
0
)
// this.getArea(this.mutIndex[0], 0)
// 选择省清空已选的市区value
this
.
city
=
''
this
.
city
=
''
this
.
area
=
''
this
.
area
=
''
this
.
$emit
(
'cityArea'
,
this
.
mutArray
)
this
.
$emit
(
'cityArea'
,
this
.
mutArray
)
},
},
// 选择市
// 选择市
selectCity
(
val
)
{
selectCity
(
val
)
{
this
.
mutArray
[
1
]
=
val
this
.
mutArray
[
1
]
=
val
this
.
mutArray
[
2
]
=
''
this
.
mutArray
[
2
]
=
null
const
i
=
this
.
mutIndex
[
0
]
const
i
=
this
.
mutIndex
[
0
]
this
.
AllData
[
i
].
cityInfoList
.
forEach
((
element
,
index
)
=>
{
this
.
AllData
[
i
].
cityInfoList
.
forEach
((
element
,
index
)
=>
{
if
(
element
.
cityId
===
val
)
{
if
(
element
.
cityId
===
val
)
{
this
.
mutIndex
[
1
]
=
index
this
.
mutIndex
[
1
]
=
index
}
}
})
})
this
.
getArea
(
this
.
mutIndex
[
0
],
this
.
mutIndex
[
1
])
val
?
this
.
getArea
(
this
.
mutIndex
[
0
],
this
.
mutIndex
[
1
])
:
false
this
.
area
=
''
this
.
area
=
''
val
?
this
.
$emit
(
'cityArea'
,
this
.
mutArray
)
:
false
val
?
this
.
$emit
(
'cityArea'
,
this
.
mutArray
)
:
false
},
},
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment