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
6fb687a4
Commit
6fb687a4
authored
Oct 09, 2021
by
季圣华
Browse files
给所有单据都增加扫码功能
parent
d958c073
Changes
1
Hide whitespace changes
Inline
Side-by-side
jshERP-web/src/views/bill/mixins/BillModalMixin.js
View file @
6fb687a4
...
...
@@ -525,6 +525,7 @@ export const BillModalMixin = {
getMaterialByBarCode
(
param
).
then
((
res
)
=>
{
if
(
res
&&
res
.
code
===
200
)
{
let
hasFinished
=
false
let
allLastMoney
=
0
let
allTaxLastMoney
=
0
//获取单据明细列表信息
let
detailArr
=
allValues
.
tablesValue
[
0
].
values
...
...
@@ -594,6 +595,7 @@ export const BillModalMixin = {
this
.
materialTable
.
dataSource
=
newDetailArr
//更新优惠后金额、本次付款等信息
for
(
let
newDetail
of
newDetailArr
){
allLastMoney
=
allLastMoney
+
(
newDetail
.
allPrice
-
0
)
allTaxLastMoney
=
allTaxLastMoney
+
(
newDetail
.
taxLastMoney
-
0
)
}
let
discount
=
this
.
form
.
getFieldValue
(
'
discount
'
)
-
0
...
...
@@ -601,10 +603,16 @@ export const BillModalMixin = {
let
discountMoney
=
(
discount
*
0.01
*
allTaxLastMoney
).
toFixed
(
2
)
-
0
let
discountLastMoney
=
(
allTaxLastMoney
-
discountMoney
).
toFixed
(
2
)
-
0
let
changeAmountNew
=
(
discountLastMoney
+
otherMoney
).
toFixed
(
2
)
-
0
this
.
$nextTick
(()
=>
{
this
.
form
.
setFieldsValue
({
'
discount
'
:
discount
,
'
discountMoney
'
:
discountMoney
,
'
discountLastMoney
'
:
discountLastMoney
,
'
changeAmount
'
:
changeAmountNew
,
'
debt
'
:
0
})
});
if
(
this
.
prefixNo
===
'
LSCK
'
||
this
.
prefixNo
===
'
LSTH
'
)
{
this
.
$nextTick
(()
=>
{
this
.
form
.
setFieldsValue
({
'
changeAmount
'
:
allLastMoney
,
'
getAmount
'
:
allLastMoney
,
'
backAmount
'
:
0
})
});
}
else
{
this
.
$nextTick
(()
=>
{
this
.
form
.
setFieldsValue
({
'
discount
'
:
discount
,
'
discountMoney
'
:
discountMoney
,
'
discountLastMoney
'
:
discountLastMoney
,
'
changeAmount
'
:
changeAmountNew
,
'
debt
'
:
0
})
});
}
//置空扫码的内容
this
.
scanBarCode
=
''
}
...
...
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