easyui textbox 内容改变事件 增加oninpu 类似事件,

//======================利用easyui验证功能,进行内容变化监控=== =============
$(function () {
var CustomerService = $.parseJSON($('#CustomerService').val());
$.extend($.fn.validatebox.defaults.rules, {
//校验正整数,并计算码洋
calculateMY: {
validator: function (value) {
var driverAmount = value * CustomerService.DriverAmountRate;
var Deposit = Math.round(driverAmount * CustomerService.AdvanceRate*100)/100;//预付款
var TransportationExpense = Math.round(driverAmount * CustomerService.FreightRate * 100) / 100;//运费
var AdvancePayment = Math.round(driverAmount * CustomerService.ReceiptDepositRate * 100) / 100;//回执
$('#Deposit').textbox('setValue', Deposit);
$('#TransportationExpense').textbox('setValue', TransportationExpense);
$('#AdvancePayment').textbox('setValue', AdvancePayment);
return true;
},
message: '客户费用参数错误'
}
});

})

posted @ 2018-12-28 17:32  IDOER  阅读(1344)  评论(0编辑  收藏  举报