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 cebc6e7e
authored
Jun 28, 2019
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
tijiao
1 parent
43fe8b4d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
67 additions
and
35 deletions
src/api/businessGroupDetail.js
src/views/customer/businessDetails/index.vue
src/views/customer/businessGroupDetail/index.vue
src/api/businessGroupDetail.js
View file @
cebc6e7
...
...
@@ -6,7 +6,8 @@ const methods = {
SearchChildList
:
`
${
path
}
group.search.param`
,
// 子商户根据商户号或者商户名搜索商户列表
SearchList
:
`
${
path
}
group.search.parampar`
,
// 父商户根据商户号或者商户名搜索商户列表
GetTree
:
`
${
path
}
group.merchant.tree`
,
GroupSearchMerchant
:
`
${
path
}
group.search.merchant`
GroupSearchMerchant
:
`
${
path
}
group.search.merchant`
,
GroupModifyLevel
:
`
${
path
}
group.modify.merchant.level`
}
export
{
methods
...
...
src/views/customer/businessDetails/index.vue
View file @
cebc6e7
...
...
@@ -62,8 +62,8 @@
<gl-upload
v-if=
"isEdit"
class=
"upload-demo"
name=
"file"
action=
"http://192.168.3.217:9220/file/upstring
"
name=
"file
s
"
:action=
"uploadAction
"
:limit=
"2"
:before-upload=
"beforeUpload"
:on-success=
"handleSuccess"
...
...
@@ -80,12 +80,13 @@
style=
"width: 50%;"
v-model=
"merchantInfo.merchantChannelName"
placeholder=
"请选择渠道"
@
change=
"handleMerchantChannel"
>
<gl-option
v-for=
"item in channelList"
:key=
"item.confId"
:label=
"item.confKey"
:value=
"item.conf
Id
"
:value=
"item.conf
Key
"
>
</gl-option>
</gl-select>
...
...
@@ -395,7 +396,10 @@ export default {
// this.uploadAction = `${
// this.$get_session_common_config().axios.fileUploadURL
// }/gps/common/uploadFile`
// this.uploadAction = 'http://192.168.3.217:9220/file/upstring'
// this.uploadAction = 'http://192.168.2.109:8085/customer/gfs.test.glsx.com.cn'
// this.uploadAction = 'https://jsonplaceholder.typicode.com/posts/'
console
.
log
(
this
.
$get_session_common_config
())
this
.
uploadAction
=
'http://192.168.3.217:9220/file/upstring'
this
.
$root
.
eventBus
.
$on
(
'params'
,
(
params
)
=>
{
this
.
activeName
=
'first'
this
.
isVisible
=
false
...
...
@@ -428,7 +432,9 @@ export default {
if
(
!
isCancel
&&
this
.
isEdit
)
{
console
.
log
(
'调保存接口--'
)
console
.
log
(
this
.
merchantInfo
)
const
params
=
this
.
merchantInfo
const
params
=
this
.
$deep_clone
(
this
.
merchantInfo
)
// params.merchantChannel = params.merchantId
delete
params
.
merchantChannelName
params
.
method
=
bizMethods
.
MerchantModify
console
.
log
(
params
)
request
.
req
(
params
).
then
(
res
=>
{
...
...
@@ -441,11 +447,11 @@ export default {
if
(
isCancel
)
{
this
.
merchantInfo
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
tempMerchantInfo
))
if
(
!
this
.
merchantInfo
.
lng
&&
!
this
.
merchantInfo
.
lat
)
{
amapManager
.
_map
.
remove
(
marker
)
marker
&&
amapManager
.
_map
.
remove
(
marker
)
this
.
hasLocation
=
false
this
.
List
[
10
].
value
=
'无位置信息'
}
else
{
this
.
getAddress
(
this
.
merchantInfo
.
lng
,
this
.
merchantInfo
.
lat
)
//
this.getAddress(this.merchantInfo.lng, this.merchantInfo.lat)
}
}
this
.
isEdit
=
!
this
.
isEdit
...
...
@@ -460,6 +466,10 @@ export default {
notice
.
errorTips
(
err
)
})
},
// 选择-商户渠道
handleMerchantChannel
(
item
)
{
this
.
merchantInfo
.
merchantChannel
=
this
.
channelList
[
this
.
channelList
.
findIndex
(
i
=>
i
.
confKey
===
item
)].
confId
},
// 切换tab
handleClick
(
tab
,
event
)
{
switch
(
tab
.
name
)
{
...
...
@@ -483,6 +493,7 @@ export default {
params
.
method
=
bizMethods
.
Detail
request
.
req
(
params
).
then
(
res
=>
{
this
.
merchantInfo
=
res
console
.
log
(
this
.
merchantInfo
)
// this.merchantInfo.lng = ''
// this.merchantInfo.lat = ''
this
.
assignBasicInfo
()
...
...
@@ -590,6 +601,7 @@ export default {
// 图片上传
// 上传附件,限制用户上传的附件格式和大小
beforeUpload
(
file
)
{
console
.
log
(
file
)
const
fileType
=
[
'image/jpeg'
,
'image/jpg'
,
'image/gif'
,
'image/png'
]
const
isFileType
=
fileType
.
includes
(
file
.
type
)
const
isLT20M
=
file
.
size
/
1024
/
1024
<
20
...
...
@@ -598,6 +610,7 @@ export default {
return
isLT20M
},
handleSuccess
(
res
,
file
,
fileList
)
{
console
.
log
(
file
)
this
.
fileList
=
[{
name
:
file
.
name
,
url
:
file
.
response
.
data
}]
this
.
merchantInfo
.
merchantPortrait
=
file
.
response
.
data
},
...
...
src/views/customer/businessGroupDetail/index.vue
View file @
cebc6e7
...
...
@@ -68,10 +68,10 @@
remote
clearable
@
change=
"changeMerchant"
:remote-method=
"remote
Merchant
List"
:loading=
"
treeL
oading"
>
:remote-method=
"remoteList"
:loading=
"
l
oading"
>
<gl-option
v-for=
"item in business
Tree
List"
v-for=
"item in businessList"
:key=
"item.merchantId"
:label=
"item.merchantName"
:value=
"item.merchantId"
>
...
...
@@ -185,7 +185,7 @@
:addDialogVisible=
"addDialogVisible"
@
addData=
"handleAddData"
></add-business>
<
!-- <
gl-dialog
<gl-dialog
title=
"编辑商户"
:visible
.
sync=
"merchantDialogVisible"
>
<gl-form
:model=
"merchantInfo"
>
...
...
@@ -203,17 +203,12 @@
<gl-form-item
label=
"父商户:"
:label-width=
"formLabelWidth"
prop="parentMerchantId"
>
<gl-select
v-model=
"merchantInfo.parentMerchantName"
filterable
remote
clearable
name="merchantId"
placeholder="请输入商户名称/商户号"
data-vv-as="商户名称/商户号"
v-validate="'required'"
@
change=
"changeMerchant"
:remote-method=
"remoteList"
:loading=
"loading"
...
...
@@ -222,7 +217,7 @@
v-for=
"item in businessList"
:key=
"item.merchantId"
:label=
"item.merchantName"
:value="item.merchant
Name
"
:value=
"item.merchant
Id
"
>
</gl-option>
</gl-select>
...
...
@@ -238,7 +233,7 @@
@
click=
"submitMerchant"
>
确 定
</gl-button>
</div>
</gl-dialog>
-->
</gl-dialog>
</div>
</template>
...
...
@@ -379,12 +374,13 @@ export default {
children
:
'list'
,
label
:
'merchantName'
},
business
Tree
List
:
[],
treeL
oading
:
false
,
businessList
:
[],
l
oading
:
false
,
searchResult
:
{},
// 搜索结果的对象
allTree
:
[],
target
:
[],
lastSearch
:
''
lastSearch
:
''
,
parentMerchantList
:
[]
}
},
created
()
{
...
...
@@ -519,6 +515,7 @@ export default {
// 编辑商户
editMerchat
(
row
)
{
this
.
merchantInfo
=
{
merchantId
:
row
.
merchantId
,
merchantName
:
row
.
merchantName
,
merchantTypeName
:
row
.
merchantTypeName
,
parentMerchantId
:
row
.
parentMerchantId
,
...
...
@@ -531,38 +528,48 @@ export default {
this
.
merchantDialogVisible
=
!
this
.
merchantDialogVisible
},
submitMerchant
()
{
console
.
log
(
this
.
merchantInfo
)
console
.
log
(
this
.
businessList
)
const
params
=
{}
params
.
groupId
=
this
.
groupId
params
.
merchantId
=
this
.
merchantInfo
.
merchantId
params
.
parentMerchantId
=
this
.
merchantInfo
.
parentMerchantName
// params.merchantType = this.merchantInfo.merchantType
params
.
method
=
groupDetailMethods
.
GroupModifyLevel
request
.
req
(
params
).
then
(
res
=>
{
console
.
log
(
res
)
})
// 调用接口
this
.
merchantDialogVisible
=
!
this
.
merchantDialogVisible
//
this.merchantDialogVisible = !this.merchantDialogVisible
},
// 树操作
// 父商户搜索
remote
Merchant
List
(
query
)
{
remoteList
(
query
)
{
if
(
query
!==
''
)
{
this
.
treeL
oading
=
true
this
.
l
oading
=
true
const
params
=
{}
params
.
groupId
=
this
.
groupId
params
.
searchWrod
=
query
params
.
method
=
groupDetailMethods
.
GroupSearchMerchant
request
.
req
(
params
).
then
(
res
=>
{
console
.
log
(
res
)
this
.
treeL
oading
=
false
this
.
business
Tree
List
=
res
.
merchantParams
this
.
l
oading
=
false
this
.
businessList
=
res
.
merchantParams
}).
catch
(
err
=>
{
notice
.
errorTips
(
err
)
})
}
else
{
this
.
business
Tree
List
=
[]
this
.
businessList
=
[]
}
},
changeMerchant
(
val
)
{
if
(
val
)
{
this
.
businessTreeList
.
forEach
(
item
=>
{
if
(
item
.
merchantId
===
val
&&
item
.
merchantType
!==
null
)
{
this
.
merchantInfo
.
merchantType
=
item
.
merchantType
this
.
disabledMerchant
=
true
}
})
this
.
businessTreeList
=
[]
// this.businessList.forEach(item => {
// if (item.merchantId === val && item.merchantType !== null) {
// this.merchantInfo.merchantType = item.merchantType
// }
// })
this
.
businessList
=
[]
}
},
// 查询
...
...
@@ -582,6 +589,7 @@ export default {
},
cycle
(
arr
,
target
)
{
this
.
$nextTick
(()
=>
{
console
.
log
(
this
.
target
)
arr
.
forEach
(
i
=>
{
if
(
i
.
node
.
key
===
target
.
key
&&
target
.
level
===
this
.
target
.
length
)
{
const
top
=
i
.
$el
.
offsetTop
...
...
@@ -589,6 +597,7 @@ export default {
setTimeout
(()
=>
{
this
.
$set
(
this
.
$refs
.
tree
.
$el
,
'scrollTop'
,
top
-
i
.
$el
.
offsetHeight
/
2
)
// #f5f7fa
console
.
log
(
i
.
$el
)
i
.
$el
.
children
[
0
].
style
[
'background-color'
]
=
'#eee'
this
.
lastSearch
=
i
.
$el
.
children
[
0
]
},
200
)
...
...
@@ -610,6 +619,7 @@ export default {
})
},
searchParent
(
e
)
{
this
.
target
=
[]
if
(
e
.
level
!==
1
)
{
this
.
$set
(
e
.
parent
,
'expanded'
,
true
)
this
.
searchParent
(
e
.
parent
)
...
...
@@ -626,6 +636,14 @@ export default {
<
span
>
{
node
.
data
.
merchantTypeName
}
<
/span
>
<
/span>
)
}
// remoteList() {
// },
// changeParentMerchant(val) {
// if (val) {
// this.parentMerchantList = []
// }
// }
}
}
</
script
>
...
...
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