|
|
@@ -3,9 +3,9 @@
|
|
|
*/
|
|
|
|
|
|
let isZJ2005 = true;
|
|
|
-
|
|
|
+const { fixedFlag } = commonConstants;
|
|
|
// 一般计税取不含税市场价、不含税定额价。简易计税取含税市场价、含税定额价。打开项目时,4个价格根据计税类型只载入其二,所以这里可不作区分。
|
|
|
-function overwriteRationCalcBases (taxType){
|
|
|
+function overwriteRationCalcBases(taxType) {
|
|
|
if (typeof rationCalcBases == 'undefined') return;
|
|
|
for (let key in rationCalcBases) delete rationCalcBases[key];
|
|
|
// let isJY = taxType == '2';
|
|
|
@@ -24,24 +24,27 @@ function overwriteRationCalcBases (taxType){
|
|
|
(function overwriteFeeTypes() {
|
|
|
if (typeof cpFeeTypes == 'undefined') return;
|
|
|
cpFeeTypes = [
|
|
|
- {type: 'directWork', name: '直接工程费'},
|
|
|
- {type: 'direct', name: '直接费'},
|
|
|
- {type: 'marketLabour', name: '人工费'},
|
|
|
- {type: 'marketMaterial', name: '材料费'},
|
|
|
- {type: 'marketMachine', name: '施工机械使用费'},
|
|
|
- {type: 'otherDirect', name: '其他直接费'},
|
|
|
- {type: 'local', name: '现场经费'},
|
|
|
- {type: 'indirect', name: '间接费'},
|
|
|
- {type: 'profit', name: '计划利润'},
|
|
|
- {type: 'tax', name: '税金'},
|
|
|
- {type: 'composite', name: '年度经费综合费'},
|
|
|
- {type: 'common', name: '养护工程费'}
|
|
|
+ { type: 'directWork', name: '直接工程费' },
|
|
|
+ { type: 'direct', name: '直接费' },
|
|
|
+ { type: 'marketLabour', name: '人工费' },
|
|
|
+ { type: 'marketMaterial', name: '材料费' },
|
|
|
+ { type: 'marketMachine', name: '施工机械使用费' },
|
|
|
+ { type: 'otherDirect', name: '其他直接费' },
|
|
|
+ { type: 'local', name: '现场经费' },
|
|
|
+ { type: 'indirect', name: '间接费' },
|
|
|
+ { type: 'profit', name: '计划利润' },
|
|
|
+ { type: 'tax', name: '税金' },
|
|
|
+ { type: 'composite', name: '年度经费综合费' },
|
|
|
+ { type: 'common', name: '养护工程费' }
|
|
|
];
|
|
|
})();
|
|
|
|
|
|
// 清单基数
|
|
|
+const progression = [];
|
|
|
+const deficiency = {};
|
|
|
if (typeof baseFigureMap !== 'undefined') {
|
|
|
- baseFigureMap.budget = {
|
|
|
+ const { fixedFlag } = commonConstants;
|
|
|
+ const budgetMap = {
|
|
|
// 除清单固定类别是“建筑安装工程费”的以外部分可显示
|
|
|
'公路养护工程费': {
|
|
|
base: 'GLYHGCF',
|
|
|
@@ -65,6 +68,8 @@ if (typeof baseFigureMap !== 'undefined') {
|
|
|
},
|
|
|
// 只有清单固定类别是“养护工程其他费用”部分可显示
|
|
|
'养护工程管理经费': {
|
|
|
+ progressiveName: '养护工程管理费', // 累进库里配置的名称与基数名称应该是一样的,但是这里不一样且已经在yun上线。特殊处理
|
|
|
+ isProgressive: true,
|
|
|
base: 'YHGCGLJF',
|
|
|
fixedFlag: null,
|
|
|
filter: [fixedFlag.MAINTENANCE_EXPENSES],
|
|
|
@@ -83,11 +88,10 @@ if (typeof baseFigureMap !== 'undefined') {
|
|
|
fixedFlag: null,
|
|
|
filter: [fixedFlag.BUDGET_FEE],
|
|
|
pick: true,
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
};
|
|
|
-
|
|
|
- baseFigureMap.boq = {
|
|
|
+ const boqMap = {
|
|
|
//仅允许用于固定类别是“第100章至700章清单”以外的清单
|
|
|
'各章清单合计': {
|
|
|
base: 'GZQDHJ',
|
|
|
@@ -114,9 +118,21 @@ if (typeof baseFigureMap !== 'undefined') {
|
|
|
pick: true
|
|
|
}
|
|
|
};
|
|
|
+ for (const name in budgetMap) {
|
|
|
+ const item = budgetMap[name];
|
|
|
+ if (item.isProgressive) {
|
|
|
+ progression.push(item.progressiveName || name);
|
|
|
+ }
|
|
|
+ if (item.deficiency) {
|
|
|
+ deficiency[item.progressiveName || name] = item.deficiency;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ baseFigureMap.budget = budgetMap;
|
|
|
+ baseFigureMap.boq = boqMap;
|
|
|
}
|
|
|
|
|
|
if (typeof baseFigureTemplate !== 'undefined') {
|
|
|
+ const { fixedFlag } = commonConstants;
|
|
|
baseFigureTemplate.budget = {
|
|
|
// 公路养护工程费:取清单固定类别是“建筑安装工程费”的金额
|
|
|
GLYHGCF(tender) {
|
|
|
@@ -142,7 +158,7 @@ if (typeof baseFigureTemplate !== 'undefined') {
|
|
|
if (!tender) {
|
|
|
calcBase.baseProgressiveFee = baseFee;
|
|
|
}
|
|
|
- return calculateUtil.getProgressiveFee(baseFee, '养护工程管理费', projectObj.project.property.progressiveInterval, decimalObj.bills.totalPrice);
|
|
|
+ return calculateUtil.getProgressiveFee(baseFee, '养护工程管理费', projectObj.project.property.progressiveInterval, decimalObj.bills.totalPrice, deficiency);
|
|
|
},
|
|
|
// 一二三部分合计:取清单固定类别是“一二三部分合计”的金额
|
|
|
YESBFHJ(tender) {
|
|
|
@@ -272,7 +288,7 @@ if (typeof gljOprObj !== 'undefined') {
|
|
|
|
|
|
}
|
|
|
|
|
|
-if(typeof gljUtil !== 'undefined'){
|
|
|
+if (typeof gljUtil !== 'undefined') {
|
|
|
gljUtil.getCodeSortMath = getCodeSortMath;
|
|
|
gljUtil.getElecCoe = function () {
|
|
|
return 0.24;
|
|
|
@@ -283,54 +299,54 @@ if(typeof gljUtil !== 'undefined'){
|
|
|
}
|
|
|
|
|
|
|
|
|
-if(typeof electrovalenceObj !== 'undefined'){
|
|
|
+if (typeof electrovalenceObj !== 'undefined') {
|
|
|
electrovalenceObj.options = [
|
|
|
- {code:"270",name:"电网电",specs:"",unit:"kW·h",type:"201"},
|
|
|
- {code:"905",name:"5kW以内柴油发电机组",specs:"",unit:"台班",type:"301"},
|
|
|
- {code:"906",name:"15kW以内柴油发电机组",specs:"",unit:"台班",type:"301"},
|
|
|
- {code:"907",name:"30kW以内柴油发电机组",specs:"",unit:"台班",type:"301"},
|
|
|
- {code:"908",name:"50kW以内柴油发电机组",specs:"",unit:"台班",type:"301"},
|
|
|
- {code:"909",name:"75kW以内柴油发电机组",specs:"",unit:"台班",type:"301"},
|
|
|
- {code:"910",name:"100kW以内柴油发电机组",specs:"",unit:"台班",type:"301"},
|
|
|
- {code:"911",name:"120kW以内柴油发电机组",specs:"",unit:"台班",type:"301"},
|
|
|
- {code:"912",name:"160kW以内柴油发电机组",specs:"",unit:"台班",type:"301"},
|
|
|
- {code:"913",name:"200kW以内柴油发电机组",specs:"",unit:"台班",type:"301"},
|
|
|
- {code:"914",name:"250kW以内柴油发电机组",specs:"",unit:"台班",type:"301"},
|
|
|
- {code:"915",name:"320kW以内柴油发电机组",specs:"",unit:"台班",type:"301"}
|
|
|
+ { code: "270", name: "电网电", specs: "", unit: "kW·h", type: "201" },
|
|
|
+ { code: "905", name: "5kW以内柴油发电机组", specs: "", unit: "台班", type: "301" },
|
|
|
+ { code: "906", name: "15kW以内柴油发电机组", specs: "", unit: "台班", type: "301" },
|
|
|
+ { code: "907", name: "30kW以内柴油发电机组", specs: "", unit: "台班", type: "301" },
|
|
|
+ { code: "908", name: "50kW以内柴油发电机组", specs: "", unit: "台班", type: "301" },
|
|
|
+ { code: "909", name: "75kW以内柴油发电机组", specs: "", unit: "台班", type: "301" },
|
|
|
+ { code: "910", name: "100kW以内柴油发电机组", specs: "", unit: "台班", type: "301" },
|
|
|
+ { code: "911", name: "120kW以内柴油发电机组", specs: "", unit: "台班", type: "301" },
|
|
|
+ { code: "912", name: "160kW以内柴油发电机组", specs: "", unit: "台班", type: "301" },
|
|
|
+ { code: "913", name: "200kW以内柴油发电机组", specs: "", unit: "台班", type: "301" },
|
|
|
+ { code: "914", name: "250kW以内柴油发电机组", specs: "", unit: "台班", type: "301" },
|
|
|
+ { code: "915", name: "320kW以内柴油发电机组", specs: "", unit: "台班", type: "301" }
|
|
|
]
|
|
|
}
|
|
|
|
|
|
-if(typeof materialCalcObj !== 'undefined'){
|
|
|
+if (typeof materialCalcObj !== 'undefined') {
|
|
|
materialCalcObj.getAssistProductionLabel = function () {
|
|
|
return "辅助生产现场经费费率(%)";
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-if(typeof projectObj !== 'undefined'){
|
|
|
- projectObj.isInsertEquipmentVisable = function(selected){
|
|
|
- return false; //浙江不管是预算或者工程量清单,都是隐藏
|
|
|
- }
|
|
|
+if (typeof projectObj !== 'undefined') {
|
|
|
+ projectObj.isInsertEquipmentVisable = function (selected) {
|
|
|
+ return false; //浙江不管是预算或者工程量清单,都是隐藏
|
|
|
+ }
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
-if(typeof module !== 'undefined'){
|
|
|
- let _= require('lodash');
|
|
|
+if (typeof module !== 'undefined') {
|
|
|
+ let _ = require('lodash');
|
|
|
|
|
|
module.exports = {
|
|
|
- sortRationGLJ: function(list){
|
|
|
+ sortRationGLJ: function (list) {
|
|
|
list = _.sortByAll(list, [function (item) {
|
|
|
- return getMainType(item.gljType?item.gljType:item.type);
|
|
|
+ return getMainType(item.gljType ? item.gljType : item.type);
|
|
|
}, getCodeSortMath()]);
|
|
|
return list;
|
|
|
|
|
|
function getMainType(type) {
|
|
|
let str = type + "";
|
|
|
- return parseInt(str.substr(0,1));
|
|
|
+ return parseInt(str.substr(0, 1));
|
|
|
}
|
|
|
},
|
|
|
- getDefalutAssistProductionFeeRate:function () {
|
|
|
+ getDefalutAssistProductionFeeRate: function () {
|
|
|
return 15
|
|
|
}
|
|
|
};
|
|
|
@@ -343,4 +359,9 @@ function getCodeSortMath() {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+if (typeof module !== 'undefined') {
|
|
|
+ module.exports = {
|
|
|
+ progression,
|
|
|
+ deficiency
|
|
|
+ };
|
|
|
+}
|