|
主从页面,双击主表行弹出详细页,升级后双击弹出没有详细数据,关闭详细页面报错如下:
主表js:
var staticActivity1 = {};
staticActivity1.openDetail = function(operator, id){
var runner = justep.xbl("detailRunner");
runner.open({
operator : operator,
id : id
},runner.domNode.getAttribute('url')+"?detailId="+id);
};
staticActivity1.insertItemClick = function (event){
staticActivity1.openDetail("new");
};
staticActivity1.listGridRowDblClick = function(event){
var data = justep.xbl('masterData');
var id = data.getCurrentRowId();
if (!!id)
staticActivity1.openDetail("edit", id);
};
staticActivity1.detailRunnerReceive = function(event){
var data = justep.xbl("masterData");
data.refreshData();
var id = event.data.id;
if (!!id && (data.getCurrentRowId() != id) && (data.getIndex(id) >= 0))
data.setIndex(data.getIndex(id));
};
staticActivity1.editItemClick = function(event){
var data = justep.xbl('masterData');
var id = data.getCurrentRowId();
if (!!id)
staticActivity1.openDetail("edit", id);
};
//关闭下拉设置显示值
staticActivity1.gridSelect1Closeup = function(event){
var data = justep.xbl('masterData');
data.saveData();
var ghzt = justep.xbl('masterData').getValue('fGHZT');
if(ghzt == '已归还'){
var datetostring = justep.Date.toString(justep.System.datetime(), "yyyy-MM-dd");
data.setValue("fGHRQ",datetostring);
data.saveData();
}else if(ghzt == '未归还'){
data.setValue("fGHRQ",null);
data.saveData();
}
};
//载入标红超期
staticActivity1.model1Load = function(event){
var dataDetail = justep.xbl("masterData");
for(i=0;i<dataDetail.getCount();i++){
var id = dataDetail.getID(i);
var rqid = dataDetail.getValue("fSQRQ",id);//申请日期
var lyrq = dataDetail.getValue("fLYRQ",id);//利用日期
var ghzt = dataDetail.getValue("fGHZT",id);
var d = justep.Date.fromString(rqid,'yyyy-MM-dd');//申请日期转成日期格式
var d2 = justep.Date.increase(d,lyrq,"d");//d2=申请日期+利用日期 ,应归还日期
rq = justep.Date.toString(d2, justep.Date.STANDART_FORMAT_SHOT);//应归还日期转为字符串
xtrq = justep.Date.toString(justep.System.datetime(), justep.Date.STANDART_FORMAT_SHOT);//当前系统日期转为字符串
if(rq < xtrq && ghzt == '未归还'){//比较当前系统日期和应归还日期
justep.xbl("listGrid").grid.setRowColor(id, "red");
};
};
};
//显示lable
staticActivity1.listGrid_fJDLXRender = function(event){
if (event.value == "0"){
return "仅查阅";
}else {
return "含借阅";
}
};//标红超期
staticActivity1.masterDataAfterRefreshPage = function(event){
var dataDetail = justep.xbl("masterData");
for(i=0;i<dataDetail.getCount();i++){
var id = dataDetail.getID(i);
var rqid = dataDetail.getValue("fSQRQ",id);
var lyrq = dataDetail.getValue("fLYRQ",id);
var ghzt = dataDetail.getValue("fGHZT",id);
var d = justep.Date.fromString(rqid,'yyyy-MM-dd');
var d2 = justep.Date.increase(d,lyrq,"d");
rq = justep.Date.toString(d2, justep.Date.STANDART_FORMAT_SHOT);
xtrq = justep.Date.toString(justep.System.datetime(), justep.Date.STANDART_FORMAT_SHOT);
if(rq < xtrq && ghzt == '未归还'){
justep.xbl("listGrid").grid.setRowColor(id, "red");
};
};
};
//标红超期
staticActivity1.masterDataAfterRefresh = function(event){
var dataDetail = justep.xbl("masterData");
for(i=0;i<dataDetail.getCount();i++){
var id = dataDetail.getID(i);
var rqid = dataDetail.getValue("fSQRQ",id);
var lyrq = dataDetail.getValue("fLYRQ",id);
var ghzt = dataDetail.getValue("fGHZT",id);
var d = justep.Date.fromString(rqid,'yyyy-MM-dd');
var d2 = justep.Date.increase(d,lyrq,"d");
rq = justep.Date.toString(d2, justep.Date.STANDART_FORMAT_SHOT);
xtrq = justep.Date.toString(justep.System.datetime(), justep.Date.STANDART_FORMAT_SHOT);
if(rq < xtrq && ghzt == '未归还'){
justep.xbl("listGrid").grid.setRowColor(id, "red");
};
};
};
从表js:
var staticActivity1Detail = {};
//不清楚功能
staticActivity1Detail.detailDataSaveCommit = function(event){
var data = justep.xbl('masterData');
justep.windowReceiver.windowEnsure({
id : data.getCurrentRowId()
}, true);
};
staticActivity1Detail.windowReceiverReceive = function(event){
var operator = event.data.operator;
var data = justep.xbl('masterData');
if (operator == "new") {
data.newData();
} else if (operator == "edit") {
var id = event.data.id;
data.filters.setFilter("idFilter", data.getConceptAliasName() + "='" + id + "'");
data.refreshData();
}
};
staticActivity1Detail.trigger1Click = function(event){
var process = justep.Context.getCurrentProcess();
var activity = justep.Context.getCurrentActivity();
var rowid = justep.xbl("masterData").getCurrentRowId();
if (rowid && (rowid != "")) {
var url = "/UI/ttyt/archives/process/acchives_report/mainActivity.w?process="+ process + "&activity=" + activity + "&rowid=" + rowid;
justep.Portal.openWindow("档案利用报表", url);
}
};
//打开归还交接单
staticActivity1Detail.trigger2Click = function(event){
var process = justep.Context.getCurrentProcess();
var activity = justep.Context.getCurrentActivity();
var rowid = justep.xbl("masterData").getCurrentRowId();
if (rowid && (rowid != "")) {
var url = "/UI/ttyt/archives/process/acchives_report/staticActivity1.w?process="+ process + "&activity=" + activity + "&rowid=" + rowid;
justep.Portal.openWindow("档案归还交接单", url);
}
};
//打开催还通知单
staticActivity1Detail.trigger3Click = function(event){
var process = justep.Context.getCurrentProcess();
var activity = justep.Context.getCurrentActivity();
var rowid = justep.xbl("masterData").getCurrentRowId();
if (rowid && (rowid != "")) {
var url = "/UI/ttyt/archives/process/acchives_report/staticActivity2.w?process="+ process + "&activity=" + activity + "&rowid=" + rowid;
justep.Portal.openWindow("档案催还通知单", url);
}
};
5.2.7运行功能正常,请问是版本调整后需要修改某些地方造成的么?
|
|