87,992
社区成员
发帖
与我相关
我的任务
分享function openwin(wid,url,title,width,height,modal){
var windiv = document.createElement('div');
windiv.id = wid;
document.body.appendChild(windiv);
windiv.innerHTML = '<iframe src="'+rootpath+url+'" frameborder="0" style="overflow: no; overflow-x:hidden;padding: 0px; margin: 0px; valign: top;width:100%;height:100%" id="'+wid+'_frame" name="'+wid+'_frame" scolling="no" noresize="noresize"></iframe>';
$('#'+wid).window({
title: title,
width: width,
modal: modal,
draggable:true,
shadow: true,//阴影
closed: false,
collapsible:false,
minimizable:false,
maximizable:false,
inline:true,
height: height,
onClose:function(){
var temp = windiv.parentNode;
temp.removeChild(windiv);
// windiv.removeNode(true);
}
});
}function onSave() {
var selected = $("#grid").datagrid("getSelected");
var parentDoc = window.parent.frames['productionAddWin_frame'];
if (selected == null) {
alert("请选择一个物料!");
return;
} else {
parentDoc.materialNameReturn = selected.materialName;
parentDoc.materialNoReturn = selected.materialNo;
parentDoc.setMaterialInfo(rowIndex);
window.parent.closewin('materialListWin',"");
}
}var materialNoReturn = null;
var storeReturn = null;
var storeIdReturn = null;
var slNameReturn = null;
var slIdReturn = null;
/**
* 子页面返显物料信息调用的函数
* @param {} rowIndex
*/
function setMaterialInfo(rowIndex){
var editors = $('#detail').datagrid('getEditors',rowIndex);
var materialNameEditor = editors[0];
var materialNOEditor = editors[1];
$(materialNameEditor.target).val(materialNameReturn);
$(materialNOEditor.target).val(materialNoReturn);
$('#detail').datagrid('getEditor', { index: rowIndex, field: 'num' }).target.val('1');
editIndex = rowIndex;
return ;
}