var PREPARE_URL = location.protocol + "//" + location.hostname + ":"
+ location.port + '/sfa/';
var limit = 15;
var msg_account = 0;
var currentPage = 0;
$(document).ready(function() {
});
var SDATE = $("#txtdt1").val();
var CAR_ID = $("#car_id").val();
var EDATE = $("#txtdt2").val();
var DMS_ID = $("#dms_id").val();
/**
* @type查询
*/
function dosearch(obj) {
var SDATE = $("#txtdt1").val();
var EDATE = $("#txtdt2").val();
if( SDATE==null ||SDATE==""||EDATE==null ||EDATE==""){
alert("请输入日期!");
}else{
if (!getMessage(1, obj)) {
return;
}
if (!getMessage(1, obj)) {
return;
}
page_div(1, obj);
$('#footer').show();
}
function getMessage(page, obj) {
var params = '';
params += 'DMS_ID=' + $("#dms_id").val();
params += '&CAR_ID=' + $("#car_id").val();
params += '&SDATE=' + $('#txtdt1').val();
params += '&EDATE=' + $('#txtdt2').val();
lockScreen();
$.get('../ReportServlet?className=coverTownRateRep&' + params
+ "&" + Math.random() + '&limit=' + limit
+ '&page=' + page,
function(data) {
if (data == "") {
return false;
}
var json = eval("(" + data + ")");
$("#no_data").remove();
$("#tr2").remove();
$("tr[name='result']").remove();
var shtml = '';
json = json.data;
var json1 = json[0].data;
var json2 = json[1].data;
if (json2 == '') {
$("#report").append(
'
8888无记录,重新选择条件,点击查询显示结果.....');return false;
}
var html ='' ;
for ( var i = 0; i < json1.length; i++) {
html += '
'+ json[0].data[i] + '
';}
$("#title").html(html);
for ( var i = 1; i < json2.length; i++) {
var item = json2[i];
shtml += '
';shtml += '
'+ item.EFFECTIVE_DATE + '
';shtml += '
'+ item.PARA_DESC + '
';shtml += '
'+ item.DMS_ID + '
';shtml += '
'+ item.FARDISTANCE_BYDT + '
';shtml += '
'+ item.TOWNNAME + '
';shtml += '
';shtml += '
';}
$("#report").append(shtml);
});
return true;
}
function Visittrack(){
}
d代码如上 请各位大大们帮看看具体怎么实现 真心求指教