$(function() {
jeDate({
dateCell : "#backTime",// isinitVal:true,
format : "YYYY-MM-DD",
isTime : false
});
getbaseList(1);
});
function getbaseList(init) {
if (init == 1)$(".pageNum").val(1);
JY.Model.loading();
JY.Ajax.doRequest("baseForm",bonuspath + '/backstage/lease/repair/findByPage',null,function(data) {
$("#baseTable tbody").empty();
var obj = data.obj;
var list = obj.list;
var results = list.results;
var permitBtn = obj.permitBtn;
var pageNum = list.pageNum,
pageSize = list.pageSize,
totalRecord = list.totalRecord;
var html = "";
if (results != null && results.length > 0) {
var leng = (pageNum - 1) * pageSize;
for (var i = 0; i < results.length; i++) {
var l = results[i];
html += "
";
html += "| "+ (i + leng + 1) + " | ";
html += ""+ JY.Object.notEmpty(l.outNum) + " | ";
html += ""+ JY.Object.notEmpty(l.outTime) + " | ";
html += ""+ JY.Object.notEmpty(l.backTime) + " | ";
html += ""+ JY.Object.notEmpty(l.pickCompany) + " | ";
html += ""+ JY.Object.notEmpty(l.pickProject) + " | ";
// if(l.batchStatus == 6 || l.batchStatus == "6"){
// html += "待修试 | ";
// }else{
// html += "已修试 | ";
// }
html += rowFunction(l.outNum,l.batchStatus);
html += "
";
}
$("#baseTable tbody").append(html);
JY.Page.setPage("baseForm", "pageing", pageSize,pageNum, totalRecord, "getbaseList");
} else {
html += "| 没有相关数据 |
";
$("#baseTable tbody").append(html);
$("#pageing ul").empty();// 清空分页
}
JY.Model.loadingClose();
});
}
function rowFunction(outNum,batchStatus) {
var h="";
h+="";
h+="";
h+="";
h+=" | ";
return h;
}
function edit(outNum) {
localStorage.setItem("repairOutNum",outNum);
layer.open({
type: 2,
title:['机具修试','background-color: #438EB9;color:#fff'],
shadeClose:true,
shade:false,
maxmin: true,
area: ['1000px', '450px'],
content:bonuspath + '/backstage/lease/repair/details'
});
}