Index: ssts-web/src/main/webapp/disinfectsystem/basedatamanager/qualitymonitoringConfig/qualityMonitoringDefinitionView.js =================================================================== diff -u -r35040 -r35042 --- ssts-web/src/main/webapp/disinfectsystem/basedatamanager/qualitymonitoringConfig/qualityMonitoringDefinitionView.js (.../qualityMonitoringDefinitionView.js) (revision 35040) +++ ssts-web/src/main/webapp/disinfectsystem/basedatamanager/qualitymonitoringConfig/qualityMonitoringDefinitionView.js (.../qualityMonitoringDefinitionView.js) (revision 35042) @@ -1034,16 +1034,23 @@ top.Ext.getCmp('warningWeekDaysBox').show(); top.Ext.getCmp('warningMonthDaysBox').hide(); top.Ext.getCmp('warningMonthDays').setValue(''); + top.Ext.getCmp('endMethodBox').show(); + top.Ext.getCmp('warningUserBox').show(); } else if (value == '按月') { top.Ext.getCmp('warningWeekDaysBox').hide(); top.Ext.getCmp('warningWeekDays').setValue(''); top.Ext.getCmp('warningMonthDaysBox').show(); + top.Ext.getCmp('endMethodBox').show(); + top.Ext.getCmp('warningUserBox').show(); } else { top.Ext.getCmp('warningWeekDaysBox').hide(); top.Ext.getCmp('warningMonthDaysBox').hide(); top.Ext.getCmp('warningMonthDays').setValue(''); top.Ext.getCmp('warningWeekDays').setValue(''); + top.Ext.getCmp('endMethodBox').hide(); + top.Ext.getCmp('warningUserBox').hide(); } + top.Ext.getCmp('formDefinitionForm').doLayout(); } } }] @@ -1138,6 +1145,7 @@ }, { columnWidth: 1, layout: 'form', + id:'endMethodBox', hidden: !(sstsConfig.enableThePeriodicMonitoringRemindersFunction && entityName == '定期监测'), items: [{ layout: 'column', @@ -1152,7 +1160,7 @@ id: "endMethod", valueField: 'value', displayField: 'value', - allowBlank: false, + allowBlank: true, editable: false, store: new top.Ext.data.SimpleStore({ fields: ['value'], @@ -1170,7 +1178,7 @@ if (value == '指定日期范围提醒') { top.Ext.getCmp('warningForDate').show(); top.Ext.getCmp('warningForFrequencyBox').hide(); - top.Ext.getCmp('warningFrequency').setValue(''); + top.Ext.getCmp('warningFrequency').setValue(1); } else if (value == '指定次数提醒') { top.Ext.getCmp('warningForDate').hide(); top.Ext.getCmp('warningStartDateTime').setValue(''); @@ -1179,7 +1187,7 @@ } else { top.Ext.getCmp('warningForDate').hide(); top.Ext.getCmp('warningForFrequencyBox').hide(); - top.Ext.getCmp('warningFrequency').setValue(''); + top.Ext.getCmp('warningFrequency').setValue(1); top.Ext.getCmp('warningStartDateTime').setValue(''); top.Ext.getCmp('warningEndDateTime').setValue(''); } @@ -1297,10 +1305,20 @@ } } }] - }] + }], + listeners: { + render: function () { + setTimeout(function () { + if(top.Ext.getCmp('cycleName') && top.Ext.getCmp('cycleName').getValue() == '不重复'){ + top.Ext.getCmp('endMethodBox').hide(); + } + }, 200); + } + } }, { layout: 'form', columnWidth: 1, + id:'warningUserBox', hidden: !(sstsConfig.enableThePeriodicMonitoringRemindersFunction && entityName == '定期监测'), items: [{ layout: 'column', @@ -1327,7 +1345,7 @@ store: allUserStroe, editable: false, triggerAction: 'all', - allowBlank: !(sstsConfig.enableThePeriodicMonitoringRemindersFunction && entityName == '定期监测'), + allowBlank: true, anchor: '95%', listeners: { select: function (combo, record, index) { @@ -1369,7 +1387,7 @@ id: "separateWrite", valueField: 'value', displayField: 'value', - allowBlank: !(sstsConfig.enableThePeriodicMonitoringRemindersFunction && entityName == '定期监测'), + allowBlank: true, editable: false, store: new top.Ext.data.SimpleStore({ fields: ['value'], @@ -1382,7 +1400,16 @@ anchor: '95%' }] }] - }] + }], + listeners: { + render: function () { + setTimeout(function () { + if(top.Ext.getCmp('cycleName') && top.Ext.getCmp('cycleName').getValue() == '不重复'){ + top.Ext.getCmp('warningUserBox').hide(); + } + }, 200); + } + } }, { layout: 'form', columnWidth: 1, @@ -1762,10 +1789,14 @@ top.Ext.getCmp('warningWeekDaysBox').show(); top.Ext.getCmp('warningWeekDays').setValue(formConfig.warningWeekDays.replace(/\s/g, "")); top.Ext.getCmp('warningMonthDaysBox').hide(); + top.Ext.getCmp('endMethodBox').show(); + top.Ext.getCmp('warningUserBox').show(); } else if (formConfig.cycleName == '按月') { top.Ext.getCmp('warningWeekDaysBox').hide(); top.Ext.getCmp('warningMonthDaysBox').show(); top.Ext.getCmp('warningMonthDays').setValue(formConfig.warningMonthDays); + top.Ext.getCmp('endMethodBox').show(); + top.Ext.getCmp('warningUserBox').show(); } else { top.Ext.getCmp('warningWeekDaysBox').hide(); top.Ext.getCmp('warningMonthDaysBox').hide(); @@ -1778,11 +1809,11 @@ } else if (formConfig.endMethod == '指定次数提醒') { top.Ext.getCmp('warningForDate').hide(); top.Ext.getCmp('warningForFrequencyBox').show(); - top.Ext.getCmp('warningFrequency').setValue(formConfig.warningFrequency); } else { top.Ext.getCmp('warningForDate').hide(); top.Ext.getCmp('warningForFrequencyBox').hide(); } + top.Ext.getCmp('warningFrequency').setValue(formConfig.warningFrequency || 1); top.Ext.getCmp('warningUserIds').setValue(formConfig.warningUserIds); top.Ext.getCmp('warningUserNames').setValue(formConfig.warningUserIds); top.Ext.getCmp('warningUserNames').setRawValue(formConfig.warningUserNames); @@ -1865,6 +1896,7 @@ var warningEndDateTime = top.Ext.getCmp('warningEndDateTime').getRawValue(); var warningFrequency = top.Ext.getCmp('warningFrequency').getValue(); + var warningUserIds = top.Ext.getCmp('warningUserIds').getValue() var warningUserNames = top.Ext.getCmp('warningUserNames').getValue(); var separateWrite = top.Ext.getCmp('separateWrite').getValue(); var remindAllUsers = ''; @@ -1892,13 +1924,16 @@ } } + if(warningUserNames == '' && warningUserIds == ''){ + showResult('请填写提醒人员!'); + return; + } + if (warningUserNames.indexOf('all') >= 0) { warningUserIds = '' remindAllUsers = '是'; } else { - if(warningUserNames == ''){ - warningUserIds = top.Ext.getCmp('warningUserIds').getValue(); - }else { + if(warningUserNames !== ''){ warningUserIds = warningUserNames } }