|
@@ -21,7 +21,6 @@ let pageOprObj = {
|
|
repositoryGljObj.getGljTree(stdGljLibId, function () {
|
|
repositoryGljObj.getGljTree(stdGljLibId, function () {
|
|
repositoryGljObj.getGljItems(me.stdGljLibId, me.userId, me.compilationId);
|
|
repositoryGljObj.getGljItems(me.stdGljLibId, me.userId, me.compilationId);
|
|
});
|
|
});
|
|
- sheetOpr.shieldAllCells(repositoryGljObj.workBook.getSheet(0), repositoryGljObj.setting);
|
|
|
|
});
|
|
});
|
|
}
|
|
}
|
|
};
|
|
};
|
|
@@ -85,10 +84,6 @@ let repositoryGljObj = {
|
|
}
|
|
}
|
|
});
|
|
});
|
|
distTypeTree.distTypesArr.forEach(function (distTypeObj) {
|
|
distTypeTree.distTypesArr.forEach(function (distTypeObj) {
|
|
- /* if(distTypeObj.children.length === 0 && distTypeObj.data.fullName !== '普通机械' &&distTypeObj.data.fullName !== '机械组成物'
|
|
|
|
- && distTypeObj.data.fullName !== '机上人工'){
|
|
|
|
- distTypeTree.comboDatas.push({text: distTypeObj.data.fullName, value: distTypeObj.data.ID});
|
|
|
|
- }*/
|
|
|
|
if(distTypeObj.data.fullName !== '材料' && distTypeObj.data.fullName !== '机械'){
|
|
if(distTypeObj.data.fullName !== '材料' && distTypeObj.data.fullName !== '机械'){
|
|
distTypeTree.comboDatas.push({text: distTypeObj.data.fullName, value: distTypeObj.data.ID});
|
|
distTypeTree.comboDatas.push({text: distTypeObj.data.fullName, value: distTypeObj.data.ID});
|
|
}
|
|
}
|
|
@@ -105,15 +100,11 @@ let repositoryGljObj = {
|
|
if(!result.error && callback){
|
|
if(!result.error && callback){
|
|
me.distTypeTree = me.getComboData(result.data);
|
|
me.distTypeTree = me.getComboData(result.data);
|
|
console.log(me.distTypeTree);
|
|
console.log(me.distTypeTree);
|
|
- let combo = new GC.Spread.Sheets.CellTypes.ComboBox();
|
|
|
|
- combo.items(me.distTypeTree.comboDatas).editorValueType(GC.Spread.Sheets.CellTypes.EditorValueType.text);
|
|
|
|
- me.workBook.getSheet(0).getCell(-1, 5, GC.Spread.Sheets.SheetArea.viewport).cellType(combo).value(me.distTypeTree.comboDatas[0].text);
|
|
|
|
callback();
|
|
callback();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
-
|
|
|
|
getGljTree: function(gljLibId, callback) {
|
|
getGljTree: function(gljLibId, callback) {
|
|
let me = this;
|
|
let me = this;
|
|
$.ajax({
|
|
$.ajax({
|
|
@@ -156,6 +147,7 @@ let repositoryGljObj = {
|
|
me.complementaryGljList = result.data.complementaryGljs;
|
|
me.complementaryGljList = result.data.complementaryGljs;
|
|
me.workBook.getSheet(0).setRowCount(me.stdGljList.length);
|
|
me.workBook.getSheet(0).setRowCount(me.stdGljList.length);
|
|
me.sortGlj(me.stdGljList);
|
|
me.sortGlj(me.stdGljList);
|
|
|
|
+ me.setProp('isStd', true, me.stdGljList);
|
|
me.sortGlj(me.complementaryGljList);
|
|
me.sortGlj(me.complementaryGljList);
|
|
let rootNode = me.treeObj.getNodes()[0];
|
|
let rootNode = me.treeObj.getNodes()[0];
|
|
if(rootNode && rootNode.isParent && rootNode.isFirstNode){
|
|
if(rootNode && rootNode.isParent && rootNode.isFirstNode){
|
|
@@ -184,6 +176,8 @@ let repositoryGljObj = {
|
|
}
|
|
}
|
|
sheetOpr.cleanData(me.workBook.getSheet(0), me.setting, -1);
|
|
sheetOpr.cleanData(me.workBook.getSheet(0), me.setting, -1);
|
|
sheetOpr.showData(me.workBook.getSheet(0), me.setting, cacheSection, me.distTypeTree);
|
|
sheetOpr.showData(me.workBook.getSheet(0), me.setting, cacheSection, me.distTypeTree);
|
|
|
|
+ sheetCommonObj.setStaticCombo(me.workBook.getActiveSheet(), 0, 5, cacheSection.length, me.distTypeTree.comboDatas, false, 'text');
|
|
|
|
+ sheetCommonObj.setDynamicCombo(me.workBook.getActiveSheet(), cacheSection.length, 5, me.workBook.getActiveSheet().getRowCount() - cacheSection.length, me.distTypeTree.comboDatas, false, 'text');
|
|
|
|
|
|
cacheSection = null;
|
|
cacheSection = null;
|
|
}
|
|
}
|
|
@@ -198,6 +192,7 @@ let repositoryGljObj = {
|
|
me.workBook.getSheet(0).bind(GC.Spread.Sheets.Events.EditEnded, me.onCellEditEnd);
|
|
me.workBook.getSheet(0).bind(GC.Spread.Sheets.Events.EditEnded, me.onCellEditEnd);
|
|
me.workBook.getSheet(0).bind(GC.Spread.Sheets.Events.EnterCell, me.onEnterCell);
|
|
me.workBook.getSheet(0).bind(GC.Spread.Sheets.Events.EnterCell, me.onEnterCell);
|
|
me.workBook.getSheet(0).bind(GC.Spread.Sheets.Events.SelectionChanged, me.onSelectionChanged);
|
|
me.workBook.getSheet(0).bind(GC.Spread.Sheets.Events.SelectionChanged, me.onSelectionChanged);
|
|
|
|
+ me.workBook.bind(GC.Spread.Sheets.Events.ButtonClicked, me.onButtonClicked);//复选框点击事件
|
|
},
|
|
},
|
|
getCurrentComponent: function (gljComponent) {
|
|
getCurrentComponent: function (gljComponent) {
|
|
let me = repositoryGljObj, rst = [];
|
|
let me = repositoryGljObj, rst = [];
|
|
@@ -205,6 +200,7 @@ let repositoryGljObj = {
|
|
let obj = {};
|
|
let obj = {};
|
|
for(let j = 0; j < me.complementaryGljList.length; j++){
|
|
for(let j = 0; j < me.complementaryGljList.length; j++){
|
|
if(gljComponent[i].ID == me.complementaryGljList[j].ID){
|
|
if(gljComponent[i].ID == me.complementaryGljList[j].ID){
|
|
|
|
+ obj.isStd = false;
|
|
obj.ID = me.complementaryGljList[j].ID;
|
|
obj.ID = me.complementaryGljList[j].ID;
|
|
obj.code = me.complementaryGljList[j].code;
|
|
obj.code = me.complementaryGljList[j].code;
|
|
obj.name = me.complementaryGljList[j].name;
|
|
obj.name = me.complementaryGljList[j].name;
|
|
@@ -216,6 +212,7 @@ let repositoryGljObj = {
|
|
}
|
|
}
|
|
for(let j = 0; j < me.stdGljList.length; j++){
|
|
for(let j = 0; j < me.stdGljList.length; j++){
|
|
if(gljComponent[i].ID == me.stdGljList[j].ID){
|
|
if(gljComponent[i].ID == me.stdGljList[j].ID){
|
|
|
|
+ obj.isStd = true;
|
|
obj.ID = me.stdGljList[j].ID;
|
|
obj.ID = me.stdGljList[j].ID;
|
|
obj.code = me.stdGljList[j].code;
|
|
obj.code = me.stdGljList[j].code;
|
|
obj.name = me.stdGljList[j].name;
|
|
obj.name = me.stdGljList[j].name;
|
|
@@ -288,11 +285,6 @@ let repositoryGljObj = {
|
|
//混凝土202、砂浆203、配合比204、机械3
|
|
//混凝土202、砂浆203、配合比204、机械3
|
|
if(typeof info.oldSelections || info.oldSelections.length === 0 && info.newSelections.length > 0 || info.oldSelections[0].row !== info.newSelections[0].row){
|
|
if(typeof info.oldSelections || info.oldSelections.length === 0 && info.newSelections.length > 0 || info.oldSelections[0].row !== info.newSelections[0].row){
|
|
let row = info.newSelections[0].row;
|
|
let row = info.newSelections[0].row;
|
|
- sheetOpr.lockCells(that.workBook.getSheet(0), that.setting);
|
|
|
|
- that.workBook.getSheet(0).getRange(-1, 0 , -1, 1, GC.Spread.Sheets.SheetArea.viewport).locked(true);
|
|
|
|
- that.workBook.getSheet(0).getRange(-1, 4 , -1, 1, GC.Spread.Sheets.SheetArea.viewport).locked(true);
|
|
|
|
- that.isLocked = true;
|
|
|
|
- //that.workBook.getSheet(0).options.isProtected = true;
|
|
|
|
sheetOpr.cleanSheet(that.workBook.getSheet(0), that.setting, -1);
|
|
sheetOpr.cleanSheet(that.workBook.getSheet(0), that.setting, -1);
|
|
me.workBook.focus(true);
|
|
me.workBook.focus(true);
|
|
me.currentComponent = [];
|
|
me.currentComponent = [];
|
|
@@ -301,9 +293,6 @@ let repositoryGljObj = {
|
|
//标记当前工料机
|
|
//标记当前工料机
|
|
me.currentGlj = me.currentCache[row];
|
|
me.currentGlj = me.currentCache[row];
|
|
if(me.allowComponent.indexOf(me.currentCache[row].gljType) !== -1){
|
|
if(me.allowComponent.indexOf(me.currentCache[row].gljType) !== -1){
|
|
- //that.workBook.getSheet(0).getRange(-1, 0 , -1, 1, GC.Spread.Sheets.SheetArea.viewport).locked(false);
|
|
|
|
- that.workBook.getSheet(0).getRange(-1, 4 , -1, 1, GC.Spread.Sheets.SheetArea.viewport).locked(false);
|
|
|
|
- that.isLocked = false;
|
|
|
|
//展示数据
|
|
//展示数据
|
|
if(me.currentGlj.component.length > 0){
|
|
if(me.currentGlj.component.length > 0){
|
|
me.currentComponent = me.getCurrentComponent(me.currentGlj.component);
|
|
me.currentComponent = me.getCurrentComponent(me.currentGlj.component);
|
|
@@ -320,6 +309,7 @@ let repositoryGljObj = {
|
|
},
|
|
},
|
|
onEnterCell: function (sender, args) {
|
|
onEnterCell: function (sender, args) {
|
|
let me = repositoryGljObj;
|
|
let me = repositoryGljObj;
|
|
|
|
+ args.sheet.repaint();
|
|
me.cellRowIdx = args.row;
|
|
me.cellRowIdx = args.row;
|
|
let isHasData = false;
|
|
let isHasData = false;
|
|
if(me.addGljObj){
|
|
if(me.addGljObj){
|
|
@@ -361,24 +351,13 @@ let repositoryGljObj = {
|
|
}
|
|
}
|
|
else {
|
|
else {
|
|
$('#gljAlertBtn').click();
|
|
$('#gljAlertBtn').click();
|
|
- //me.workBook.getSheet(0).options.isProtected = true;
|
|
|
|
- sheetOpr.lockAllCells(args.sheet);
|
|
|
|
$('#aleConfBtn').click(function () {
|
|
$('#aleConfBtn').click(function () {
|
|
- // me.workBook.getSheet(0).options.isProtected = false;
|
|
|
|
- sheetOpr.unLockAllCells(args.sheet);
|
|
|
|
- sheetOpr.reLockSomeCodes(args.sheet, 0, repositoryGljObj.currentCache.length);
|
|
|
|
me.workBook.getSheet(0).setActiveCell(me.editingRowIdx, focusToCol);
|
|
me.workBook.getSheet(0).setActiveCell(me.editingRowIdx, focusToCol);
|
|
});
|
|
});
|
|
$('#gljAleClose').click(function () {
|
|
$('#gljAleClose').click(function () {
|
|
- // me.workBook.getSheet(0).options.isProtected = false;
|
|
|
|
- sheetOpr.unLockAllCells(args.sheet);
|
|
|
|
- sheetOpr.reLockSomeCodes(args.sheet, 0, repositoryGljObj.currentCache.length);
|
|
|
|
me.workBook.getSheet(0).setActiveCell(me.editingRowIdx, focusToCol);
|
|
me.workBook.getSheet(0).setActiveCell(me.editingRowIdx, focusToCol);
|
|
});
|
|
});
|
|
$('#aleCanceBtn').click(function () {
|
|
$('#aleCanceBtn').click(function () {
|
|
- // me.workBook.getSheet(0).options.isProtected = false;
|
|
|
|
- sheetOpr.unLockAllCells(args.sheet);
|
|
|
|
- sheetOpr.reLockSomeCodes(args.sheet, 0, repositoryGljObj.currentCache.length);
|
|
|
|
me.addGljObj = null;
|
|
me.addGljObj = null;
|
|
me.workBook.getSheet(0).suspendPaint();
|
|
me.workBook.getSheet(0).suspendPaint();
|
|
me.workBook.getSheet(0).suspendEvent();
|
|
me.workBook.getSheet(0).suspendEvent();
|
|
@@ -396,21 +375,31 @@ let repositoryGljObj = {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ onButtonClicked: function (sender, args) {
|
|
|
|
+ let me = repositoryGljObj;
|
|
|
|
+ if(args.col === 6 && args.row < me.currentCache.length){
|
|
|
|
+ args.sheet.setValue(args.row, args.col, true);
|
|
|
|
+ }
|
|
|
|
+ },
|
|
onCellEditStart: function(sender, args) {
|
|
onCellEditStart: function(sender, args) {
|
|
let me = repositoryGljObj;
|
|
let me = repositoryGljObj;
|
|
let rObj = sheetOpr.combineRowData(me.workBook.getSheet(0), me.setting, args.row);
|
|
let rObj = sheetOpr.combineRowData(me.workBook.getSheet(0), me.setting, args.row);
|
|
me.currentEditingGlj = rObj;
|
|
me.currentEditingGlj = rObj;
|
|
me.orgCode = me.workBook.getSheet(0).getValue(args.row, 0);
|
|
me.orgCode = me.workBook.getSheet(0).getValue(args.row, 0);
|
|
- let cacheSection = me.complementaryGljList;
|
|
|
|
- if (cacheSection) {
|
|
|
|
- for (let j = 0; j < cacheSection.length; j++) {
|
|
|
|
- if (cacheSection[j][me.setting.header[0].dataCode] && cacheSection[j][me.setting.header[0].dataCode] == rObj[me.setting.header[0].dataCode]) {
|
|
|
|
- rObj["ID"] = cacheSection[j]["ID"];
|
|
|
|
- rObj.gljClass = cacheSection[j].gljClass;
|
|
|
|
- break;
|
|
|
|
- }
|
|
|
|
|
|
+ if(args.row < me.currentCache.length){
|
|
|
|
+ me.currentGlj = me.currentCache[args.row];
|
|
|
|
+ if(args.col === 0 || (args.col === 4 && me.allowComponent.indexOf(me.currentGlj.gljType) !== -1)
|
|
|
|
+ || args.col === 6){
|
|
|
|
+ args.cancel = true;
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ rObj.ID = me.currentGlj.ID;
|
|
|
|
+ rObj.gljClass = me.currentGlj.gljClass;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ else {
|
|
|
|
+ me.currentGlj = null;
|
|
|
|
+ }
|
|
},
|
|
},
|
|
onCellEditEnd: function(sender, args) {
|
|
onCellEditEnd: function(sender, args) {
|
|
let me = repositoryGljObj, that = gljComponentOprObj,
|
|
let me = repositoryGljObj, that = gljComponentOprObj,
|
|
@@ -450,7 +439,6 @@ let repositoryGljObj = {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
sheetOpr.cleanData(that.workBook.getSheet(0), that.setting, 5);
|
|
sheetOpr.cleanData(that.workBook.getSheet(0), that.setting, 5);
|
|
- that.isLocked = me.allowComponent.indexOf(rObj.gljType) !== -1 ? false : true;
|
|
|
|
}
|
|
}
|
|
else if(rObj.basePrice !== me.currentEditingGlj.basePrice){//修改了单价,可修改单价的必为可成为组成物的
|
|
else if(rObj.basePrice !== me.currentEditingGlj.basePrice){//修改了单价,可修改单价的必为可成为组成物的
|
|
//寻找所有引用了此组成物的工料机,并从组成物中删去此工料机,并重算单价
|
|
//寻找所有引用了此组成物的工料机,并从组成物中删去此工料机,并重算单价
|
|
@@ -533,7 +521,6 @@ let repositoryGljObj = {
|
|
}
|
|
}
|
|
if(updateArr.length >0 || addArr.length >0){
|
|
if(updateArr.length >0 || addArr.length >0){
|
|
me.currentEditingGlj = null;
|
|
me.currentEditingGlj = null;
|
|
- //me.workBook.getSheet(0).setValue(11, 5, "人工");
|
|
|
|
me.mixUpdateRequest(updateArr, addArr, []);
|
|
me.mixUpdateRequest(updateArr, addArr, []);
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -607,12 +594,9 @@ let repositoryGljObj = {
|
|
}
|
|
}
|
|
$('#alertText').text(text + "不可为空!");
|
|
$('#alertText').text(text + "不可为空!");
|
|
$('#codeAlertBtn').click();
|
|
$('#codeAlertBtn').click();
|
|
- sheet.options.isProtected = true;
|
|
|
|
$('#codAleConfBtn').click(function () {
|
|
$('#codAleConfBtn').click(function () {
|
|
- sheetOpr.lockSomeCodes(sheet, 0, cacheSection.length);
|
|
|
|
});
|
|
});
|
|
$('#codAleClose').click(function () {
|
|
$('#codAleClose').click(function () {
|
|
- sheetOpr.lockSomeCodes(sheet, 0, cacheSection.length);
|
|
|
|
});
|
|
});
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -702,11 +686,12 @@ let repositoryGljObj = {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- tempObj.gljType = me.distTypeTree.comboDatas[i].value;
|
|
|
|
- tempObj.shortName = me.distTypeTree.distTypes[me.distTypeTree.prefix + tempObj.gljType].data.shortName;
|
|
|
|
|
|
+ tempObj.component = tempObj.gljType === me.distTypeTree.comboDatas[i].value ? tempObj.component : [];
|
|
if(me.allowComponent.indexOf(tempObj.gljType) !== -1){
|
|
if(me.allowComponent.indexOf(tempObj.gljType) !== -1){
|
|
- tempObj.basePrice = 0;
|
|
|
|
|
|
+ tempObj.basePrice = tempObj.gljType === me.distTypeTree.comboDatas[i].value ? tempObj.basePrice : 0;
|
|
}
|
|
}
|
|
|
|
+ tempObj.gljType = me.distTypeTree.comboDatas[i].value;
|
|
|
|
+ tempObj.shortName = me.distTypeTree.distTypes[me.distTypeTree.prefix + tempObj.gljType].data.shortName;
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -782,11 +767,39 @@ let repositoryGljObj = {
|
|
pasteObj.gljClass = me.gljCurTypeId;
|
|
pasteObj.gljClass = me.gljCurTypeId;
|
|
return true;
|
|
return true;
|
|
},
|
|
},
|
|
|
|
+ canPasted: function (info) {
|
|
|
|
+ let rst = true;
|
|
|
|
+ let me = repositoryGljObj;
|
|
|
|
+ if(me.gljCurTypeId < 0){
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ if(info.cellRange.col + info.cellRange.colCount - 1 > me.setting.header.length - 2){
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ if(info.cellRange.row < me.currentCache.length){
|
|
|
|
+ if(info.cellRange.col === 0){
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ else if(info.cellRange.col <= 4 && info.cellRange.col + info.cellRange.colCount - 1 >= 4){
|
|
|
|
+ for(let i = 0, len = info.cellRange.rowCount; i < len; i++){
|
|
|
|
+ let row = i + info.cellRange.row;
|
|
|
|
+ if(row < me.currentCache.length){
|
|
|
|
+ if(me.allowComponent.indexOf(me.currentCache[row].gljType) !== -1){
|
|
|
|
+ rst = false;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return rst;
|
|
|
|
+ },
|
|
onClipboardPasting: function(sender, args) {
|
|
onClipboardPasting: function(sender, args) {
|
|
let me = repositoryGljObj;
|
|
let me = repositoryGljObj;
|
|
let maxCol = args.cellRange.col + args.cellRange.colCount - 1;
|
|
let maxCol = args.cellRange.col + args.cellRange.colCount - 1;
|
|
- //复制的列数超过正确的列数,不可复制
|
|
|
|
- if (me.gljCurTypeId < 0 || maxCol >= me.setting.header.length -1) {
|
|
|
|
|
|
+ if (!me.canPasted(args)) {
|
|
args.cancel = true;
|
|
args.cancel = true;
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -957,11 +970,14 @@ let repositoryGljObj = {
|
|
}
|
|
}
|
|
else{
|
|
else{
|
|
me.currentCache = me.getCache();
|
|
me.currentCache = me.getCache();
|
|
- //sheetOpr.unLockAllCells(me.workBook.getSheet(0));
|
|
|
|
- sheetOpr.reLockSomeCodes(me.workBook.getSheet(0), 0, me.currentCache.length);
|
|
|
|
- //sheetOpr.lockSomeCodes(me.workBook.getSheet(0), 0, me.currentCache.length);
|
|
|
|
}
|
|
}
|
|
me.showGljItems(me.complementaryGljList, me.gljCurTypeId);
|
|
me.showGljItems(me.complementaryGljList, me.gljCurTypeId);
|
|
|
|
+ //getCurrentGlj
|
|
|
|
+ let row = me.workBook.getSheet(0).getSelections()[0].row;
|
|
|
|
+ me.currentGlj = row < me.currentCache.length ? me.currentCache[row] : null;
|
|
|
|
+ me.currentComponent = me.currentGlj ? me.getCurrentComponent(me.currentGlj.component) : [];
|
|
|
|
+ sheetOpr.cleanData(gljComponentOprObj.workBook.getSheet(0), gljComponentOprObj.setting, -1);
|
|
|
|
+ sheetOpr.showData(gljComponentOprObj.workBook.getSheet(0), gljComponentOprObj.setting, me.currentComponent);
|
|
}
|
|
}
|
|
},
|
|
},
|
|
error:function(err){
|
|
error:function(err){
|
|
@@ -1030,6 +1046,12 @@ let repositoryGljObj = {
|
|
}
|
|
}
|
|
//allgljs
|
|
//allgljs
|
|
},
|
|
},
|
|
|
|
+ setProp: function (prop, value, gljList) {
|
|
|
|
+ let me = this;
|
|
|
|
+ for(let i = 0, len = gljList.length; i < len; i++){
|
|
|
|
+ gljList[i][prop] = value;
|
|
|
|
+ }
|
|
|
|
+ },
|
|
sortGlj: function(gljList) {
|
|
sortGlj: function(gljList) {
|
|
let me = this;
|
|
let me = this;
|
|
gljList.sort(function(a, b){
|
|
gljList.sort(function(a, b){
|
|
@@ -1047,25 +1069,17 @@ let gljTypeTreeOprObj = {
|
|
that = gljComponentOprObj,
|
|
that = gljComponentOprObj,
|
|
gljTypeId = treeNode.ID;
|
|
gljTypeId = treeNode.ID;
|
|
me.gljCurTypeId = treeNode.ID;
|
|
me.gljCurTypeId = treeNode.ID;
|
|
- that.isLocked = true;
|
|
|
|
//消除新增到一半的数据
|
|
//消除新增到一半的数据
|
|
me.addGljObj = null;
|
|
me.addGljObj = null;
|
|
//me.currentCache = me.getCache();
|
|
//me.currentCache = me.getCache();
|
|
sheetOpr.cleanData(that.workBook.getSheet(0), that.setting, 5);
|
|
sheetOpr.cleanData(that.workBook.getSheet(0), that.setting, 5);
|
|
- that.workBook.getSheet(0).getRange(-1, 0 , -1, 1, GC.Spread.Sheets.SheetArea.viewport).locked(true);
|
|
|
|
- that.workBook.getSheet(0).getRange(-1, 4 , -1, 1, GC.Spread.Sheets.SheetArea.viewport).locked(true);
|
|
|
|
- me.workBook.getSheet(0).getRange(-1, 6 , -1, 1, GC.Spread.Sheets.SheetArea.viewport).locked(true);
|
|
|
|
- //that.workBook.getSheet(0).options.isProtected = true;
|
|
|
|
if (me.parentNodeIds["_pNodeId_" + treeNode.ID]) {
|
|
if (me.parentNodeIds["_pNodeId_" + treeNode.ID]) {
|
|
me.currentOprParent = 1;
|
|
me.currentOprParent = 1;
|
|
me.currentCache = me.getParentCache(me.parentNodeIds["_pNodeId_" + treeNode.ID]);
|
|
me.currentCache = me.getParentCache(me.parentNodeIds["_pNodeId_" + treeNode.ID]);
|
|
- sheetOpr.lockCodeCells(me.workBook.getSheet(0), me.currentCache.length);
|
|
|
|
me.workBook.getSheet(0).setRowCount(me.currentCache.length);
|
|
me.workBook.getSheet(0).setRowCount(me.currentCache.length);
|
|
} else {
|
|
} else {
|
|
me.currentOprParent = 0;
|
|
me.currentOprParent = 0;
|
|
me.currentCache = me.getCache();
|
|
me.currentCache = me.getCache();
|
|
- sheetOpr.unLockAllCells(me.workBook.getSheet(0));
|
|
|
|
- sheetOpr.reLockSomeCodes(me.workBook.getSheet(0), 0, me.currentCache.length);
|
|
|
|
}
|
|
}
|
|
me.showGljItems(me.complementaryGljList, gljTypeId);
|
|
me.showGljItems(me.complementaryGljList, gljTypeId);
|
|
}
|
|
}
|