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 fc7bd3d9
authored
Mar 20, 2019
by
wangql
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改代码
1 parent
f9ec9b5d
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
259 additions
and
27 deletions
src/api/businessGroup.js
src/api/index.js
src/views/customer/businessGroup/index.vue
src/views/customer/businessGroupDetail/addBusiness.vue
src/views/customer/businessGroupDetail/index.vue
src/api/businessGroup.js
0 → 100644
View file @
fc7bd3d
import
{
GlAxios
}
from
'glsx-vue-common'
const
path
=
'glsx.accounts.admin.merchant'
const
__groupList
=
`
${
path
}
.group.dict`
const
getMerchantGroupList
=
{
p
:
[
__groupList
],
req
:
params
=>
GlAxios
.
get
(
__groupList
,
{
params
})
}
export
{
getMerchantGroupList
}
src/api/index.js
View file @
fc7bd3d
...
...
@@ -5,8 +5,12 @@ import {
getList
,
saveMerchant
}
from
'./bussinessListApi'
import
{
getMerchantGroupList
}
from
'./businessGroup'
export
{
getBusinessList
,
getList
,
saveMerchant
}
\ No newline at end of file
saveMerchant
,
getMerchantGroupList
}
src/views/customer/businessGroup/index.vue
View file @
fc7bd3d
...
...
@@ -100,11 +100,11 @@
<
script
>
// import Edit from './Edit'
// import { fn, treeCheckKeys, deleteEmptyAttribute } from '@/common/common'
// import { getExpList, mergeExp
} from '@/api'
import
{
getMerchantGroupList
}
from
'@/api'
// import { NoticeMixin } from '@/mixins'
// import Vue from 'vue'
export
default
{
name
:
'
channel
'
,
name
:
'
businessGroup
'
,
components
:
{
// Edit,
},
...
...
@@ -200,7 +200,6 @@ export default {
},
mounted
()
{
this
.
getList
()
// this.idPassvalue = new Vue()
},
methods
:
{
loadingGetList
()
{
...
...
@@ -208,28 +207,29 @@ export default {
this
.
getList
()
},
/* 接口请求-start */
getParams
()
{
return
Object
.
assign
(
{
pageNum
:
this
.
pageNum
,
pageSize
:
this
.
pageSize
},
this
.
searchCondition
)
},
//
getParams() {
//
return Object.assign(
//
{
//
pageNum: this.pageNum,
//
pageSize: this.pageSize
//
},
//
this.searchCondition
//
)
//
},
getList
()
{
// const params = this.getParams()
// getExpList
// .req(params)
// .then(res => {
// this.total = res.total
// this.tableData.data = res.list
// this.tableLoading = false
// })
// .catch(err => {
// this.tableLoading = false
// this.error(err)
// })
getMerchantGroupList
.
req
({})
.
then
(
res
=>
{
console
.
log
(
res
)
this
.
total
=
res
.
total
this
.
tableData
.
data
=
res
.
list
this
.
tableLoading
=
false
})
.
catch
(
err
=>
{
this
.
tableLoading
=
false
console
.
log
(
err
)
})
},
handleSizeChange
(
val
)
{
this
.
pageSize
=
val
...
...
src/views/customer/businessGroupDetail/addBusiness.vue
0 → 100644
View file @
fc7bd3d
<
template
>
<div>
<gl-dialog
title=
"添加商户"
:visible
.
sync=
"addDialogVisible"
width=
"400px"
:before-close=
"showAddDialog"
>
<gl-form
ref=
"addForm"
:model=
"addForm"
label-width=
"100px"
:rules=
"rules"
>
<gl-form-item
label=
"商户:"
prop=
"merchant"
>
<gl-select
v-model=
"addForm.merchant"
filterable
remote
clearable
name=
"merchant"
placeholder=
"请输入商户名称/商户号"
data-vv-as=
"商户名称/商户号"
v-validate=
"'required'"
:remote-method=
"remoteMethod"
:loading=
"loading"
>
<gl-option
v-for=
"item in options4"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</gl-option>
</gl-select>
<span
v-show=
"errorBags.has('merchant')"
class=
"error"
>
{{
errorBags
.
first
(
'merchant'
)
}}
</span>
</gl-form-item>
<gl-form-item
label=
"商户类型:"
prop=
"merchantType"
>
<gl-select
v-model=
"addForm.merchantType"
name=
"merchantType"
data-vv-as=
"商户类型"
v-validate=
"'required'"
placeholder=
"请搜索"
>
<gl-option
v-for=
"item in merchantTypeList"
:key=
"item.merchantId"
:label=
"item.merchantName"
:value=
"item.merchantId"
>
</gl-option>
</gl-select>
<span
v-show=
"errorBags.has('merchantType')"
class=
"error"
>
{{
errorBags
.
first
(
'merchantType'
)
}}
</span>
</gl-form-item>
<div
v-for=
"(item, idx) in addList"
:key=
"idx"
>
<gl-form-item
:label=
"item.label + ':'"
>
<gl-select
v-model=
"item.merchant"
filterable
remote
clearable
placeholder=
"请输入商户名称/商户号"
:remote-method=
"remoteMethod"
:loading=
"loading"
>
<gl-option
v-for=
"item in options4"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</gl-option>
</gl-select>
<i
v-show=
"item.show"
class=
"el-icon-delete delete"
@
click=
"deleteBusiness(idx)"
></i>
</gl-form-item>
<gl-form-item
label=
"商户类型:"
>
<gl-select
v-model=
"item.merchantType"
placeholder=
"请选择"
>
<gl-option
v-for=
"item in merchantTypeList"
:key=
"item.merchantId"
:label=
"item.merchantName"
:value=
"item.merchantId"
>
</gl-option>
</gl-select>
</gl-form-item>
</div>
<gl-button
@
click=
"addMore"
>
添加更多
</gl-button>
</gl-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<gl-button
@
click=
"showAddDialog"
>
取 消
</gl-button>
<gl-button
type=
"primary"
@
click=
"ok"
>
确 定
</gl-button>
</div>
</gl-dialog>
</div>
</
template
>
<
script
>
export
default
{
name
:
'AddBusiness'
,
props
:
{
addDialogVisible
:
Boolean
},
data
()
{
return
{
addForm
:
{
merchant
:
''
,
merchantType
:
''
},
merchantTypeList
:
[
{
merchantId
:
1
,
merchantName
:
'广联'
},
{
merchantId
:
2
,
merchantName
:
'分组'
},
{
merchantId
:
3
,
merchantName
:
'富强'
}
],
rules
:
{
merchant
:
[{
required
:
true
}],
merchantType
:
[{
required
:
true
}]
},
// 远程搜索
loading
:
false
,
options4
:
[],
states
:
[
'Alabama'
,
'Alaska'
,
'Arizona'
,
'Arkansas'
,
'California'
,
'Colorado'
,
'Connecticut'
,
'Delaware'
,
'Florida'
,
'Georgia'
,
'Hawaii'
,
'Idaho'
,
'Illinois'
,
'Indiana'
,
'Iowa'
,
'Kansas'
,
'Kentucky'
,
'Louisiana'
,
'Maine'
,
'Maryland'
,
'Massachusetts'
,
'Michigan'
,
'Minnesota'
,
'Mississippi'
,
'Missouri'
,
'Montana'
,
'Nebraska'
,
'Nevada'
,
'New Hampshire'
,
'New Jersey'
,
'New Mexico'
,
'New York'
,
'North Carolina'
,
'North Dakota'
,
'Ohio'
,
'Oklahoma'
,
'Oregon'
,
'Pennsylvania'
,
'Rhode Island'
,
'South Carolina'
,
'South Dakota'
,
'Tennessee'
,
'Texas'
,
'Utah'
,
'Vermont'
,
'Virginia'
,
'Washington'
,
'West Virginia'
,
'Wisconsin'
,
'Wyoming'
],
addList
:
[
{
label
:
'子商户1'
,
merchant
:
''
,
merchantType
:
''
}
]
}
},
watch
:
{
addDialogVisible
(
val
)
{
this
.
$validator
.
errors
.
clear
()
}
},
mounted
()
{
this
.
list
=
this
.
states
.
map
(
item
=>
{
return
{
value
:
item
,
label
:
item
}
})
},
methods
:
{
ok
()
{
this
.
$validator
.
validateAll
().
then
((
result
)
=>
{
if
(
result
)
{
this
.
addList
.
forEach
(
item
=>
{
delete
item
.
label
})
this
.
addForm
.
merchantRelationAdds
=
this
.
addList
this
.
showAddDialog
()
this
.
addList
=
[{
label
:
'子商户1'
,
merchant
:
''
,
merchantType
:
''
}]
this
.
addForm
=
{
merchant
:
''
,
merchantType
:
''
}
}
})
},
showAddDialog
()
{
this
.
$emit
(
'addData'
)
},
addMore
()
{
console
.
log
(
this
.
addList
.
length
)
this
.
addList
.
push
({
label
:
'子商户'
+
(
this
.
addList
.
length
+
1
),
merchant
:
''
,
merchantType
:
''
,
show
:
true
})
},
deleteBusiness
(
idx
)
{
console
.
log
(
idx
)
this
.
addList
.
splice
(
idx
,
1
)
},
remoteMethod
(
query
)
{
if
(
query
!==
''
)
{
this
.
loading
=
true
setTimeout
(()
=>
{
this
.
loading
=
false
this
.
options4
=
this
.
list
.
filter
(
item
=>
{
return
item
.
label
.
toLowerCase
()
.
indexOf
(
query
.
toLowerCase
())
>
-
1
})
},
200
)
}
else
{
this
.
options4
=
[]
}
}
}
}
</
script
>
<
style
>
.delete
{
color
:
red
;
margin-left
:
20px
;
font-size
:
18px
;
}
</
style
>
src/views/customer/businessGroupDetail/index.vue
View file @
fc7bd3d
...
...
@@ -115,6 +115,10 @@
<gl-button
@
click=
"searchReset"
>
重置
</gl-button>
</div>
</gl-dialog>
<add-business
:addDialogVisible=
"addDialogVisible"
@
addData=
"handleAddData"
></add-business>
</div>
</template>
...
...
@@ -124,10 +128,11 @@
// import { getExpList, mergeExp } from '@/api'
// import { NoticeMixin } from '@/mixins'
// import Vue from 'vue'
import
AddBusiness
from
'./addBusiness'
export
default
{
name
:
'detail'
,
components
:
{
// Edit,
AddBusiness
},
watch
:
{
},
...
...
@@ -148,6 +153,7 @@ export default {
tableLoading
:
false
,
searchLoading
:
false
,
dialogVisible_search
:
false
,
addDialogVisible
:
false
,
tableData
:
{
border
:
true
,
align
:
'center'
,
...
...
@@ -276,7 +282,10 @@ export default {
},
addDialog
()
{
this
.
addDialogVisible
=
!
this
.
addDialogVisible
},
handleAddData
()
{
this
.
addDialogVisible
=
!
this
.
addDialogVisible
}
}
}
...
...
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