Index: ssts-web/src/main/webapp/disinfectsystem/qualitymonitoring/qualitymonitoringInstanceForm.js =================================================================== diff -u -r40968 -r40974 --- ssts-web/src/main/webapp/disinfectsystem/qualitymonitoring/qualitymonitoringInstanceForm.js (.../qualitymonitoringInstanceForm.js) (revision 40968) +++ ssts-web/src/main/webapp/disinfectsystem/qualitymonitoring/qualitymonitoringInstanceForm.js (.../qualitymonitoringInstanceForm.js) (revision 40974) @@ -594,7 +594,7 @@ firstTousseBagsList = []; } else { if (scope == '材料') { - for(var i=0;i 0) { for (var i = 0; i < optionValues.length; i++) { - if(top.Ext.getCmp('configItemOptionQuantity' + id + optionValues[i].answer)){ + if (top.Ext.getCmp('configItemOptionQuantity' + id + optionValues[i].answer)) { top.Ext.getCmp('configItemOptionQuantity' + id + optionValues[i].answer).setValue(optionValues[i].quantity || '') } } } + if (top.Ext.getCmp('configItemOptionQuantity' + id + optionsJson[filedIndex].name)) { + top.Ext.getCmp('configItemOptionQuantity' + id + optionsJson[filedIndex].name).setValue(1); + } } else { var newValue = oldElementValue.replace("," + thiz.getRawValue(), ''); elementObj.setValue(newValue); @@ -1794,6 +1798,9 @@ } top.Ext.getCmp('itemsFieldSet').doLayout(); } + if (top.Ext.getCmp('configItemOptionQuantity' + id + optionsJson[filedIndex].name)) { + top.Ext.getCmp('configItemOptionQuantity' + id + optionsJson[filedIndex].name).setValue(''); + } } } } @@ -1806,14 +1813,15 @@ id: 'quantityBox' + id + '_' + j, hidden: optionsJson[j].fillQuantity !== '是', items: [{ - xtype:'numberfield', - allowDecimals :false, - minValue:0, + xtype: 'numberfield', + allowDecimals: false, + allowNegative: false, + minValue: 0, hideLabel: true, anchor: '100%', id: 'configItemOptionQuantity' + id + optionsJson[j].name, name: 'configItemOptionQuantity' + id + optionsJson[j].name, - value:optionsJson[j].quantity || '' + value: optionsJson[j].quantity || '' }] }, { layout: 'form', @@ -2601,13 +2609,13 @@ top.Ext.getCmp('material').setValue(materialName); top.Ext.getCmp('materialAmount').setValue(count); } else { - if(top.Ext.getCmp('material_'+i) && top.Ext.getCmp('materialAmount'+i)){ - top.Ext.getCmp('materialC'+i).setVisible(true); - top.Ext.getCmp('materialAmountC'+i).setVisible(true); - top.Ext.getCmp('material_'+i).setValue(materialName); - top.Ext.getCmp('materialAmount'+i).setValue(count); - }else { - addExtractCheckMaterial(false, materialName, count, "", "", false, "", i,"", "", 1, "", "", ""); + if (top.Ext.getCmp('material_' + i) && top.Ext.getCmp('materialAmount' + i)) { + top.Ext.getCmp('materialC' + i).setVisible(true); + top.Ext.getCmp('materialAmountC' + i).setVisible(true); + top.Ext.getCmp('material_' + i).setValue(materialName); + top.Ext.getCmp('materialAmount' + i).setValue(count); + } else { + addExtractCheckMaterial(false, materialName, count, "", "", false, "", i, "", "", 1, "", "", ""); } } } @@ -2634,13 +2642,13 @@ top.Ext.getCmp('material').setValue(materialName); top.Ext.getCmp('materialAmount').setValue(count); } else { - if(top.Ext.getCmp('material_'+i) && top.Ext.getCmp('materialAmount'+i)){ - top.Ext.getCmp('materialC'+i).setVisible(true); - top.Ext.getCmp('materialAmountC'+i).setVisible(true); - top.Ext.getCmp('material_'+i).setValue(materialName); - top.Ext.getCmp('materialAmount'+i).setValue(count); - }else { - addExtractCheckMaterial(false, materialName, count, "", "", false, "", i,"", "", 1, "", "", ""); + if (top.Ext.getCmp('material_' + i) && top.Ext.getCmp('materialAmount' + i)) { + top.Ext.getCmp('materialC' + i).setVisible(true); + top.Ext.getCmp('materialAmountC' + i).setVisible(true); + top.Ext.getCmp('material_' + i).setValue(materialName); + top.Ext.getCmp('materialAmount' + i).setValue(count); + } else { + addExtractCheckMaterial(false, materialName, count, "", "", false, "", i, "", "", 1, "", "", ""); } } } @@ -2840,7 +2848,7 @@ if (responsiblePersonValue.indexOf(hiddenUser) == -1) { if (responsiblePersonValue == '') { responsiblePersonValue = hiddenUser; - }else { + } else { responsiblePersonValue += ';' + hiddenUser; } } @@ -2849,21 +2857,21 @@ if (responsiblePersonValue.indexOf(newResponsiblePerson) == -1) { if (responsiblePersonValue == '') { responsiblePersonValue = newResponsiblePerson; - }else { + } else { responsiblePersonValue += ';' + newResponsiblePerson; } } - if(domId){ + if (domId) { top.Ext.getCmp(domId).setValue(responsiblePersonValue); - }else { + } else { top.Ext.getCmp('responsiblePerson').setValue(responsiblePersonValue); } } else { var responsiblePerson2 = top.Ext.getCmp('responsiblePerson').getValue(); if (responsiblePerson2 == '') { - if(domId){ + if (domId) { top.Ext.getCmp(domId).setValue(responsiblePersonValue); - }else { + } else { top.Ext.getCmp('responsiblePerson').setValue(responsiblePersonValue); } } else { @@ -2874,9 +2882,9 @@ responsiblePersonValue += ';' + arr[i]; } } - if(domId){ + if (domId) { top.Ext.getCmp(domId).setValue(responsiblePersonValue); - }else { + } else { top.Ext.getCmp('responsiblePerson').setValue(responsiblePersonValue); } } @@ -4665,7 +4673,7 @@ top.Ext.getCmp('formName').setValue(''); top.Ext.getCmp('responsibilityPart').disable(); } - if(remarks && remarks !== '' && top.Ext.getCmp('remark')){ + if (remarks && remarks !== '' && top.Ext.getCmp('remark')) { top.Ext.getCmp('remark').setValue(remarks) } }, 500);