Index: ssts-web/src/main/webapp/disinfectsystem/foreigntousseapplication/foreignTousseInfoForm.js =================================================================== diff -u -r35454 -r35494 --- ssts-web/src/main/webapp/disinfectsystem/foreigntousseapplication/foreignTousseInfoForm.js (.../foreignTousseInfoForm.js) (revision 35454) +++ ssts-web/src/main/webapp/disinfectsystem/foreigntousseapplication/foreignTousseInfoForm.js (.../foreignTousseInfoForm.js) (revision 35494) @@ -1396,7 +1396,10 @@ if(suppler1Comp != null){ store.proxy.extraParams.supplierName = suppler1Comp.getValue(); } - } + }, + load:function(){ + top.Ext4.getCmp("hiddenForeignTousseName1").setValue(''); + } } }); @@ -1528,7 +1531,12 @@ {name : 'name',mapping : 'name'}, {name : 'contactName',mapping : 'contactName'}, {name : 'phoneNumber',mapping : 'phoneNumber'} - ] + ], + listeners : { + load:function(){ + top.Ext4.getCmp("hiddenSuppler1").setValue(''); + } + } }); //材料一次性物品store @@ -1563,17 +1571,16 @@ if(sstsConfig.onlySelectExistedForeignTousse && sstsConfig.allowEditForeignTousseTousseName){ supplerQueryDelay1 = 1300; supplerForceSelection1 = true; - }else if(!sstsConfig.allowEditForeignTousseTousseName && sstsConfig.onlySelectExistedForeignTousse){ - tousseNameQueryDelay1 = 1300; - tousseNameForceSelection1 = true; - supplerQueryDelay1 = 1300; - supplerForceSelection1 = true; } var forigntousseTbar = [ { text: "器械包名称:" },{ + xtype:'hidden', + id:'hiddenForeignTousseName1', + name:'hiddenForeignTousseName1' + },{ xtype : 'combo', id : 'foreignTousseName1', name : 'foreignTousseName1', @@ -1596,9 +1603,7 @@ listeners : { select:function(combo, records, index){ var suppler1Comp = top.Ext4.getCmp("suppler1"); - suppler1Comp.forceSelection = false; suppler1Comp.setValue(records[0].get("suppler")); - suppler1Comp.forceSelection = true; supplierContacJsonStore.load(); returnContactJsonStore.load(); //给配置项expandFieldsOfForeignTousseApplicationForm新增字段赋值 @@ -1624,11 +1629,17 @@ } } } + top.Ext4.getCmp("hiddenForeignTousseName1").setValue(records[0].get("name")) + top.Ext4.getCmp("hiddenSuppler1").setValue(records[0].get("suppler")) } } },{ text: "供应商:" },{ + xtype:'hidden', + id:'hiddenSuppler1', + name:'hiddenSuppler1' + },{ xtype : 'combo', id : 'suppler1', name : 'suppler1', @@ -1657,6 +1668,9 @@ foreignTousseJsonStore.reload(); supplierContacJsonStore.load(); returnContactJsonStore.load(); + + top.Ext4.getCmp("hiddenSuppler1").setValue(records[0].get("name")) + top.Ext4.getCmp("hiddenForeignTousseName1").setValue('') } } },{ @@ -1707,7 +1721,17 @@ top.Ext4.getCmp('suppler1').focus(); return false; } - + + var hiddenForeignTousseName1 = top.Ext4.getCmp('hiddenForeignTousseName1').getValue(); + var hiddenSuppler1 = top.Ext4.getCmp('hiddenSuppler1').getValue(); + + if(!sstsConfig.allowEditForeignTousseTousseName && sstsConfig.onlySelectExistedForeignTousse){ + if(Ext4.isEmpty(hiddenForeignTousseName1) || Ext4.isEmpty(hiddenSuppler1)){ + showResult('温馨提示,手动填写内容不支持添加,请选择相应选项后添加。'); + return false; + } + } + //是否允许申请多套外来器械包 if(!sstsConfig.allowApplyMultipleForeignTousse && foreignTousseStore.getRootNode().childNodes.length > 0){ showResult("只能申请一个外来器械包!"); @@ -2156,12 +2180,12 @@ }] } - var supplerQueryDelay1 = 1300; - var supplerForceSelection1 = true; + var supplerQueryDelay1 = 0; + var supplerForceSelection1 = false; - if(!sstsConfig.allowEditForeignTousseTousseName && !sstsConfig.onlySelectExistedForeignTousse){ - supplerQueryDelay1 = 0; - supplerForceSelection1 = false; + if(sstsConfig.onlySelectExistedForeignTousse && sstsConfig.allowEditForeignTousseTousseName){ + supplerQueryDelay1 = 1300; + supplerForceSelection1 = true; } var foreignTousseColumns = [{