瀏覽代碼

fix: 清单规则编辑器,插入空行复制已有单元格的内容,粘贴到空行位置,再次编辑修改,刷新后新增的数据不应变化 (#GLY-5260)

vian 2 周之前
父節點
當前提交
daa0d097ed
共有 1 個文件被更改,包括 4 次插入4 次删除
  1. 4 4
      web/maintain/bills_lib/html/qingdan.html

+ 4 - 4
web/maintain/bills_lib/html/qingdan.html

@@ -1077,7 +1077,6 @@
 
     function bindPasteBills(controller, sheet, setting){
         sheet.bind(GC.Spread.Sheets.Events.ClipboardPasting, function (sender, args) {
-            debugger;
             sheetBillsDatas = tools.getsheetDatas(sheet, 'bills', controller);
             let maxCol = args.cellRange.col + args.cellRange.colCount - 1;
             let maxRow = args.cellRange.row + args.cellRange.rowCount - 1;
@@ -1149,6 +1148,10 @@
             let curData;
             info.changedCells.forEach(({ row, col }) => {
                 const node = controller.tree.items[row];
+                // 拖动填充的时候tag也会被覆盖,重新设置
+                if (col === 0 && node) {
+                    sheet.setTag(row, col, node.data.ID);
+                }
                 if (curRow !== row) {
                     curData = { ID: node.data.ID };
                     postData.push(curData);
@@ -1211,7 +1214,6 @@
         });
         sheet.bind(GC.Spread.Sheets.Events.ClipboardPasted, function(sender, args){
             if(controller.tree.selected){
-                debugger;
                 let orgRow = args.cellRange.row, orgCol = args.cellRange.col, rowCount = args.cellRange.rowCount, colCount = args.cellRange.colCount;
                 let maxRow = orgRow + rowCount - 1, maxCol = orgCol + colCount -1;
                 let pasteArr = [];
@@ -1276,7 +1278,6 @@
     function bindPasteDesignRel(sheet, controller, totalDesigns, setting){
         sheet.bind(GC.Spread.Sheets.Events.ClipboardPasting, function (sender, args) {
             let maxCol = args.cellRange.col + args.cellRange.colCount - 1;
-            debugger;
             sheetDesignDatas = tools.getsheetDatas(sheet, 'designs');
             //复制的列数超过正确的列数,不可复制
             if(maxCol >= designsSetting.cols.length){
@@ -1293,7 +1294,6 @@
                 const codeCol = 0;
                 const nameCol = 1;
                 const unitCol = 2;
-                debugger;
                 for(let i=orgRow; i<=maxRow; i++){
                     //粘贴编号列,转换成粘贴内容处理
                     let code = sheet.getCell(i, codeCol).value();