//改变商品预计配货数量
function update_freight_num(obj,order_id,goods_sn,request_num){
    var num=parseFloat($(obj).val());
    if(num.toString().length>5){$.showErr('商品数量不能超过三位小数',1,'hc');}
    if(parseFloat(num)>parseFloat(request_num)){
        $.showErr('配货量不能大于进货量',1,'hc');
        window.location.reload();return;
    }
    var query = new Object();
    query.freight_num = parseFloat(num.toFixed(3));
    query.order_id = order_id;
    query.goods_sn = goods_sn;
    var url = APP + "InvoicingOrder/update_freight_num.html"
    $.ajax({
        url: url,
        data: query,
        type: "post",
        dataType: "json",
        success: function (data) {
            if (data.status==1) {
                $(obj).parent().parent().css("background-color","#f5cfd4");
                return;
            }else{
                $.showErr(data.msg);
            }
        }
    });
    
}