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 c9227d1b
authored
Mar 29, 2019
by
wangql
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'master' of
http://192.168.3.233:8090/glsx-web/glsx-oss-merchant-data
2 parents
180d4632
627a9fe2
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
93 additions
and
139 deletions
src/base.js
src/views/customer/businessDetails/index.vue
src/views/customer/businessGroup/index.vue
src/views/customer/businessGroupDetail/addBusiness.vue
src/views/customer/businessGroupDetail/index.vue
src/views/customer/businessList/AddDialog.vue
src/views/customer/businessList/SearchDialog.vue
src/views/customer/businessList/index.vue
src/views/customer/businessManagement/index.vue
src/views/customer/components/src/cityArea.vue
src/base.js
View file @
c9227d1
...
@@ -105,7 +105,7 @@ var mixin = {
...
@@ -105,7 +105,7 @@ var mixin = {
// }
// }
}
}
}
}
const
URL
=
'
http://192.168.3.171:7300
/mock/5be17454f31545347559d499/config'
const
URL
=
'
http://oss-config.test.glsx.com.cn
/mock/5be17454f31545347559d499/config'
const
getConfig
=
(
url
=
URL
+
'/business_data_config'
)
=>
{
const
getConfig
=
(
url
=
URL
+
'/business_data_config'
)
=>
{
return
new
Promise
(
resolve
=>
{
return
new
Promise
(
resolve
=>
{
const
xhr
=
new
XMLHttpRequest
()
const
xhr
=
new
XMLHttpRequest
()
...
...
src/views/customer/businessDetails/index.vue
View file @
c9227d1
...
@@ -257,7 +257,8 @@ export default {
...
@@ -257,7 +257,8 @@ export default {
label
:
'详情'
,
label
:
'详情'
,
type
:
'text'
,
type
:
'text'
,
callback
:
(
index
,
rows
)
=>
{
callback
:
(
index
,
rows
)
=>
{
// console.log(rows[index])
this
.
parentLevelTableData
.
data
=
[]
this
.
childLevelTableData
.
data
=
[]
this
.
getGroupLevelInfo
(
rows
[
index
].
id
)
this
.
getGroupLevelInfo
(
rows
[
index
].
id
)
}
}
}]
}]
...
@@ -311,11 +312,10 @@ export default {
...
@@ -311,11 +312,10 @@ export default {
},
},
methods
:
{
methods
:
{
back
()
{
back
()
{
this
.
$parent
.
to
([
'商户数据平台'
,
'商户数据
平台'
,
'商户数据平台'
,
'商户列表'
,
'商户
列表'
])
this
.
$parent
.
to
([
'商户数据平台'
,
'商户数据
管理'
,
'商户数据'
,
'商户列表管理'
,
'商户数据
列表'
])
},
},
goGroupDetail
(
row
)
{
goGroupDetail
(
row
)
{
// console.log(row)
this
.
$root
.
to
([
'商户数据平台'
,
'商户数据管理'
,
'商户数据'
,
'商户分组管理'
,
'*商户分组详情'
],
{
groupId
:
row
.
id
})
this
.
$root
.
to
([
'商户数据平台'
,
'商户数据平台'
,
'商户数据平台'
,
'商户分组'
,
'*商户分组详情'
],
{
groupId
:
row
.
id
})
},
},
goBusinessDetail
(
row
)
{
goBusinessDetail
(
row
)
{
this
.
detailVisible
()
this
.
detailVisible
()
...
@@ -324,8 +324,6 @@ export default {
...
@@ -324,8 +324,6 @@ export default {
},
},
// 切换tab
// 切换tab
handleClick
(
tab
,
event
)
{
handleClick
(
tab
,
event
)
{
// console.log(tab, event)
// console.log(this.IdChange)
switch
(
tab
.
name
)
{
switch
(
tab
.
name
)
{
case
'first'
:
case
'first'
:
this
.
IdChange
[
0
]
&&
this
.
getBasicInfo
()
this
.
IdChange
[
0
]
&&
this
.
getBasicInfo
()
...
@@ -348,10 +346,10 @@ export default {
...
@@ -348,10 +346,10 @@ export default {
this
.
merchantInfo
=
res
this
.
merchantInfo
=
res
this
.
assignBasicInfo
()
this
.
assignBasicInfo
()
this
.
IdChange
[
0
]
=
0
this
.
IdChange
[
0
]
=
0
// notice.okTips()
}).
catch
(
err
=>
{
}).
catch
(
err
=>
{
this
.
IdChange
[
0
]
=
0
this
.
IdChange
[
0
]
=
0
notice
.
errorTips
(
err
)
console
.
log
(
err
)
notice
.
errorTips
(
'查询失败'
)
})
})
},
},
assignBasicInfo
()
{
assignBasicInfo
()
{
...
@@ -378,12 +376,10 @@ export default {
...
@@ -378,12 +376,10 @@ export default {
this
.
staffTableData
.
data
=
res
.
merchantPersonals
this
.
staffTableData
.
data
=
res
.
merchantPersonals
this
.
IdChange
[
1
]
=
0
this
.
IdChange
[
1
]
=
0
this
.
staffLoading
=
false
this
.
staffLoading
=
false
// console.log(this.IdChange[1])
}).
catch
(()
=>
{
// notice.okTips()
}).
catch
(
err
=>
{
this
.
IdChange
[
1
]
=
0
this
.
IdChange
[
1
]
=
0
this
.
staffLoading
=
false
this
.
staffLoading
=
false
notice
.
errorTips
(
err
)
notice
.
errorTips
(
'查询失败'
)
})
})
},
},
// 分组信息
// 分组信息
...
@@ -394,27 +390,22 @@ export default {
...
@@ -394,27 +390,22 @@ export default {
this
.
groupTableData
.
data
=
res
.
merchantGroups
this
.
groupTableData
.
data
=
res
.
merchantGroups
this
.
IdChange
[
2
]
=
0
this
.
IdChange
[
2
]
=
0
this
.
groupLoading
=
false
this
.
groupLoading
=
false
// console.log(this.IdChange[2])
}).
catch
(()
=>
{
// notice.okTips()
}).
catch
(
err
=>
{
this
.
IdChange
[
2
]
=
0
this
.
IdChange
[
2
]
=
0
this
.
groupLoading
=
false
this
.
groupLoading
=
false
notice
.
errorTips
(
err
)
notice
.
errorTips
(
'查询失败'
)
})
})
},
},
// 分组信息-详情
// 分组信息-详情
getGroupLevelInfo
(
groupId
)
{
getGroupLevelInfo
(
groupId
)
{
const
params
=
{
merchantId
:
this
.
merchantId
,
groupId
:
groupId
}
const
params
=
{
merchantId
:
this
.
merchantId
,
groupId
:
groupId
}
params
.
method
=
bizMethods
.
GroupLevel
params
.
method
=
bizMethods
.
GroupLevel
console
.
log
(
params
)
this
.
detailVisible
()
this
.
detailVisible
()
request
.
req
(
params
).
then
(
res
=>
{
request
.
req
(
params
).
then
(
res
=>
{
// console.log([res.parentMerchantLevel])
res
.
parentMerchantLevel
&&
(
this
.
parentLevelTableData
.
data
=
[
res
.
parentMerchantLevel
])
res
.
parentMerchantLevel
&&
(
this
.
parentLevelTableData
.
data
=
[
res
.
parentMerchantLevel
])
res
.
childMerchantLevels
&&
(
this
.
childLevelTableData
.
data
=
res
.
childMerchantLevels
)
res
.
childMerchantLevels
&&
(
this
.
childLevelTableData
.
data
=
res
.
childMerchantLevels
)
}).
catch
(
err
=>
{
}).
catch
(()
=>
{
// console.log(err)
notice
.
errorTips
(
'查询失败'
)
notice
.
errorTips
(
err
)
})
})
},
},
detailVisible
()
{
detailVisible
()
{
...
@@ -429,15 +420,12 @@ export default {
...
@@ -429,15 +420,12 @@ export default {
<
style
>
<
style
>
.amap-page-container
{
.amap-page-container
{
/* display: inline-block; */
width
:
100%
;
width
:
100%
;
height
:
300px
;
height
:
300px
;
/* vertical-align: text-top; */
}
}
.amap-demo
{
.amap-demo
{
height
:
300px
;
height
:
300px
;
border
:
1px
solid
#ebeef5
;
border
:
1px
solid
#ebeef5
;
border-radius
:
10px
;
}
}
.detail
{
.detail
{
margin
:
12px
;
margin
:
12px
;
...
...
src/views/customer/businessGroup/index.vue
View file @
c9227d1
...
@@ -8,6 +8,7 @@
...
@@ -8,6 +8,7 @@
>
新增分组
</gl-button>
>
新增分组
</gl-button>
</div>
</div>
<gl-table
<gl-table
class=
"m-b10"
:table=
"tableData"
:table=
"tableData"
v-loading=
"tableLoading"
>
v-loading=
"tableLoading"
>
</gl-table>
</gl-table>
...
@@ -18,7 +19,7 @@
...
@@ -18,7 +19,7 @@
:current-page=
"pageNum"
:current-page=
"pageNum"
:page-sizes=
"[10,20,30,40]"
:page-sizes=
"[10,20,30,40]"
:page-size=
"pageSize"
:page-size=
"pageSize"
layout=
"
sizes, total
, ->, prev, pager, next, jumper"
layout=
"
total, sizes
, ->, prev, pager, next, jumper"
:total=
"total"
:total=
"total"
></gl-pagination>
></gl-pagination>
<gl-dialog
<gl-dialog
...
@@ -144,7 +145,7 @@ export default {
...
@@ -144,7 +145,7 @@ export default {
label
:
'详情'
,
label
:
'详情'
,
type
:
'text'
,
type
:
'text'
,
callback
:
(
index
,
row
)
=>
{
callback
:
(
index
,
row
)
=>
{
this
.
$root
.
to
([
'商户数据平台'
,
'商户数据
平台'
,
'商户数据平台'
,
'商户分组
'
,
'*商户分组详情'
],
{
groupId
:
row
[
index
].
id
})
this
.
$root
.
to
([
'商户数据平台'
,
'商户数据
管理'
,
'商户数据'
,
'商户分组管理
'
,
'*商户分组详情'
],
{
groupId
:
row
[
index
].
id
})
}
}
}
}
]
]
...
@@ -154,7 +155,6 @@ export default {
...
@@ -154,7 +155,6 @@ export default {
},
},
mounted
()
{
mounted
()
{
this
.
loadingGetList
()
this
.
loadingGetList
()
this
.
getBusinessList
()
},
},
methods
:
{
methods
:
{
loadingGetList
()
{
loadingGetList
()
{
...
@@ -174,7 +174,7 @@ export default {
...
@@ -174,7 +174,7 @@ export default {
request
request
.
req
(
params
)
.
req
(
params
)
.
then
(
res
=>
{
.
then
(
res
=>
{
this
.
total
=
res
.
pagination
.
totalCount
res
.
pagination
&&
(
this
.
total
=
res
.
pagination
.
totalCount
)
this
.
tableData
.
data
=
res
.
groupDicts
this
.
tableData
.
data
=
res
.
groupDicts
this
.
tableLoading
=
false
this
.
tableLoading
=
false
})
})
...
@@ -206,6 +206,7 @@ export default {
...
@@ -206,6 +206,7 @@ export default {
},
},
dialog
()
{
dialog
()
{
this
.
dialogVisible
=
!
this
.
dialogVisible
this
.
dialogVisible
=
!
this
.
dialogVisible
this
.
getBusinessList
()
},
},
// 新增分组
// 新增分组
handleSubmit
(
formName
)
{
handleSubmit
(
formName
)
{
...
@@ -213,7 +214,6 @@ export default {
...
@@ -213,7 +214,6 @@ export default {
if
(
valid
)
{
if
(
valid
)
{
this
.
createGroup
(
this
.
addParams
)
this
.
createGroup
(
this
.
addParams
)
}
else
{
}
else
{
console
.
log
(
'error submit!!'
)
return
false
return
false
}
}
})
})
...
...
src/views/customer/businessGroupDetail/addBusiness.vue
View file @
c9227d1
...
@@ -56,6 +56,7 @@
...
@@ -56,6 +56,7 @@
v-validate="item.merchantId || item.merchantType ? 'required' : ''"
v-validate="item.merchantId || item.merchantType ? 'required' : ''"
:data-vv-as="`子商户`"
:data-vv-as="`子商户`"
clearable
clearable
@change="changeMerchant"
placeholder="请输入商户名称/商户号"
placeholder="请输入商户名称/商户号"
:remote-method="remoteChildList"
:remote-method="remoteChildList"
:loading="childLoading">
:loading="childLoading">
...
@@ -75,7 +76,7 @@
...
@@ -75,7 +76,7 @@
:
name
=
"
`item.merchantType${idx+1
}
`"
:
name
=
"
`item.merchantType${idx+1
}
`"
v-validate="
item
.
merchantId
||
item
.
merchantType
?
'required'
:
''
"
v-validate="
item
.
merchantId
||
item
.
merchantType
?
'required'
:
''
"
:data-vv-as="`子商户类型`"
:data-vv-as="`子商户类型`"
clearable
clearable
placeholder="
请选择
">
placeholder="
请选择
">
<gl-option
<gl-option
v-for="
item
in
merchantTypeList
"
v-for="
item
in
merchantTypeList
"
...
@@ -101,7 +102,7 @@
...
@@ -101,7 +102,7 @@
<
/template
>
<
/template
>
<
script
>
<
script
>
import
{
resetSearch
}
from
'@/common/common'
//
import
{
resetSearch
}
from
'@/common/common'
import
notice
from
'@/common/notice'
import
notice
from
'@/common/notice'
import
{
businessManagenMethods
,
groupDetailMethods
,
request
}
from
'@/api'
import
{
businessManagenMethods
,
groupDetailMethods
,
request
}
from
'@/api'
export
default
{
export
default
{
...
@@ -138,11 +139,13 @@ export default {
...
@@ -138,11 +139,13 @@ export default {
'addForm.merchantId'
(
val
)
{
'addForm.merchantId'
(
val
)
{
if
(
this
.
addList
.
length
!==
0
)
{
if
(
this
.
addList
.
length
!==
0
)
{
this
.
addList
.
forEach
(
item
=>
{
this
.
addList
.
forEach
(
item
=>
{
for
(
var
j
in
item
)
{
// for (var j in item)
{
if
(
j
==
'merchantId'
||
j
==
'merchantType'
)
{
// if (j == 'merchantId' || j == 'merchantType')
{
item
[
j
]
=
''
// item[j] = ''
}
//
}
}
//
}
item
[
'merchantId'
]
=
''
item
[
'merchantType'
]
=
''
}
)
}
)
}
}
}
}
...
@@ -158,7 +161,6 @@ export default {
...
@@ -158,7 +161,6 @@ export default {
this
.
$validator
.
validateAll
().
then
((
result
)
=>
{
this
.
$validator
.
validateAll
().
then
((
result
)
=>
{
if
(
result
)
{
if
(
result
)
{
if
(
this
.
addList
.
length
!==
0
)
{
if
(
this
.
addList
.
length
!==
0
)
{
console
.
log
(
this
.
addList
)
if
(
this
.
addList
[
0
].
merchantId
)
{
if
(
this
.
addList
[
0
].
merchantId
)
{
this
.
addList
.
forEach
(
item
=>
{
this
.
addList
.
forEach
(
item
=>
{
delete
item
.
label
delete
item
.
label
...
@@ -169,7 +171,6 @@ export default {
...
@@ -169,7 +171,6 @@ export default {
}
}
const
params
=
this
.
$deep_clone
(
this
.
addForm
)
const
params
=
this
.
$deep_clone
(
this
.
addForm
)
params
.
groupId
=
this
.
groupId
params
.
groupId
=
this
.
groupId
console
.
log
(
params
)
params
.
method
=
groupDetailMethods
.
Create
params
.
method
=
groupDetailMethods
.
Create
request
.
req
(
params
).
then
(
res
=>
{
request
.
req
(
params
).
then
(
res
=>
{
notice
.
okTips
()
notice
.
okTips
()
...
@@ -190,7 +191,6 @@ export default {
...
@@ -190,7 +191,6 @@ export default {
}
,
}
,
// 添加更多按钮
// 添加更多按钮
addMore
()
{
addMore
()
{
console
.
log
(
this
.
addForm
.
merchantId
)
if
(
this
.
addForm
.
merchantId
)
{
if
(
this
.
addForm
.
merchantId
)
{
this
.
isAdd
=
false
this
.
isAdd
=
false
if
(
this
.
addList
.
length
===
0
)
{
if
(
this
.
addList
.
length
===
0
)
{
...
@@ -250,7 +250,23 @@ export default {
...
@@ -250,7 +250,23 @@ export default {
params
.
method
=
groupDetailMethods
.
SearchChildList
params
.
method
=
groupDetailMethods
.
SearchChildList
request
.
req
(
params
).
then
(
res
=>
{
request
.
req
(
params
).
then
(
res
=>
{
this
.
childLoading
=
false
this
.
childLoading
=
false
this
.
businessChildList
=
res
.
merchantParams
const
arr
=
res
.
merchantParams
const
index
=
[]
let
list
=
[]
if
(
!
res
.
merchantParams
||
!
res
.
merchantParams
.
length
)
{
this
.
businessChildList
=
[]
return
}
for
(
var
i
of
res
.
merchantParams
)
{
for
(
var
j
of
this
.
addList
)
{
if
(
i
.
merchantId
===
j
.
merchantId
)
{
index
.
push
(
i
.
merchantId
)
}
}
}
list
=
arr
.
filter
(
item
=>
!
index
.
includes
(
item
.
merchantId
))
// list = [...arr].filter(item => [...this.addList].every(obj => obj.merchantId !== item.merchantId))
this
.
businessChildList
=
index
.
length
?
list
:
arr
}
).
catch
(
err
=>
{
}
).
catch
(
err
=>
{
notice
.
errorTips
(
err
)
notice
.
errorTips
(
err
)
}
)
}
)
...
@@ -258,6 +274,9 @@ export default {
...
@@ -258,6 +274,9 @@ export default {
this
.
businessChildList
=
[]
this
.
businessChildList
=
[]
}
}
}
,
}
,
changeMerchant
(
val
)
{
this
.
businessChildList
=
[]
}
,
// 获取商户类型列表
// 获取商户类型列表
getBusinessType
()
{
getBusinessType
()
{
const
params
=
{
}
const
params
=
{
}
...
...
src/views/customer/businessGroupDetail/index.vue
View file @
c9227d1
...
@@ -36,7 +36,7 @@
...
@@ -36,7 +36,7 @@
:current-page=
"pageNum"
:current-page=
"pageNum"
:page-sizes=
"[10,20,30,40]"
:page-sizes=
"[10,20,30,40]"
:page-size=
"pageSize"
:page-size=
"pageSize"
layout=
"
sizes, total
, ->, prev, pager, next, jumper"
layout=
"
total, sizes
, ->, prev, pager, next, jumper"
:total=
"total"
:total=
"total"
>
>
</gl-pagination>
</gl-pagination>
...
@@ -232,7 +232,6 @@ export default {
...
@@ -232,7 +232,6 @@ export default {
const
params
=
this
.
getParams
()
const
params
=
this
.
getParams
()
params
.
groupId
=
this
.
groupId
params
.
groupId
=
this
.
groupId
params
.
method
=
groupDetailMethods
.
Search
params
.
method
=
groupDetailMethods
.
Search
console
.
log
(
params
)
request
request
.
req
(
params
)
.
req
(
params
)
.
then
(
res
=>
{
.
then
(
res
=>
{
...
@@ -310,7 +309,7 @@ export default {
...
@@ -310,7 +309,7 @@ export default {
}
}
},
},
merchantDetail
(
merchantId
)
{
merchantDetail
(
merchantId
)
{
this
.
$root
.
to
([
'商户数据平台'
,
'商户数据
平台'
,
'商户数据平台'
,
'商户列表
'
,
'*商户详情'
],
{
merchantId
:
merchantId
})
this
.
$root
.
to
([
'商户数据平台'
,
'商户数据
管理'
,
'商户数据'
,
'商户列表管理
'
,
'*商户详情'
],
{
merchantId
:
merchantId
})
}
}
}
}
}
}
...
...
src/views/customer/businessList/AddDialog.vue
View file @
c9227d1
...
@@ -9,11 +9,11 @@
...
@@ -9,11 +9,11 @@
:close-on-click-modal=
"false"
:close-on-click-modal=
"false"
>
>
<gl-form
<gl-form
label-width=
"
85
px"
label-width=
"
90
px"
:model=
"merchantForm"
:model=
"merchantForm"
:rules=
"rules"
:rules=
"rules"
>
>
<gl-form-item
label=
"商户名称
:
"
>
<gl-form-item
label=
"商户名称
"
prop=
"merchantName
"
>
<gl-input
<gl-input
v-model=
"merchantForm.merchantName"
v-model=
"merchantForm.merchantName"
placeholder=
"请输入商户名称"
placeholder=
"请输入商户名称"
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
></gl-input>
></gl-input>
<span
v-show=
"errorBags.has('name')"
class=
"error"
>
{{
errorBags
.
first
(
'name'
)
}}
</span>
<span
v-show=
"errorBags.has('name')"
class=
"error"
>
{{
errorBags
.
first
(
'name'
)
}}
</span>
</gl-form-item>
</gl-form-item>
<gl-form-item
label=
"商户地址
:
"
>
<gl-form-item
label=
"商户地址
"
prop=
"address
"
>
<city-area
<city-area
ref=
"c"
ref=
"c"
:showCity=
"showCity"
:showCity=
"showCity"
...
@@ -45,10 +45,13 @@
...
@@ -45,10 +45,13 @@
</gl-input>
</gl-input>
<span
v-show=
"errorBags.has('address')"
class=
"error"
>
{{
errorBags
.
first
(
'address'
)
}}
</span>
<span
v-show=
"errorBags.has('address')"
class=
"error"
>
{{
errorBags
.
first
(
'address'
)
}}
</span>
</gl-form-item>
</gl-form-item>
<gl-form-item
label=
"商户渠道
:
"
>
<gl-form-item
label=
"商户渠道
"
prop=
"merchantChannel
"
>
<gl-select
<gl-select
v-model=
"merchantForm.merchantChannel"
v-model=
"merchantForm.merchantChannel"
placeholder=
"请选择"
placeholder=
"请选择"
name=
"merchantChannel"
data-vv-as=
"商户渠道"
v-validate=
"'required'"
>
>
<gl-option
<gl-option
v-for=
"item in channelList"
v-for=
"item in channelList"
...
@@ -57,8 +60,9 @@
...
@@ -57,8 +60,9 @@
:value=
"item.confId"
>
:value=
"item.confId"
>
</gl-option>
</gl-option>
</gl-select>
</gl-select>
<span
v-show=
"errorBags.has('merchantChannel')"
class=
"error"
>
{{
errorBags
.
first
(
'merchantChannel'
)
}}
</span>
</gl-form-item>
</gl-form-item>
<gl-form-item
label=
"联系人
:
"
>
<gl-form-item
label=
"联系人
"
prop=
"contactor
"
>
<gl-input
<gl-input
v-model=
"merchantForm.contactor"
v-model=
"merchantForm.contactor"
placeholder=
"请输入联系人姓名"
placeholder=
"请输入联系人姓名"
...
@@ -69,7 +73,7 @@
...
@@ -69,7 +73,7 @@
></gl-input>
></gl-input>
<span
v-show=
"errorBags.has('contactor')"
class=
"error"
>
{{
errorBags
.
first
(
'contactor'
)
}}
</span>
<span
v-show=
"errorBags.has('contactor')"
class=
"error"
>
{{
errorBags
.
first
(
'contactor'
)
}}
</span>
</gl-form-item>
</gl-form-item>
<gl-form-item
label=
"手机号码
:
"
>
<gl-form-item
label=
"手机号码
"
prop=
"contactPhone
"
>
<gl-input
<gl-input
v-model=
"merchantForm.contactPhone"
v-model=
"merchantForm.contactPhone"
placeholder=
"请输入联系人手机号码"
placeholder=
"请输入联系人手机号码"
...
@@ -93,7 +97,6 @@
...
@@ -93,7 +97,6 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
Vue
from
'vue'
import
{
CityArea
}
from
'../components'
import
{
CityArea
}
from
'../components'
import
{
businessManagenMethods
,
request
}
from
'@/api'
import
{
businessManagenMethods
,
request
}
from
'@/api'
const
isPhone
=
{
const
isPhone
=
{
...
@@ -148,7 +151,7 @@ export default {
...
@@ -148,7 +151,7 @@ export default {
},
},
mounted
()
{
mounted
()
{
this
.
$validator
.
extend
(
'is_phone'
,
isPhone
)
this
.
$validator
.
extend
(
'is_phone'
,
isPhone
)
this
.
eventBus
=
new
Vue
()
this
.
eventBus
=
this
.
$root
.
eventBus
},
},
methods
:
{
methods
:
{
handleClose
()
{
handleClose
()
{
...
@@ -174,7 +177,6 @@ export default {
...
@@ -174,7 +177,6 @@ export default {
})
})
},
},
getCityArea
(
params
)
{
getCityArea
(
params
)
{
// console.log(params)
params
[
0
]
&&
(
this
.
areaInfo
.
provinceId
=
params
[
0
])
params
[
0
]
&&
(
this
.
areaInfo
.
provinceId
=
params
[
0
])
params
[
1
]
&&
(
this
.
areaInfo
.
cityId
=
params
[
1
])
params
[
1
]
&&
(
this
.
areaInfo
.
cityId
=
params
[
1
])
params
[
2
]
&&
(
this
.
areaInfo
.
areaId
=
params
[
2
])
params
[
2
]
&&
(
this
.
areaInfo
.
areaId
=
params
[
2
])
...
@@ -190,4 +192,7 @@ export default {
...
@@ -190,4 +192,7 @@ export default {
.newBusiness
.el-dialog__body
{
.newBusiness
.el-dialog__body
{
padding
:
0
20px
;
padding
:
0
20px
;
}
}
.newBusiness
.el-select
{
width
:
100%
;
}
</
style
>
</
style
>
\ No newline at end of file
\ No newline at end of file
src/views/customer/businessList/SearchDialog.vue
View file @
c9227d1
...
@@ -10,9 +10,9 @@
...
@@ -10,9 +10,9 @@
>
>
<gl-form
<gl-form
:model=
"merchantSearch"
:model=
"merchantSearch"
label-width=
"
85
px"
label-width=
"
90
px"
>
>
<gl-form-item
label=
"商户名称
:
"
>
<gl-form-item
label=
"商户名称"
>
<gl-input
<gl-input
v-model=
"merchantSearch.name"
v-model=
"merchantSearch.name"
placeholder=
"请输入商户名称"
placeholder=
"请输入商户名称"
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
></gl-input>
></gl-input>
</gl-form-item>
</gl-form-item>
<gl-col
:span=
"12"
>
<gl-col
:span=
"12"
>
<gl-form-item
label=
"商户号
:
"
>
<gl-form-item
label=
"商户号"
>
<gl-input
<gl-input
v-model=
"merchantSearch.merchantId"
v-model=
"merchantSearch.merchantId"
placeholder=
"请输入商户号"
placeholder=
"请输入商户号"
...
@@ -29,33 +29,16 @@
...
@@ -29,33 +29,16 @@
</gl-form-item>
</gl-form-item>
</gl-col>
</gl-col>
<gl-col
:span=
"12"
>
<gl-col
:span=
"12"
>
<gl-form-item
label=
"地区
:
"
>
<gl-form-item
label=
"地区"
>
<city-area
<city-area
:showCity=
"showCity"
:showCity=
"showCity"
:eventBus=
"eventBus"
:eventBus=
"eventBus"
@
cityArea=
"getCityArea"
@
cityArea=
"getCityArea"
></city-area>
></city-area>
<!--
<gl-col
:span=
"11"
>
<gl-select
v-model=
"merchantSearch.provinceId"
placeholder=
"省"
>
</gl-select>
</gl-col>
<gl-col
:span=
"11"
:push=
"2"
>
<gl-select
v-model=
"merchantSearch.cityId"
placeholder=
"市"
>
</gl-select>
</gl-col>
-->
</gl-form-item>
</gl-form-item>
</gl-col>
</gl-col>
<gl-col
:span=
"12"
>
<gl-col
:span=
"12"
>
<gl-form-item
label=
"渠道
:
"
>
<gl-form-item
label=
"渠道"
>
<gl-select
<gl-select
style=
"width: 100%;"
style=
"width: 100%;"
v-model=
"merchantSearch.merchantChannel"
v-model=
"merchantSearch.merchantChannel"
...
@@ -72,18 +55,12 @@
...
@@ -72,18 +55,12 @@
</gl-form-item>
</gl-form-item>
</gl-col>
</gl-col>
<gl-col
:span=
"12"
>
<gl-col
:span=
"12"
>
<gl-form-item
label=
"状态
:
"
>
<gl-form-item
label=
"状态"
>
<gl-select
<gl-select
style=
"width: 100%;"
style=
"width: 100%;"
v-model=
"merchantSearch.merchantStatus"
v-model=
"merchantSearch.merchantStatus"
placeholder=
"请选择状态"
placeholder=
"请选择状态"
>
>
<!--
<gl-option
v-for=
"(item, index) in statusItems"
:key=
"item"
:value=
"index"
:label=
"item"
></gl-option>
-->
<gl-option
<gl-option
v-for=
"(value, key) in statusItems"
v-for=
"(value, key) in statusItems"
:key=
"value"
:key=
"value"
...
@@ -94,28 +71,16 @@
...
@@ -94,28 +71,16 @@
</gl-form-item>
</gl-form-item>
</gl-col>
</gl-col>
<gl-col>
<gl-col>
<gl-form-item
label=
"注册时间:"
>
<gl-form-item
label=
"注册时间"
>
<gl-col
:span=
"11"
>
<gl-date-picker
type=
"date"
placeholder=
"选择日期"
v-model=
"merchantSearch.startTime"
value-format=
"yyyy-MM-dd"
style=
"width:92%;"
></gl-date-picker>
</gl-col>
<gl-col
class=
"line"
:span=
"2"
>
至
</gl-col>
<gl-col
:span=
"11"
>
<gl-col
:span=
"11"
>
<gl-date-picker
<gl-date-picker
type=
"date"
v-model=
"merchantSearch.times"
placeholder=
"选择日期"
type=
"daterange"
v-model=
"merchantSearch.endTime"
value-format=
"yyyy-MM-dd"
value-format=
"yyyy-MM-dd"
style=
"width: 100%;"
range-separator=
"至"
></gl-date-picker>
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
>
</gl-date-picker>
</gl-col>
</gl-col>
</gl-form-item>
</gl-form-item>
</gl-col>
</gl-col>
...
@@ -132,7 +97,6 @@
...
@@ -132,7 +97,6 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
Vue
from
'vue'
import
{
CityArea
}
from
'../components'
import
{
CityArea
}
from
'../components'
import
{
businessManagenMethods
,
request
}
from
'@/api'
import
{
businessManagenMethods
,
request
}
from
'@/api'
export
default
{
export
default
{
...
@@ -166,14 +130,13 @@ export default {
...
@@ -166,14 +130,13 @@ export default {
}
}
},
},
mounted
()
{
mounted
()
{
this
.
eventBus
=
new
Vue
()
this
.
eventBus
=
this
.
$root
.
eventBus
},
},
methods
:
{
methods
:
{
getChannelList
()
{
getChannelList
()
{
const
params
=
{}
const
params
=
{}
params
.
method
=
businessManagenMethods
.
Channel
params
.
method
=
businessManagenMethods
.
Channel
request
.
req
(
params
).
then
(
res
=>
{
request
.
req
(
params
).
then
(
res
=>
{
// console.log(res)
this
.
channelList
=
res
.
merchantDictList
this
.
channelList
=
res
.
merchantDictList
}).
catch
(
err
=>
{
}).
catch
(
err
=>
{
console
.
log
(
err
)
console
.
log
(
err
)
...
@@ -184,6 +147,11 @@ export default {
...
@@ -184,6 +147,11 @@ export default {
this
.
$emit
(
'hideDialog'
,
true
)
this
.
$emit
(
'hideDialog'
,
true
)
},
},
handleComfrim
()
{
handleComfrim
()
{
if
(
this
.
merchantSearch
.
times
)
{
this
.
merchantSearch
.
startTime
=
this
.
merchantSearch
.
times
[
0
]
this
.
merchantSearch
.
endTime
=
this
.
merchantSearch
.
times
[
1
]
delete
this
.
merchantSearch
.
times
}
this
.
eventBus
.
$emit
(
'reset'
)
this
.
eventBus
.
$emit
(
'reset'
)
this
.
$emit
(
'comfirmDialog'
)
this
.
$emit
(
'comfirmDialog'
)
},
},
...
@@ -192,7 +160,6 @@ export default {
...
@@ -192,7 +160,6 @@ export default {
this
.
$emit
(
'hideDialog'
)
this
.
$emit
(
'hideDialog'
)
},
},
getCityArea
(
params
)
{
getCityArea
(
params
)
{
console
.
log
(
params
)
params
[
0
]
&&
(
this
.
merchantSearch
.
provinceId
=
params
[
0
])
params
[
0
]
&&
(
this
.
merchantSearch
.
provinceId
=
params
[
0
])
params
[
1
]
&&
(
this
.
merchantSearch
.
cityId
=
params
[
1
])
params
[
1
]
&&
(
this
.
merchantSearch
.
cityId
=
params
[
1
])
}
}
...
...
src/views/customer/businessList/index.vue
View file @
c9227d1
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
:current-page
.
sync=
"pageNum"
:current-page
.
sync=
"pageNum"
:page-sizes=
"[10, 20, 30, 40]"
:page-sizes=
"[10, 20, 30, 40]"
:page-size=
"pageSize"
:page-size=
"pageSize"
layout=
"
sizes, total
, ->, prev, pager, next, jumper"
layout=
"
total, sizes
, ->, prev, pager, next, jumper"
:total=
"totalCount"
:total=
"totalCount"
>
>
</gl-pagination>
</gl-pagination>
...
@@ -135,7 +135,7 @@ export default {
...
@@ -135,7 +135,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
})
}
}
}]
}]
},
},
...
@@ -169,14 +169,14 @@ export default {
...
@@ -169,14 +169,14 @@ export default {
getList
()
{
getList
()
{
const
params
=
this
.
getParams
()
const
params
=
this
.
getParams
()
params
.
method
=
bizMethods
.
Search
params
.
method
=
bizMethods
.
Search
console
.
log
(
params
)
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
res
.
pagination
&&
(
this
.
totalCount
=
res
.
pagination
.
totalCount
)
resetSearch
(
this
.
merchantSearch
)
resetSearch
(
this
.
merchantSearch
)
this
.
tableLoading
=
false
this
.
tableLoading
=
false
}).
catch
(
err
=>
{
}).
catch
(
err
=>
{
notice
.
errorTips
(
err
)
console
.
log
(
err
)
notice
.
errorTips
(
'查询失败'
)
resetSearch
(
this
.
merchantSearch
)
resetSearch
(
this
.
merchantSearch
)
this
.
tableLoading
=
false
this
.
tableLoading
=
false
})
})
...
@@ -187,13 +187,11 @@ export default {
...
@@ -187,13 +187,11 @@ export default {
params
.
method
=
bizMethods
.
Create
params
.
method
=
bizMethods
.
Create
request
.
req
(
params
).
then
(
res
=>
{
request
.
req
(
params
).
then
(
res
=>
{
notice
.
okTips
()
notice
.
okTips
()
// resetSearch(this.merchantForm)
this
.
handleAddHide
()
this
.
handleAddHide
()
this
.
loadingGetList
()
this
.
loadingGetList
()
}).
catch
(
err
=>
{
}).
catch
(
err
=>
{
console
.
log
(
err
)
console
.
log
(
err
)
// resetSearch(this.merchantForm)
notice
.
errorTips
(
'新增失败'
)
notice
.
errorTips
(
err
)
})
})
},
},
// 接口请求-end
// 接口请求-end
...
@@ -205,11 +203,6 @@ export default {
...
@@ -205,11 +203,6 @@ export default {
this
.
pageNum
=
val
this
.
pageNum
=
val
this
.
loadingGetList
()
this
.
loadingGetList
()
},
},
// reset(params) {
// for (var item in params) {
// params[item] = ''
// }
// },
// 搜索-start--------
// 搜索-start--------
handleSearch
()
{
handleSearch
()
{
this
.
searchVisible
=
!
this
.
searchVisible
this
.
searchVisible
=
!
this
.
searchVisible
...
@@ -218,7 +211,6 @@ export default {
...
@@ -218,7 +211,6 @@ export default {
handleSearchHide
(
hide
)
{
handleSearchHide
(
hide
)
{
resetSearch
(
this
.
merchantSearch
)
resetSearch
(
this
.
merchantSearch
)
hide
&&
this
.
handleSearch
()
hide
&&
this
.
handleSearch
()
console
.
log
(
this
.
merchantSearch
)
},
},
// 搜索
// 搜索
handleSearchComfirm
()
{
handleSearchComfirm
()
{
...
...
src/views/customer/businessManagement/index.vue
View file @
c9227d1
...
@@ -146,25 +146,24 @@ export default {
...
@@ -146,25 +146,24 @@ export default {
const
params
=
{}
const
params
=
{}
params
.
method
=
businessManagenMethods
.
Business
params
.
method
=
businessManagenMethods
.
Business
request
.
req
(
params
).
then
(
res
=>
{
request
.
req
(
params
).
then
(
res
=>
{
// console.log(res)
this
.
tableData
.
data
=
res
.
merchantDictList
this
.
tableData
.
data
=
res
.
merchantDictList
this
.
tableLoading
=
false
this
.
tableLoading
=
false
}).
catch
(
err
=>
{
}).
catch
(
err
=>
{
console
.
log
(
err
)
this
.
tableLoading
=
false
this
.
tableLoading
=
false
notice
.
errorTips
(
err
)
notice
.
errorTips
(
'查询失败'
)
})
})
},
},
businessCreate
()
{
businessCreate
()
{
const
params
=
this
.
$deep_clone
(
this
.
form
)
const
params
=
this
.
$deep_clone
(
this
.
form
)
delete
params
.
area
console
.
log
(
params
)
params
.
method
=
businessManagenMethods
.
Create
params
.
method
=
businessManagenMethods
.
Create
request
.
req
(
params
).
then
(
res
=>
{
request
.
req
(
params
).
then
(
res
=>
{
notice
.
okTips
()
notice
.
okTips
()
this
.
showDialog
()
this
.
showDialog
()
this
.
loadingGetList
()
this
.
loadingGetList
()
}).
catch
(
err
=>
{
}).
catch
(
err
=>
{
notice
.
errorTips
(
err
)
console
.
log
(
err
)
notice
.
errorTips
(
'新增失败'
)
})
})
}
}
}
}
...
...
src/views/customer/components/src/cityArea.vue
View file @
c9227d1
...
@@ -97,25 +97,13 @@ export default {
...
@@ -97,25 +97,13 @@ export default {
watch
:
{
watch
:
{
// 监听省市被clear清空市区数组
// 监听省市被clear清空市区数组
province
(
val
)
{
province
(
val
)
{
// console.log(val)
!
val
?
this
.
cityList
=
[]
&&
(
this
.
areaList
=
[])
:
false
!
val
?
this
.
cityList
=
[]
&&
(
this
.
areaList
=
[])
:
false
},
},
city
(
val
)
{
city
(
val
)
{
!
val
?
this
.
areaList
=
[]
:
false
!
val
?
this
.
areaList
=
[]
:
false
}
}
// eventBus: {
// handler(__eventBus) {
// if (__eventBus) {
// __eventBus.$on('reset', () => {
// console.log('reset----------')
// this.$validator.errors.clear()
// })
// }
// }
// }
},
},
mounted
()
{
mounted
()
{
// console.log(this.showCity)
this
.
eventBus
.
$on
(
'reset'
,
()
=>
{
this
.
eventBus
.
$on
(
'reset'
,
()
=>
{
this
.
resetAll
()
this
.
resetAll
()
})
})
...
@@ -125,8 +113,6 @@ export default {
...
@@ -125,8 +113,6 @@ export default {
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.getArea(0, 0)
})
})
},
},
methods
:
{
methods
:
{
...
@@ -153,7 +139,6 @@ export default {
...
@@ -153,7 +139,6 @@ export default {
this
.
mutIndex
[
1
]
=
''
this
.
mutIndex
[
1
]
=
''
this
.
mutIndex
[
2
]
=
''
this
.
mutIndex
[
2
]
=
''
this
.
getCity
(
this
.
mutIndex
[
0
])
this
.
getCity
(
this
.
mutIndex
[
0
])
// this.getArea(this.mutIndex[0], 0)
// 选择省清空已选的市区value
// 选择省清空已选的市区value
this
.
city
=
''
this
.
city
=
''
this
.
area
=
''
this
.
area
=
''
...
...
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