Index: ssts-web/src/main/webapp/disinfectsystem/foreigntousseapplication/foreignTousseInfoForm.js =================================================================== diff -u -r31037 -r31093 --- ssts-web/src/main/webapp/disinfectsystem/foreigntousseapplication/foreignTousseInfoForm.js (.../foreignTousseInfoForm.js) (revision 31037) +++ ssts-web/src/main/webapp/disinfectsystem/foreigntousseapplication/foreignTousseInfoForm.js (.../foreignTousseInfoForm.js) (revision 31093) @@ -95,13 +95,6 @@ return false; } }else{ - /* if(!isLeaf && (colIdx == 3 || colIdx == 4 || colIdx == 6 || colIdx == 7)){//父节点不能编辑 - return false; - }else if(isLeaf && (colIdx == 1 || colIdx == 5 || colIdx == 8|| colIdx == 9 || colIdx == 10)){//子节点不能编辑 - return false; - } */ - - if(!isLeaf && (colIdx == 3 || colIdx == 4 || colIdx == 7 || colIdx == 8)){//父节点不能编辑 return false; }else if(isLeaf && (colIdx == 1 || colIdx == 5 || colIdx == 6 || colIdx == 9|| colIdx == 10 || colIdx == 11)){//子节点不能编辑 @@ -1450,21 +1443,19 @@ ] }); - var tousseNameQueryDelay = 0; - var tousseNameForceSelection = false; - var supplerQueryDelay = 0; - var supplerForceSelection = false; + var tousseNameQueryDelay1 = 0; + var tousseNameForceSelection1 = false; + var supplerQueryDelay1 = 0; + var supplerForceSelection1 = false; - if(sstsConfig.onlySelectExistedForeignTousse){ - tousseNameQueryDelay = 1300; - tousseNameForceSelection = true; - supplerQueryDelay = 1300; - supplerForceSelection = true; - - if(sstsConfig.allowEditForeignTousseTousseName){ - tousseNameQueryDelay = 0; - tousseNameForceSelection = false; - } + 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 = [ @@ -1488,8 +1479,8 @@ hideTrigger : false, typeAhead : false, allowBlank : true, - queryDelay : tousseNameQueryDelay, - forceSelection : tousseNameForceSelection, + queryDelay : tousseNameQueryDelay1, + forceSelection : tousseNameForceSelection1, listeners : { select:function(combo, records, index){ var suppler1Comp = top.Ext4.getCmp("suppler1"); @@ -1538,8 +1529,8 @@ matchFieldWidth: false, store : foldersCompanyJsonStore, pageSize : 12, - queryDelay: supplerQueryDelay, - forceSelection : supplerForceSelection, + queryDelay: supplerQueryDelay1, + forceSelection : supplerForceSelection1, lazyInit : true, triggerAction : 'all', hideTrigger : false, @@ -1944,8 +1935,15 @@ } }] } - - //foreignTousseTreeGrid的列 + + var supplerQueryDelay1 = 1300; + var supplerForceSelection1 = true; + + if(!sstsConfig.allowEditForeignTousseTousseName && !sstsConfig.onlySelectExistedForeignTousse){ + supplerQueryDelay1 = 0; + supplerForceSelection1 = false; + } + var foreignTousseColumns = [{ dataIndex : 'tousseDefinitionId', hidden : true @@ -1965,7 +1963,8 @@ queryParam : 'supplierName', minChars : 0, matchFieldWidth: false, - forceSelection : true, + queryDelay:supplerQueryDelay1, + forceSelection : supplerForceSelection1, lazyInit : true, triggerAction : 'all', hideTrigger : false,