Index: ssts-web/src/main/webapp/disinfectsystem/basedatamanager/deviceInterface/deviceInterfaceView.jsp
===================================================================
diff -u -r40584 -r40603
--- ssts-web/src/main/webapp/disinfectsystem/basedatamanager/deviceInterface/deviceInterfaceView.jsp (.../deviceInterfaceView.jsp) (revision 40584)
+++ ssts-web/src/main/webapp/disinfectsystem/basedatamanager/deviceInterface/deviceInterfaceView.jsp (.../deviceInterfaceView.jsp) (revision 40603)
@@ -136,6 +136,12 @@
* 设备接口用户名和密码加密深度,默认为3
*/
var DEVICEINTERFACE_ENCRPT_DEPTH = '<%=CoderEncryption.DEVICEINTERFACE_ENCRPT_DEPTH%>';
+//按开始时间
+var PARAMATCHINGMETHOD_STARTDATE = '<%=DeviceInterface.PARAMATCHINGMETHOD_STARTDATE%>';
+//按循环次数
+var PARAMATCHINGMETHOD_CYCLECOUNTER = '<%=DeviceInterface.PARAMATCHINGMETHOD_CYCLECOUNTER%>';
+//按结束时间
+var PARAMATCHINGMETHOD_ENDDATE = '<%=DeviceInterface.PARAMATCHINGMETHOD_ENDDATE%>';
/**
* 《供应商包添加》权限
@@ -161,17 +167,6 @@
SSTS_Supplier_Delete = false;
-var enableEditBtn = false;
-var enableSaveBtn = false;
-var enableSaveAndNewBtn = false;
-
-enableEditBtn = true;
-
-
-enableSaveBtn = true;
-
-
-
Index: ssts-web/src/main/webapp/disinfectsystem/basedatamanager/deviceInterface/deviceInterfaceForm.js
===================================================================
diff -u -r40584 -r40603
--- ssts-web/src/main/webapp/disinfectsystem/basedatamanager/deviceInterface/deviceInterfaceForm.js (.../deviceInterfaceForm.js) (revision 40584)
+++ ssts-web/src/main/webapp/disinfectsystem/basedatamanager/deviceInterface/deviceInterfaceForm.js (.../deviceInterfaceForm.js) (revision 40603)
@@ -1,757 +1,781 @@
var id;
var formObj;
var deviceInterfaceWin;
+//接口类型
+var interfaceTypeStore = new Ext.data.SimpleStore({
+ fields: ['value'],
+ data: [[SHAREFOLDER], [FTP]]
+})
+//参数匹配方式
+var paraMatchingMethodStore = new Ext.data.SimpleStore({
+ fields: ['value'],
+ data: [[PARAMATCHINGMETHOD_STARTDATE], [PARAMATCHINGMETHOD_CYCLECOUNTER]]
+});
+//设备类型
+var deviceTypeStore = new Ext.data.SimpleStore({
+ fields: ['value'],
+ data: [[' '], [DEVICETYPE_LOW], [DEVICETYPE_HIGH]]
+})
+
function addAndEditDeviceInterface(id) {
this.id = id;
- formObj = new top.Ext.FormPanel( {
- id : 'deviceInterfaceForm',
- frame : true,
- labelAlign:'right',
- labelSeparator : ':',
- bodyStyle : 'padding:5px 5px 0px 5px',
- labelWidth : 120,
- height:160,
- items : [ {
- xtype : 'hidden',
- name : 'id',
- id : 'id'
- },{
- xtype : 'hidden',
- name : 'oldDeviceId',
- id : 'oldDeviceId'
- },{
- layout : 'column',
- items : [ {
- layout : 'form',
- columnWidth : .5,
- labelWidth : 100,
- items : [ {
- xtype : 'textfield',
- fieldLabel : "接口名称",
- blankText : '请输入名称!',
- name : "name",
- id : "name",
- allowBlank : false,
- anchor : '97.5%'
+ formObj = new top.Ext.FormPanel({
+ id: 'deviceInterfaceForm',
+ frame: true,
+ labelAlign: 'right',
+ labelSeparator: ':',
+ bodyStyle: 'padding:5px 5px 0px 5px',
+ labelWidth: 120,
+ height: 160,
+ items: [{
+ xtype: 'hidden',
+ name: 'id',
+ id: 'id'
+ }, {
+ xtype: 'hidden',
+ name: 'oldDeviceId',
+ id: 'oldDeviceId'
+ }, {
+ layout: 'column',
+ items: [{
+ layout: 'form',
+ columnWidth: .5,
+ labelWidth: 100,
+ items: [{
+ xtype: 'textfield',
+ fieldLabel: "接口名称",
+ blankText: '请输入名称!',
+ name: "name",
+ id: "name",
+ allowBlank: false,
+ anchor: '97.5%'
}]
- },{
- layout : 'form',
- columnWidth : 0.5,
- labelWidth : 100,
- id : 'interfaceTypeWrap',
- items : [{
- xtype : 'combo',
- fieldLabel : '接口类型',
- id : 'interfaceType',
- name : 'interfaceType',
- width : 130,
- valueField : 'value',
- displayField : 'value',
- store : new Ext.data.SimpleStore({
- fields : [ 'value' ],
- data : [[SHAREFOLDER],[FTP]]
- }
- ),
- forceSelection : true,
- allowBlank : false,
- editable : false,
- mode : 'local',
- triggerAction : 'all',
- anchor : '95%'
+ }, {
+ layout: 'form',
+ columnWidth: 0.5,
+ labelWidth: 100,
+ id: 'interfaceTypeWrap',
+ items: [{
+ xtype: 'combo',
+ fieldLabel: '接口类型',
+ id: 'interfaceType',
+ name: 'interfaceType',
+ width: 130,
+ valueField: 'value',
+ displayField: 'value',
+ store: interfaceTypeStore,
+ forceSelection: true,
+ allowBlank: false,
+ editable: false,
+ mode: 'local',
+ triggerAction: 'all',
+ anchor: '95%'
}]
- },{
- layout : 'form',
- columnWidth : 0.5,
- labelWidth : 100,
- items : [ {
- xtype : 'textfield',
- fieldLabel : "IP地址",
- name : "IP",
- id : "IP",
- allowBlank : false,
- anchor : '97.5%'
+ }, {
+ layout: 'form',
+ columnWidth: 0.5,
+ labelWidth: 100,
+ items: [{
+ xtype: 'textfield',
+ fieldLabel: "IP地址",
+ name: "IP",
+ id: "IP",
+ allowBlank: false,
+ anchor: '97.5%'
}]
- },{
- layout : 'form',
- columnWidth : 0.5,
- labelWidth : 100,
- items : [ {
- xtype : 'numberfield',
- fieldLabel : "端口",
- name : "port",
- id : "port",
+ }, {
+ layout: 'form',
+ columnWidth: 0.5,
+ labelWidth: 100,
+ items: [{
+ xtype: 'numberfield',
+ fieldLabel: "端口",
+ name: "port",
+ id: "port",
minValue: 1,
maxValue: 65535,
- allowBlank : true,
- anchor : '97.5%'
+ allowBlank: true,
+ anchor: '97.5%'
}]
- },{
- layout : 'form',
- columnWidth : 0.5,
- labelWidth : 100,
- id:'folderPathWrap',
- items : [ {
- xtype : 'textfield',
- fieldLabel : "共享文件夹",
- name : "folderPath",
- id : "folderPath",
- allowBlank : true,
- anchor : '95%'
+ }, {
+ layout: 'form',
+ columnWidth: 0.5,
+ labelWidth: 100,
+ id: 'folderPathWrap',
+ items: [{
+ xtype: 'textfield',
+ fieldLabel: "共享文件夹",
+ name: "folderPath",
+ id: "folderPath",
+ allowBlank: true,
+ anchor: '95%'
}]
}, {
- layout : 'form',
- columnWidth : 0.5,
- labelWidth : 100,
- id:'userNameWrap',
- items : [ {
- xtype : 'textfield',
- fieldLabel : "用户名",
- name : "userName",
- id : "userName",
- blankText : '请输入用户名!',
- allowBlank : true,
- anchor : '97.5%'
+ layout: 'form',
+ columnWidth: 0.5,
+ labelWidth: 100,
+ id: 'userNameWrap',
+ items: [{
+ xtype: 'textfield',
+ fieldLabel: "用户名",
+ name: "userName",
+ id: "userName",
+ blankText: '请输入用户名!',
+ allowBlank: true,
+ anchor: '97.5%'
}]
}, {
- layout : 'form',
- columnWidth : 0.5,
- labelWidth : 100,
- id:'passwordWrap',
- items : [ {
- xtype : 'textfield',
- fieldLabel : "密码",
- name : "password",
- id : "password",
- allowBlank : true,
- anchor : '95%'
- } ]
+ layout: 'form',
+ columnWidth: 0.5,
+ labelWidth: 100,
+ id: 'passwordWrap',
+ items: [{
+ xtype: 'textfield',
+ fieldLabel: "密码",
+ name: "password",
+ id: "password",
+ allowBlank: true,
+ anchor: '95%'
+ }]
}, {
- layout : 'form',
- columnWidth : 0.5,
- labelWidth : 100,
- items : [{
- xtype : 'combo',
- fieldLabel : '设备品牌',
- id : 'deviceBrand',
- name : 'deviceBrand',
- width : 130,
- valueField : 'value',
- displayField : 'value',
- store : new Ext.data.SimpleStore({
- fields : [ 'value' ],
- data : [[BELIMED],[STERIS],[GETINGE],[JIANGHAN],[XINHUA],[MARGE],[JOHNSON],[YOUYUAN],[KPS_CASP],[SENOH],[MATACHANA],[STERIVAC3M],[MELAG],[JNK]]
+ layout: 'form',
+ columnWidth: 0.5,
+ labelWidth: 100,
+ items: [{
+ xtype: 'combo',
+ fieldLabel: '设备品牌',
+ id: 'deviceBrand',
+ name: 'deviceBrand',
+ width: 130,
+ valueField: 'value',
+ displayField: 'value',
+ store: new Ext.data.SimpleStore({
+ fields: ['value'],
+ data: [[BELIMED], [STERIS], [GETINGE], [JIANGHAN], [XINHUA], [MARGE], [JOHNSON], [YOUYUAN], [KPS_CASP], [SENOH], [MATACHANA], [STERIVAC3M], [MELAG], [JNK]]
+ }),
+ forceSelection: true,
+ allowBlank: false,
+ editable: false,
+ mode: 'local',
+ triggerAction: 'all',
+ anchor: '97.5%',
+ listeners: {
+ select: function (thiz, record, index) {
+ onDeviceBrandChange(true);
}
- ),
- forceSelection : true,
- allowBlank : false,
- editable : false,
- mode : 'local',
- triggerAction : 'all',
- anchor : '97.5%',
- listeners : {
- select : function(thiz,record,index){
- onDeviceBrandChange();
- }
}
}]
- },{
- layout : 'form',
- columnWidth : 0.5,
- labelWidth : 100,
- id : 'versionWrap',
- items : [{
- xtype : 'combo',
- fieldLabel : '接口版本',
- id : 'version',
- name : 'version',
- width : 60,
- valueField : 'value',
- displayField : 'value',
- store : new Ext.data.SimpleStore({
- fields : [ 'value' ],
- data : [['V1.0'],['V2.0']]
- }
+ }, {
+ layout: 'form',
+ columnWidth: 0.5,
+ labelWidth: 100,
+ id: 'versionWrap',
+ items: [{
+ xtype: 'combo',
+ fieldLabel: '接口版本',
+ id: 'version',
+ name: 'version',
+ width: 60,
+ valueField: 'value',
+ displayField: 'value',
+ store: new Ext.data.SimpleStore({
+ fields: ['value'],
+ data: [['V1.0'], ['V2.0']]
+ }
),
- value:'V1.0',
- forceSelection : true,
- allowBlank : false,
- editable : false,
- mode : 'local',
- triggerAction : 'all',
- anchor : '95%',
- listeners:{
- select:function(combo, record, index){
- if(combo.value == 'V1.0'){
- showCmt('paraMatchingMethodWrap','paraMatchingMethod',false);
- hideCmt('deviceModelWrap','deviceModel',true);
- }else {
- hideCmt('paraMatchingMethodWrap','paraMatchingMethod',true);
+ value: 'V1.0',
+ forceSelection: true,
+ allowBlank: false,
+ editable: false,
+ mode: 'local',
+ triggerAction: 'all',
+ anchor: '95%',
+ listeners: {
+ select: function (combo, record, index) {
+ if (combo.value == 'V1.0') {
+ showCmt('paraMatchingMethodWrap', 'paraMatchingMethod', false, paraMatchingMethodStore);
+ top.Ext.getCmp("paraMatchingMethod").setValue(PARAMATCHINGMETHOD_STARTDATE);
+ hideCmt('deviceModelWrap', 'deviceModel', true);
+ } else {
+ hideCmt('paraMatchingMethodWrap', 'paraMatchingMethod', true);
var versionComboStore = new Ext.data.SimpleStore({
- fields : [ 'value' ],
- data : [[' '],[BELIMED_MST_9_6_18_HS2],[BELIMED_MST_9_6_18_VS2],[BELIMED_WD_290]]
+ fields: ['value'],
+ data: [[' '], [BELIMED_MST_9_6_18_HS2], [BELIMED_MST_9_6_18_VS2], [BELIMED_WD_290]]
})
- showCmt('deviceModelWrap','deviceModel',false,versionComboStore);
+ showCmt('deviceModelWrap', 'deviceModel', false, versionComboStore);
}
}
}
}],
- listeners:{
- render:function(){
- setTimeout(function(){
- hideCmt('versionWrap','version',true);
- },100)
+ listeners: {
+ render: function () {
+ setTimeout(function () {
+ hideCmt('versionWrap', 'version', true);
+ }, 100)
}
}
}, {
- layout : 'form',
- columnWidth : 0.5,
- labelWidth : 100,
- hidden : false,
- id : 'deviceModelWrap',
- items : [{
- xtype : 'combo',
- fieldLabel : '设备型号',
- id : 'deviceModel',
- name : 'deviceModel',
- width : 130,
- valueField : 'value',
- displayField : 'value',
- store : new Ext.data.SimpleStore({
- fields : [ 'value' ],
- data : []
- }
- ),
- forceSelection : true,
- allowBlank : false,
- editable : false,
- mode : 'local',
- triggerAction : 'all',
- anchor : '97.5%',
- listeners:{
- select:function(combo, record, index){
- if(combo.value == ' '){
+ layout: 'form',
+ columnWidth: 0.5,
+ labelWidth: 100,
+ hidden: false,
+ id: 'deviceModelWrap',
+ items: [{
+ xtype: 'combo',
+ fieldLabel: '设备型号',
+ id: 'deviceModel',
+ name: 'deviceModel',
+ width: 130,
+ valueField: 'value',
+ displayField: 'value',
+ store: new Ext.data.SimpleStore({
+ fields: ['value'],
+ data: []
+ }),
+ forceSelection: true,
+ allowBlank: false,
+ editable: false,
+ mode: 'local',
+ triggerAction: 'all',
+ anchor: '97.5%',
+ listeners: {
+ select: function (combo, record, index) {
+ if (combo.value == ' ') {
top.Ext.getCmp('deviceModel').setValue('');
}
onDeviceModelChange();
}
}
}],
- listeners:{
- render:function(){
- setTimeout(function(){
- hideCmt('deviceModelWrap','deviceModel',true);
- },100)
+ listeners: {
+ render: function () {
+ setTimeout(function () {
+ hideCmt('deviceModelWrap', 'deviceModel', true);
+ }, 100)
}
}
- },{
- layout : 'form',
- columnWidth : 0.5,
- labelWidth : 100,
- id : 'paraMatchingMethodWrap',
- items : [{
- xtype : 'combo',
- fieldLabel : '参数匹配方式',
- id : 'paraMatchingMethod',
- name : 'paraMatchingMethod',
- width : 60,
- valueField : 'value',
- displayField : 'value',
- store : new Ext.data.SimpleStore({
- fields : [ 'value' ],
- data : [['按开始时间'],['按循环次数']]
- }
- ),
- defaultValue:'按循环次数',
- forceSelection : true,
- allowBlank : false,
- editable : false,
- mode : 'local',
- triggerAction : 'all',
- anchor : '95%'
+ }, {
+ layout: 'form',
+ columnWidth: 0.5,
+ labelWidth: 100,
+ id: 'paraMatchingMethodWrap',
+ items: [{
+ xtype: 'combo',
+ fieldLabel: '参数匹配方式',
+ id: 'paraMatchingMethod',
+ name: 'paraMatchingMethod',
+ width: 60,
+ valueField: 'value',
+ displayField: 'value',
+ store: paraMatchingMethodStore,
+ defaultValue: PARAMATCHINGMETHOD_CYCLECOUNTER,
+ forceSelection: true,
+ allowBlank: false,
+ editable: false,
+ mode: 'local',
+ triggerAction: 'all',
+ anchor: '95%'
}]
- },{
- layout : 'form',
- columnWidth : 0.5,
- labelWidth : 100,
- hidden : false,
- id : 'deviceTypeWrap',
- items : [{
- xtype : 'combo',
- fieldLabel : '设备类型',
- id : 'deviceType',
- name : 'deviceType',
- width : 130,
- valueField : 'value',
- displayField : 'value',
- store : new Ext.data.SimpleStore({
- fields : [ 'value' ],
- data : [[' '],[DEVICETYPE_LOW],[DEVICETYPE_HIGH]]
- }
- ),
- forceSelection : true,
- allowBlank : false,
- editable : false,
- mode : 'local',
- triggerAction : 'all',
- anchor : '97.5%',
- listeners:{
- select:function(combo, record, index){
- if(combo.value == ' '){
+ }, {
+ layout: 'form',
+ columnWidth: 0.5,
+ labelWidth: 100,
+ hidden: false,
+ id: 'deviceTypeWrap',
+ items: [{
+ xtype: 'combo',
+ fieldLabel: '设备类型',
+ id: 'deviceType',
+ name: 'deviceType',
+ width: 130,
+ valueField: 'value',
+ displayField: 'value',
+ store: deviceTypeStore,
+ forceSelection: true,
+ allowBlank: false,
+ editable: false,
+ mode: 'local',
+ triggerAction: 'all',
+ anchor: '97.5%',
+ listeners: {
+ select: function (combo, record, index) {
+ if (combo.value == ' ') {
top.Ext.getCmp('deviceType').setValue('');
}
onDeviceTypeChange();
}
}
}],
- listeners:{
- render:function(){
- setTimeout(function(){
- hideCmt('deviceTypeWrap','deviceType',true);
- },100)
+ listeners: {
+ render: function () {
+ setTimeout(function () {
+ hideCmt('deviceTypeWrap', 'deviceType', true);
+ }, 100)
}
}
- },{
- layout : 'form',
- columnWidth : 0.5,
- labelWidth : 100,
- hidden : true,
- id : 'deviceIdWrap',
- items : [{
- xtype : 'textfield',
- fieldLabel : '设备ID',
- id : 'deviceId',
- name : 'deviceId',
-// emptyText : 'NULL',
- width : 193,
-// allowBlank : false,
- anchor : '95%'
+ }, {
+ layout: 'form',
+ columnWidth: 0.5,
+ labelWidth: 100,
+ hidden: true,
+ id: 'deviceIdWrap',
+ items: [{
+ xtype: 'textfield',
+ fieldLabel: '设备ID',
+ id: 'deviceId',
+ name: 'deviceId',
+ // emptyText : 'NULL',
+ width: 193,
+ // allowBlank : false,
+ anchor: '95%'
}]
}]
- } ],
- buttons : [ {
- id : 'saveBtn',
- text : '保存',
- handler : save
+ }],
+ buttons: [{
+ id: 'saveBtn',
+ text: '保存',
+ handler: save
}, {
- text : '取消',
- id : 'saveAndNewBtn',
- handler : cancel
- } ]
+ text: '取消',
+ id: 'saveAndNewBtn',
+ handler: cancel
+ }]
});
- deviceInterfaceWin = new top.Ext.Window( {
- id : 'deviceInterfaceWin',
- layout : 'fit',
- title : '设备接口信息',
- width : 600,
- height:255,
- border : false,
- modal : true,
- plain : true,
- items : [ formObj ]
+ deviceInterfaceWin = new top.Ext.Window({
+ id: 'deviceInterfaceWin',
+ layout: 'fit',
+ title: '设备接口信息',
+ width: 600,
+ height: 255,
+ border: false,
+ modal: true,
+ plain: true,
+ items: [formObj]
});
deviceInterfaceWin.show();
-
- if(id==0) {
- return ;
+
+ if (id == 0) {
+ return;
}
formObj.form
- .load( {
- url : WWWROOT + '/disinfectSystem/baseData/deviceInterfaceAction!loadDeviceInterface.do',
- method : 'GET',
- waitMsg : '正在加载数据,请稍候',
- success : function(form, action) {
- if(action.result.data.port == 0){
- top.Ext.getCmp("port").setValue('');
+ .load({
+ url: WWWROOT + '/disinfectSystem/baseData/deviceInterfaceAction!loadDeviceInterface.do',
+ method: 'GET',
+ waitMsg: '正在加载数据,请稍候',
+ success: function (form, action) {
+ if (action.result.data.port == 0) {
+ top.Ext.getCmp("port").setValue('');
+ }
+ top.Ext.getCmp("oldDeviceId").setValue(action.result.data.deviceId);
+ if ((action.result.data.deviceBrand == XINHUA || action.result.data.deviceBrand == GETINGE)
+ && action.result.data.interfaceType == '') {
+ top.Ext.getCmp("interfaceType").setValue(SHAREFOLDER);
+ }
+ //对用户名和密码进行rsa解密后在控件中显示明文
+ top.Ext.getCmp("userName").setValue(dencryptText(action.result.data.userName, DEVICEINTERFACE_ENCRPT_DEPTH));
+ top.Ext.getCmp("password").setValue(dencryptText(action.result.data.password, DEVICEINTERFACE_ENCRPT_DEPTH));
+ onDeviceBrandChange();
+ },
+ failure: function (form, action) {
+ },
+ params: {
+ id: id
}
- top.Ext.getCmp("oldDeviceId").setValue(action.result.data.deviceId);
- if((action.result.data.deviceBrand == XINHUA || action.result.data.deviceBrand == GETINGE)
- && action.result.data.interfaceType == ''){
- top.Ext.getCmp("interfaceType").setValue(SHAREFOLDER);
- }
- //对用户名和密码进行rsa解密后在控件中显示明文
- top.Ext.getCmp("userName").setValue(dencryptText(action.result.data.userName,DEVICEINTERFACE_ENCRPT_DEPTH));
- top.Ext.getCmp("password").setValue(dencryptText(action.result.data.password,DEVICEINTERFACE_ENCRPT_DEPTH));
- onDeviceBrandChange();
- },
- failure : function(form, action) {
- },
- params : {
- id : id
- }
- });
+ });
}
-function showCmt(wrapId,id,allowBlank,comboStore){
+function showCmt(wrapId, id, allowBlank, comboStore) {
top.Ext.getCmp(wrapId).show();
- if(comboStore){
+ if (comboStore) {
top.Ext.getCmp(id).bindStore(comboStore);
}
- if(allowBlank){
+ if (allowBlank) {
top.Ext.getCmp(id).allowBlank = true;
top.Ext.getCmp(id).clearInvalid();
- }else{
+ } else {
top.Ext.getCmp(id).allowBlank = false;
}
}
-function hideCmt(wrapId,id,allowBlank){
+function hideCmt(wrapId, id, allowBlank) {
top.Ext.getCmp(wrapId).hide();
- if(allowBlank){
+ if (allowBlank) {
top.Ext.getCmp(id).allowBlank = true;
top.Ext.getCmp(id).clearInvalid();
- }else{
+ } else {
top.Ext.getCmp(id).allowBlank = false;
}
}
-function onDeviceTypeChange(){
+function onDeviceTypeChange() {
var deviceBrand = top.Ext.getCmp('deviceBrand').getValue();
- if(deviceBrand == XINHUA){
+ if (deviceBrand == XINHUA) {
var deviceType = top.Ext.getCmp('deviceType').getValue();
- if(deviceType == ''){
- showCmt('paraMatchingMethodWrap','paraMatchingMethod',false);
- }else{//新华高低温暂不支持参数匹配方式
+ if (deviceType == '') {
+ showCmt('paraMatchingMethodWrap', 'paraMatchingMethod', false, paraMatchingMethodStore);
+ top.Ext.getCmp("paraMatchingMethod").setValue(PARAMATCHINGMETHOD_STARTDATE);
+ } else {//新华高低温暂不支持参数匹配方式
top.Ext.getCmp('paraMatchingMethod').setValue(null);
- hideCmt('paraMatchingMethodWrap','paraMatchingMethod',true);
+ hideCmt('paraMatchingMethodWrap', 'paraMatchingMethod', true);
}
}
}
-function onDeviceModelChange(){
+function onDeviceModelChange() {
var deviceBrand = top.Ext.getCmp('deviceBrand').getValue();
var deviceModel = top.Ext.getCmp('deviceModel').getValue();
- if(deviceBrand == MARGE){
- if(deviceModel == MARGE_MODEL_120_CSV || deviceModel == MARGE_MODEL_MAG_GSZK385_CSV){
- showCmt('interfaceTypeWrap','interfaceType',true);
- showCmt('folderPathWrap','folderPath',true);
- showCmt('userNameWrap','userName',true);
- showCmt('passwordWrap','password',true);
- hideCmt('deviceIdWrap','deviceId',true);
- hideCmt('paraMatchingMethodWrap','paraMatchingMethod',true);
- }else if(deviceModel == MARGE_MODEL_MAG_CL4){
+ if (deviceBrand == MARGE) {
+ if (deviceModel == MARGE_MODEL_120_CSV || deviceModel == MARGE_MODEL_MAG_GSZK385_CSV) {
+ showCmt('interfaceTypeWrap', 'interfaceType', true, interfaceTypeStore);
+ showCmt('folderPathWrap', 'folderPath', true);
+ showCmt('userNameWrap', 'userName', true);
+ showCmt('passwordWrap', 'password', true);
+ hideCmt('deviceIdWrap', 'deviceId', true);
+ hideCmt('paraMatchingMethodWrap', 'paraMatchingMethod', true);
+ } else if (deviceModel == MARGE_MODEL_MAG_CL4) {
var paraMatchingMethodComboStore = new Ext.data.SimpleStore({
- fields : [ 'value' ],
- data : [['按开始时间'],['按干预管理手工匹配']]
+ fields: ['value'],
+ data: [[PARAMATCHINGMETHOD_STARTDATE]]
})
- showCmt('interfaceTypeWrap','interfaceType',true);
- showCmt('folderPathWrap','folderPath',true);
- showCmt('userNameWrap','userName',true);
- showCmt('passwordWrap','password',true);
- showCmt('paraMatchingMethodWrap','paraMatchingMethod',false,paraMatchingMethodComboStore);
- hideCmt('deviceIdWrap','deviceId',true);
- }else{
- hideCmt('interfaceTypeWrap','interfaceType',true);
- hideCmt('folderPathWrap','folderPath',true);
- hideCmt('userNameWrap','userName',true);
- hideCmt('passwordWrap','password',true);
- hideCmt('paraMatchingMethodWrap','paraMatchingMethod',true);
+ showCmt('interfaceTypeWrap', 'interfaceType', true, interfaceTypeStore);
+ showCmt('folderPathWrap', 'folderPath', true);
+ showCmt('userNameWrap', 'userName', true);
+ showCmt('passwordWrap', 'password', true);
+ showCmt('paraMatchingMethodWrap', 'paraMatchingMethod', false, paraMatchingMethodComboStore);
+ hideCmt('deviceIdWrap', 'deviceId', true);
+ top.Ext.getCmp("paraMatchingMethod").setValue(PARAMATCHINGMETHOD_STARTDATE);
+ } else {
+ hideCmt('interfaceTypeWrap', 'interfaceType', true);
+ hideCmt('folderPathWrap', 'folderPath', true);
+ hideCmt('userNameWrap', 'userName', true);
+ hideCmt('passwordWrap', 'password', true);
+ hideCmt('paraMatchingMethodWrap', 'paraMatchingMethod', true);
}
- }else if(deviceBrand == STERIS){
- if(deviceModel == STERIS_CHANGLONG){
+ } else if (deviceBrand == STERIS) {
+ if (deviceModel == STERIS_CHANGLONG) {
var paraMatchingMethodComboStore = new Ext.data.SimpleStore({
- fields : [ 'value' ],
- data : [['清洗结束时间'],['循环次数']]
+ fields: ['value'],
+ data: [[PARAMATCHINGMETHOD_ENDDATE], [PARAMATCHINGMETHOD_CYCLECOUNTER]]
})
var deviceTypeComboStore = new Ext.data.SimpleStore({
- fields : [ 'value' ],
- data : [[' '],[DEVICETYPE_LOW],[DEVICETYPE_HIGH]]
+ fields: ['value'],
+ data: [[' '], ['清洗机']]
})
- showCmt('paraMatchingMethodWrap','paraMatchingMethod',true,paraMatchingMethodComboStore);
- showCmt('deviceTypeWrap','deviceType',true,deviceTypeComboStore);
- }else {
- hideCmt('paraMatchingMethodWrap','paraMatchingMethod',true);
- hideCmt('deviceTypeWrap','deviceType',true);
+ showCmt('paraMatchingMethodWrap', 'paraMatchingMethod', true, paraMatchingMethodComboStore);
+ showCmt('deviceTypeWrap', 'deviceType', true, deviceTypeComboStore);
+ top.Ext.getCmp("paraMatchingMethod").setValue(PARAMATCHINGMETHOD_ENDDATE);
+ top.Ext.getCmp("deviceType").setValue('');
+ } else {
+ hideCmt('paraMatchingMethodWrap', 'paraMatchingMethod', true);
+ hideCmt('deviceTypeWrap', 'deviceType', true);
}
}
}
-function onDeviceBrandChange(){
+function onDeviceBrandChange(clearValue) {
var deviceBrand = top.Ext.getCmp('deviceBrand').getValue();
var deviceModel = top.Ext.getCmp('deviceModel').getValue();
-
- hideCmt('deviceIdWrap','deviceId',true);
- hideCmt('deviceModelWrap','deviceModel',true);
- hideCmt('deviceTypeWrap','deviceType',true);
- hideCmt('interfaceTypeWrap','interfaceType',true);
- hideCmt('paraMatchingMethodWrap','paraMatchingMethod',true);
- showCmt('userNameWrap','userName',true);
- showCmt('folderPathWrap','folderPath',true);
- showCmt('passwordWrap','password',true);
+ hideCmt('deviceIdWrap', 'deviceId', true);
+ hideCmt('deviceModelWrap', 'deviceModel', true);
+ hideCmt('deviceTypeWrap', 'deviceType', true);
+ hideCmt('interfaceTypeWrap', 'interfaceType', true);
+ hideCmt('paraMatchingMethodWrap', 'paraMatchingMethod', true);
+ showCmt('userNameWrap', 'userName', true);
+ showCmt('folderPathWrap', 'folderPath', true);
+ showCmt('passwordWrap', 'password', true);
+
//NFYY-98:新增接口版本
- hideCmt('versionWrap','version',true);
-
- if(deviceBrand == JIANGHAN){
- showCmt('deviceIdWrap','deviceId',true);
- }else if(deviceBrand == MARGE){
+ hideCmt('versionWrap', 'version', true);
+
+ if (deviceBrand == JIANGHAN) {
+ showCmt('deviceIdWrap', 'deviceId', true);
+ } else if (deviceBrand == MARGE) {
var margeModelComboStore = new Ext.data.SimpleStore({
- fields : [ 'value' ],
- data : [[' '],[MARGE_MODEL_120],[MARGE_MODEL_120_CSV],[ MARGE_MODEL_150],[MARGE_MODEL_DRYER],[MARGE_MODEL_MAG_GSZK385_CSV],[MARGE_MODEL_MAG_CL4]]
+ fields: ['value'],
+ data: [[' '], [MARGE_MODEL_120], [MARGE_MODEL_120_CSV], [MARGE_MODEL_150], [MARGE_MODEL_DRYER], [MARGE_MODEL_MAG_GSZK385_CSV], [MARGE_MODEL_MAG_CL4]]
})
- showCmt('deviceModelWrap','deviceModel',false,margeModelComboStore);
- if(deviceModel == MARGE_MODEL_120_CSV || deviceModel == MARGE_MODEL_MAG_GSZK385_CSV){
- showCmt('interfaceTypeWrap','interfaceType',true,interfaceTypeComboStore);
- }else if(deviceModel == MARGE_MODEL_MAG_CL4){
+ showCmt('deviceModelWrap', 'deviceModel', false, margeModelComboStore);
+ if (clearValue) {
+ top.Ext.getCmp("deviceModel").setValue('');
+ }
+ if (deviceModel == MARGE_MODEL_120_CSV || deviceModel == MARGE_MODEL_MAG_GSZK385_CSV) {
+ showCmt('interfaceTypeWrap', 'interfaceType', true, interfaceTypeStore);
+ if (clearValue) {
+ top.Ext.getCmp("interfaceType").setValue('');
+ top.Ext.getCmp("deviceModel").setValue('');
+ }
+ } else if (deviceModel == MARGE_MODEL_MAG_CL4) {
var paraMatchingMethodComboStore = new Ext.data.SimpleStore({
- fields : [ 'value' ],
- data : [['按开始时间'],['按干预管理手工匹配']]
+ fields: ['value'],
+ data: [[PARAMATCHINGMETHOD_STARTDATE]]
})
- showCmt('interfaceTypeWrap','interfaceType',true);
- showCmt('folderPathWrap','folderPath',true);
- showCmt('paraMatchingMethodWrap','paraMatchingMethod',false,paraMatchingMethodComboStore);
- hideCmt('userNameWrap','userName',true);
- hideCmt('passwordWrap','password',true);
- hideCmt('deviceIdWrap','deviceId',true);
- }else{
- showCmt('deviceIdWrap','deviceId',false);
- hideCmt('userNameWrap','userName',true);
- hideCmt('folderPathWrap','folderPath',true);
- hideCmt('passwordWrap','password',true);
+ showCmt('interfaceTypeWrap', 'interfaceType', true, interfaceTypeStore);
+ showCmt('folderPathWrap', 'folderPath', true);
+ showCmt('paraMatchingMethodWrap', 'paraMatchingMethod', false, paraMatchingMethodComboStore);
+ hideCmt('userNameWrap', 'userName', true);
+ hideCmt('passwordWrap', 'password', true);
+ hideCmt('deviceIdWrap', 'deviceId', true);
+ if (clearValue) {
+ top.Ext.getCmp("paraMatchingMethod").setValue(PARAMATCHINGMETHOD_STARTDATE);
+ top.Ext.getCmp("interfaceType").setValue('');
+ top.Ext.getCmp("deviceModel").setValue('');
+ }
+ } else {
+ showCmt('deviceIdWrap', 'deviceId', false);
+ hideCmt('userNameWrap', 'userName', true);
+ hideCmt('folderPathWrap', 'folderPath', true);
+ hideCmt('passwordWrap', 'password', true);
}
- }else if(deviceBrand == XINHUA){
+ } else if (deviceBrand == XINHUA) {
var xinhuaModelComboStore = new Ext.data.SimpleStore({
- fields : [ 'value' ],
- data : [[' '],[XINHUATYPE_S7_300],[XINHUA_CHANGLONG_DC_4],[XINHUA_CHANGLONG_DC_5],[XINHUA_PC_L],[XINHUA_SUPER6000],[XINHUA_Repaid_A_520],[XINHUATYPE_PS_100GXP],[XG2C],[XINHUA_WAICHE]]
+ fields: ['value'],
+ data: [[' '], [XINHUATYPE_S7_300], [XINHUA_CHANGLONG_DC_4], [XINHUA_CHANGLONG_DC_5], [XINHUA_PC_L], [XINHUA_SUPER6000], [XINHUA_Repaid_A_520], [XINHUATYPE_PS_100GXP], [XG2C], [XINHUA_WAICHE]]
})
- var interfaceTypeComboStore = new Ext.data.SimpleStore({
- fields : [ 'value' ],
- data : [[SHAREFOLDER],[FTP]]
- })
- var deviceTypeComboStore = new Ext.data.SimpleStore({
- fields : [ 'value' ],
- data : [[' '],[DEVICETYPE_LOW],[DEVICETYPE_HIGH]]
- })
- showCmt('paraMatchingMethodWrap','paraMatchingMethod',false);
- var paraMatchingMethodValue = top.Ext.getCmp("paraMatchingMethod").getValue();
- if('' == paraMatchingMethodValue){
- top.Ext.getCmp("paraMatchingMethod").setValue('按开始时间');
+ showCmt('paraMatchingMethodWrap', 'paraMatchingMethod', false, paraMatchingMethodStore);
+ showCmt('deviceModelWrap', 'deviceModel', true, xinhuaModelComboStore);
+ showCmt('interfaceTypeWrap', 'interfaceType', true, interfaceTypeStore);
+ showCmt('deviceTypeWrap', 'deviceType', true, deviceTypeStore);
+ if (clearValue) {
+ top.Ext.getCmp("paraMatchingMethod").setValue(PARAMATCHINGMETHOD_STARTDATE);
+ top.Ext.getCmp("deviceType").setValue('');
+ top.Ext.getCmp("interfaceType").setValue('');
+ top.Ext.getCmp("deviceModel").setValue('');
}
- showCmt('deviceModelWrap','deviceModel',true,xinhuaModelComboStore);
- showCmt('interfaceTypeWrap','interfaceType',true,interfaceTypeComboStore);
- showCmt('deviceTypeWrap','deviceType',true,deviceTypeComboStore);
- }else if(deviceBrand == GETINGE || deviceBrand == BELIMED || deviceBrand == STERIS){
- var interfaceTypeComboStore = new Ext.data.SimpleStore({
- fields : [ 'value' ],
- data : [[SHAREFOLDER],[FTP]]
- })
+ } else if (deviceBrand == GETINGE || deviceBrand == BELIMED || deviceBrand == STERIS) {
var getingModelComboStore = null;
- if(deviceBrand == GETINGE){
+ if (deviceBrand == GETINGE) {
getingModelComboStore = new Ext.data.SimpleStore({
- fields : [ 'value' ],
- data : [[' '],[GETING_GSS67H17],[GETING_86_SERIES],[GETINGETYPE_HS66],[GETINGETYPE_HS_ONE],[GETINGETYPE_HS6620_TDOC],[GETING_SUZHOUJIEDING_46_5],[GETING_CM320],[GETING_9125E],[GETING_S_8668],[GETING_WD500]]
+ fields: ['value'],
+ data: [[' '], [GETING_GSS67H17], [GETING_86_SERIES], [GETINGETYPE_HS66], [GETINGETYPE_HS_ONE], [GETINGETYPE_HS6620_TDOC], [GETING_SUZHOUJIEDING_46_5], [GETING_CM320], [GETING_9125E], [GETING_S_8668], [GETING_WD500]]
})
- showCmt('paraMatchingMethodWrap','paraMatchingMethod',false);
- showCmt('deviceModelWrap','deviceModel',true,getingModelComboStore);
- }else if(deviceBrand == STERIS){
+ showCmt('paraMatchingMethodWrap', 'paraMatchingMethod', false, paraMatchingMethodStore);
+ showCmt('deviceModelWrap', 'deviceModel', true, getingModelComboStore);
+ if (clearValue) {
+ top.Ext.getCmp("paraMatchingMethod").setValue(PARAMATCHINGMETHOD_STARTDATE);
+ top.Ext.getCmp("deviceModel").setValue('');
+ }
+ } else if (deviceBrand == STERIS) {
sterisModelComboStore = new Ext.data.SimpleStore({
- fields : [ 'value' ],
- data : [[' '],[STERIS_AMSCO_3052],[STERIS_AMSCO_V_PRO_MAX],[STERIS_CHANGLONG]]
+ fields: ['value'],
+ data: [[' '], [STERIS_AMSCO_3052], [STERIS_AMSCO_V_PRO_MAX], [STERIS_CHANGLONG]]
})
- showCmt('deviceModelWrap','deviceModel',true,sterisModelComboStore);
- if(deviceModel == STERIS_CHANGLONG){
- showCmt('paraMatchingMethodWrap','paraMatchingMethod',true);
- showCmt('deviceTypeWrap','deviceType',true);
+ showCmt('deviceModelWrap', 'deviceModel', true, sterisModelComboStore);
+ if (deviceModel == STERIS_CHANGLONG) {
+ showCmt('paraMatchingMethodWrap', 'paraMatchingMethod', true, paraMatchingMethodStore);
+ showCmt('deviceTypeWrap', 'deviceType', true, deviceTypeStore);
+ if (clearValue) {
+ top.Ext.getCmp("deviceType").setValue('');
+ top.Ext.getCmp("paraMatchingMethod").setValue(PARAMATCHINGMETHOD_STARTDATE);
+ }
}
- }else if(deviceBrand == BELIMED ){
- showCmt('paraMatchingMethodWrap','paraMatchingMethod',false);
- var paraMatchingMethodValue = top.Ext.getCmp("paraMatchingMethod").getValue();
- if('' == paraMatchingMethodValue){
- top.Ext.getCmp("paraMatchingMethod").setValue('按开始时间');
+ if (clearValue) {
+ top.Ext.getCmp("deviceModel").setValue('');
}
+ } else if (deviceBrand == BELIMED) {
+ showCmt('paraMatchingMethodWrap', 'paraMatchingMethod', false, paraMatchingMethodStore);
+ if (clearValue) {
+ top.Ext.getCmp("paraMatchingMethod").setValue(PARAMATCHINGMETHOD_STARTDATE);
+ }
//NFYY-98:新增接口版本
- showCmt('versionWrap','version',false);
+ showCmt('versionWrap', 'version', false);
var version = top.Ext.getCmp("version").getValue();
- if(version == VERSION_1_0){
- showCmt('paraMatchingMethodWrap','paraMatchingMethod',false);
- hideCmt('deviceModelWrap','deviceModel',true);
- }else {
- hideCmt('paraMatchingMethodWrap','paraMatchingMethod',true);
+ if (version == VERSION_1_0) {
+ showCmt('paraMatchingMethodWrap', 'paraMatchingMethod', false, paraMatchingMethodStore);
+ hideCmt('deviceModelWrap', 'deviceModel', true);
+ if (clearValue) {
+ top.Ext.getCmp("paraMatchingMethod").setValue(PARAMATCHINGMETHOD_STARTDATE);
+ }
+ } else {
+ hideCmt('paraMatchingMethodWrap', 'paraMatchingMethod', true);
var versionComboStore = new Ext.data.SimpleStore({
- fields : [ 'value' ],
- data : [[' '],[BELIMED_MST_9_6_18_HS2],[BELIMED_MST_9_6_18_VS2],[BELIMED_WD_290]]
+ fields: ['value'],
+ data: [[' '], [BELIMED_MST_9_6_18_HS2], [BELIMED_MST_9_6_18_VS2], [BELIMED_WD_290]]
})
- showCmt('deviceModelWrap','deviceModel',false,versionComboStore);
+ showCmt('deviceModelWrap', 'deviceModel', false, versionComboStore);
}
}
- showCmt('interfaceTypeWrap','interfaceType',true,interfaceTypeComboStore);
- }else if(deviceBrand == JOHNSON){
+ showCmt('interfaceTypeWrap', 'interfaceType', true, interfaceTypeStore);
+ if (clearValue) {
+ top.Ext.getCmp("interfaceType").setValue('');
+ top.Ext.getCmp("deviceModel").setValue('');
+ }
+ } else if (deviceBrand == JOHNSON) {
var johnsonModelComboStore = new Ext.data.SimpleStore({
- fields : [ 'value' ],
- data : [[' '],[JOHNSON_MODEL_STERRAD_100S],[JOHNSON_MODEL_STERRAD_100S_SINGLE_CYCLE],[DEVICEMODEL_100NX]]
+ fields: ['value'],
+ data: [[' '], [JOHNSON_MODEL_STERRAD_100S], [JOHNSON_MODEL_STERRAD_100S_SINGLE_CYCLE], [DEVICEMODEL_100NX]]
})
- var interfaceTypeComboStore = new Ext.data.SimpleStore({
- fields : [ 'value' ],
- data : [[SHAREFOLDER],[FTP]]
- })
var deviceTypeComboStore = new Ext.data.SimpleStore({
- fields : [ 'value' ],
- data : [[' '],[DEVICETYPE_LOW]]
+ fields: ['value'],
+ data: [[' '], [DEVICETYPE_LOW]]
})
- showCmt('deviceModelWrap','deviceModel',true,johnsonModelComboStore);
- showCmt('interfaceTypeWrap','interfaceType',true,interfaceTypeComboStore);
- showCmt('deviceTypeWrap','deviceType',true,deviceTypeComboStore);
- showCmt('paraMatchingMethodWrap','paraMatchingMethod',false);
- var paraMatchingMethodValue = top.Ext.getCmp("paraMatchingMethod").getValue();
- if('' == paraMatchingMethodValue){
- top.Ext.getCmp("paraMatchingMethod").setValue('按开始时间');
+ showCmt('deviceModelWrap', 'deviceModel', true, johnsonModelComboStore);
+ showCmt('interfaceTypeWrap', 'interfaceType', true, interfaceTypeStore);
+ showCmt('deviceTypeWrap', 'deviceType', true, deviceTypeComboStore);
+ showCmt('paraMatchingMethodWrap', 'paraMatchingMethod', false, paraMatchingMethodStore);
+ if (clearValue) {
+ top.Ext.getCmp("paraMatchingMethod").setValue(PARAMATCHINGMETHOD_STARTDATE);
+ top.Ext.getCmp("deviceType").setValue('');
+ top.Ext.getCmp("interfaceType").setValue('');
+ top.Ext.getCmp("deviceModel").setValue('');
}
- }else if(deviceBrand == YOUYUAN){
+ } else if (deviceBrand == YOUYUAN) {
var youYuanModelComboStore = new Ext.data.SimpleStore({
- fields : [ 'value' ],
- data : [[' '],[YOUYUAN_YZQ_230]]
+ fields: ['value'],
+ data: [[' '], [YOUYUAN_YZQ_230]]
})
- var interfaceTypeComboStore = new Ext.data.SimpleStore({
- fields : [ 'value' ],
- data : [[SHAREFOLDER],[FTP]]
- })
- showCmt('deviceModelWrap','deviceModel',true,youYuanModelComboStore);
- showCmt('interfaceTypeWrap','interfaceType',true,interfaceTypeComboStore);
- }else if(deviceBrand == KPS_CASP){
+ showCmt('deviceModelWrap', 'deviceModel', true, youYuanModelComboStore);
+ showCmt('interfaceTypeWrap', 'interfaceType', true, interfaceTypeStore);
+ if (clearValue) {
+ top.Ext.getCmp("interfaceType").setValue('');
+ top.Ext.getCmp("deviceModel").setValue('');
+ }
+ } else if (deviceBrand == KPS_CASP) {
var caspModelComboStore = new Ext.data.SimpleStore({
- fields : [ 'value' ],
- data : [[' '],[KPS_CASP_120]]
+ fields: ['value'],
+ data: [[' '], [KPS_CASP_120]]
})
- var interfaceTypeComboStore = new Ext.data.SimpleStore({
- fields : [ 'value' ],
- data : [[SHAREFOLDER],[FTP]]
- })
- showCmt('deviceModelWrap','deviceModel',true,caspModelComboStore);
- showCmt('interfaceTypeWrap','interfaceType',true,interfaceTypeComboStore);
- }else if(deviceBrand == SENOH){
+ showCmt('deviceModelWrap', 'deviceModel', true, caspModelComboStore);
+ showCmt('interfaceTypeWrap', 'interfaceType', true, interfaceTypeStore);
+ if (clearValue) {
+ top.Ext.getCmp("interfaceType").setValue('');
+ top.Ext.getCmp("deviceModel").setValue('');
+ }
+ } else if (deviceBrand == SENOH) {
var senohModelComboStore = new Ext.data.SimpleStore({
- fields : [ 'value' ],
- data : [[' '],[GETINGETYPE_SENOH_SCM_D_JSB15]]
+ fields: ['value'],
+ data: [[' '], [GETINGETYPE_SENOH_SCM_D_JSB15]]
})
var interfaceTypeComboStore = new Ext.data.SimpleStore({
- fields : [ 'value' ],
- data : [[INTERFACETYPE_PLC_S7_1200]]
+ fields: ['value'],
+ data: [[INTERFACETYPE_PLC_S7_1200]]
})
- showCmt('deviceModelWrap','deviceModel',true,senohModelComboStore);
- showCmt('interfaceTypeWrap','interfaceType',true,interfaceTypeComboStore);
- }else if(deviceBrand == MATACHANA){
+ showCmt('deviceModelWrap', 'deviceModel', true, senohModelComboStore);
+ showCmt('interfaceTypeWrap', 'interfaceType', true, interfaceTypeComboStore);
+ if (clearValue) {
+ top.Ext.getCmp("interfaceType").setValue('');
+ top.Ext.getCmp("deviceModel").setValue('');
+ }
+ } else if (deviceBrand == MATACHANA) {
var modelComboStore = new Ext.data.SimpleStore({
- fields : [ 'value' ],
- data : [[' '],[MATACHANA_130LF]]
+ fields: ['value'],
+ data: [[' '], [MATACHANA_130LF]]
})
- var interfaceTypeComboStore = new Ext.data.SimpleStore({
- fields : [ 'value' ],
- data : [[SHAREFOLDER],[FTP]]
- })
- showCmt('deviceModelWrap','deviceModel',true,modelComboStore);
- showCmt('interfaceTypeWrap','interfaceType',true,interfaceTypeComboStore);
- showCmt('paraMatchingMethodWrap','paraMatchingMethod',false);
- var paraMatchingMethodValue = top.Ext.getCmp("paraMatchingMethod").getValue();
- if('' == paraMatchingMethodValue){
- top.Ext.getCmp("paraMatchingMethod").setValue('按开始时间');
+ showCmt('deviceModelWrap', 'deviceModel', true, modelComboStore);
+ showCmt('interfaceTypeWrap', 'interfaceType', true, interfaceTypeStore);
+ showCmt('paraMatchingMethodWrap', 'paraMatchingMethod', false, paraMatchingMethodStore);
+ if (clearValue) {
+ top.Ext.getCmp("paraMatchingMethod").setValue(PARAMATCHINGMETHOD_STARTDATE);
+ top.Ext.getCmp("interfaceType").setValue('');
+ top.Ext.getCmp("deviceModel").setValue('');
}
-
- }else if(deviceBrand == STERIVAC3M){
+ } else if (deviceBrand == STERIVAC3M) {
var modelComboStore = new Ext.data.SimpleStore({
- fields : [ 'value' ],
- data : [[' '],[STERIVAC3M_STERILIZER_GS8_1D]]
+ fields: ['value'],
+ data: [[' '], [STERIVAC3M_STERILIZER_GS8_1D]]
})
- var interfaceTypeComboStore = new Ext.data.SimpleStore({
- fields : [ 'value' ],
- data : [[SHAREFOLDER],[FTP]]
- })
- showCmt('deviceModelWrap','deviceModel',true,modelComboStore);
- showCmt('interfaceTypeWrap','interfaceType',true,interfaceTypeComboStore);
- showCmt('paraMatchingMethodWrap','paraMatchingMethod',false);
- var paraMatchingMethodValue = top.Ext.getCmp("paraMatchingMethod").getValue();
- if('' == paraMatchingMethodValue){
- top.Ext.getCmp("paraMatchingMethod").setValue('按开始时间');
+ showCmt('deviceModelWrap', 'deviceModel', true, modelComboStore);
+ showCmt('interfaceTypeWrap', 'interfaceType', true, interfaceTypeStore);
+ showCmt('paraMatchingMethodWrap', 'paraMatchingMethod', false, paraMatchingMethodStore);
+ if (clearValue) {
+ top.Ext.getCmp("paraMatchingMethod").setValue(PARAMATCHINGMETHOD_STARTDATE);
+ top.Ext.getCmp("interfaceType").setValue('');
+ top.Ext.getCmp("deviceModel").setValue('');
}
- }else if(deviceBrand == MELAG){
+ } else if (deviceBrand == MELAG) {
var versionComboStore = new Ext.data.SimpleStore({
- fields : [ 'value' ],
- data : [[' '],[MELAG_VACUKLAV_43_B_PLUS]]
+ fields: ['value'],
+ data: [[' '], [MELAG_VACUKLAV_43_B_PLUS]]
})
- var interfaceTypeComboStore = new Ext.data.SimpleStore({
- fields : [ 'value' ],
- data : [[SHAREFOLDER],[FTP]]
- })
- showCmt('deviceModelWrap','deviceModel',false,versionComboStore);
- showCmt('paraMatchingMethodWrap','paraMatchingMethod',false);
- showCmt('interfaceTypeWrap','interfaceType',true,interfaceTypeComboStore);
- }else if(deviceBrand == JNK){
+ showCmt('deviceModelWrap', 'deviceModel', false, versionComboStore);
+ showCmt('paraMatchingMethodWrap', 'paraMatchingMethod', false, paraMatchingMethodStore);
+ showCmt('interfaceTypeWrap', 'interfaceType', true, interfaceTypeStore);
+ if (clearValue) {
+ top.Ext.getCmp("paraMatchingMethod").setValue(PARAMATCHINGMETHOD_STARTDATE);
+ top.Ext.getCmp("interfaceType").setValue('');
+ top.Ext.getCmp("deviceModel").setValue('');
+ }
+ } else if (deviceBrand == JNK) {
var versionComboStore = new Ext.data.SimpleStore({
- fields : [ 'value' ],
- data : [[' '],[DEVICETYPE_JK_NQX1500]]
+ fields: ['value'],
+ data: [[' '], [DEVICETYPE_JK_NQX1500]]
})
- var interfaceTypeComboStore = new Ext.data.SimpleStore({
- fields : [ 'value' ],
- data : [[SHAREFOLDER],[FTP]]
- })
var paraMatchingMethodComboStore = new Ext.data.SimpleStore({
- fields : [ 'value' ],
- data : [['按开始时间']]
+ fields: ['value'],
+ data: [[PARAMATCHINGMETHOD_STARTDATE]]
})
var deviceTypeComboStore = new Ext.data.SimpleStore({
- fields : [ 'value' ],
- data : [[' '],['清洗机']]
+ fields: ['value'],
+ data: [[' '], ['清洗机']]
})
- showCmt('deviceModelWrap','deviceModel',false,versionComboStore);
- showCmt('paraMatchingMethodWrap','paraMatchingMethod',false,paraMatchingMethodComboStore);
- showCmt('interfaceTypeWrap','interfaceType',true,interfaceTypeComboStore);
- showCmt('deviceTypeWrap','deviceType',true,deviceTypeComboStore);
+ showCmt('deviceModelWrap', 'deviceModel', false, versionComboStore);
+ showCmt('paraMatchingMethodWrap', 'paraMatchingMethod', false, paraMatchingMethodComboStore);
+ showCmt('interfaceTypeWrap', 'interfaceType', true, interfaceTypeStore);
+ showCmt('deviceTypeWrap', 'deviceType', true, deviceTypeComboStore);
+ if (clearValue) {
+ top.Ext.getCmp("paraMatchingMethod").setValue(PARAMATCHINGMETHOD_STARTDATE);
+ top.Ext.getCmp("deviceType").setValue('');
+ top.Ext.getCmp("interfaceType").setValue('');
+ top.Ext.getCmp("deviceModel").setValue('');
+ }
}
}
-function validateAndSubmit(){ //validate的过程,放在保存里
-// Ext.Ajax.request({
-// url : WWWROOT + '/disinfectSystem/baseData/deviceInterfaceAction!validate.do',
-// params : {
-// id : top.Ext.getCmp("id").getValue(),
-// name:top.Ext.getCmp('name').getValue(),
-// deviceId : top.Ext.getCmp("deviceId").getValue(),
-// deviceBrand : top.Ext.getCmp("deviceBrand").getValue()
-// },
-// success : function(response, options) {
-// var result = Ext.decode(response.responseText);
-// if(result.status==1){
-// formObj.form.submit( {
-// url : WWWROOT + '/disinfectSystem/baseData/deviceInterfaceAction!saveDeviceInterface.do',
-// method : 'POST',
-// waitMsg : '正在保存数据,请稍候',
-// waitTitle : '提交表单',
-// success : function(form, action) {
-// deviceInterfaceWin.close();
-// showResult('保存成功');
-// grid.dwrReload();
-// },
-// failure : function(form, action) {
-// showResult('failure = ' + action.result.message,'error');
-// top.Ext.getCmp('saveBtn').enable();
-// }
-// });
-// }else{
-// showResult(result.message);
-// top.Ext.getCmp('saveBtn').enable();
-// }
-// },
-// failure : function(response, options) {
-// var result = Ext.decode(response.responseText);
-// showResult(result.message);
-// }
-// });
+function validateAndSubmit() { //validate的过程,放在保存里
+ // Ext.Ajax.request({
+ // url : WWWROOT + '/disinfectSystem/baseData/deviceInterfaceAction!validate.do',
+ // params : {
+ // id : top.Ext.getCmp("id").getValue(),
+ // name:top.Ext.getCmp('name').getValue(),
+ // deviceId : top.Ext.getCmp("deviceId").getValue(),
+ // deviceBrand : top.Ext.getCmp("deviceBrand").getValue()
+ // },
+ // success : function(response, options) {
+ // var result = Ext.decode(response.responseText);
+ // if(result.status==1){
+ // formObj.form.submit( {
+ // url : WWWROOT + '/disinfectSystem/baseData/deviceInterfaceAction!saveDeviceInterface.do',
+ // method : 'POST',
+ // waitMsg : '正在保存数据,请稍候',
+ // waitTitle : '提交表单',
+ // success : function(form, action) {
+ // deviceInterfaceWin.close();
+ // showResult('保存成功');
+ // grid.dwrReload();
+ // },
+ // failure : function(form, action) {
+ // showResult('failure = ' + action.result.message,'error');
+ // top.Ext.getCmp('saveBtn').enable();
+ // }
+ // });
+ // }else{
+ // showResult(result.message);
+ // top.Ext.getCmp('saveBtn').enable();
+ // }
+ // },
+ // failure : function(response, options) {
+ // var result = Ext.decode(response.responseText);
+ // showResult(result.message);
+ // }
+ // });
//提交表单前,先对用户名和密码进行rsa加密
//对用户名和密码进行rsa解密后在控件中显示明文
- top.Ext.getCmp("userName").setValue(encryptText(top.Ext.getCmp("userName").getValue(),DEVICEINTERFACE_ENCRPT_DEPTH));
- top.Ext.getCmp("password").setValue(encryptText(top.Ext.getCmp("password").getValue(),DEVICEINTERFACE_ENCRPT_DEPTH));
+ top.Ext.getCmp("userName").setValue(encryptText(top.Ext.getCmp("userName").getValue(), DEVICEINTERFACE_ENCRPT_DEPTH));
+ top.Ext.getCmp("password").setValue(encryptText(top.Ext.getCmp("password").getValue(), DEVICEINTERFACE_ENCRPT_DEPTH));
formObj.form.submit({
- url : WWWROOT + '/disinfectSystem/baseData/deviceInterfaceAction!saveDeviceInterface.do',
- method : 'POST',
- waitMsg : '正在保存数据,请稍候',
- waitTitle : '提交表单',
- success : function(form, action){
+ url: WWWROOT + '/disinfectSystem/baseData/deviceInterfaceAction!saveDeviceInterface.do',
+ method: 'POST',
+ waitMsg: '正在保存数据,请稍候',
+ waitTitle: '提交表单',
+ success: function (form, action) {
deviceInterfaceWin.close();
showResult(action.result.message);
grid.dwrReload();
},
- failure : function(form, action){
- if(action.result == null){
- showResult("连接出错!",'error');
- }else{
- showResult(action.result.message,'error');
+ failure: function (form, action) {
+ if (action.result == null) {
+ showResult("连接出错!", 'error');
+ } else {
+ showResult(action.result.message, 'error');
}
top.Ext.getCmp('saveBtn').enable();
}