Просмотр исходного кода

1. 中间计量,草图问题
2. 添加标准清单、项目节、签约清单,查找定位后,焦点定位至台账

MaiXinRong 5 лет назад
Родитель
Сommit
344fe403ed

+ 3 - 0
app/public/js/ledger.js

@@ -1668,6 +1668,7 @@ $(document).ready(function() {
                         }
                     }
                     treeOperationObj.refreshOperationValid(mainSheet);
+                    ledgerSpread.focus();
                     posOperationObj.loadCurPosData();
                 });
             });
@@ -1734,6 +1735,8 @@ $(document).ready(function() {
                     const sel = mainSheet.getSelections()[0];
                     mainSheet.setSelection(refreshData.create[0].index, sel.col, sel.rowCount, sel.colCount);
                     treeOperationObj.refreshOperationValid(mainSheet);
+                    ledgerSpread.focus();
+                    posOperationObj.loadCurPosData();
                 });
             });
             }

+ 3 - 0
app/public/js/ledger_search.js

@@ -55,6 +55,7 @@
                     const pos = resultArr[0];
                     if (pos.index !== curRow) {
                         sheet.setSelection(pos.index, sel ? sel.col : 0, 1, 1);
+                        sheet.getParent().focus();
                         sheet.showRow(pos.index, spreadNS.VerticalPosition.center);
                     }
                 }
@@ -69,6 +70,7 @@
                     if (!next) next = resultArr[0];
                     if (next.index !== curRow) {
                         sheet.setSelection(next.index, sel ? sel.col : 0, 1, 1);
+                        sheet.getParent().focus();
                         sheet.showRow(next.index, spreadNS.VerticalPosition.center);
                     }
                 }
@@ -83,6 +85,7 @@
                     if (!next) next = resultArr[resultArr.length - 1];
                     if (next.index !== curRow) {
                         sheet.setSelection(next.index, sel ? sel.col : 0, 1, 1);
+                        sheet.getParent().focus();
                         sheet.showRow(next.index, spreadNS.VerticalPosition.center);
                     }
                 }

+ 5 - 1
app/public/js/revise.js

@@ -1065,6 +1065,7 @@ $(document).ready(() => {
                             }
                         }
                         billsTreeSpreadObj.refreshOperationValid(mainSheet);
+                        billsSpread.focus();
                         posSpreadObj.loadCurPosData();
                     });
                 });
@@ -1135,6 +1136,8 @@ $(document).ready(() => {
                             mainSheet.setSelection(mainTree.nodes.indexOf(refreshData.create[0]), sel.col, sel.rowCount, sel.colCount);
                         }
                         billsTreeSpreadObj.refreshOperationValid(mainSheet);
+                        billsSpread.focus();
+                        posSpreadObj.loadCurPosData();
                     });
                 });
             }
@@ -1233,11 +1236,12 @@ $(document).ready(() => {
                     qdSheet.setRowCount(count);
                     qdSheet.getCell(sel.row + 1, 0, GC.Spread.Sheets.SheetArea.rowHeader).text('节点' + count);
 
-                    const colCount = posSheet.getColumnCount() + 1
+                    const colCount = posSheet.getColumnCount() + 1;
                     posSheet.setColumnCount(colCount);
                     posSheet.getCell(0, colCount - 1, GC.Spread.Sheets.SheetArea.colHeader).text('数量' + count);
                 }
                 qdSheet.setSelection(sel.row + 1, sel.col, 1, 1);
+                qdSheet.getParent().focus();
             });
 
             this.obj.bind('shown.bs.modal', function () {

+ 1 - 0
app/public/js/spreadjs_rela/spreadjs_zh.js

@@ -713,6 +713,7 @@ const SpreadJsObj = {
         const index = tree.nodes.indexOf(node);
         const sels = sheet.getSelections();
         sheet.setSelection(index, sels[0].col, 1, 1);
+        sheet.getParent().focus();
         sheet.showRow(index, spreadNS.VerticalPosition.center);
     },
     saveTopAndSelect: function (sheet, cacheKey) {

+ 4 - 2
app/public/js/stage.js

@@ -2365,13 +2365,15 @@ $(document).ready(() => {
                     updateData.img = canvas.toDataURL('image/jpeg');
                     updateData.imgInfo = itemInfo;
                     postData(window.location.pathname + '/detail/merge-img', updateData, function (result) {
-                        _.assign(data, result);
+                        data.calc_img = result.calc_img;
+                        data.calc_img_org = result.calc_img_org;
                         self.reLoadDetailData();
                         $('#edit-img').modal('hide');
                     });
                 } else if (data.calc_img) {
                     postData(window.location.pathname + '/detail/merge-img', {updateType: 'clear', lid: data.lid, pid: data.pid, uuid: data.uuid}, function (result) {
-                        _.assign(data, result);
+                        data.calc_img = result.calc_img;
+                        data.calc_img_org = result.calc_img_org;
                         self.reLoadDetailData();
                         $('#edit-img').modal('hide');
                     });

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

@@ -254,7 +254,7 @@ const stageIm = (function () {
         });
         if (cd) {
             _.assignInWith(im, cd, function (oV, sV, key) {
-                return imFields.indexOf(key) > -1 && sV !== undefined && sV !== null ? sV : oV;
+                return (imFields.indexOf(key) > -1 && sV !== undefined && sV !== null) ? sV : oV;
             });
         }
     }