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 @@
$("#DiscountShow").text(res.discount);
$("#DiscountMoneyShow").text(res.discountmoney);
$("#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); //结算天数
$("#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 itemMoneyArr = null;
if(res.othermoneyitem!=null) {
...
...
@@ -1500,10 +1505,10 @@
}
}
}
$
(
"
#OtherMoneyShow
"
).
text
(
otherMoneyShow
+
"
总计:
"
+
res
.
other
m
oney
+
"
元
"
);
//其它费用
$("#OtherMoneyShow").text(otherMoneyShow +"总计:"+ other
M
oney + "元 "); //其它费用
}
else {
$
(
"
#OtherMoneyShow
"
).
text
(
res
.
other
m
oney
);
//其它费用
$("#OtherMoneyShow").text(other
M
oney); //其它费用
}
$("#payTypeShow").text(res.paytype);
var TotalPrice = res.totalprice;
...
...
@@ -2176,21 +2181,23 @@
//给弹窗赋值-其它费用数据
var itemArr = $("#OtherMoney").attr("data-itemArr");
itemArr
=
JSON
.
parse
(
itemArr
);
var
itemMoneyArr
=
$
(
"
#OtherMoney
"
).
attr
(
"
data-itemMoneyArr
"
);
itemMoneyArr
=
JSON
.
parse
(
itemMoneyArr
);
$
(
"
#otherMoneyDlg .money-dlg .money-content-tmp
"
).
each
(
function
(){
var
index
=
$
(
this
).
attr
(
"
data-index
"
);
$
(
this
).
find
(
"
.money-id-dlg
"
).
val
(
itemArr
[
index
]);
if
(
itemMoneyArr
[
index
]
!=
"
undefined
"
){
for
(
var
k
=
0
;
k
<
itemMoneyArr
.
length
;
k
++
)
{
if
(
itemMoneyArr
[
k
].
otherId
==
itemArr
[
index
])
{
$
(
this
).
find
(
"
.other-money-dlg
"
).
val
(
itemMoneyArr
[
k
].
otherMoney
);
}
}
if(itemArr) {
itemArr = JSON.parse(itemArr);
var itemMoneyArr = $("#OtherMoney").attr("data-itemMoneyArr");
itemMoneyArr = JSON.parse(itemMoneyArr);
$("#otherMoneyDlg .money-dlg .money-content-tmp").each(function(){
var index = $(this).attr("data-index");
$(this).find(".money-id-dlg").val(itemArr[index]);
if(itemMoneyArr[index]!="undefined"){
for(var k =0;k<itemMoneyArr.length; k++) {
if (itemMoneyArr[k].otherId == itemArr[index]) {
$(this).find(".other-money-dlg").val(itemMoneyArr[k].otherMoney);
}
}
}
});
}
});
}
$("#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