Commit d55909bb authored by 1650842865's avatar 1650842865

付款申请无PO金额计算优化;记账过账日期记账凭证日期在申请人第二次填写数据的时候再传给SAP

parent 693254e6
...@@ -361,9 +361,9 @@ function getColumns() { ...@@ -361,9 +361,9 @@ function getColumns() {
type: 'text' type: 'text'
}}); }});
columns.push({display: "税额(本位币)", name: "kwetr1", width: 120, minwidth: 120, type: "money", align: "left", columns.push({display: "税额(本位币)", name: "kwetr1", width: 120, minwidth: 120, type: "money", align: "left",
//等于含税金额(本位币)减去税额(本位币) editor: {
render:function(item){ mask: 'nnnnnnnnn.nn',
return item.netwr1 = MathUtil.sub(item.kzwi11,item.kwetr1); type: 'text'
}}); }});
return columns; return columns;
} }
...@@ -540,6 +540,7 @@ function loadGrid(obj) { ...@@ -540,6 +540,7 @@ function loadGrid(obj) {
obj.gridManager.updateRow(item.record, {kwetr: kwetr,kzwi11: money,kwetr1: kwetr1}); obj.gridManager.updateRow(item.record, {kwetr: kwetr,kzwi11: money,kwetr1: kwetr1});
totalGrid(); totalGrid();
changeFinancialAuditGridData();
} }
var check = true; var check = true;
if (item.column.name == "zepPtdamount1"){ if (item.column.name == "zepPtdamount1"){
...@@ -970,7 +971,7 @@ function businessJudgmentUnit() { ...@@ -970,7 +971,7 @@ function businessJudgmentUnit() {
var isApply = isApplyProcUnit(); var isApply = isApplyProcUnit();
if (isApply) { if (isApply) {
$("#approvalMoney").hide(); $("#approvalMoney").hide();
$("#financialAudit").hide(); //$("#financialAudit").hide();
$("#financialAudit_sapReturn").hide(); $("#financialAudit_sapReturn").hide();
$("#capitalPost").hide(); $("#capitalPost").hide();
$("#paymentAccomplish_sapReturn").hide(); $("#paymentAccomplish_sapReturn").hide();
...@@ -1059,6 +1060,32 @@ function initFinancialAuditGridData(){ ...@@ -1059,6 +1060,32 @@ function initFinancialAuditGridData(){
} }
} }
function changeFinancialAuditGridData(){
var _grid = UICtrl.getGridManager('#reimbursementApplierGrid');
var _secondGrid = UICtrl.getGridManager('#financialAuditGrid');
if (_grid != null && _secondGrid != null){
var datas = _grid.currentData.Rows;
if (datas.length > 0 && _secondGrid.currentData != null){
var secondRows = _secondGrid.currentData.Rows;
$.each(datas, function (i, data) {
$.each(secondRows, function (i, row) {
if (data.zepItemno === row.zepItemno){
_secondGrid.updateRow(row,{
zepPdamount1:data.netwr,
zepPdtax1:data.kwetr,
zepPtdamount1:data.kzwi1,
zepPdamount:MathUtil.mul(data.netwr,data.kursf),
zepPdtax:data.kwetr1,
zepPtdamount:data.kzwi11
})
}
});
});
totalFinancialAuditGrid(secondRows);
}
}
}
function totalFinancialAuditGrid(data){ function totalFinancialAuditGrid(data){
var zepPtamount = 0,//审批总金额(本位币) var zepPtamount = 0,//审批总金额(本位币)
zepPttax = 0,//审批总税额(本位币) zepPttax = 0,//审批总税额(本位币)
......
...@@ -275,18 +275,20 @@ public class SapCostReimbursementApplicationImpl extends FlowBroker implements S ...@@ -275,18 +275,20 @@ public class SapCostReimbursementApplicationImpl extends FlowBroker implements S
String zpayStaus = (String) detailMap.get("ZPAY_STAUS"); String zpayStaus = (String) detailMap.get("ZPAY_STAUS");
if ("已支付".equals(zpayStaus)){ if ("已支付".equals(zpayStaus)){
detailMap.put("ZPAY_STAUS","S"); detailMap.put("ZPAY_STAUS","S");
String budat = DateUtil.getDateFormat(new Date(), "yyyyMMdd");
detailMap.put("BUDAT",budat);
detailMap.put("BLDAT",budat);
costReimbursementDetail.setBudat(new Date());
costReimbursementDetail.setBldat(new Date());
}else {
detailMap.put("ZPAY_STAUS","");
} }
if (costReimbursementDetail.getZepFpldate() != null){ if (costReimbursementDetail.getZepFpldate() != null){
String dateFormat = DateUtil.getDateFormat(costReimbursementDetail.getZepFpldate(), "yyyyMMdd"); String dateFormat = DateUtil.getDateFormat(costReimbursementDetail.getZepFpldate(), "yyyyMMdd");
detailMap.put("ZEP_FPLDATE",dateFormat); detailMap.put("ZEP_FPLDATE",dateFormat);
} }
String budat = DateUtil.getDateFormat(new Date(), "yyyyMMdd");
detailMap.put("BUDAT",budat);
detailMap.put("BLDAT",budat);
detailMap.putAll(map); detailMap.putAll(map);
itemList.add(detailMap); itemList.add(detailMap);
costReimbursementDetail.setBudat(new Date());
costReimbursementDetail.setBldat(new Date());
costReimbursementDetail.setBankn1(sapCostReimbursement.getBankn1()); costReimbursementDetail.setBankn1(sapCostReimbursement.getBankn1());
costReimbursementDetail.setZepTxt1(sapCostReimbursement.getZepTxt1()); costReimbursementDetail.setZepTxt1(sapCostReimbursement.getZepTxt1());
costReimbursementDetail.setZt012kText1(sapCostReimbursement.getZt012kText1()); costReimbursementDetail.setZt012kText1(sapCostReimbursement.getZt012kText1());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment