弹出窗口
$().ready(function () {
var indx_lyr;
$("#grdTest th").each(function (index) {
if ($(this).html().indexOf("领用人") > 0) {
indx_lyr = index;
}
});
$("#grdTest tr").find("td:eq(" + indx_lyr + ")").click(function (event) {
function callback(varReturn) {
if (varReturn != null && varReturn != '') {
var sarray = new Array();
sarray = varReturn.split(';;');
for (var i = 0; i < sarray.length; i++) {
var ctrlId = null;
var txt = null;
var sarray1 = new Array();
sarray1 = sarray[i] .split(',,');
if ((sarray1.length == 2) && (sarray1[0] == 'YGXM')){
event.target.value=sarray1[1];
event.target.focus();
event.target.select();
}//end of if
} //end of for
}//end of if varReturn
}//endof callback
if( _userInfo.roleID == 347 )//生管部 yml
{
openWin('CommSelect.aspx?PU=1276&&MW_ID=471', '员工选择', callback, { w: 320, h: 500 });
}
if (_userInfo.roleID == 149)//仓管员 hjl
{
openWin('CommSelect.aspx?PU=1277&&MW_ID=471', '员工选择', callback, { w: 320, h: 500 });
}
});
});
<script>
function val_WLBH_click(ctrlSuffix){
var suffix=ctrlSuffix||'';
function callback(varReturn){
if(varReturn!=null&&varReturn!=''){
var sarray=new Array();
sarray=varReturn.split(';;');
for(var i = 0; i < sarray.length; i++){
var ctrlId = null;
var txt = null;
var sarray1=new Array();
sarray1=sarray[i].split(',,');
if(sarray1.length==2){
if(sarray1[0]=='ZJLDW'){
ctrlId='val_ZJLDW' + suffix;
txt = document.getElementById(ctrlId); }
if(sarray1[0]=='XTWLID'){
ctrlId='val_WLID' + suffix;
txt = document.getElementById(ctrlId); }
if(sarray1[0]=='WLBH'){
ctrlId='val_WLBH' + suffix;
txt = document.getElementById(ctrlId); }
if(sarray1[0]=='WLMC'){
ctrlId='val_WLMC' + suffix;
txt = document.getElementById(ctrlId); }
if(sarray1[0]=='GGXH'){
ctrlId='val_GGXH' + suffix;
txt = document.getElementById(ctrlId); }
if(txt != null){
txt.value=sarray1[1];
}
}
}
}
}
openWin('CommSelect.aspx?PU=26001010022&MW_ID=409&&TZID='+document.all.val_TZID.value+'','特征选择物料',callback,{w:1000,h:500});}
</script>