var isFreshRoomCount = false;
var lastModify = "unknown";
var userinfo = {
loginid : null,
username : null,
userid : null
};function getModifyMark() { Ext.Ajax.request({
url : 'querymodify.action',
success : function(response, options) {
try {
var node = response.responseXML.documentElement
.selectSingleNode("//LASTMODIFY");
var modify = node.text;
if (modify != lastModify) {
lastModify = modify;
getEveryRoomDataCount(); }
} catch (e) {
} finally {
}
}
}); if (isFreshRoomCount)
setTimeout("getModifyMark()", 1000);}function getEveryRoomDataCount() {
for (var i = 0; i < 1; ++i) { 
Ext.fly('studyid').dom.focus(); 
var eachroom = roomdata[i];
Ext.Ajax.request({
url : 'queuecount.action',
params : {
branchname : branchname,
devicename : eachroom.roomvalue
},
appdata : eachroom,
success : function(response, options) {
var obj = Ext.util.JSON.decode(response.responseText);
options.appdata.count = obj.count;
var grid = options.appdata.grid;
if (grid != null) {
grid.setTitle(options.appdata.roomname + "("
+ options.appdata.count + ")");
grid.getStore().load();
} }
}); }

}var tobeAssignStore = new Ext.data.JsonStore({
root : 'result',
totalProperty : 'totalCount',
idProperty : 'checkserialnum',
remoteSort : true,
baseParams : {},
fields : [{
name : 'checkserialnum',
type : 'string',
mapping : 'checkserialnum'
}, {
name : 'patientname',
type : 'string',
mapping : 'patientname'
}, {
name : 'patientsex',
type : 'string',
mapping : 'patientsex'
}, {
name : 'patientage',
type : 'string',
mapping : 'patientage'
}, {
name : 'studyscription',
type : 'string',
mapping : 'studyscription'
}, {
name : 'predicttime',
type : 'string',
mapping : 'predicttime'
}, {
name : 'devicetypename',
type : 'string',
mapping : 'devicetypename'
}, {
name : 'studyinfo',
mapping : 'studyinfo'
}, {
name : 'infotype',
mapping : 'infotype'
}, {
name : 'studyid',
mapping : 'studyid'
}, {
name : 'deviceid',
mapping : 'deviceid'
}, {
name : 'devicename',
mapping : 'devicename'
}, {
name : 'ishavehisrequisition',
mapping : 'ishavehisrequisition'
}, {
name : 'diagid',
mapping : 'diagid'
}, {
name : 'isbespeak',
mapping : 'isbespeak'
}, {
name : 'feetotal',
mapping : 'feetotal'
}],
url : 'tobeassignstudy.action'
});

解决方案 »

  1.   

    //szz studyid
    function showRoomDialog(patientname, patientage, patientsex, studyscription,       
    devicetypename, checkserialnum, infotype, studyid, deviceid) {
    var studyinfo = patientname + "," + patientage + "," + patientsex + ",";
    studyinfo += studyscription + "," + devicetypename + "," + infotype + "," + studyid;
    var radioItems = []; for (var i = 0; i <1; ++i) { radioItems = radioItems.concat({
    bodyStyle : 'padding:5px 0px 5px 0px;',
    layout : 'fit',
    border : false,
    columnWidth : .33,
    items : [{
    fieldLabel : '',
    labelSeparator : '',
    xtype : 'radio',
    anchor : '100%',
    boxLabel : roomdata[i].roomname + "(" + roomdata[i].count + ")",
    name : 'room',
    inputValue : roomdata[i].roomvalue + "," + roomdata[i].deviceid,
    //checked: roomdata[i].deviceid == deviceid
    checked:1
    }]
    });
    } var mywindow = new Ext.Window({
    modal : true,
    width : 400,
    height : 300,
    frame : true,
    layout : 'fit',
    items : [{
    id : 'myform',
    xtype : 'form',
    frame : true,
    title : '请选择诊室',
    labelWidth : 120,
    bodyStyle : 'padding:5px 5px 5px 5px;',
    items : [{
    html : studyinfo
    }, {
    html : '&nbsp;'
    }, {
    id : 'radioFieldSet',
    xtype : 'fieldset',
    title : '诊室列表',
    anchor : '-5 100%',
    autoHeight : true,
    layout : 'column',
    items : radioItems
    }], var myform = mywindow.findById('myform'); myform.getForm().submit({
    params : {
    checkserialnum : checkserialnum, 
    patientname : patientname,
    branchname : branchname,
    patientage : patientage,
    patientsex : patientsex,
    infotype : infotype,
    studyid : studyid
    },

    url : 'assignroom.action',
    success : function() {
    tobeAssignStore.reload();
    mywindow.close();
                    
    },
    failure : function(form, action) {
    alert(action.result.errors.msg);
    }
    }); 
    }]
    });
    mywindow.show();
    }
      

  2.   

    Ext.onReady(function() { Ext.BLANK_IMAGE_URL = "lib/ext/resources/images/default/s.gif";
    Ext.QuickTips.init(); Ext.form.Field.prototype.msgTarget = 'side'; var tobeAssignToolbar = new Ext.PagingToolbar({
    pageSize : 20,
    displayInfo : true,
    store : tobeAssignStore
    });
    //szz studyid
    function mystudyinforender(studyinfo) {

    var str= '<a href="#" onClick="showRoomDialog(';
    str += "'" + studyinfo.patientname + "',";
    str += "'" + studyinfo.patientage + "',";
    str += "'" + studyinfo.patientsex + "',";
    str += "'" + studyinfo.studyscription + "',";
    str += "'" + studyinfo.devicetypename + "',";
    str += "'" + studyinfo.checkserialnum + "',";
    str += "'" + studyinfo.infotype + "',";
    str += "'" + studyinfo.studyid + "',";
    str += "'" + studyinfo.deviceid + "',";
    str += "'" + studyinfo.re + "'";
    str += ')">到诊确认</a>'; return str;
    }