Browse Source

变更修改“混凝土、砂浆、配合比、机械台班”的定额价

zhongzewei 7 years ago
parent
commit
a308e99b51
1 changed files with 6 additions and 3 deletions
  1. 6 3
      web/maintain/std_glj_lib/js/glj.js

+ 6 - 3
web/maintain/std_glj_lib/js/glj.js

@@ -386,7 +386,8 @@ let repositoryGljObj = {
         me.orgCode = me.workBook.getSheet(0).getValue(args.row, 0);
         if(args.row < me.currentCache.length){
             me.currentGlj = me.currentCache[args.row];
-            if(args.col === 0 || (args.col === 4 && me.allowComponent.indexOf(me.currentGlj.gljType) !== -1)
+            if(args.col === 0 || (args.col === 4 && me.allowComponent.indexOf(me.currentGlj.gljType) !== -1
+                && me.currentGlj.component.length > 0)
                 || (args.col === 6 && me.currentGlj.gljType !== 1 && me.currentGlj.gljType !== 303)){
                 args.cancel = true;
             }
@@ -864,7 +865,8 @@ let repositoryGljObj = {
                     resumeArr.push(info.cellRange.row + i);
                 }
             }
-            if(info.cellRange.colCount === me.setting.header.length){
+            //if(info.cellRange.colCount === me.setting.header.length){
+            if(info.cellRange.colCount >= me.setting.header.length - 1 && info.cellRange.colCount <= me.setting.header.length){
                 for(let i = updateCount ; i < items.length; i++){
                     if(me.isValidObj(items[i])){
                         items[i].component = [];
@@ -886,7 +888,8 @@ let repositoryGljObj = {
             }
         }
         else{
-            if(info.cellRange.colCount === me.setting.header.length && info.cellRange.col + info.cellRange.colCount - 1 >= 5){
+            //if(info.cellRange.colCount === me.setting.header.length && info.cellRange.col + info.cellRange.colCount - 1 >= 5){
+            if(info.cellRange.colCount >= me.setting.header.length - 1 && info.cellRange.colCount <= me.setting.header.length && info.cellRange.col + info.cellRange.colCount - 1 >= 5){
                 for(let i = 0; i < items.length; i++){
                     if(me.isValidObj(items[i])){
                         items[i].component = [];