Index: ssts-web/src/main/webapp/disinfectsystem/qualitymonitoring/qualitymonitoringInstanceForm.js =================================================================== diff -u -r41269 -r41306 --- ssts-web/src/main/webapp/disinfectsystem/qualitymonitoring/qualitymonitoringInstanceForm.js (.../qualitymonitoringInstanceForm.js) (revision 41269) +++ ssts-web/src/main/webapp/disinfectsystem/qualitymonitoring/qualitymonitoringInstanceForm.js (.../qualitymonitoringInstanceForm.js) (revision 41306) @@ -110,6 +110,8 @@ if (materialInfosData.length == 0) { firstMaterialInfosStore.insert(0, new materialInfosRecord({ 'material': '全部' })); } + var actualWidth = document.body.clientWidth; + var actualHeight = document.body.clientHeight; Ext.getCmp('tousseBagsForPanel').add({ layout: 'column', columnWidth: 1, @@ -118,7 +120,7 @@ items: [{ layout: 'form', labelWidth: 50, - columnWidth: .36, + columnWidth: actualWidth > 500 ? 0.36 : 0.8, height: 28, items: [{ xtype: 'hidden', @@ -226,7 +228,7 @@ }] }, { layout: 'form', - columnWidth: .04, + columnWidth: actualWidth > 500 ? 0.04 : 0.2, labelWidth: 90, height: setH, items: [{ @@ -241,7 +243,7 @@ }, { layout: 'form', labelWidth: 50, - columnWidth: .36, + columnWidth: actualWidth > 500 ? 0.36 : 0.5, height: 28, hidden: scope == '器械包', items: [{ @@ -314,7 +316,7 @@ }] }, { layout: 'form', - columnWidth: .04, + columnWidth: actualWidth > 500 ? 0.04 : 0.15, labelWidth: 90, height: setH, id: 'tousseAndMaterialDetailsButton_' + hiddenTousseIndex, @@ -331,7 +333,7 @@ }, { layout: 'form', labelWidth: 50, - columnWidth: .2, + columnWidth: actualWidth > 500 ? 0.2 : 0.35, id: 'materialInfosAmountBox_' + hiddenTousseIndex + '_0', items: [{ xtype: 'numberfield', @@ -377,11 +379,14 @@ 'id': materialInfosData[i].id || '' })); } + var actualWidth = document.body.clientWidth; + var actualHeight = document.body.clientHeight; + Ext.getCmp('tousseAndMaterialDetailsBox_' + hiddenTousseIndex).add({ layout: 'form', labelWidth: 50, - columnWidth: .4, height: 28, + hidden: true, id: 'hiddenIndexBox_' + hiddenTousseIndex + '_' + hiddenMaterialIndex, items: [{ xtype: 'hidden', @@ -392,7 +397,7 @@ }, { layout: 'form', labelWidth: 50, - columnWidth: .36, + columnWidth: actualWidth > 500 ? 0.35 : 0.5, height: 28, id: 'materialInfosNameBox_' + hiddenTousseIndex + '_' + hiddenMaterialIndex, items: [{ @@ -458,7 +463,7 @@ }] }, { layout: 'form', - columnWidth: .04, + columnWidth: actualWidth > 500 ? 0.04 : 0.15, labelWidth: 90, height: setH, id: 'deleteButton_' + hiddenTousseIndex + '_' + hiddenMaterialIndex, @@ -477,7 +482,7 @@ }, { layout: 'form', labelWidth: 50, - columnWidth: .2, + columnWidth: actualWidth > 500 ? 0.2 : 0.35, id: 'materialInfosAmountBox_' + hiddenTousseIndex + '_' + hiddenMaterialIndex, items: [{ xtype: 'numberfield', @@ -793,6 +798,8 @@ } } + var actualWidth = document.body.clientWidth; + var actualHeight = document.body.clientHeight; var tousseBagsForNameValue = '' var formPanel = new Ext.FormPanel({ frame: true, @@ -803,14 +810,14 @@ labelWidth: 90, autoScroll: true, layout: 'form', - width: 650, + width: actualWidth - 50, items: [{ xtype: 'fieldset', layout: 'column', title: '基础信息', autoHeight: true, id: 'tousseBagsForPanel', - width: 650, + width: actualWidth - 50, items: [{ layout: 'column', columnWidth: 1, @@ -819,7 +826,7 @@ items: [{ layout: 'form', labelWidth: 50, - columnWidth: .36, + columnWidth: actualWidth > 500 ? 0.36 : 0.8, height: 28, hidden: scope == '材料', items: [{ @@ -959,7 +966,7 @@ }] }, { layout: 'form', - columnWidth: .04, + columnWidth: actualWidth > 500 ? 0.04 : 0.2, labelWidth: 90, height: setH, hidden: scope == '材料', @@ -975,7 +982,7 @@ }, { layout: 'form', labelWidth: 50, - columnWidth: .36, + columnWidth: actualWidth > 500 ? 0.36 : 0.5, height: 28, id: 'materialDetailsBox_0', hidden: scope == '器械包', @@ -1047,7 +1054,7 @@ }] }, { layout: 'form', - columnWidth: .04, + columnWidth: actualWidth > 500 ? 0.04 : 0.15, labelWidth: 90, height: setH, id: 'tousseAndMaterialDetailsButton_0', @@ -1068,7 +1075,7 @@ }, { layout: 'form', labelWidth: 50, - columnWidth: .2, + columnWidth: actualWidth > 500 ? 0.2 : 0.35, id: 'materialInfosAmountBox_0_0', items: [{ xtype: 'numberfield', @@ -1262,8 +1269,8 @@ id: 'recordMaterialDetailsWin', layout: 'fit', title: '不合格物品登记', - width: 700, - height: 400, + width: actualWidth, + height: actualHeight, border: false, modal: true, plain: true, @@ -1631,14 +1638,14 @@ }); var checkColumnWidth = 0.5; var columnFormWidth = 1; + checkColumnWidth = actualWidth > 500 ? checkColumnWidth : 1; + columnFormWidth = actualWidth > 500 ? columnFormWidth : 1; if (sstsConfig.enableRecordMaterialDetailsOfQualityMonitoring) { checkColumnWidth = 1; columnFormWidth = 0.5; } else if (sstsConfig.enableCSSDNursingQualityControlReport) { columnFormWidth = 0.5; } - checkColumnWidth = actualWidth > 500 ? checkColumnWidth : 1; - columnFormWidth = actualWidth > 500 ? columnFormWidth : 1; if (options != "") { var optionsJson = JSON.parse(options); var optionNames = []; @@ -1663,7 +1670,7 @@ items: [{ layout: 'form', columnWidth: columnFormWidth, - labelWidth: 150, + labelWidth: actualWidth > 500 ? 150 : 100, style: 'margin-top:10px', id: 'hideCheckbox' + id + '_' + j, items: [{ @@ -1699,7 +1706,7 @@ if (updateId == '') { Ext.getCmp('hideButton' + id + '_' + filedIndex).show(); Ext.getCmp('showRecordMaterialDetailsBox_' + id + '_' + filedIndex).show(); - Ext.getCmp('hideCheckbox' + id + '_' + filedIndex).columnWidth = 0.3; + // Ext.getCmp('hideCheckbox' + id + '_' + filedIndex).columnWidth = 0.3; } if (optionValues && optionValues.length > 0) { @@ -1797,7 +1804,7 @@ } if (optionsJson[filedIndex].recordMaterialDetails == '是' && sstsConfig.enableRecordMaterialDetailsOfQualityMonitoring) { Ext.getCmp('hideButton' + id + '_' + filedIndex).hide(); - Ext.getCmp('hideCheckbox' + id + '_' + filedIndex).columnWidth = 0.5; + //Ext.getCmp('hideCheckbox' + id + '_' + filedIndex).columnWidth = 0.3; Ext.getCmp('showRecordMaterialDetails_' + id + '_' + filedIndex).setValue(''); Ext.getCmp('hideRecordMaterialDetails_' + id + '_' + filedIndex).setValue(''); var recordMaterialDetails = Ext.getCmp('recordMaterialDetails' + id).getValue(); @@ -1840,7 +1847,7 @@ }] }, { layout: 'form', - columnWidth: 0.2, + columnWidth: actualWidth > 500 ? 0.2 : 0.25, style: 'margin-top:10px', id: 'hideButton' + id + '_' + j, hidden: !(id == '' && sstsConfig.enableRecordMaterialDetailsOfQualityMonitoring), @@ -1855,8 +1862,8 @@ }] }, { layout: 'form', - columnWidth: 0.3, - labelWidth: 0, + columnWidth: actualWidth > 500 ? 0.3 : 0.25, + labelWidth: 10, style: 'margin-top:10px', id: 'showRecordMaterialDetailsBox_' + id + '_' + j, hidden: true, @@ -1872,7 +1879,6 @@ labelWidth: 0, anchor: '99%', readOnly: true, - width: 300, cls: 'fieldReadOnlyNoRemove', id: 'showRecordMaterialDetails_' + id + '_' + j, name: 'showRecordMaterialDetails_' + id + '_' + j,