|
@@ -36,14 +36,18 @@ var projectObj = {
|
|
|
subViewObj.loadComments(node);
|
|
|
}
|
|
|
gljOprObj.showDataIfRationSelect(node);
|
|
|
- if (activeSubSheetIs(subSheetIndex.ssiCalcProgram)) {
|
|
|
- calcProgramObj.showData(node);
|
|
|
- }
|
|
|
+ if (activeSubSheetIsCalcProgram())
|
|
|
+ calcProgramObj.refreshCalcProgram(node, 3);
|
|
|
+
|
|
|
//zhong 2017-9-1 特征及内容
|
|
|
if(pageCCOprObj.active){
|
|
|
pageCCOprObj.mainActiveCell = projectObj.mainSpread.getActiveSheet().getSelections()[0];//mainSpread焦点单元格
|
|
|
pageCCOprObj.setCacheAndShow(node);
|
|
|
}
|
|
|
+
|
|
|
+ let acSheet = subSpread.getActiveSheet();
|
|
|
+
|
|
|
+ console.log(acSheet.name());
|
|
|
// for test interface. CSLAAAAA
|
|
|
// projectObj.testDisplay('前四项累计值排除当前选中项' + projectObj.project.calcProgram.getBeforeTaxTotalFee([node]));
|
|
|
|
|
@@ -395,10 +399,6 @@ var projectObj = {
|
|
|
project.Ration.updateRationCodes([{'node':node,value:value}]);
|
|
|
// this.updateRationCode(node, value); // 新套定额适合实时计算
|
|
|
// 这里因异步问题暂时缺少工料机价格。该过程移到:ration_glj.js的refreshAfterSave方法中。
|
|
|
- /*project.calcProgram.calcAndSave(node);
|
|
|
- if (activeSubSheetIs(subSheetIndex.ssiCalcProgram)) {
|
|
|
- calcProgramObj.showData(node, false);
|
|
|
- };*/
|
|
|
}
|
|
|
},
|
|
|
updateNodeField : function (node,value,filedID,callback) {
|
|
@@ -425,11 +425,14 @@ var projectObj = {
|
|
|
let project = projectObj.project, fieldName = colSetting.data.field;
|
|
|
if(node.sourceType==project.ration_glj.getSourceType()){
|
|
|
project.ration_glj.updateFromMainSpread(value,node,fieldName);
|
|
|
- }else if(fieldName === 'remark'){
|
|
|
+ }
|
|
|
+ else if(fieldName === 'remark'){
|
|
|
projectObj.updateNodeField(node,value,'remark');
|
|
|
- } else if(calcTools.isGljRation(node)){
|
|
|
+ }
|
|
|
+ else if(calcTools.isGljRation(node)){
|
|
|
gljOprObj.updateRationTypeGLJ(value,node,fieldName,editingText);
|
|
|
- } else if (value !== calcFees.getFee(node.data, fieldName)||fieldName == 'quantity') {//工程量需要进行转换,所以做特殊处理
|
|
|
+ }
|
|
|
+ else if (value !== calcFees.getFee(node.data, fieldName)||fieldName == 'quantity') {//工程量需要进行转换,所以做特殊处理
|
|
|
if (fieldName === 'code' && value != '' && !calcTools.isVolumePrice(node)) {
|
|
|
projectObj.updateCode(node, value);
|
|
|
}
|
|
@@ -561,9 +564,9 @@ var projectObj = {
|
|
|
projectObj.mainSpread.repaint();
|
|
|
},
|
|
|
mainSpreadEditEnded: function (sender, info) {
|
|
|
+ console.log('enterEDEnd');
|
|
|
let project = projectObj.project;
|
|
|
let node = project.mainTree.items[info.row];
|
|
|
- console.log( project.withinBillsLocked(node));
|
|
|
project.withinBillsLocked(node);
|
|
|
let colSetting = projectObj.mainController.setting.cols[info.col];
|
|
|
let fieldName = projectObj.mainController.setting.cols[info.col].data.field;
|
|
@@ -705,8 +708,9 @@ var projectObj = {
|
|
|
that.mainController.bind(TREE_SHEET_CONTROLLER.eventName.beforeTreeSelectedChange, that.beforeMainTreeSelectedChange);
|
|
|
that.mainController.bind(TREE_SHEET_CONTROLLER.eventName.treeSelectedChanged, that.treeSelectedChanged);
|
|
|
if(!projectReadOnly){
|
|
|
- that.bindEnterKey(that.mainSpread, 'mainEnterKey', that.mainSpreadEnterKey);
|
|
|
+ sheetCommonObj.bindEnterKey(that.mainSpread, that.mainSpreadEnterKey);
|
|
|
}
|
|
|
+ sheetCommonObj.bindEscKey(that.mainSpread, [{sheet: that.mainSpread.getSheet(0), editStarting: that.mainSpreadEditStarting, editEnded: that.mainSpreadEditEnded}]);
|
|
|
setTimeout(function () {
|
|
|
that.mainSpread.getActiveSheet().startEdit();//这两句需要挺多时间,而又需要在editend 事件前触发,而这些又不影响计算,所以这里用异步的方法
|
|
|
that.mainSpread.getActiveSheet().endEdit();
|
|
@@ -860,14 +864,6 @@ var projectObj = {
|
|
|
me.mainSpreadEnterCell({type: 'EnterCell'}, {sheet: sheet, sheetName: sheet.name(), cancel: false, row: newRow, col: newCol});
|
|
|
|
|
|
},
|
|
|
- //注册自定义回车键事件
|
|
|
- bindEnterKey: function (workBook, registerName, operation) {
|
|
|
- let me = this;
|
|
|
- let sheet = workBook.getActiveSheet();
|
|
|
- workBook.commandManager().register(registerName, operation);
|
|
|
- workBook.commandManager().setShortcutKey(null, GC.Spread.Commands.Key.enter, false, false, false, false);
|
|
|
- workBook.commandManager().setShortcutKey(registerName, GC.Spread.Commands.Key.enter, false, false, false, false);
|
|
|
- },
|
|
|
loadMainSpreadContextMenu: function () {
|
|
|
var project = this.project, spread = this.mainSpread, controller = this.mainController;
|
|
|
$.contextMenu({
|
|
@@ -2229,12 +2225,10 @@ $('#customFile').change(function () {
|
|
|
if(file.files.length > 0){
|
|
|
$('.custom-file-label').text(`${file.files[0].name}`);
|
|
|
$('#uploadAlert').hide();
|
|
|
- console.log(file.files);
|
|
|
//读取各个表及表名
|
|
|
$.bootstrapLoading.start();
|
|
|
let fileReader = new FileReader();
|
|
|
fileReader.onload = function(ev) {
|
|
|
- console.log('enter');
|
|
|
try {
|
|
|
let data = ev.target.result;
|
|
|
// 以二进制流方式读取得到整份excel表格对象
|
|
@@ -2287,6 +2281,7 @@ $('#uploadConfirm').click(function () {
|
|
|
//要去匹配的清单库(第一个)
|
|
|
let matchBillLibId = projectInfoObj.projectInfo.engineeringInfo.bill_lib.length > 0 ? projectInfoObj.projectInfo.engineeringInfo.bill_lib[0].id : null;
|
|
|
formData.append('billsLibId', matchBillLibId);
|
|
|
+ let uploadS = +new Date();
|
|
|
$.ajax({
|
|
|
url: '/bills/upload',
|
|
|
type: 'POST',
|
|
@@ -2303,6 +2298,8 @@ $('#uploadConfirm').click(function () {
|
|
|
if (message !== '') {
|
|
|
alert(message);
|
|
|
}
|
|
|
+ let uploadE = +new Date();
|
|
|
+ console.log(`导入时间:${uploadE-uploadS}`);
|
|
|
// 成功则关闭窗体
|
|
|
$('#import').modal("hide");
|
|
|
//更新前端
|