您的位置:首页 > 其它

录入单号失去焦点后显示货款

2015-11-03 09:57 218 查看
<script>

 $("#SELLID").blur(function () {

                $.ajax({

                    type: "Post",

                    url: "/Distributor/Appeal/BlurData",

                    data: { sellid: $(this).val() },

                    dataType: "json",

                    success: function (result) {

                        $("#AMOUNTSUM").html(result.amount);

                        $("#GyspName").html(result.gys);

                        $("#Gyspsn").html(result.gyssn);

                        $("#msg").html("");

                    },

                    error: function (XMLHttpRequest) {

                        //alert("error!:" + XMLHttpRequest.responseText);

                        $("#AMOUNTSUM").html("");

                        $("#GyspName").html("");

                        $("#Gyspsn").html("");

                        $("#msg").html("单号未找到!");

                    }

                });

            });

</script>

控制器:

//失去焦点

        public JsonResult BlurData()

        {

            string sellid = Request.Params["sellid"];

            LIST_SELL m = CopAppealMgr.BlurData(sellid);

            JsonResult js = new JsonResult();

            js.Data = new { amount = m.AMOUNTSUM, gys = m.GYSPNAMECN, gyssn = m.GYSPSN };

            return js;

        }
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  blur