|
@@ -44,7 +44,7 @@ let feeItemObj = {
|
|
|
options: {
|
|
|
tabStripVisible: false,
|
|
|
allowCopyPasteExcelStyle : false,
|
|
|
- allowExtendPasteRange: false,
|
|
|
+ allowExtendPasteRange: true,
|
|
|
allowUserDragDrop : false,
|
|
|
allowUserDragFill: false,
|
|
|
scrollbarMaxAlign : true
|
|
@@ -108,6 +108,7 @@ let feeItemObj = {
|
|
|
sheet.bind(Events.EnterCell, me.onEnterCell);
|
|
|
sheet.bind(Events.EditStarting, me.onEditStarting);
|
|
|
sheet.bind(Events.EditEnded, me.onEditEnded);
|
|
|
+ sheet.bind(Events.ClipboardPasting, me.onClipboardPasting);
|
|
|
sheet.bind(Events.ClipboardPasted, me.onClipboardPasted);
|
|
|
me.feeItemDelOpr();
|
|
|
},
|
|
@@ -191,6 +192,12 @@ let feeItemObj = {
|
|
|
//ajax
|
|
|
me.updateFeeItem([updateObj]);
|
|
|
},
|
|
|
+ onClipboardPasting: function (sender, info) {
|
|
|
+ let me = this;
|
|
|
+ if(info.cellRange.col + info.cellRange.colCount > me.setting.header.length){
|
|
|
+ info.cancel = true;
|
|
|
+ }
|
|
|
+ },
|
|
|
onClipboardPasted: function (sender, info) {
|
|
|
let me = feeItemObj, se = sectionObj;
|
|
|
let postData = [];
|
|
@@ -255,7 +262,7 @@ let feeItemObj = {
|
|
|
}
|
|
|
//update currentFeeItem
|
|
|
me.currentFeeItem = me.getCurrentData(me.sheet, me.cache);
|
|
|
- se.cache = me.currentFeeItem.section;
|
|
|
+ se.cache = me.isDef(me.currentFeeItem) ? me.currentFeeItem.section : [];
|
|
|
if(fiPostData.length > 0){
|
|
|
me.updateFeeItem(fiPostData, function () {
|
|
|
me.sheet.setRowCount(me.cache.length + 10);
|
|
@@ -325,7 +332,7 @@ let sectionObj = {
|
|
|
options: {
|
|
|
tabStripVisible: false,
|
|
|
allowCopyPasteExcelStyle : false,
|
|
|
- allowExtendPasteRange: false,
|
|
|
+ allowExtendPasteRange: true,
|
|
|
allowUserDragDrop : false,
|
|
|
allowUserDragFill: false,
|
|
|
scrollbarMaxAlign : true
|
|
@@ -475,7 +482,7 @@ let sectionObj = {
|
|
|
},
|
|
|
onClipboardPasting: function (sender, info) {
|
|
|
let me = sectionObj, fi = feeItemObj;
|
|
|
- if(!me.isDef(fi.currentFeeItem)){
|
|
|
+ if(info.cellRange.col + info.cellRange.colCount > me.setting.header.length || !me.isDef(fi.currentFeeItem)){
|
|
|
info.cancel = true;
|
|
|
}
|
|
|
},
|
|
@@ -537,7 +544,7 @@ let sectionObj = {
|
|
|
}
|
|
|
//update currentSection
|
|
|
me.currentSection = fi.getCurrentData(me.sheet, me.cache);
|
|
|
- fr.cache = me.currentSection.feeRule;
|
|
|
+ fr.cache = me.isDef(me.currentSection) ? me.currentSection.feeRule : [];
|
|
|
if(sePostData.length > 0){
|
|
|
me.updateSection(sePostData, function () {
|
|
|
me.sheet.setRowCount(me.cache.length + 5);
|
|
@@ -585,7 +592,7 @@ let feeRuleObj = {
|
|
|
options: {
|
|
|
tabStripVisible: false,
|
|
|
allowCopyPasteExcelStyle : false,
|
|
|
- allowExtendPasteRange: false,
|
|
|
+ allowExtendPasteRange: true,
|
|
|
allowUserDragDrop : false,
|
|
|
allowUserDragFill: false,
|
|
|
scrollbarMaxAlign : true
|
|
@@ -921,6 +928,9 @@ let feeRuleObj = {
|
|
|
},
|
|
|
onClipboardPasting: function (sender, info) {
|
|
|
let me = feeRuleObj, se = sectionObj;
|
|
|
+ if(info.cellRange.col + info.cellRange.colCount > me.setting.header.length){
|
|
|
+ info.cancel = true;
|
|
|
+ }
|
|
|
if(!me.isDef(se.currentSection)){
|
|
|
info.cancel = true;
|
|
|
}
|
|
@@ -1057,7 +1067,7 @@ let batchSectionObj = {
|
|
|
options: {
|
|
|
tabStripVisible: false,
|
|
|
allowCopyPasteExcelStyle : false,
|
|
|
- allowExtendPasteRange: false,
|
|
|
+ allowExtendPasteRange: true,
|
|
|
allowUserDragDrop : false,
|
|
|
allowUserDragFill: false,
|
|
|
scrollbarMaxAlign : true
|