解决供应商对账里面的单据展示bug
This commit is contained in:
@@ -237,24 +237,32 @@
|
|||||||
$("#bill .DebtShow").text((data.discountlastmoney+data.othermoney-data.changeamount).toFixed(2));
|
$("#bill .DebtShow").text((data.discountlastmoney+data.othermoney-data.changeamount).toFixed(2));
|
||||||
$("#bill .OtherMoneyShow").text(data.othermoney==null ? "": data.othermoney);
|
$("#bill .OtherMoneyShow").text(data.othermoney==null ? "": data.othermoney);
|
||||||
$("#bill .AccountDayShow").text(data.accountday==null ? "": data.accountday); //结算天数
|
$("#bill .AccountDayShow").text(data.accountday==null ? "": data.accountday); //结算天数
|
||||||
var otherMoney = data.othermoney + "";
|
if(data.othermoney && data.othermoneylist && data.othermoneyitem) {
|
||||||
var otherMoneyList = data.othermoneylist + "";
|
var itemArr = data.othermoneylist.split(","); //支出项目id列表
|
||||||
var otherMoneyItem = data.othermoneyitem + "";
|
var itemMoneyArr = null;
|
||||||
if(otherMoneyList && otherMoneyItem){
|
if (data.othermoneyitem != null) {
|
||||||
var itemArr = otherMoneyList.split(","); //支出项目id列表
|
itemMoneyArr = eval("([" + data.othermoneyitem + "])"); //支出项目金额列表
|
||||||
var itemMoneyArr = otherMoneyItem.split(","); //支出项目金额列表
|
}
|
||||||
var otherMoneyShow = "";
|
var otherMoneyShow = "";
|
||||||
for(var j =0;j<itemArr.length; j++) {
|
for(var j =0;j<itemArr.length; j++) {
|
||||||
if (outItemList != null) {
|
if (outItemList != null) {
|
||||||
for (var i = 0; i < outItemList.length; i++) {
|
for (var i = 0; i < outItemList.length; i++) {
|
||||||
var money = outItemList[i];
|
var money = outItemList[i];
|
||||||
if(itemArr[j] == money.Id) {
|
if(itemArr[j] == money.Id) {
|
||||||
otherMoneyShow = otherMoneyShow + money.InOutItemName + "(" + itemMoneyArr[j] +"元) ";
|
for(var k =0;k<itemMoneyArr.length; k++) {
|
||||||
|
if(itemMoneyArr[k].otherId == money.Id) {
|
||||||
|
otherMoneyShow += money.InOutItemName;
|
||||||
|
if(itemMoneyArr[k].otherMoney) {
|
||||||
|
otherMoneyShow +="(" + itemMoneyArr[k].otherMoney +"元)";
|
||||||
|
}
|
||||||
|
otherMoneyShow+=",";
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$("#bill .OtherMoneyShow:visible").text(otherMoneyShow +"总计:"+ otherMoney.replace("undefined","0") + "元 "); //其它费用
|
$("#bill .OtherMoneyShow:visible").text(otherMoneyShow +"总计:"+ data.othermoney + "元 "); //其它费用
|
||||||
}
|
}
|
||||||
$("#bill .payTypeShow").text(data.payType);
|
$("#bill .payTypeShow").text(data.payType);
|
||||||
var TotalPrice = data.totalprice;
|
var TotalPrice = data.totalprice;
|
||||||
|
|||||||
Reference in New Issue
Block a user