|
@@ -301,7 +301,7 @@ var projectObj = {
|
|
|
let libId = projectObj.project.projectInfo.engineeringInfo.bill_lib[0].id;
|
|
|
CommonAjax.post('/stdBillsEditor/getStdBillsByCode', {userId: userID, billsLibId: libId, code: stdCode}, function (data) {
|
|
|
if (data) {
|
|
|
-
|
|
|
+
|
|
|
function updateBeforeInsert(node, data) {
|
|
|
node.data.name = data.name;
|
|
|
if(node.data.type == billType.BX){//从清单库中找到标准清单的话,要把补项改成分项
|
|
@@ -520,7 +520,8 @@ var projectObj = {
|
|
|
};
|
|
|
//计算基数赋值要经过解析和标准化,已在calculate里赋值
|
|
|
if(fieldName !== 'calcBase'){
|
|
|
- calcTools.setFieldValue(node, fieldName, value);
|
|
|
+ calcTools.setFieldValue(node, fieldName, value);
|
|
|
+ projectObj.mainController.refreshTreeNode([node]); // 量价,输入单价x,反算单价x1,第二次输入单价x,单价不再反算。(实际反算了,没刷新)
|
|
|
};
|
|
|
|
|
|
project.calcProgram.calcAndSave(node);
|
|
@@ -562,7 +563,7 @@ var projectObj = {
|
|
|
projectObj.lastCell = {row: info.row, col: info.col};
|
|
|
if(colSetting.data.field === 'quantity'){
|
|
|
SheetDataHelper.hideMoreButton()
|
|
|
- }
|
|
|
+ }
|
|
|
},
|
|
|
//滚动造价书鼠标时,工程量的更多按钮跟着移动
|
|
|
TopRowChanged:function(type,info){
|
|
@@ -570,7 +571,7 @@ var projectObj = {
|
|
|
if(colSetting.data.field === 'quantity'){
|
|
|
SheetDataHelper.moveMoreButton(info.sheet)
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
},
|
|
|
|
|
|
//repaint 动态下拉框
|
|
@@ -639,7 +640,7 @@ var projectObj = {
|
|
|
}
|
|
|
}
|
|
|
if(node.sourceType == ModuleNames.ration){ //在定额编码中双击,如果右侧定额库没有展开,则自动展开。
|
|
|
- if(node.data.type != rationType.ration) return ;//只有定额类型才需要自动展开,其它都不用
|
|
|
+ if(node.data.type != rationType.ration) return ;//只有定额类型才需要自动展开,其它都不用
|
|
|
let libID = node.data.libID;
|
|
|
if (node.data.from === 'cpt') {
|
|
|
libID = node.data.fromUser ? `${rationLibObj.compleRationLibId}*${node.data.fromUser}` : rationLibObj.compleRationLibId;
|
|
@@ -978,7 +979,7 @@ var projectObj = {
|
|
|
});
|
|
|
let startShowTime = +new Date();
|
|
|
that.mainController = TREE_SHEET_CONTROLLER.createNew(that.project.mainTree, that.mainSpread.getActiveSheet(), that.project.projSetting.mainGridSetting);
|
|
|
-
|
|
|
+
|
|
|
let endShowTime = +new Date();
|
|
|
console.log(`show data时间——${endShowTime - startShowTime}`);
|
|
|
that.mainController.bind('refreshBaseActn', that.refreshBaseActn);
|
|
@@ -1013,12 +1014,12 @@ var projectObj = {
|
|
|
|
|
|
|
|
|
//工程量悬浮窗移动事件
|
|
|
- that.mainSpread.bind(GC.Spread.Sheets.Events.TopRowChanged, that.TopRowChanged);
|
|
|
+ that.mainSpread.bind(GC.Spread.Sheets.Events.TopRowChanged, that.TopRowChanged);
|
|
|
//let loadOtherStartTime = +new Date();
|
|
|
//if(!projectReadOnly){
|
|
|
that.loadMainSpreadContextMenu();
|
|
|
//}
|
|
|
-
|
|
|
+
|
|
|
socketObject.connect('main', { projectReadOnly: !!projectReadOnly, user: { ...projectObj.project.projectInfo.opener } });//连接socket服务器
|
|
|
let endTime = +new Date();
|
|
|
console.log(`其它时间——${endTime - endShowTime}`);
|
|
@@ -1341,16 +1342,16 @@ var projectObj = {
|
|
|
return true;//除了清单,其它类型都只读
|
|
|
},
|
|
|
callback: function (key, opt) {
|
|
|
- /* 2020-12-28 插入前先弹窗选择
|
|
|
+ /* 2020-12-28 插入前先弹窗选择
|
|
|
let selected = project.mainTree.selected;
|
|
|
if(selected.data.type==billType.FX || selected.data.type==billType.BX){
|
|
|
//添加成分项的父亲
|
|
|
- ProjectController.addFXParent(selected);
|
|
|
+ ProjectController.addFXParent(selected);
|
|
|
}else{//正常添加分部
|
|
|
ProjectController.addFB(project, controller);
|
|
|
projectObj.selectColAndFocus(project.mainTree.selected);
|
|
|
} */
|
|
|
- $("#selectFBFor").val("add");
|
|
|
+ $("#selectFBFor").val("add");
|
|
|
$('#selectFBDiv').modal('show');
|
|
|
},
|
|
|
visible: function(key, opt){
|
|
@@ -1783,7 +1784,7 @@ var projectObj = {
|
|
|
project.calcProgram.calcAllNodesAndSave();
|
|
|
$.bootstrapLoading.end();
|
|
|
},100)
|
|
|
-
|
|
|
+
|
|
|
},
|
|
|
disabled: function () {
|
|
|
if (projectReadOnly) {
|
|
@@ -3500,7 +3501,7 @@ $(function () {
|
|
|
if ($('#clone_option_unit').prop("checked")) options.checkUnit = true;
|
|
|
if ($('#clone_option_zeroQuantity').prop("checked")) options.zeroQuantity = true;
|
|
|
if ($('#clone_option_cover').prop("checked")) options.overwriteRations = true;
|
|
|
-
|
|
|
+
|
|
|
let nodes = [];
|
|
|
let calcNodes = [];
|
|
|
switch (blockLibObj.cloneType) {
|