|
@@ -123,7 +123,7 @@ let gljComponentOprObj = {
|
|
|
updateArr.push(that.currentGlj);
|
|
|
me.updateComponent(updateArr);
|
|
|
if(updateBasePrc.length > 0){
|
|
|
- that.updateRationBasePrcRq(updateBasePrc);
|
|
|
+ that.updateRationBasePrcRq(updateBasePrc, me.workBook);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -205,7 +205,7 @@ let gljComponentOprObj = {
|
|
|
updateArr.push(that.currentGlj);
|
|
|
me.updateComponent(updateArr);
|
|
|
if(updateBasePrcArr.length > 0 && that.rationLibs.length > 0){
|
|
|
- that.updateRationBasePrcRq(updateBasePrcArr);
|
|
|
+ that.updateRationBasePrcRq(updateBasePrcArr, me.workBook);
|
|
|
}
|
|
|
}},
|
|
|
"batchClear": {name: '批量删除消耗量为0的组成物', disabled: insertDis, icon: 'fa-remove', callback: function (key, opt) {
|
|
@@ -223,6 +223,9 @@ let gljComponentOprObj = {
|
|
|
},
|
|
|
onCellEditStart: function(sender, args) {
|
|
|
let me = gljComponentOprObj, that = repositoryGljObj;
|
|
|
+ if(me.isPending){
|
|
|
+ args.cancel = true;
|
|
|
+ }
|
|
|
let rObj = me.getRowData(args.sheet, args.row, me.setting);
|
|
|
me.currentEditingComponent = rObj;
|
|
|
let thatRow = that.workBook.getSheet(0).getSelections()[0].row;
|
|
@@ -239,7 +242,6 @@ let gljComponentOprObj = {
|
|
|
}
|
|
|
},
|
|
|
onCellEditEnd: function (sender, args) {
|
|
|
- console.log('enterED');
|
|
|
let me = gljComponentOprObj, that = repositoryGljObj, updateBasePrc = [];
|
|
|
let gljList = that.gljList, updateArr = [];
|
|
|
//if(args.editingText !== me.currentEditingComponent.code){
|
|
@@ -362,7 +364,10 @@ let gljComponentOprObj = {
|
|
|
if(updateArr.length > 0){
|
|
|
me.updateComponent(updateArr);
|
|
|
if(updateBasePrc.length > 0){
|
|
|
- that.updateRationBasePrcRq(updateBasePrc);
|
|
|
+ me.isPending = true;
|
|
|
+ that.updateRationBasePrcRq(updateBasePrc, me.workBook, function () {
|
|
|
+ me.isPending = false;
|
|
|
+ });
|
|
|
}
|
|
|
}
|
|
|
let focusInter = setInterval(function () {
|
|
@@ -374,11 +379,14 @@ let gljComponentOprObj = {
|
|
|
},
|
|
|
onClipboardPasting: function (sender, info) {
|
|
|
let me = gljComponentOprObj;
|
|
|
+ if(me.isPending){
|
|
|
+ info.cancel = true
|
|
|
+ }
|
|
|
let that = repositoryGljObj;
|
|
|
let maxCol = info.cellRange.col + info.cellRange.colCount - 1;
|
|
|
//复制的列数超过正确的列数,不可复制
|
|
|
if(info.cellRange.col !== 0 && info.cellRange.col !== 4 || info.cellRange.colCount > 1 || (that.currentGlj.gljType === 4 && that.isComponent(that.currentGlj.ID, that.gljList))){
|
|
|
- args.cancel = true;
|
|
|
+ info.cancel = true;
|
|
|
}
|
|
|
},
|
|
|
onClipboardPasted: function (sender, info) {
|
|
@@ -496,7 +504,10 @@ let gljComponentOprObj = {
|
|
|
if(updateArr.length > 0){
|
|
|
me.updateComponent(updateArr);
|
|
|
if(updateBasePrc.length > 0){
|
|
|
- that.updateRationBasePrcRq(updateBasePrc);
|
|
|
+ me.isPending = true;
|
|
|
+ that.updateRationBasePrcRq(updateBasePrc, me.workBook, function () {
|
|
|
+ me.isPending = false;
|
|
|
+ });
|
|
|
}
|
|
|
}
|
|
|
else {
|