进入WEB端脚本
jS代码
splitPaymentBill:function(event,value){
var fid = _self.getCurrentModel().id;
var actualAmt = waf("#uiactPayAmt").wafNumberField("getValue");
var payList1 =[];
var paymentListArr= waf("#editGrid").wafGrid("getAllRowData");
for(var i =0;i<paymentListArr.length;i++){
var amount1 = paymentListArr[i].actualAmt;
var payId =paymentListArr[i].id;
var pay =Object();
pay.id=payId;
pay.amount=amount1;
payList1.push(pay);
}
var jsonPay =JSON.stringify(payList1);
waf.doPost({
action: "splitPaymentBill",
data: { id: fid ,money:actualAmt,payList:jsonPay},
success: function(res) {
console.log("拆单返回值:"+res);
if(res.length>4){
_self.showWarning(res);
}else if(res.length==4){
waf.msgBox.showInfo(res);
}
}
});
}
方法需要做以下配置
发送到了后台的
public void onAction(KDActionEvent event) throws EASBizException, BOSException {
HttpServletRequest request = event.getReqeustContext().getHttpServletRequest();
String id = request.getParameter("id");
String success = FundplanFacadeFactory.getRemoteInstance().splitPaymentBill(id, "0");
com.kingdee.bos.webframework.json.JSONUtils.SUCCESS(success);
}