Browse Source

修复表列问题

ellisran 4 months ago
parent
commit
bbeabc164e
1 changed files with 1 additions and 1 deletions
  1. 1 1
      app/public/js/change_revise.js

+ 1 - 1
app/public/js/change_revise.js

@@ -68,7 +68,7 @@ $(document).ready(() => {
         }
     }
     posSpreadSetting.cols.unshift({ title: '变更清单', colSpan: '1', rowSpan: '2', field: 'is_change', hAlign: 1, width: 60, cellType: 'checkbox', readOnly: 'readOnly.isChangeList', getValue: 'getValue.isChange' });
-    const posIndex = _.findIndex(posSpreadSetting.cols, { field: 'drawing_code' });
+    const posIndex = _.findIndex(posSpreadSetting.cols, { field: 'drawing_code' }) !== -1 ? _.findIndex(posSpreadSetting.cols, { field: 'drawing_code' }) : posSpreadSetting.cols.length;
     posSpreadSetting.cols.splice(posIndex, 0, { title: '计价', colSpan: '1', rowSpan: '2', field: 'is_valuation', hAlign: 1, width: 60, cellType: 'checkbox', readOnly: 'readOnly.isValuation', getValue: 'getValue.isValuation' });
     posSpreadSetting.cols.splice(posIndex + 1, 0, {title: '申请变更增(+)减(-)|数量', colSpan: '1|1', rowSpan: '|1', field: 'camount', hAlign: 2, width: 120, readOnly: 'readOnly.isSettle', getValue: 'getValue.camount'},);
     if (!posSpreadSetting.readOnly) {