Index: ssts-web/src/main/webapp/common/selectHttpOptionExt2.js
===================================================================
diff -u
--- ssts-web/src/main/webapp/common/selectHttpOptionExt2.js (revision 0)
+++ ssts-web/src/main/webapp/common/selectHttpOptionExt2.js (revision 26802)
@@ -0,0 +1,73 @@
+/**
+ * 打开ext的参数选择(编辑输入)的窗口,可用于如使用记录器械包丢失报损备注的选择
+ * @param ExtComponent ext组件(Ext或top.Ext)
+ * @param extElement 源页面的ext元素
+ * @param optionArray 可选参数的数组
+ * @param winTitle 弹窗的标题
+ */
+function openHttpOptionSelectExt2Window(ExtComponent , extElement , optionArray , winTitle){
+ //所选中的选项
+ var selectedOptionValue;
+ var radioArray = [];
+ for(var i = 0;i < optionArray.length;i++){
+ radioArray.push({
+ id:'optionRadio' + i,
+ name:'optionRadio',
+ xtype:'radio',
+ height:30,
+ boxLabel:optionArray[i],
+ listeners : {
+ check : function(thiz , checked){
+ if(checked){
+ ExtComponent.getCmp('optionTextfield').setValue(thiz.boxLabel);
+ }
+ }
+ }
+ });
+ }
+
+ radioArray.push({
+ id:'optionTextfield',
+ xtype:'textarea',
+ width:320,
+ height:50,
+ value:extElement.getValue()
+ });
+ //1.构造面板
+ var optionPanel = new ExtComponent.Panel({
+ width:480,
+ height:280,
+ autoScroll : true,
+ frame : true,
+ bodyStyle : 'padding:5px 5px 0px 25px',
+ items:radioArray,
+ buttonAlign : 'center',
+ buttons : [
+ {text:"确认",handler:function(){
+ var optionTextfield = ExtComponent.getCmp('optionTextfield');
+ var optionValue = optionTextfield.getValue();//optionTextfield.el.dom.value
+ if(!optionValue){
+ alert('请选择或输入');
+ return;
+ }
+ extElement.setValue(optionValue);
+ extElement.focus();
+ win.close();
+ }},{text:"取消",handler:function(){
+ extElement.focus();
+ win.close();
+ }}
+ ]
+ });
+ //2.构造window并show出来
+ var win = new ExtComponent.Window({
+ id : 'optionWindow',
+ width:500,
+ height:300,
+ layout : 'fit',
+ title : winTitle,
+ modal : true,
+ items : [optionPanel]
+ });
+ win.show();
+}
\ No newline at end of file
Index: ssts-web/src/main/webapp/disinfectsystem/useRecord/useRecordForm.js
===================================================================
diff -u -r26744 -r26802
--- ssts-web/src/main/webapp/disinfectsystem/useRecord/useRecordForm.js (.../useRecordForm.js) (revision 26744)
+++ ssts-web/src/main/webapp/disinfectsystem/useRecord/useRecordForm.js (.../useRecordForm.js) (revision 26802)
@@ -2382,7 +2382,49 @@
width:750,
maxLength : 665,
allowBlank : true,
- anchor : '100%'
+ anchor : '100%',
+ listeners : {
+ render : function(c){
+ var timeoutHandler = null;
+ //单击弹出窗口选反对或输入备注
+ c.getEl().on('click',function(e,thiz){
+ clearTimeout(timeoutHandler);
+
+ timeoutHandler = setTimeout(function(){
+ //弹出窗口录入相关的备注信息(传当前备注文本域对象(用于接收编辑的值)、参数类型(用于过滤相关的备注选项)等)
+ var optionArray = [];
+ Ext.Ajax.request({
+ url : WWWROOT + '/disinfectSystem/core/httpOptionAction!getHttpOptionsById.do',
+ params : {"optionId":errorDamageRemark},
+ success : function(response, options) {
+ var result = Ext.decode(response.responseText);
+ if(result.success){
+ if(result.data && result.data.length > 0){
+ for(var i = 0;i < result.data.length;i++){
+ optionArray.push(result.data[i].value);
+ }
+ openHttpOptionSelectExt2Window(top.Ext , c , optionArray , '请选择/输入' + typeName + '原因说明');
+ }else{
+ showResult("系统未配置丢失报损常用备注,请直接输入备注");
+ }
+ }else{
+ if(result.message){
+ showResult(result.message);
+ }
+ }
+ },failure:function(response){
+ showResult("服务器正忙,请稍候再试!");
+ }
+ });
+ } , 300);
+ });
+ //双击事件(屏蔽单击),进入编辑
+ c.getEl().on('dblclick',function(e,thiz){
+ clearTimeout(timeoutHandler);
+ c.focus();
+ });
+ }
+ }
}]
}],
buttons : [{
Index: ssts-web/src/main/webapp/disinfectsystem/useRecord/useRecordView.jsp
===================================================================
diff -u -r26658 -r26802
--- ssts-web/src/main/webapp/disinfectsystem/useRecord/useRecordView.jsp (.../useRecordView.jsp) (revision 26658)
+++ ssts-web/src/main/webapp/disinfectsystem/useRecord/useRecordView.jsp (.../useRecordView.jsp) (revision 26802)
@@ -1,3 +1,4 @@
+<%@page import="com.forgon.systemsetting.model.HttpOption"%>
<%@page import="java.util.List"%>
<%@page import="com.forgon.systemsetting.service.HttpOptionManager"%>
<%@page import="com.forgon.disinfectsystem.basedatamanager.supplyroomconfig.service.SupplyRoomConfigManager"%>
@@ -75,6 +76,7 @@
+