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 552f4bc8
authored
Mar 18, 2019
by
wangql
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
商户分组页面
1 parent
5251e82f
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
267 additions
and
5 deletions
package-lock.json
src/base.js
src/views/customer/businessGroup/index.vue
package-lock.json
View file @
552f4bc
This diff is collapsed.
Click to expand it.
src/base.js
View file @
552f4bc
...
@@ -32,7 +32,7 @@ var mixin = {
...
@@ -32,7 +32,7 @@ var mixin = {
}
}
}
}
const
URL
=
' http://192.168.3.171:7300/mock/5be17454f31545347559d499/config'
const
URL
=
' http://192.168.3.171:7300/mock/5be17454f31545347559d499/config'
const
getConfig
=
(
url
=
URL
+
'/
authority_common
'
)
=>
{
const
getConfig
=
(
url
=
URL
+
'/
business_data_config
'
)
=>
{
return
new
Promise
(
resolve
=>
{
return
new
Promise
(
resolve
=>
{
const
xhr
=
new
XMLHttpRequest
()
const
xhr
=
new
XMLHttpRequest
()
xhr
.
onreadystatechange
=
()
=>
{
xhr
.
onreadystatechange
=
()
=>
{
...
...
src/views/customer/businessGroup/index.vue
View file @
552f4bc
<
template
>
<
template
>
<div>
<div
class=
"group"
>
<h1>
商户分组
</h1>
<div
class=
"default"
>
<gl-form
:inline=
"true"
:model=
"searchCondition"
>
<!--
<gl-form-item>
<gl-input
v-model=
"searchCondition.brand"
class=
"input-with-select"
placeholder=
"请输入品牌"
clearable
/>
</gl-form-item>
<gl-form-item>
<gl-button
type=
"primary"
@
click=
"getList"
>
搜索
</gl-button>
</gl-form-item>
-->
<gl-form-item
style=
"float:right;"
>
<gl-button
class=
"newButton"
type=
"primary"
@
click=
"dialog"
>
新增分组
</gl-button>
</gl-form-item>
</gl-form>
</div>
<gl-table
:table=
"tableData"
v-loading=
"tableLoading"
>
<!--
<gl-table-column
align=
"center"
v-for=
"(i, index) in tableData.column"
:key=
"index"
:label=
'i.label'
:prop=
'i.prop'
:width=
'i.width'
>
<template
slot-scope=
"scope"
>
<template
v-if=
'i.prop === "ipBackgroundList"'
>
<img
class=
"tableImg"
:src=
"tableData.data[scope.scope.$index][i.prop]"
>
</
template
>
<
template
v-else
>
{{
tableData
.
data
[
scope
.
scope
.
$index
][
i
.
prop
]
}}
</
template
>
</template>
</gl-table-column>
-->
</gl-table>
<gl-pagination
background
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:current-page=
"pageNum"
:page-sizes=
"[10,20,30,40]"
:page-size=
"pageSize"
layout=
"total, sizes, prev, pager, next, jumper"
:total=
"total"
>
</gl-pagination>
<gl-dialog
:title=
"新增分组"
width=
"30%"
:visible
.
sync=
"dialogVisible"
:before-close=
"handleClose"
>
<gl-form
:model=
"addParams"
label-width=
"120px"
>
<gl-form-item
label=
"分组名称:"
prop=
"groupName"
>
<gl-input
name=
"groupName"
v-validate=
"'required'"
data-vv-as=
"分组名称"
placeholder=
"请输入名称"
v-model=
"addParams.groupName"
></gl-input>
<!-- <span v-show="errorBags.has('groupName')" class="error">
{{ errorBags.first('groupName') }}
</span> -->
</gl-form-item>
<gl-form-item
label=
"业务类型:"
prop=
"businessCode"
>
<gl-select
name=
"businessCode"
v-validate=
"'required'"
data-vv-as=
"业务类型"
v-model=
"addParams.businessCode"
placeholder=
"请选择"
>
<gl-option
v-for=
"item in businessCodeList"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</gl-option>
</gl-select>
<!-- <span v-show="errorBags.has('businessCode')" class="error">
{{ errorBags.first('businessCode') }}
</span> -->
</gl-form-item>
</gl-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<gl-button
type=
"primary"
@
click=
"handleSubmit"
:loading=
"addLoading"
>
提交
</gl-button>
<gl-button
@
click=
"handleClose"
>
取消
</gl-button>
</div>
</gl-dialog>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
// import Edit from './Edit'
// import { fn, treeCheckKeys, deleteEmptyAttribute } from '@/common/common'
// import { getExpList, mergeExp } from '@/api'
// import { NoticeMixin } from '@/mixins'
// import Vue from 'vue'
export
default
{
export
default
{
name
:
'businessGroup'
// name: 'channel',
components
:
{
// Edit,
},
watch
:
{
},
// mixins: [NoticeMixin],
data
()
{
return
{
searchCondition
:
{},
addParams
:
{
groupName
:
''
,
businessCode
:
null
},
businessCodeList
:
[],
pageNum
:
1
,
pageSize
:
10
,
total
:
10
,
tableLoading
:
false
,
addLoading
:
false
,
dialogVisible
:
false
,
tableData
:
{
border
:
true
,
align
:
'center'
,
// height: parseInt(this.$client_height() - 140),
data
:
[],
column
:
[
{
label
:
'分组ID'
,
prop
:
'id'
},
{
label
:
'分组名称'
,
prop
:
'groupName'
},
{
label
:
'分组编号'
,
prop
:
'groupCode'
},
{
label
:
'业务编号'
,
prop
:
'businessCode'
},
{
label
:
'业务名称'
,
prop
:
'businessName'
},
{
label
:
'创建时间'
,
prop
:
'createTime'
,
formatter
:
cellValue
=>
{
if
(
cellValue
.
createTime
)
{
return
new
Date
(
cellValue
.
createTime
).
format
(
'yyyy-MM-dd'
)
}
}
}
],
// number: {
// label: '序号',
// width: '50px',
// index: index => {
// ++index
// return index < 10 && index > 0 ? '0' + index : index
// }
// },
console
:
{
show
:
true
,
label
:
'操作'
,
prop
:
'options'
,
button
:
[
{
label
:
'详情'
,
type
:
'text'
,
callback
:
(
index
,
row
)
=>
{
this
.
detail
(
row
)
}
}
]
}
}
}
},
mounted
()
{
this
.
getList
()
// this.idPassvalue = new Vue()
},
methods
:
{
loadingGetList
()
{
this
.
tableLoading
=
true
this
.
getList
()
},
/* 接口请求-start */
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)
// })
},
handleSizeChange
(
val
)
{
this
.
pageSize
=
val
this
.
loadingGetList
()
},
handleCurrentChange
(
val
)
{
this
.
pageNum
=
val
this
.
loadingGetList
()
},
dialog
()
{
this
.
dialogVisible
=
!
this
.
dialogVisible
// this.idPassvalue.$emit('expressionId', objId)
},
// 新增分组
handleSubmit
()
{
},
// 关闭新增分组弹出框
handleClose
()
{
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
>
<
style
lang=
"sass"
scoped
>
<
style
rel=
"stylesheet/scss"
lang=
"scss"
>
.group
{
.cell
{
.el-button
{
padding
:
2px
10px
;
}
}
}
//
.tableImg
{
//
width
:
36px
;
//
height
:
36px
;
//
cursor
:
pointer
;
//
}
</
style
>
</
style
>
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