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
22065a4e
Commit
22065a4e
authored
Apr 19, 2019
by
daywrite
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
费用报销新建
parent
1b759ef8
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
23 deletions
+32
-23
settingMixin.js
src/components/common/settingMixin.js
+5
-0
reimbursementForm.vue
src/components/reimbursement/reimbursementForm.vue
+20
-12
reimbursementModal.vue
src/components/reimbursement/reimbursementModal.vue
+5
-4
viewHelper.js
src/lib/viewHelper.js
+2
-7
No files found.
src/components/common/settingMixin.js
View file @
22065a4e
...
...
@@ -48,6 +48,11 @@ export default {
reimbursementCarbonCopyRels
()
{
let
ret
=
this
.
getArrayByKey
(
'Reimbursements'
,
'form_reimbursementCarbonCopyRels'
)
return
ret
&&
[].
concat
(
ret
.
value
)
},
reimbursementSettleAccountsAt
()
{
let
ret
=
this
.
getArrayByKey
(
'Reimbursements'
,
'settle_accounts_at'
)
return
ret
&&
[].
concat
(
ret
.
value
)
}
},
...
...
src/components/reimbursement/reimbursementForm.vue
View file @
22065a4e
...
...
@@ -8,11 +8,11 @@
@
update:item=
"val =>
{model.form_type = val}">
</single-radio>
</el-form-item>
<el-form-item
label=
"费用类型:"
prop=
"
cost_t
ype"
class=
"ec-clear-left is-required"
>
<el-form-item
label=
"费用类型:"
prop=
"
form_costT
ype"
class=
"ec-clear-left is-required"
>
<single-radio
:form-item=
"model.
cost_t
ype"
:form-item=
"model.
form_costT
ype"
:options-list=
"reimCostTypeArray"
@
update:item=
"val =>
{model.
cost_t
ype = val}">
@
update:item=
"val =>
{model.
form_costT
ype = val}">
</single-radio>
</el-form-item>
<el-form-item
label=
"发生时间:"
prop=
"occurrence_at"
class=
"ec-clear-left is-required"
>
...
...
@@ -23,6 +23,14 @@
placeholder=
"选择日期时间"
>
</el-date-picker>
</el-form-item>
<el-form-item
label=
"结算时间:"
prop=
"settle_accounts_at"
class=
"ec-clear-left is-required"
>
<el-date-picker
size=
"small"
v-model=
"model.settle_accounts_at"
type=
"datetime"
placeholder=
"选择日期时间"
>
</el-date-picker>
</el-form-item>
<el-form-item
label=
"费用金额:"
prop=
"amount"
class=
"ec-clear-left ec-form-item-lg is-required"
>
<el-input
class=
"ec-input-normal"
...
...
@@ -54,21 +62,23 @@
</el-select>
</el-form-item>
<el-form-item
label=
"审核人:"
prop=
"form_reimbursementVerifyRels"
class=
"ec-clear-left ec-form-item-lg is-required"
>
<el-select
v-model=
"model.form_reimbursementVerifyRels"
size=
"small"
multiple
placeholder=
"
请选择
"
>
<el-select
v-model=
"model.form_reimbursementVerifyRels"
size=
"small"
multiple
placeholder=
"
点击选择或输入关键字查询
"
>
<el-option
v-for=
"(option, optKey) in reimbursementVerifyRels"
:key=
"optKey"
:label=
"option.name"
:value=
"option.key"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"结算人:"
prop=
"actName"
class=
"ec-clear-left is-required"
>
<settle-account-select
:query=
"model"
:inputWidth=
"340"
:startLoadInitial=
"false"
/>
<el-form-item
label=
"结算人:"
prop=
"settle_accounts_by"
class=
"ec-clear-left is-required"
>
<el-select
v-model=
"model.settle_accounts_by"
size=
"small"
filterable
placeholder=
"点击选择或输入关键字查询"
>
<el-option
v-for=
"(option, optKey) in reimbursementSettleAccountsAt"
:key=
"optKey"
:label=
"option.name"
:value=
"option.key"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"抄送:"
prop=
"form_reimbursementCarbonCopyRels"
class=
"ec-clear-left ec-form-item-lg"
>
<el-select
v-model=
"model.form_reimbursementCarbonCopyRels"
size=
"small"
multiple
placeholder=
"
请选择
"
>
<el-select
v-model=
"model.form_reimbursementCarbonCopyRels"
size=
"small"
multiple
placeholder=
"
点击选择或输入关键字查询
"
>
<el-option
v-for=
"(option, optKey) in reimbursementCarbonCopyRels"
:key=
"optKey"
:label=
"option.name"
...
...
@@ -87,7 +97,6 @@
</section>
</
template
>
<
script
>
import
settleAccountSelect
from
'./settleAccountSelect'
import
singleRadio
from
'../common/singleRadio'
import
settingMixin
from
'../common/settingMixin'
import
depSelect
from
'../schedule/depSelect'
...
...
@@ -105,7 +114,6 @@ export default {
},
components
:
{
settleAccountSelect
,
singleRadio
,
depSelect
},
...
...
src/components/reimbursement/reimbursementModal.vue
View file @
22065a4e
...
...
@@ -30,8 +30,9 @@ export default {
diaVis
:
false
,
model
:
{
form_type
:
''
,
cost_t
ype
:
''
,
form_costT
ype
:
''
,
occurrence_at
:
''
,
settle_accounts_at
:
''
,
amount
:
''
,
client_id
:
''
,
client_name
:
''
,
// 客户
...
...
@@ -52,8 +53,8 @@ export default {
handleClose
()
{
Object
.
keys
(
this
.
model
).
forEach
(
item
=>
{
if
(
Array
.
isArray
(
item
)
)
{
this
.
model
[
item
]
=
''
if
(
item
===
'form_reimbursementVerifyRels'
||
item
===
'form_reimbursementCarbonCopyRels'
)
{
this
.
model
[
item
]
=
[]
}
else
{
this
.
model
[
item
]
=
''
}
...
...
@@ -62,10 +63,10 @@ export default {
},
save
()
{
console
.
log
(
this
.
model
)
let
_params
=
Object
.
assign
({},
setModule
(
this
.
model
,
'Reimbursements'
))
let
_apiUrl
=
!
this
.
model
.
id
?
api
.
saveNewReim
:
api
.
saveEditReim
!
this
.
model
.
id
&&
delete
_params
[
'Reimbursements[id]'
]
console
.
log
(
_params
)
requestAPI
(
Object
.
assign
(
_apiUrl
,
{
method
:
'POST'
}),
_params
)
.
then
((
res
)
=>
{
this
.
$refs
.
scheduleSidePopup
.
close
()
...
...
src/lib/viewHelper.js
View file @
22065a4e
...
...
@@ -24,14 +24,9 @@ export function removeEmptyMemberArray (arr) {
export
let
setModule
=
(
obj
,
key
)
=>
{
let
ob
=
{}
Object
.
keys
(
obj
).
forEach
((
item
)
=>
{
// ob[key + '[' + item + ']'] = obj[item]
if
(
Array
.
isArray
(
obj
[
item
]))
{
obj
[
item
].
forEach
(
arr
=>
{
if
(
arr
.
key
===
'new'
)
{
ob
[
key
+
'['
+
item
+
']['
+
arr
.
key
+
'][]'
]
=
arr
.
name
}
else
{
ob
[
key
+
'['
+
item
+
']['
+
arr
.
key
+
']'
]
=
arr
.
name
}
})
ob
[
key
+
'['
+
item
+
']'
]
=
obj
[
item
]
}
else
{
ob
[
key
+
'['
+
item
+
']'
]
=
obj
[
item
]
}
...
...
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