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
a054dacc
Commit
a054dacc
authored
Jun 24, 2020
by
季圣华
Browse files
优化单据页面
parent
d9412d5f
Changes
1
Hide whitespace changes
Inline
Side-by-side
erp_web/js/pages/materials/in_out.js
View file @
a054dacc
...
@@ -1472,10 +1472,15 @@
...
@@ -1472,10 +1472,15 @@
$
(
"
#DiscountShow
"
).
text
(
res
.
discount
);
$
(
"
#DiscountShow
"
).
text
(
res
.
discount
);
$
(
"
#DiscountMoneyShow
"
).
text
(
res
.
discountmoney
);
$
(
"
#DiscountMoneyShow
"
).
text
(
res
.
discountmoney
);
$
(
"
#DiscountLastMoneyShow
"
).
text
(
res
.
discountlastmoney
);
$
(
"
#DiscountLastMoneyShow
"
).
text
(
res
.
discountlastmoney
);
$
(
"
#DebtShow
"
).
text
((
res
.
discountlastmoney
+
res
.
othermoney
-
res
.
changeamount
).
toFixed
(
2
));
var
debt
=
0
;
if
(
res
.
othermoney
){
debt
=
(
res
.
discountlastmoney
+
res
.
othermoney
-
res
.
changeamount
).
toFixed
(
2
);
}
$
(
"
#DebtShow
"
).
text
(
debt
);
$
(
"
#AccountDayShow
"
).
text
(
res
.
accountday
);
//结算天数
$
(
"
#AccountDayShow
"
).
text
(
res
.
accountday
);
//结算天数
$
(
"
#LinkNumberShow
"
).
text
(
res
.
linknumber
);
//关联订单号
$
(
"
#LinkNumberShow
"
).
text
(
res
.
linknumber
);
//关联订单号
if
(
res
.
othermoney
&&
res
.
othermoneylist
&&
res
.
othermoneyitem
){
var
otherMoney
=
res
.
othermoney
?
res
.
othermoney
:
0
;
if
(
otherMoney
!=
0
&&
res
.
othermoneylist
&&
res
.
othermoneyitem
){
var
itemArr
=
res
.
othermoneylist
.
split
(
"
,
"
);
//支出项目id列表
var
itemArr
=
res
.
othermoneylist
.
split
(
"
,
"
);
//支出项目id列表
var
itemMoneyArr
=
null
;
var
itemMoneyArr
=
null
;
if
(
res
.
othermoneyitem
!=
null
)
{
if
(
res
.
othermoneyitem
!=
null
)
{
...
@@ -1500,10 +1505,10 @@
...
@@ -1500,10 +1505,10 @@
}
}
}
}
}
}
$
(
"
#OtherMoneyShow
"
).
text
(
otherMoneyShow
+
"
总计:
"
+
res
.
other
m
oney
+
"
元
"
);
//其它费用
$
(
"
#OtherMoneyShow
"
).
text
(
otherMoneyShow
+
"
总计:
"
+
other
M
oney
+
"
元
"
);
//其它费用
}
}
else
{
else
{
$
(
"
#OtherMoneyShow
"
).
text
(
res
.
other
m
oney
);
//其它费用
$
(
"
#OtherMoneyShow
"
).
text
(
other
M
oney
);
//其它费用
}
}
$
(
"
#payTypeShow
"
).
text
(
res
.
paytype
);
$
(
"
#payTypeShow
"
).
text
(
res
.
paytype
);
var
TotalPrice
=
res
.
totalprice
;
var
TotalPrice
=
res
.
totalprice
;
...
@@ -2176,21 +2181,23 @@
...
@@ -2176,21 +2181,23 @@
//给弹窗赋值-其它费用数据
//给弹窗赋值-其它费用数据
var
itemArr
=
$
(
"
#OtherMoney
"
).
attr
(
"
data-itemArr
"
);
var
itemArr
=
$
(
"
#OtherMoney
"
).
attr
(
"
data-itemArr
"
);
itemArr
=
JSON
.
parse
(
itemArr
);
if
(
itemArr
)
{
var
itemMoneyArr
=
$
(
"
#OtherMoney
"
).
attr
(
"
data-itemMoneyArr
"
);
itemArr
=
JSON
.
parse
(
itemArr
);
itemMoneyArr
=
JSON
.
parse
(
itemMoneyArr
);
var
itemMoneyArr
=
$
(
"
#OtherMoney
"
).
attr
(
"
data-itemMoneyArr
"
);
$
(
"
#otherMoneyDlg .money-dlg .money-content-tmp
"
).
each
(
function
(){
itemMoneyArr
=
JSON
.
parse
(
itemMoneyArr
);
var
index
=
$
(
this
).
attr
(
"
data-index
"
);
$
(
"
#otherMoneyDlg .money-dlg .money-content-tmp
"
).
each
(
function
(){
$
(
this
).
find
(
"
.money-id-dlg
"
).
val
(
itemArr
[
index
]);
var
index
=
$
(
this
).
attr
(
"
data-index
"
);
if
(
itemMoneyArr
[
index
]
!=
"
undefined
"
){
$
(
this
).
find
(
"
.money-id-dlg
"
).
val
(
itemArr
[
index
]);
for
(
var
k
=
0
;
k
<
itemMoneyArr
.
length
;
k
++
)
{
if
(
itemMoneyArr
[
index
]
!=
"
undefined
"
){
if
(
itemMoneyArr
[
k
].
otherId
==
itemArr
[
index
])
{
for
(
var
k
=
0
;
k
<
itemMoneyArr
.
length
;
k
++
)
{
$
(
this
).
find
(
"
.other-money-dlg
"
).
val
(
itemMoneyArr
[
k
].
otherMoney
);
if
(
itemMoneyArr
[
k
].
otherId
==
itemArr
[
index
])
{
}
$
(
this
).
find
(
"
.other-money-dlg
"
).
val
(
itemMoneyArr
[
k
].
otherMoney
);
}
}
}
}
}
});
});
}
$
(
"
#otherMoneyTotalDlg
"
).
text
(
$
(
"
#OtherMoney
"
).
val
());
$
(
"
#otherMoneyTotalDlg
"
).
text
(
$
(
"
#OtherMoney
"
).
val
());
});
});
...
...
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