Browse Source

调整冻结行

ellisran 3 weeks atrás
parent
commit
a184fc16d5
1 changed files with 10 additions and 6 deletions
  1. 10 6
      app/public/js/change_revise.js

+ 10 - 6
app/public/js/change_revise.js

@@ -205,6 +205,7 @@ $(document).ready(() => {
     if (thousandth) sjsSettingObj.setTpThousandthFormat(billsSpreadSetting);
     sjsSettingObj.setNodeTypeCol(billsSpreadSetting.cols, [{field: 'node_type'}]);
     SpreadJsObj.initSpreadSettingEvents(billsSpreadSetting, billsCol);
+    if (billsSpreadSetting.frozenColCount) billsSpreadSetting.frozenColCount = billsSpreadSetting.frozenColCount + 1;
     SpreadJsObj.initSheet(billsSheet, billsSpreadSetting);
     const posSpread = SpreadJsObj.createNewSpread($('#pos-spread')[0]);
     const posSheet = posSpread.getActiveSheet();
@@ -935,14 +936,16 @@ $(document).ready(() => {
                         if (cInfo.camount === 0 && cInfo.camount_expr === '') {
                             if (changeOrder && _.findIndex(oldChangeList, {id: cInfo.id}) !== -1) {
                                 toastr.warning('插入台账清单功能下无法从这移除已勾选清单');
+                                SpreadJsObj.reLoadRowData(info.sheet, info.row);
                                 return
                             }
                             if (_.find(changeUsedData, {cbid: cInfo.id})) {
                                 toastr.warning('清单计量单元已被使用,无法取消勾选');
+                                SpreadJsObj.reLoadRowData(info.sheet, info.row);
                                 return
                             } else if (checkIsSettle(cInfo)) {
                                 toastr.warning('清单计量单元已结算,无法取消勾选');
-                                info.sheet.setValue(info.row, info.col, 1);
+                                SpreadJsObj.reLoadRowData(info.sheet, info.row);
                                 return
                             }
                             postData('/tender/' + window.location.pathname.split('/')[2] + '/change/' + window.location.pathname.split('/')[4] + '/information/save', {type: 'del-change-list', ids: [cInfo.id] }, function (result) {
@@ -1561,7 +1564,6 @@ $(document).ready(() => {
                         return
                     } else if (checkIsSettle(cInfo)) {
                         toastr.warning('清单计量单元已结算,无法取消勾选');
-                        info.sheet.setValue(info.row, info.col, 1);
                         return
                     }
                 }
@@ -2850,14 +2852,16 @@ $(document).ready(() => {
                     if (cInfo.camount === 0 && cInfo.camount_expr === '') {
                         if (changeOrder && _.findIndex(oldChangeList, {id: cInfo.id}) !== -1) {
                             toastr.warning('插入台账清单功能下无法从这移除已勾选清单');
+                            SpreadJsObj.reLoadRowData(info.sheet, info.row);
                             return
                         }
                         if (_.find(changeUsedData, {cbid: cInfo.id})) {
                             toastr.warning('清单计量单元已被使用,无法取消勾选');
+                            SpreadJsObj.reLoadRowData(info.sheet, info.row);
                             return
                         } else if (checkIsSettle(cInfo)) {
                             toastr.warning('清单计量单元已结算,无法取消勾选');
-                            info.sheet.setValue(info.row, info.col, 1);
+                            SpreadJsObj.reLoadRowData(info.sheet, info.row);
                             return
                         }
                         postData('/tender/' + window.location.pathname.split('/')[2] + '/change/' + window.location.pathname.split('/')[4] + '/information/save', {type: 'del-change-list', ids: [cInfo.id] }, function (result) {
@@ -3098,16 +3102,16 @@ $(document).ready(() => {
                 for (const cInfo of camountDatas) {
                     if (changeOrder && _.findIndex(oldChangeList, {id: cInfo.id}) !== -1) {
                         toastr.warning('插入台账清单功能下无法从这移除已勾选清单');
-                        info.sheet.setValue(info.row, info.col, 1);
+                        posSpreadObj.loadCurPosData();
                         return
                     }
                     if (_.find(changeUsedData, {cbid: cInfo.id})) {
                         toastr.warning('该计量单元已被使用,无法取消变更');
-                        info.sheet.setValue(info.row, info.col, 1);
+                        posSpreadObj.loadCurPosData();
                         return
                     } else if (checkIsSettle(cInfo)) {
                         toastr.warning('该计量单元已结算,无法取消变更');
-                        info.sheet.setValue(info.row, info.col, 1);
+                        posSpreadObj.loadCurPosData();
                         return
                     }
                 }