优化单据页面
This commit is contained in:
@@ -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 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$("#OtherMoneyShow").text(otherMoneyShow +"总计:"+ res.othermoney + "元 "); //其它费用
|
$("#OtherMoneyShow").text(otherMoneyShow +"总计:"+ otherMoney + "元 "); //其它费用
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$("#OtherMoneyShow").text(res.othermoney); //其它费用
|
$("#OtherMoneyShow").text(otherMoney); //其它费用
|
||||||
}
|
}
|
||||||
$("#payTypeShow").text(res.paytype);
|
$("#payTypeShow").text(res.paytype);
|
||||||
var TotalPrice = res.totalprice;
|
var TotalPrice = res.totalprice;
|
||||||
@@ -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());
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user