. 代碼如下:
var dates = this.options.form.getWidgetByName("dates").getValue();
$.ajax({
url: "http://127.0.0.1:9009/Brilliantzz/service/snproduct.do",
data:dates,
beforeSend:function() {
var h = document.body.clientHeight;
$("<div class=\"datagrid-mask\"></div>").css({display:"block",width:"100%",height:h}).appendTo("body");
$("<div class=\"datagrid-mask-msg\"></div>").html("正在上傳生產數據,請稍候。。。").appendTo("body").css({display:"block",
left:($(document.body).outerWidth(true) - 190) / 2,
top:(h - 45) / 2});
},
complete:function(data) {
$('.datagrid-mask-msg').remove();
$('.datagrid-mask').remove();
},
success: function(data) {
alert("生產數據:"+data);
},
error: function(data) {
alert("上傳生產數據異常!");
}
});