|
@@ -300,25 +300,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 sortItems(serialItems, items){
|
|
|
- for(let item of items){
|
|
|
- for(let serialItem of serialItems){
|
|
|
- if(item.id === serialItem.id){
|
|
|
- item.serialNo = serialItem.serialNo;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- items.sort(function (a, b) {
|
|
|
- let rst = 0;
|
|
|
- if(a.serialNo > b.serialNo){
|
|
|
- rst = 1;
|
|
|
- }
|
|
|
- else if(a.serialNo < b.serialNo){
|
|
|
- rst = -1;
|
|
|
- }
|
|
|
- return rst;
|
|
|
- });
|
|
|
- }
|
|
|
+
|
|
|
function updateBeforeInsert(node, data) {
|
|
|
node.data.name = data.name;
|
|
|
if(node.data.type == billType.BX){//从清单库中找到标准清单的话,要把补项改成分项
|
|
@@ -379,8 +361,9 @@ var projectObj = {
|
|
|
searchStdBillsAndUpdate(stdMatchCode, value);
|
|
|
return;
|
|
|
} else {
|
|
|
- hintBox.infoBox("系统提示","已存在该编码的清单,是否继续?",2,function () {
|
|
|
- searchStdBillsAndUpdate(stdMatchCode, value);
|
|
|
+ hintBox.infoBox("系统提示","已存在该编码的清单,将自动修改编码后3位,是否继续?",2,function () {
|
|
|
+ let newFormatCode = project.Bills.newFormatCode(stdMatchCode);
|
|
|
+ searchStdBillsAndUpdate(stdMatchCode, newFormatCode);
|
|
|
},function () {
|
|
|
me.mainController.refreshTreeNode([node], false);
|
|
|
},['确定','取消']);
|
|
@@ -926,10 +909,6 @@ var projectObj = {
|
|
|
let quantityTime = +new Date();
|
|
|
console.log(`计算quantity时间——${quantityTime - mTime}`);
|
|
|
//that.project.property = projectObj.project.projectInfo.property; 改在doAfterLoad的时候设置
|
|
|
- gljCol.initGljCol(that.project.projSetting.glj_col?that.project.projSetting.glj_col.showAdjustPrice:false,
|
|
|
- that.project.property.tenderSetting.showTenderFields?that.project.property.tenderSetting.showTenderFields:false);
|
|
|
- subObj.initSubSpread();//初始化主界面下方的表格
|
|
|
-
|
|
|
if (typeof overwriteRationCalcBases === 'function')
|
|
|
overwriteRationCalcBases(that.project.property.taxType);
|
|
|
//that.project.calcProgram.compileAllTemps();
|
|
@@ -986,12 +965,16 @@ var projectObj = {
|
|
|
});
|
|
|
let startShowTime = +new Date();
|
|
|
that.mainController = TREE_SHEET_CONTROLLER.createNew(that.project.mainTree, that.mainSpread.getActiveSheet(), that.project.projSetting.mainGridSetting);
|
|
|
- that.mainController.showTreeData();
|
|
|
+
|
|
|
let endShowTime = +new Date();
|
|
|
console.log(`show data时间——${endShowTime - startShowTime}`);
|
|
|
that.mainController.bind('refreshBaseActn', that.refreshBaseActn);
|
|
|
that.mainController.bind(TREE_SHEET_CONTROLLER.eventName.beforeTreeSelectedChange, that.beforeMainTreeSelectedChange);
|
|
|
that.mainController.bind(TREE_SHEET_CONTROLLER.eventName.treeSelectedChanged, that.treeSelectedChanged);
|
|
|
+ gljCol.initGljCol(that.project.projSetting.glj_col?that.project.projSetting.glj_col.showAdjustPrice:false,
|
|
|
+ that.project.property.tenderSetting.showTenderFields?that.project.property.tenderSetting.showTenderFields:false,true);
|
|
|
+ that.mainController.showTreeData();
|
|
|
+ subObj.initSubSpread();//初始化主界面下方的表格
|
|
|
if(!projectReadOnly){
|
|
|
that.mainSpreadEscKey(that.mainSpread, that.mainSpreadEditStarting, that.mainSpreadEditEnded);
|
|
|
sheetCommonObj.bindEnterKey(that.mainSpread, that.mainSpreadEnterKey);
|
|
@@ -1341,6 +1324,7 @@ var projectObj = {
|
|
|
return true;//除了清单,其它类型都只读
|
|
|
},
|
|
|
callback: function (key, opt) {
|
|
|
+ /* 2020-12-28 插入前先弹窗选择
|
|
|
let selected = project.mainTree.selected;
|
|
|
if(selected.data.type==billType.FX || selected.data.type==billType.BX){
|
|
|
//添加成分项的父亲
|
|
@@ -1348,8 +1332,9 @@ var projectObj = {
|
|
|
}else{//正常添加分部
|
|
|
ProjectController.addFB(project, controller);
|
|
|
projectObj.selectColAndFocus(project.mainTree.selected);
|
|
|
- }
|
|
|
-
|
|
|
+ } */
|
|
|
+ $("#selectFBFor").val("add");
|
|
|
+ $('#selectFBDiv').modal('show');
|
|
|
},
|
|
|
visible: function(key, opt){
|
|
|
if(project.mainTree.selected){
|
|
@@ -1776,7 +1761,12 @@ var projectObj = {
|
|
|
name: '造价计算',
|
|
|
icon: 'fa-calculator',
|
|
|
callback: function () {
|
|
|
- project.calcProgram.calcAllNodesAndSave();
|
|
|
+ $.bootstrapLoading.start();
|
|
|
+ setTimeout(function(){
|
|
|
+ project.calcProgram.calcAllNodesAndSave();
|
|
|
+ $.bootstrapLoading.end();
|
|
|
+ },100)
|
|
|
+
|
|
|
},
|
|
|
disabled: function () {
|
|
|
if (projectReadOnly) {
|
|
@@ -2151,11 +2141,11 @@ var projectObj = {
|
|
|
}
|
|
|
//分部
|
|
|
if(node.data.type === billType.FB){
|
|
|
- styleMap = mapping.FB;
|
|
|
+ styleMap = mapping.FX;
|
|
|
}
|
|
|
//分项
|
|
|
else if(node.data.type === billType.FX){
|
|
|
- styleMap = mapping.FX;
|
|
|
+ styleMap = mapping.FB;
|
|
|
}
|
|
|
//补项
|
|
|
else if(node.data.type === billType.BX){
|
|
@@ -2165,15 +2155,18 @@ var projectObj = {
|
|
|
else if(node.data.type === billType.BILL){
|
|
|
//非叶子节点的清单
|
|
|
if(node.source.children.length > 0){
|
|
|
- styleMap = mapping.UNLEAFBILL;
|
|
|
+ styleMap = mapping.UNCBBILL;
|
|
|
+ // styleMap = mapping.UNLEAFBILL;
|
|
|
}
|
|
|
//未使用基数计算的叶子节点的清单
|
|
|
else if(node.source.children.length === 0 && (!isDef(node.data.calcBase) || node.data.calcBase === '')){
|
|
|
- styleMap = mapping.UNCBBILL;
|
|
|
+ // styleMap = mapping.UNCBBILL;
|
|
|
+ styleMap = mapping.UNLEAFBILL;
|
|
|
}
|
|
|
//使用基数计算的叶子节点的清单
|
|
|
else if(node.source.children.length === 0 && isDef(node.data.calcBase && node.data.calcBaseValue !== '')){
|
|
|
- styleMap = mapping.CBBILL;
|
|
|
+ // styleMap = mapping.CBBILL;
|
|
|
+ styleMap = mapping.UNLEAFBILL;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -2212,7 +2205,7 @@ var projectObj = {
|
|
|
if(_ && !_.isEmpty(node.data.bookmarkBackground)) style.backColor = "#"+ node.data.bookmarkBackground;//设置书签和批注背景色
|
|
|
//大项费用加粗(数字与中文字符大小不一问题由字体造成,暂时不考虑分别设置大小)
|
|
|
/* if(node.sourceType === this.project.Bills.getSourceType() && node.data.type === billType.DXFY){
|
|
|
- style.font = 'bold 0.9rem Arial';
|
|
|
+ style.font = 'bold 14px Arial';
|
|
|
}*/
|
|
|
style.borderLeft = new GC.Spread.Sheets.LineBorder("#D4D4D4", GC.Spread.Sheets.LineStyle.thin);
|
|
|
style.borderTop = new GC.Spread.Sheets.LineBorder("#D4D4D4", GC.Spread.Sheets.LineStyle.thin);
|
|
@@ -2240,7 +2233,7 @@ var projectObj = {
|
|
|
'programID',
|
|
|
'ruleText'
|
|
|
];
|
|
|
- style.font = 'bold 0.9rem Arial';
|
|
|
+ style.font = 'bold 14px Arial';
|
|
|
return style;
|
|
|
},
|
|
|
//设置节点style
|
|
@@ -2543,6 +2536,20 @@ $('#interface-dropdown').click(function() {
|
|
|
return false;
|
|
|
});
|
|
|
|
|
|
+let enterZLFB = false
|
|
|
+$('#ZLFB_MENU').mouseenter(function () {
|
|
|
+ enterZLFB = true;
|
|
|
+ $('#ZLFB_MENU_sub').addClass('show');
|
|
|
+});
|
|
|
+
|
|
|
+$('#ZLFB_MENU').mouseleave(function () {
|
|
|
+ enterZLFB = false;
|
|
|
+});
|
|
|
+
|
|
|
+$('#ZLFB_MENU').click(function() {
|
|
|
+ return false;
|
|
|
+});
|
|
|
+
|
|
|
$('#moreMenu > a').mouseenter(function () {
|
|
|
if (!enterDisplayA) {
|
|
|
$('#subDisplay').removeClass('show');
|
|
@@ -2550,9 +2557,13 @@ $('#moreMenu > a').mouseenter(function () {
|
|
|
if (!enterInterfaceDropdown) {
|
|
|
$('#interface-dropdown-sub').removeClass('show');
|
|
|
}
|
|
|
+ if(!enterZLFB){
|
|
|
+ $('#ZLFB_MENU_sub').removeClass('show');
|
|
|
+ }
|
|
|
});
|
|
|
|
|
|
|
|
|
+
|
|
|
$('#displayDXFY').click(function () {
|
|
|
displayLevel(projectObj.project.mainTree.items, 0, 'DXFY')
|
|
|
});
|
|
@@ -3079,13 +3090,13 @@ const uploadType = {general: 'general', lj: 'lj', gld: 'gld'};
|
|
|
let fileType = uploadType.lj;
|
|
|
|
|
|
$('#uploadLj').click(function () {
|
|
|
- $('#uploadExample-general').show();
|
|
|
- $('#uploadExample').text('下载示例2');
|
|
|
+ $('#example-gld').hide();
|
|
|
+ $('#example-general').show();
|
|
|
fileType = uploadType.lj;
|
|
|
});
|
|
|
$('#uploadGld').click(function () {
|
|
|
- $('#uploadExample-general').hide();
|
|
|
- $('#uploadExample').text('下载示例');
|
|
|
+ $('#example-general').hide();
|
|
|
+ $('#example-gld').show();
|
|
|
fileType = uploadType.gld;
|
|
|
});
|
|
|
|
|
@@ -3329,6 +3340,12 @@ $('#uploadExample-general').click(function () {
|
|
|
$('#uploadExample').click(function () {
|
|
|
window.location.href = `/bills/downloadExamp?type=${fileType === uploadType.lj ? uploadType.lj : uploadType.gld}`;
|
|
|
});
|
|
|
+$('#uploadExample-lj').click(function () {
|
|
|
+ window.location.href = `/bills/downloadExamp?type=${uploadType.lj}`;
|
|
|
+});
|
|
|
+$('#uploadExample-gld').click(function () {
|
|
|
+ window.location.href = `/bills/downloadExamp?type=${uploadType.gld}`;
|
|
|
+});
|
|
|
|
|
|
$(function () {
|
|
|
//清空导入清单选择文件
|
|
@@ -3401,7 +3418,7 @@ $(function () {
|
|
|
$('#clone_option_name').prop("checked", false);
|
|
|
$('#clone_option_unit').prop("checked", true);
|
|
|
$('#clone_option_quantity').prop("checked", true);
|
|
|
- $('#clone_option_noCover').prop("checked", true);
|
|
|
+ $('#clone_option_cover').prop("checked", true);
|
|
|
});
|
|
|
|
|
|
$("#btn_block_createBlocks").click(async function () {
|
|
@@ -3583,6 +3600,8 @@ function disableTools(){
|
|
|
$('#stdBillsTab').addClass('disabled');
|
|
|
//$('#stdRationTab').addClass('disabled');
|
|
|
$('#blockLibTab').addClass('disabled');
|
|
|
+ // 组价模板分享
|
|
|
+ $('#btn_block_share').prop('disabled', true);
|
|
|
//人材机汇总,选择其他、另存使用
|
|
|
$('a[data-target="#change-unitFile"]').remove();
|
|
|
$('a[data-target="#unitFile-save-as"]').remove();
|