Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
JSH ERP
Commits
f682cee8
Commit
f682cee8
authored
Jul 10, 2021
by
季圣华
Browse files
解决单据中多账户展示的bug
parent
be6ef2aa
Changes
1
Hide whitespace changes
Inline
Side-by-side
jshERP-web/src/views/bill/dialog/ManyAccountModal.vue
View file @
f682cee8
...
...
@@ -95,16 +95,20 @@
edit
(
idStr
,
moneyStr
)
{
this
.
form
.
resetFields
();
this
.
model
=
Object
.
assign
({},
{});
let
idList
=
[],
moneyList
=
[]
if
(
idStr
&&
idStr
.
indexOf
(
'
,
'
)
>-
1
)
{
let
idList
=
idStr
.
split
(
"
,
"
)
if
(
idList
[
0
])
{
this
.
model
.
oneAccountId
=
idList
[
0
]
-
0
}
if
(
idList
[
1
])
{
this
.
model
.
twoAccountId
=
idList
[
1
]
-
0
}
if
(
idList
[
2
])
{
this
.
model
.
threeAccountId
=
idList
[
2
]
-
0
}
let
moneyList
=
moneyStr
.
split
(
"
,
"
)
if
(
moneyList
[
0
])
{
this
.
model
.
oneAccountPrice
=
Math
.
abs
(
moneyList
[
0
])}
if
(
moneyList
[
1
])
{
this
.
model
.
twoAccountPrice
=
Math
.
abs
(
moneyList
[
1
])}
if
(
moneyList
[
2
])
{
this
.
model
.
threeAccountPrice
=
Math
.
abs
(
moneyList
[
2
])}
idList
=
idStr
.
split
(
"
,
"
)
moneyList
=
moneyStr
.
split
(
"
,
"
)
}
else
{
idList
=
idStr
moneyList
=
moneyStr
}
if
(
idList
[
0
])
{
this
.
model
.
oneAccountId
=
idList
[
0
]
-
0
}
if
(
idList
[
1
])
{
this
.
model
.
twoAccountId
=
idList
[
1
]
-
0
}
if
(
idList
[
2
])
{
this
.
model
.
threeAccountId
=
idList
[
2
]
-
0
}
if
(
moneyList
[
0
])
{
this
.
model
.
oneAccountPrice
=
Math
.
abs
(
moneyList
[
0
])}
if
(
moneyList
[
1
])
{
this
.
model
.
twoAccountPrice
=
Math
.
abs
(
moneyList
[
1
])}
if
(
moneyList
[
2
])
{
this
.
model
.
threeAccountPrice
=
Math
.
abs
(
moneyList
[
2
])}
this
.
visible
=
true
;
this
.
$nextTick
(()
=>
{
this
.
form
.
setFieldsValue
(
pick
(
this
.
model
,
'
oneAccountId
'
,
'
oneAccountPrice
'
,
...
...
@@ -122,8 +126,9 @@
if
(
!
err
)
{
let
allPrice
=
0
that
.
confirmLoading
=
true
;
that
.
accountIdList
=
[]
that
.
accountMoneyList
=
[]
let
formData
=
Object
.
assign
(
this
.
model
,
values
);
console
.
log
(
formData
)
if
(
formData
.
oneAccountId
!==
undefined
)
{
that
.
accountIdList
.
push
(
formData
.
oneAccountId
)
}
...
...
@@ -146,6 +151,7 @@
allPrice
=
allPrice
+
formData
.
threeAccountPrice
}
that
.
$emit
(
'
ok
'
,
that
.
accountIdList
,
that
.
accountMoneyList
,
allPrice
);
that
.
confirmLoading
=
false
;
that
.
close
();
}
})
...
...
Write
Preview
Supports
Markdown
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