Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bms-vue-obear
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
daywrite
bms-vue-obear
Commits
62bbb809
Commit
62bbb809
authored
Apr 02, 2019
by
daywrite
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加费用报销列表
parent
2f999c92
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
400 additions
and
4 deletions
+400
-4
index.ejs
index.ejs
+8
-2
api.js
src/api.js
+2
-0
reimbursement.js
src/apis/reimbursement.js
+5
-0
app.scss
src/assets/css/app.scss
+23
-0
singleRadioTool.vue
src/components/common/singleRadioTool.vue
+19
-0
reimbursementHome.vue
src/components/reimbursement_list/reimbursementHome.vue
+274
-2
reimbursementPagenation.vue
...components/reimbursement_list/reimbursementPagenation.vue
+55
-0
route.js
src/route.js
+6
-0
reimbursement.js
src/routes/reimbursement.js
+8
-0
No files found.
index.ejs
View file @
62bbb809
...
@@ -25,10 +25,16 @@
...
@@ -25,10 +25,16 @@
"title"
:
"首页"
,
"title"
:
"首页"
,
"appName"
:
portalName
,
"appName"
:
portalName
,
"url"
:
"/scheduleHome"
"url"
:
"/scheduleHome"
},
{
"icon"
:
"fa-home"
,
"isRouteShow"
:
1
,
"title"
:
"费用报销"
,
"appName"
:
'reimbursement'
,
"url"
:
"/reimbursementHome"
}],
}],
homePage
:
{
homePage
:
{
appName
:
portalName
,
appName
:
'reimbursement'
,
url
:
'/
schedule
Home'
url
:
'/
reimbursement
Home'
}
}
}
}
...
...
src/api.js
View file @
62bbb809
import
ScheduleApi
from
'./apis/schedule.js'
import
ScheduleApi
from
'./apis/schedule.js'
import
ReimburrsementApi
from
'./apis/reimbursement.js'
const
API_HOST
=
process
.
env
.
API_HOST
const
API_HOST
=
process
.
env
.
API_HOST
const
API_PORT
=
process
.
env
.
API_PORT
const
API_PORT
=
process
.
env
.
API_PORT
...
@@ -24,6 +25,7 @@ const option = {
...
@@ -24,6 +25,7 @@ const option = {
let
apis
=
{}
let
apis
=
{}
apis
=
Object
.
assign
(
apis
,
ScheduleApi
)
apis
=
Object
.
assign
(
apis
,
ScheduleApi
)
apis
=
Object
.
assign
(
apis
,
ReimburrsementApi
)
export
default
{
export
default
{
option
,
option
,
...
...
src/apis/reimbursement.js
0 → 100644
View file @
62bbb809
export
default
{
getReimburrsementFilter
:
{
url
:
'/vue/reimbursement/get-filter'
}
}
src/assets/css/app.scss
View file @
62bbb809
...
@@ -25,3 +25,26 @@
...
@@ -25,3 +25,26 @@
border-color
:
#888
!
important
;
border-color
:
#888
!
important
;
}
}
}
}
.reimbursement-app
{
.el-radio-button__inner
,
.el-radio-button
:last-child
.el-radio-button__inner
,
.el-radio-button
:first-child
.el-radio-button__inner
{
border-left
:
1px
solid
#DCDFE6
;
margin
:
0
2px
0
0
;
border-radius
:
1px
;
}
.el-radio-button__inner
:hover
{
color
:
#333
;
background-color
:
#e6e6e6
;
border-color
:
#adadad
;
}
.el-radio-button__orig-radio
:checked
+
.el-radio-button__inner
{
color
:
#fff
;
background-color
:
#3c3c3c
;
border-color
:
#373737
;
box-shadow
:
0
0
0
0
#373737
;
}
.el-radio-button__orig-radio
:checked
+
.el-radio-button__inner
:hover
{
color
:
#333
;
background-color
:
#d4d4d4
;
border-color
:
#8c8c8c
;
}
}
src/components/common/singleRadioTool.vue
0 → 100644
View file @
62bbb809
<
template
>
<section>
<el-radio-group
size=
"mini"
v-model=
"item"
>
<el-radio-button
v-for=
"(radio, key) in optionsList"
:key=
"key"
:label=
"radio.name"
:value=
"radio.value"
>
{{
radio
.
value
}}
</el-radio-button>
</el-radio-group>
</section>
</
template
>
<
script
>
import
singleItemMixin
from
'./singleItemMixin'
export
default
{
name
:
'single-radio'
,
mixins
:
[
singleItemMixin
]
}
</
script
>
<
style
scoped
>
</
style
>
src/components/reimbursement_list/reimbursementHome.vue
View file @
62bbb809
<
template
>
<
template
>
<el-button
type=
"primary"
>
弹出
</el-button>
<section>
<div
class=
"content"
>
<search-header
ref=
"searchHeader"
:title=
"'费用报销'"
:search-key=
"'ClientSearch'"
:add-title=
"'新建报销'"
@
update:headerSearch=
"search => searchKeyword(search)"
@
update:headerAdd=
"() => addSch()"
>
</search-header>
<search-form
ref=
"clientForm"
:filter=
"filter"
@
update:clientList=
"form =>
{ updateForm(form) }">
</search-form>
<div
class=
"page-body-content leaveMessage"
>
<div
class=
"mb20"
>
<singleRadioTool
:form-item=
"reimType"
:options-list=
"reimTypeArray"
@
update:item=
"val =>
{reimType = val}">
</singleRadioTool>
</div>
<ScheduleItem
v-for=
"item in result.list"
:item=
"item"
:key=
"item.id"
>
<span
slot=
"opearate"
class=
"obear-opearate-button"
>
<el-button
type=
"primary"
size=
"mini"
@
click
.
prevent
.
stop=
"leaveMessageSch(item)"
><span
class=
"badge"
v-if=
"item.unread"
>
{{
item
.
unread
?
item
.
unread
:
''
}}
</span><i
class=
"fa fa-commenting"
></i>
留言
</el-button>
<el-button
type=
"primary"
size=
"mini"
@
click
.
prevent
.
stop=
"editSch(item)"
:disabled=
"!item.can_report"
><i
class=
"fa fa-calendar-check-o"
></i>
汇报
</el-button>
<el-button
type=
"primary"
size=
"mini"
@
click
.
prevent
.
stop=
"editSch(item)"
:disabled=
"!item.can_update"
><i
class=
"fa fa-edit animated"
></i>
编辑
</el-button>
<el-button
type=
"primary"
size=
"mini"
@
click
.
prevent
.
stop=
"deleteSch(item.id)"
:disabled=
"!item.can_delete"
><i
class=
"fa fa-trash-o animated-hove"
></i>
删除
</el-button>
</span>
</ScheduleItem>
<Pagenation
@
update:pager=
"pager =>
{updatePage(pager)}"
:total="result.pagenation.totalcount">
</Pagenation>
<leave-message
v-click-outside=
"lmClose"
ref=
"leaveMessage"
:lmTemplate=
"lmTemplate"
:type=
"9"
>
</leave-message>
</div>
</div>
<ScheduleModal
ref=
"scheduleModal"
v-click-outside=
"scheduleClose"
>
</ScheduleModal>
</section>
</
template
>
</
template
>
<
script
>
<
script
>
import
SearchHeader
from
'../common/searchHeader'
import
SearchForm
from
'../common/SearchForm'
import
ScheduleItem
from
'../common/scheduleItem'
import
ScheduleModal
from
'../schedule/scheduleModal'
import
LeaveMessage
from
'../common/leaveMessage'
import
Pagenation
from
'./reimbursementPagenation'
import
clickOutside
from
'@/lib/bind'
import
singleRadioTool
from
'../common/singleRadioTool'
import
{
requestAPI
,
api
}
from
'@/lib/commonMixin'
export
default
{
export
default
{
name
:
'reimbursement'
name
:
''
,
components
:
{
SearchHeader
,
SearchForm
,
ScheduleItem
,
ScheduleModal
,
LeaveMessage
,
Pagenation
,
singleRadioTool
},
directives
:
{
clickOutside
},
data
()
{
return
{
lmTemplate
:
[
{
name
:
'客户名称'
,
value
:
'client.name'
,
default
:
'未设置'
},
{
name
:
'内容'
,
value
:
'description'
},
{
name
:
'待办时间'
,
value
:
'schedule_week_display'
},
{
name
:
'状态'
,
value
:
'schedule_status_display'
},
{
name
:
'开始时间'
,
value
:
'start_at'
},
{
name
:
'结束时间'
,
value
:
'end_at'
},
{
name
:
'重复'
,
value
:
'repeatSchedule'
},
{
name
:
'负责人'
,
value
:
'repeatSchedule'
},
{
name
:
'创建时间'
,
value
:
'created_at'
}
],
filter
:
[],
form
:
{
'ClientSearch[keyword]'
:
''
},
reimType
:
''
,
reimTypeArray
:
[
{
'name'
:
0
,
'value'
:
'报销单'
},
{
'name'
:
1
,
'value'
:
'我审核的'
},
{
'name'
:
2
,
'value'
:
'抄送我的'
},
{
'name'
:
3
,
'value'
:
'我结算的'
}
],
pagenation
:
{
thispage
:
1
,
pagesize
:
10
},
result
:
{
list
:
[],
pagenation
:
{
totalcount
:
1
,
thispage
:
1
,
pagesize
:
10
},
thisUser
:
{
id
:
''
,
name
:
''
,
sex
:
''
}
}
}
},
mounted
()
{
this
.
init
()
},
methods
:
{
init
()
{
this
.
getFilter
()
this
.
getScheduleList
()
},
searchKeyword
(
search
)
{
this
.
updateForm
(
search
)
},
updateForm
(
search
)
{
Object
.
assign
(
this
.
form
,
search
)
this
.
getScheduleList
()
},
updatePage
(
pager
)
{
Object
.
assign
(
this
.
pagenation
,
pager
)
this
.
getScheduleList
()
},
getFilter
()
{
requestAPI
(
api
.
getReimburrsementFilter
).
then
(
res
=>
{
this
.
filter
=
res
})
},
leaveMessageSch
(
item
)
{
this
.
$refs
.
leaveMessage
.
isShow
(
item
)
},
lmClose
()
{
this
.
$refs
.
leaveMessage
&&
this
.
$refs
.
leaveMessage
.
isClose
()
},
scheduleClose
()
{
this
.
$refs
.
scheduleModal
&&
this
.
$refs
.
scheduleModal
.
handleClose
()
},
addSch
()
{
this
.
$refs
.
scheduleModal
.
show
()
},
editSch
(
item
)
{
this
.
$refs
.
scheduleModal
.
show
(
item
)
},
deleteSch
(
id
)
{
this
.
$confirm
(
'删除该待办事项?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
requestAPI
(
api
.
deleteSchedule
,
{
id
})
.
then
((
res
)
=>
{
this
.
$message
.
success
(
'删除成功'
)
})
}).
catch
(()
=>
{
this
.
$message
.
info
(
'取消删除'
)
})
},
getScheduleList
()
{
requestAPI
(
api
.
getScheduleList
,
{
...
this
.
form
,
page
:
this
.
pagenation
.
thispage
}).
then
((
res
)
=>
{
const
{
list
=
[],
pagenation
=
{},
thisUser
=
{}
}
=
res
this
.
result
.
list
=
list
this
.
result
.
pagenation
=
pagenation
this
.
result
.
thisUser
=
thisUser
})
}
}
}
}
</
script
>
</
script
>
<
style
scoped
lang=
"scss"
>
<
style
scoped
lang=
"scss"
>
@include
c
(
'opearate-button'
)
{
>
.el-button
{
margin-right
:
0px
;
}
&
.btn-primary
.badge
{
color
:
#333744
;
background-color
:
#fff
;
}
&
.badge
{
position
:
relative
;
top
:
0px
;
left
:
-5px
;
display
:
inline-block
;
padding
:
0px
5px
;
font-size
:
12px
;
font-weight
:
700
;
line-height
:
1
;
text-align
:
center
;
white-space
:
nowrap
;
vertical-align
:
baseline
;
border-radius
:
.25rem
;
}
i
{
display
:
inline-block
;
padding-right
:
3px
;
}
}
</
style
>
</
style
>
src/components/reimbursement_list/reimbursementPagenation.vue
0 → 100644
View file @
62bbb809
<
template
>
<section
class=
"pull-right"
>
<el-pagination
v-if=
"total > 0"
class=
"mb20 mt20"
background
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:current-page=
"pager.thispage"
:page-sizes=
"[10, 20, 40, 60, 80, 100]"
:page-size=
"pager.pagesize"
layout=
"total, prev, pager, next, jumper"
:total=
"total"
>
</el-pagination>
</section>
</
template
>
<
script
>
export
default
{
props
:
{
total
:
{
type
:
Number
,
default
:
0
}
},
data
()
{
return
{
pager
:
{
thispage
:
1
,
pagesize
:
20
,
totalcount
:
0
}
}
},
created
()
{
this
.
$emit
(
'update:pager'
,
this
.
pager
)
},
methods
:
{
handleSizeChange
(
val
)
{
this
.
pager
.
thispage
=
1
this
.
pager
.
pagesize
=
val
this
.
pager
.
totalcount
=
this
.
total
this
.
$emit
(
'update:pager'
,
this
.
pager
)
},
handleCurrentChange
(
val
)
{
this
.
pager
.
thispage
=
val
this
.
pager
.
totalcount
=
this
.
total
this
.
$emit
(
'update:pager'
,
this
.
pager
)
}
}
}
</
script
>
<
style
scoped
>
</
style
>
src/route.js
View file @
62bbb809
import
portal
from
'vis-portal'
import
portal
from
'vis-portal'
import
ScheduleRoute
from
'./routes/schedule'
import
ScheduleRoute
from
'./routes/schedule'
import
ReimbursementRoute
from
'./routes/reimbursement'
let
routes
=
[]
let
routes
=
[]
let
reimRoutes
=
[]
const
appName
=
'schedule'
const
appName
=
'schedule'
routes
=
[].
concat
(
ScheduleRoute
)
routes
=
[].
concat
(
ScheduleRoute
)
reimRoutes
=
[].
concat
(
ReimbursementRoute
)
let
RouterInit
=
()
=>
{
let
RouterInit
=
()
=>
{
portal
.
createApp
(
appName
,
{},
app
=>
{
portal
.
createApp
(
appName
,
{},
app
=>
{
app
.
mapRoute
(
routes
)
app
.
mapRoute
(
routes
)
})
})
portal
.
createApp
(
'reimbursement'
,
{},
app
=>
{
app
.
mapRoute
(
reimRoutes
)
})
// portal.createApp('client', {}, app => {
// portal.createApp('client', {}, app => {
// app.mapRoute([
// app.mapRoute([
// {
// {
...
...
src/routes/reimbursement.js
0 → 100644
View file @
62bbb809
import
ReimbursementHome
from
'../components/reimbursement_list/reimbursementHome'
const
routes
=
[{
path
:
'/reimbursementHome'
,
name
:
'reimbursementHome'
,
component
:
ReimbursementHome
}]
export
default
routes
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment