$('.refund-btn').click(function(){
//此处必须是$(this),否则$('.refund-btn')重新获取,导致值一直不变
var id = $(this).attr('data-id');
//var id = $('.refund-btn').attr('data-id');错误,这样会导致一直一个id值,一直不变,需要用$(this).attr('data-id')
var form = $('#refund-order-form');
form.attr('action', form.attr('action').replace('__order_id__', id));
$.get('{$ajaxRefundInfoUrl}'.replace('__id__', id),function(rs){
if(rs.status==200){
//默认为订单金额
$('#refundorderform-refund_amount').val(rs.model.price);
$('#refundorderform-refund_reason').val(rs.model.refund_reason);
$('#refundorderform-is_cancel').val(rs.model.is_cancel);
$('#refundorderform-refund_explain').val(rs.model.refund_explain);
$('#refundorderform-refund_remark').val(rs.model.refund_remark);
}
},'json');
});