datagrid reload the data according to the specified parameters

$('#statisticalRecordList').datagrid('reload',{
start_date:$('#dd1').datebox('getValue'),
end_date: $('#dd2').datebox('getValue'),
ProductName:$('#checkProductName').val()

});

 

2. Empty form data in a form

$('#statisticalRecordListForm').form('clear');

3. Give the specified load data from the form

$('#xyccproductUsingProductaddform').form('load', row);

4.form submit submit verification

$('#ProductBadSurveyaddform').form('submit', {
onSubmit: function () {
return $(this).form('enableValidation').form('validate');
},
url: '<%=basePath%>xyData/badSurvey/addProductBadSurvey.do',
success: function (data) {
data = eval("(" + data + ")");//JSON字符串转对象

var rows = $ ( "# addusingprodcetheal ") datagrid ( "getRows");. // This code is to get all the lines of the current page.
Alert // ( "rows ===================" rows +);
//alert("bad_survey_no==="+data.bad_survey_no);
// Alert ( == 0 rows.length);
IF (rows.length = 0) {!
for (var I = 0; I <rows.length; I ++) {
// get the data in each row
// alert (rows [i]. ProductName); // Suppose that field ProductName
$ .ajax ({
URL: "? <% =% the basePath> xyData / badSurvey / addUsingProduct.do bad_survey_no =" + data.bad_survey_no,
type: 'the POST',
dataType: 'JSON ',
the async: to false,
Data: rows [I],
Success: function (Data) {
IF (I == rows.length -. 1) {
// Alert ( "jinlaikankan ============ = ");
$.

msg: data.msg,
showType: 'show'
});
}
},
error: function (data) {
$.messager.show({
title: '提示',
msg: data.msg,
showType: 'show'
});
}
});
}
} else {
//alert("data.msg=="+data.msg);
$.messager.show({
title: '提示',
msg: data.msg,
showType: 'show'
});

5.post request

$.post( '<%=basePath%>xyData/user/selecteCompanyBasinfo.do?company_id='+company_id,
function(result){

},'json');

Guess you like

Origin www.cnblogs.com/xianz666/p/12124913.html