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
b75076a5
Commit
b75076a5
authored
Apr 25, 2022
by
季圣华
Browse files
优化采购入库和销售出库的关联单据调用的逻辑
parent
d7afcc54
Changes
2
Hide whitespace changes
Inline
Side-by-side
jshERP-web/src/views/bill/modules/PurchaseInModal.vue
View file @
b75076a5
...
...
@@ -392,8 +392,7 @@
'
organId
'
:
record
.
organId
,
'
linkNumber
'
:
record
.
number
,
'
remark
'
:
record
.
remark
,
'
discountLastMoney
'
:
record
.
totalPrice
,
'
changeAmount
'
:
record
.
totalPrice
'
discount
'
:
record
.
discount
})
});
// 加载子表数据
...
...
@@ -411,24 +410,29 @@
if
(
res
&&
res
.
code
===
200
){
let
list
=
res
.
data
.
rows
let
listEx
=
[]
let
discount
LastMoney
=
0
let
allTax
LastMoney
=
0
for
(
let
j
=
0
;
j
<
list
.
length
;
j
++
){
let
info
=
list
[
j
];
if
(
info
.
preNumber
)
{
info
.
operNumber
=
info
.
preNumber
-
info
.
finishNumber
info
.
allPrice
=
info
.
operNumber
*
info
.
unitPrice
-
0
;
discountLastMoney
+=
info
.
allPrice
info
.
allPrice
=
info
.
operNumber
*
info
.
unitPrice
-
0
}
info
.
taxMoney
=
0
info
.
taxLastMoney
=
info
.
allPrice
let
taxRate
=
info
.
taxRate
-
0
info
.
taxMoney
=
(
info
.
allPrice
*
taxRate
/
100
).
toFixed
(
2
)
-
0
info
.
taxLastMoney
=
info
.
allPrice
+
info
.
taxMoney
allTaxLastMoney
+=
info
.
taxLastMoney
listEx
.
push
(
info
)
this
.
changeColumnShow
(
info
)
}
tab
.
dataSource
=
listEx
//给优惠后金额重新赋值
if
(
discountLastMoney
)
{
if
(
allTaxLastMoney
)
{
let
discount
=
this
.
form
.
getFieldValue
(
'
discount
'
)
-
0
let
discountMoney
=
(
discount
*
allTaxLastMoney
/
100
).
toFixed
(
2
)
-
0
let
discountLastMoney
=
allTaxLastMoney
-
discountMoney
this
.
$nextTick
(()
=>
{
this
.
form
.
setFieldsValue
({
'
discountMoney
'
:
discountMoney
,
'
discountLastMoney
'
:
discountLastMoney
,
'
changeAmount
'
:
discountLastMoney
})
...
...
jshERP-web/src/views/bill/modules/SaleOutModal.vue
View file @
b75076a5
...
...
@@ -398,8 +398,7 @@
'
organId
'
:
record
.
organId
,
'
linkNumber
'
:
record
.
number
,
'
remark
'
:
record
.
remark
,
'
discountLastMoney
'
:
record
.
totalPrice
,
'
changeAmount
'
:
record
.
totalPrice
'
discount
'
:
record
.
discount
})
});
// 加载子表数据
...
...
@@ -417,24 +416,29 @@
if
(
res
&&
res
.
code
===
200
){
let
list
=
res
.
data
.
rows
let
listEx
=
[]
let
discount
LastMoney
=
0
let
allTax
LastMoney
=
0
for
(
let
j
=
0
;
j
<
list
.
length
;
j
++
){
let
info
=
list
[
j
];
if
(
info
.
preNumber
)
{
info
.
operNumber
=
info
.
preNumber
-
info
.
finishNumber
info
.
allPrice
=
info
.
operNumber
*
info
.
unitPrice
-
0
;
discountLastMoney
+=
info
.
allPrice
info
.
allPrice
=
info
.
operNumber
*
info
.
unitPrice
-
0
}
info
.
taxMoney
=
0
info
.
taxLastMoney
=
info
.
allPrice
let
taxRate
=
info
.
taxRate
-
0
info
.
taxMoney
=
(
info
.
allPrice
*
taxRate
/
100
).
toFixed
(
2
)
-
0
info
.
taxLastMoney
=
info
.
allPrice
+
info
.
taxMoney
allTaxLastMoney
+=
info
.
taxLastMoney
listEx
.
push
(
info
)
this
.
changeColumnShow
(
info
)
}
tab
.
dataSource
=
listEx
//给优惠后金额重新赋值
if
(
discountLastMoney
)
{
if
(
allTaxLastMoney
)
{
let
discount
=
this
.
form
.
getFieldValue
(
'
discount
'
)
-
0
let
discountMoney
=
(
discount
*
allTaxLastMoney
/
100
).
toFixed
(
2
)
-
0
let
discountLastMoney
=
allTaxLastMoney
-
discountMoney
this
.
$nextTick
(()
=>
{
this
.
form
.
setFieldsValue
({
'
discountMoney
'
:
discountMoney
,
'
discountLastMoney
'
:
discountLastMoney
,
'
changeAmount
'
:
discountLastMoney
})
...
...
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