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 828d5677
authored
Mar 21, 2019
by
wangql
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改代码
1 parent
c22955f7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
32 deletions
src/api/businessGroup.js
src/api/index.js
src/views/customer/businessGroup/index.vue
src/api/businessGroup.js
View file @
828d567
import
{
import
{
GlAxios
GlAxios
}
from
'glsx-vue-common'
}
from
'glsx-vue-common'
const
path
=
'glsx.accounts.admin.merchant'
const
path
=
'/glsx.accounts.admin.merchant.group'
const
__groupList
=
`
${
path
}
.group.dict`
const
__groupList
=
`
${
path
}
.dict`
const
__create
=
`
${
path
}
.create`
const
getMerchantGroupList
=
{
const
getMerchantGroupList
=
{
p
:
[
__groupList
],
p
:
[
__groupList
],
req
:
params
=>
GlAxios
.
get
(
__groupList
,
{
params
})
req
:
params
=>
GlAxios
.
get
(
__groupList
,
{
params
})
}
}
const
createGroup
=
{
p
:
[
__create
],
req
:
params
=>
GlAxios
.
get
(
__groupList
,
{
params
})
}
export
{
export
{
getMerchantGroupList
getMerchantGroupList
,
createGroup
}
}
src/api/index.js
View file @
828d567
...
@@ -6,11 +6,13 @@ import {
...
@@ -6,11 +6,13 @@ import {
saveMerchant
saveMerchant
}
from
'./bussinessListApi'
}
from
'./bussinessListApi'
import
{
import
{
getMerchantGroupList
getMerchantGroupList
,
createGroup
}
from
'./businessGroup'
}
from
'./businessGroup'
export
{
export
{
getBusinessList
,
getBusinessList
,
getList
,
getList
,
saveMerchant
,
saveMerchant
,
getMerchantGroupList
getMerchantGroupList
,
createGroup
}
}
src/views/customer/businessGroup/index.vue
View file @
828d567
...
@@ -100,7 +100,7 @@
...
@@ -100,7 +100,7 @@
<
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
}
from
'@/api'
import
{
getMerchantGroupList
,
createGroup
}
from
'@/api'
// import { NoticeMixin } from '@/mixins'
// import { NoticeMixin } from '@/mixins'
// import Vue from 'vue'
// import Vue from 'vue'
export
default
{
export
default
{
...
@@ -110,7 +110,9 @@ export default {
...
@@ -110,7 +110,9 @@ export default {
},
},
watch
:
{
watch
:
{
dialogVisible
(
val
)
{
dialogVisible
(
val
)
{
this
.
$refs
[
'addParams'
].
resetFields
()
if
(
!
val
)
{
this
.
$refs
[
'addParams'
].
resetFields
()
}
}
}
},
},
// mixins: [NoticeMixin],
// mixins: [NoticeMixin],
...
@@ -165,12 +167,12 @@ export default {
...
@@ -165,12 +167,12 @@ export default {
},
},
{
{
label
:
'创建时间'
,
label
:
'创建时间'
,
prop
:
'createTime'
,
prop
:
'createTime'
formatter
:
cellValue
=>
{
//
formatter: cellValue => {
if
(
cellValue
.
createTime
)
{
//
if (cellValue.createTime) {
return
new
Date
(
cellValue
.
createTime
).
format
(
'yyyy-MM-dd'
)
//
return new Date(cellValue.createTime).format('yyyy-MM-dd')
}
//
}
}
//
}
}
}
],
],
// number: {
// number: {
...
@@ -221,9 +223,8 @@ export default {
...
@@ -221,9 +223,8 @@ export default {
getMerchantGroupList
getMerchantGroupList
.
req
({})
.
req
({})
.
then
(
res
=>
{
.
then
(
res
=>
{
console
.
log
(
res
)
this
.
total
=
res
.
pagination
.
totalCount
this
.
total
=
res
.
total
this
.
tableData
.
data
=
res
.
groupDicts
this
.
tableData
.
data
=
res
.
list
this
.
tableLoading
=
false
this
.
tableLoading
=
false
})
})
.
catch
(
err
=>
{
.
catch
(
err
=>
{
...
@@ -247,32 +248,27 @@ export default {
...
@@ -247,32 +248,27 @@ export default {
handleSubmit
(
formName
)
{
handleSubmit
(
formName
)
{
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
valid
)
{
if
(
valid
)
{
alert
(
'submit!'
)
this
.
createGroup
(
this
.
addParams
)
}
else
{
}
else
{
console
.
log
(
'error submit!!'
)
console
.
log
(
'error submit!!'
)
return
false
return
false
}
}
})
})
},
},
createGroup
(
params
)
{
createGroup
.
req
(
params
)
.
then
(
res
=>
{
console
.
log
(
res
)
this
.
loadingGetList
()
this
.
dialogVisible
=
!
this
.
dialogVisible
})
.
catch
(
err
=>
console
.
log
(
err
))
},
// 关闭新增分组弹出框
// 关闭新增分组弹出框
handleClose
()
{
handleClose
()
{
this
.
dialogVisible
=
!
this
.
dialogVisible
this
.
dialogVisible
=
!
this
.
dialogVisible
}
}
// updateDialogClose() {
// console.log('关闭')
// this.updateVisible = !this.updateVisible
// this.loadingGetList()
// },
// deleteExp(objId) {
// if (objId) {
// mergeExp
// .req({ id: objId, deletedFlag: 'D' })
// .then(res => {
// this.loadingGetList()
// })
// .catch(err => console.log(err))
// }
// }
}
}
}
}
</
script
>
</
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