Преглед на файлове

删除人材机后添加人材机过程中变换行,数据丢失问题

zhongzewei преди 6 години
родител
ревизия
f2e86b724c
променени са 1 файла, в които са добавени 4 реда и са изтрити 4 реда
  1. 4 4
      web/maintain/std_glj_lib/js/glj.js

+ 4 - 4
web/maintain/std_glj_lib/js/glj.js

@@ -623,20 +623,20 @@ let repositoryGljObj = {
                 focusToCol = getFocusToCol(me);
                 if(focusToCol !== -1) {
                     $('#gljAlertBtn').click();
+                    $('#aleConfBtn').unbind('click');
                     $('#aleConfBtn').bind('click', function () {
                         me.workBook.getSheet(0).setActiveCell(me.editingRowIdx, focusToCol);
                         me.workBook.focus(true);
-                        $('#aleConfBtn').unbind('click');
                     });
                     $('#gljAleClose').click(function () {
                         me.workBook.getSheet(0).setActiveCell(me.editingRowIdx, focusToCol);
                         me.workBook.focus(true);
                     });
-                    $('#aleCanceBtn').click(function () {
+                    $('#aleCanceBtn').unbind('click');
+                    $('#aleCanceBtn').bind('click', function () {
                         me.addGljObj = null;
                         args.sheet.suspendEvent();
                         args.sheet.suspendPaint();
-                        console.log('enter');
                         for(let col=0; col<me.setting.header.length; col++){
                             if(col === 0){
                                 me.workBook.getSheet(0).getCell(me.editingRowIdx, 0).formatter("@");
@@ -977,9 +977,9 @@ let repositoryGljObj = {
                     $.bootstrapLoading.end();
                     $('#gljAlert').find('.modal-body h5').text('查询引用错误,不可删除。');
                     $('#gljAlert').modal('show');
+                    $('#aleConfBtn').unbind('click');
                     $('#aleConfBtn').bind('click', function () {
                         $('#gljAlert').modal('hide');
-                        $('#aleConfBtn').unbind('click');
                         me.workBook.focus(true);
                     });
                 });