|
@@ -429,7 +429,7 @@ var projectObj = {
|
|
project.calcBase.calculate(node);
|
|
project.calcBase.calculate(node);
|
|
if(!project.calcBase.success){
|
|
if(!project.calcBase.success){
|
|
let activeCell = projectObj.mainSpread.getActiveSheet().getSelections()[0];
|
|
let activeCell = projectObj.mainSpread.getActiveSheet().getSelections()[0];
|
|
- projectObj.mainSpread.getActiveSheet().setValue(activeCell.row, activeCell.col, node.data.calcBase? node.data.calcBase: '');
|
|
|
|
|
|
+ projectObj.mainController.refreshTreeNode([node]);
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
// if (value) {value = parseFloat(value).toDecimal(decimalObj.decimal("totalPrice", node))};
|
|
// if (value) {value = parseFloat(value).toDecimal(decimalObj.decimal("totalPrice", node))};
|
|
@@ -487,9 +487,17 @@ var projectObj = {
|
|
mainSpreadEditStarting: function (sender, info) {
|
|
mainSpreadEditStarting: function (sender, info) {
|
|
let project = projectObj.project;
|
|
let project = projectObj.project;
|
|
let node = project.mainTree.items[info.row];
|
|
let node = project.mainTree.items[info.row];
|
|
- if(isDef(node) && node.sourceType === project.Ration.getSourceType() && isDef(node.data.code) && isDef(node.data.from) && node.data.from === 'cpt'&&info.col ==0){
|
|
|
|
- let orgV = info.sheet.getValue(info.row, info.col);
|
|
|
|
- let newV = orgV.replace(new RegExp('补'), '');
|
|
|
|
|
|
+ let fieldName = projectObj.mainController.setting.cols[info.col].data.field;
|
|
|
|
+ let orgV = info.sheet.getValue(info.row, info.col);
|
|
|
|
+ let newV;
|
|
|
|
+ if(node && node.sourceType === projectObj.project.Ration.getSourceType() && node.data.type === rationType.ration
|
|
|
|
+ && isDef(node.data.code) && isDef(node.data.prefix) && node.data.prefix !== rationPrefix.none && fieldName === 'code'){
|
|
|
|
+ if(node.data.prefix === rationPrefix.complementary){
|
|
|
|
+ newV = orgV.replace(new RegExp('补'), '');
|
|
|
|
+ }
|
|
|
|
+ if(node.data.prefix === rationPrefix.borrow){
|
|
|
|
+ newV = orgV.replace(new RegExp('借'), '');
|
|
|
|
+ }
|
|
info.sheet.setValue(info.row, info.col, newV);
|
|
info.sheet.setValue(info.row, info.col, newV);
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -648,7 +656,6 @@ var projectObj = {
|
|
that.mainSpread.bind(GC.Spread.Sheets.Events.ClipboardChanged, that.msClipboardChanged);
|
|
that.mainSpread.bind(GC.Spread.Sheets.Events.ClipboardChanged, that.msClipboardChanged);
|
|
that.mainSpread.bind(GC.Spread.Sheets.Events.ButtonClicked, that.onButtonClick);
|
|
that.mainSpread.bind(GC.Spread.Sheets.Events.ButtonClicked, that.onButtonClick);
|
|
that.mainSpread.bind(GC.Spread.Sheets.Events.CellDoubleClick, that.onCellDoubleClick);
|
|
that.mainSpread.bind(GC.Spread.Sheets.Events.CellDoubleClick, that.onCellDoubleClick);
|
|
- that.mainSpread.commandManager().setShortcutKey(undefined, GC.Spread.Commands.Key.z, true, false, false, false);
|
|
|
|
//let loadOtherStartTime = +new Date();
|
|
//let loadOtherStartTime = +new Date();
|
|
that.loadMainSpreadContextMenu();
|
|
that.loadMainSpreadContextMenu();
|
|
that.loadFocusLocation();
|
|
that.loadFocusLocation();
|
|
@@ -1072,7 +1079,7 @@ var projectObj = {
|
|
},
|
|
},
|
|
|
|
|
|
//根据节点获取行style(颜色、字体加粗)
|
|
//根据节点获取行style(颜色、字体加粗)
|
|
- getNodeColorStyle: function (sheet, node, colSetting) {
|
|
|
|
|
|
+ getNodeColorStyle: function (sheet, node, colSetting = null) {
|
|
let colorSetting = optionsOprObj.getOption(optionsOprObj.optionsTypes.COLOROPTS);
|
|
let colorSetting = optionsOprObj.getOption(optionsOprObj.optionsTypes.COLOROPTS);
|
|
let mapping = {DEFAULT: 'DEFAULT', SELECTED: 'SELECTED', DXFY: 'DXFY', FB: 'FB', UNLEAFBILL: 'UNLEAFBILL',
|
|
let mapping = {DEFAULT: 'DEFAULT', SELECTED: 'SELECTED', DXFY: 'DXFY', FB: 'FB', UNLEAFBILL: 'UNLEAFBILL',
|
|
FX: 'FX', BX: 'BX', UNCBBILL: 'UNCBBILL', CBBILL: 'CBBILL', ZCSB: 'ZCSB'};
|
|
FX: 'FX', BX: 'BX', UNCBBILL: 'UNCBBILL', CBBILL: 'CBBILL', ZCSB: 'ZCSB'};
|
|
@@ -1205,7 +1212,9 @@ var projectObj = {
|
|
TREE_SHEET_HELPER.massOperationSheet(sheet, function () {
|
|
TREE_SHEET_HELPER.massOperationSheet(sheet, function () {
|
|
for(let node of nodes){
|
|
for(let node of nodes){
|
|
if(node && node.serialNo()!= -1){
|
|
if(node && node.serialNo()!= -1){
|
|
- sheet.setStyle(node.serialNo(), -1, me.getNodeColorStyle(sheet, node));
|
|
|
|
|
|
+ //console.log(me.getNodeColorStyle(sheet, node).backColor);
|
|
|
|
+ sheet.getRange(node.serialNo(), -1, 1, -1).backColor(me.getNodeColorStyle(sheet, node).backColor);
|
|
|
|
+ //sheet.setStyle(node.serialNo(), -1, me.getNodeColorStyle(sheet, node));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
});
|
|
});
|
|
@@ -1222,6 +1231,7 @@ var projectObj = {
|
|
}
|
|
}
|
|
|
|
|
|
};
|
|
};
|
|
|
|
+
|
|
// 点击合计框中的复制
|
|
// 点击合计框中的复制
|
|
$("body").on("click", "#total-tips a", function() {
|
|
$("body").on("click", "#total-tips a", function() {
|
|
const totalElement = $(this).parent().siblings("p").find("#total");
|
|
const totalElement = $(this).parent().siblings("p").find("#total");
|
|
@@ -1800,4 +1810,26 @@ function doAfterImport(resData){
|
|
});
|
|
});
|
|
});
|
|
});
|
|
}
|
|
}
|
|
-}
|
|
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+$(function () {
|
|
|
|
+
|
|
|
|
+ $("#billsSpread").mouseover(function(){
|
|
|
|
+ spreadAutoFocus(projectObj.mainSpread,subSpread);
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ $("#subSpread").mouseover(function(){
|
|
|
|
+ spreadAutoFocus(subSpread,projectObj.mainSpread);
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ function spreadAutoFocus(spread,relateSpread) {
|
|
|
|
+ if(relateSpread&&relateSpread.getActiveSheet().isEditing()){//关联的spread不在编辑状态的情况下,才自动获得焦点;
|
|
|
|
+ return;
|
|
|
|
+ }else {
|
|
|
|
+ spread?spread.focus():'';
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+});
|