|
@@ -535,7 +535,8 @@ let baseFigureTemplate = {
|
|
|
'RCJJC': function (tender) {//人材机价差
|
|
|
return (this['RGJC'](tender) + this['CLJC'](tender) + this['JXJC'](tender)).toDecimal(decimalObj.bills.totalPrice);
|
|
|
},
|
|
|
- 'RGJC': function () {//人工价差
|
|
|
+ 'RGJC': function (tender) {//人工价差
|
|
|
+ const quantityType = tender ? 'tenderQuantity' : 'quantity';
|
|
|
let rst = 0;
|
|
|
let projGljs = calcBase.project.projectGLJ.datas.gljList;
|
|
|
for(let glj of projGljs){
|
|
@@ -543,13 +544,15 @@ let baseFigureTemplate = {
|
|
|
//调整价
|
|
|
let adjPrc = calcBase.project.projectGLJ.getAdjustPrice(glj);
|
|
|
//价差
|
|
|
- let dffPrc = parseFloat(glj.unit_price.market_price - adjPrc).toDecimal(decimalObj.glj.unitPrice);
|
|
|
- rst = (rst + parseFloat(glj.quantity * dffPrc).toDecimal(decimalObj.bills.totalPrice)).toDecimal(decimalObj.bills.totalPrice);
|
|
|
+ let marketPrice = tender ? calcBase.project.projectGLJ.getTenderMarketPrice(glj) : glj.unit_price.market_price;
|
|
|
+ let dffPrc = parseFloat(marketPrice - adjPrc).toDecimal(decimalObj.glj.unitPrice);
|
|
|
+ rst = (rst + parseFloat(glj[quantityType] * dffPrc).toDecimal(decimalObj.bills.totalPrice)).toDecimal(decimalObj.bills.totalPrice);
|
|
|
}
|
|
|
}
|
|
|
return rst;
|
|
|
},
|
|
|
- 'CLJC': function () {//材料价差
|
|
|
+ 'CLJC': function (tender) {//材料价差
|
|
|
+ const quantityType = tender ? 'tenderQuantity' : 'quantity';
|
|
|
let rst = 0;
|
|
|
let projGljs = calcBase.project.projectGLJ.datas.gljList;
|
|
|
for(let glj of projGljs){
|
|
@@ -557,13 +560,15 @@ let baseFigureTemplate = {
|
|
|
//调整价
|
|
|
let adjPrc = calcBase.project.projectGLJ.getAdjustPrice(glj);
|
|
|
//价差
|
|
|
- let dffPrc = parseFloat(glj.unit_price.market_price - adjPrc).toDecimal(decimalObj.glj.unitPrice);
|
|
|
- rst = (rst + parseFloat(glj.quantity * dffPrc).toDecimal(decimalObj.bills.totalPrice)).toDecimal(decimalObj.bills.totalPrice);
|
|
|
+ let marketPrice = tender ? calcBase.project.projectGLJ.getTenderMarketPrice(glj) : glj.unit_price.market_price;
|
|
|
+ let dffPrc = parseFloat(marketPrice - adjPrc).toDecimal(decimalObj.glj.unitPrice);
|
|
|
+ rst = (rst + parseFloat(glj[quantityType] * dffPrc).toDecimal(decimalObj.bills.totalPrice)).toDecimal(decimalObj.bills.totalPrice);
|
|
|
}
|
|
|
}
|
|
|
return rst;
|
|
|
},
|
|
|
- 'JXJC': function () {//机械价差
|
|
|
+ 'JXJC': function (tender) {//机械价差
|
|
|
+ const quantityType = tender ? 'tenderQuantity' : 'quantity';
|
|
|
let rst = 0;
|
|
|
let projGljs = calcBase.project.projectGLJ.datas.gljList;
|
|
|
for(let glj of projGljs){
|
|
@@ -571,8 +576,9 @@ let baseFigureTemplate = {
|
|
|
//调整价
|
|
|
let adjPrc = calcBase.project.projectGLJ.getAdjustPrice(glj);
|
|
|
//价差
|
|
|
- let dffPrc = parseFloat(glj.unit_price.market_price - adjPrc).toDecimal(decimalObj.glj.unitPrice);
|
|
|
- rst = (rst + parseFloat(glj.quantity * dffPrc).toDecimal(decimalObj.bills.totalPrice)).toDecimal(decimalObj.bills.totalPrice);
|
|
|
+ let marketPrice = tender ? calcBase.project.projectGLJ.getTenderMarketPrice(glj) : glj.unit_price.market_price;
|
|
|
+ let dffPrc = parseFloat(marketPrice - adjPrc).toDecimal(decimalObj.glj.unitPrice);
|
|
|
+ rst = (rst + parseFloat(glj[quantityType] * dffPrc).toDecimal(decimalObj.bills.totalPrice)).toDecimal(decimalObj.bills.totalPrice);
|
|
|
}
|
|
|
}
|
|
|
return rst;
|
|
@@ -580,7 +586,8 @@ let baseFigureTemplate = {
|
|
|
'FBFXRCJJC': function (tender) {//分部分项人材机价差
|
|
|
return (this['FBFXRGJC'](tender) + this['FBFXCLJC'](tender) + this['FBFXJXJC'](tender)).toDecimal(decimalObj.bills.totalPrice);
|
|
|
},
|
|
|
- 'FBFXRGJC': function () {//分部分项人工价差
|
|
|
+ 'FBFXRGJC': function (tender) {//分部分项人工价差
|
|
|
+ const quantityType = tender ? 'tenderSubdivisionQuantity' : 'subdivisionQuantity';
|
|
|
let rst = 0;
|
|
|
let projGljs = calcBase.project.projectGLJ.datas.gljList;
|
|
|
for(let glj of projGljs){
|
|
@@ -588,13 +595,15 @@ let baseFigureTemplate = {
|
|
|
//调整价
|
|
|
let adjPrc = calcBase.project.projectGLJ.getAdjustPrice(glj);
|
|
|
//价差
|
|
|
- let dffPrc = parseFloat(glj.unit_price.market_price - adjPrc).toDecimal(decimalObj.glj.unitPrice);
|
|
|
- rst = (rst + parseFloat(glj.subdivisionQuantity * dffPrc).toDecimal(decimalObj.bills.totalPrice)).toDecimal(decimalObj.bills.totalPrice);
|
|
|
+ let marketPrice = tender ? calcBase.project.projectGLJ.getTenderMarketPrice(glj) : glj.unit_price.market_price;
|
|
|
+ let dffPrc = parseFloat(marketPrice - adjPrc).toDecimal(decimalObj.glj.unitPrice);
|
|
|
+ rst = (rst + parseFloat(glj[quantityType] * dffPrc).toDecimal(decimalObj.bills.totalPrice)).toDecimal(decimalObj.bills.totalPrice);
|
|
|
}
|
|
|
}
|
|
|
return rst;
|
|
|
},
|
|
|
- 'FBFXCLJC': function () {//分部分项材料价差
|
|
|
+ 'FBFXCLJC': function (tender) {//分部分项材料价差
|
|
|
+ const quantityType = tender ? 'tenderSubdivisionQuantity' : 'subdivisionQuantity';
|
|
|
let rst = 0;
|
|
|
let projGljs = calcBase.project.projectGLJ.datas.gljList;
|
|
|
for(let glj of projGljs){
|
|
@@ -602,13 +611,15 @@ let baseFigureTemplate = {
|
|
|
//调整价
|
|
|
let adjPrc = calcBase.project.projectGLJ.getAdjustPrice(glj);
|
|
|
//价差
|
|
|
- let dffPrc = parseFloat(glj.unit_price.market_price - adjPrc).toDecimal(decimalObj.glj.unitPrice);
|
|
|
- rst = (rst + parseFloat(glj.subdivisionQuantity * dffPrc).toDecimal(decimalObj.bills.totalPrice)).toDecimal(decimalObj.bills.totalPrice);
|
|
|
+ let marketPrice = tender ? calcBase.project.projectGLJ.getTenderMarketPrice(glj) : glj.unit_price.market_price;
|
|
|
+ let dffPrc = parseFloat(marketPrice - adjPrc).toDecimal(decimalObj.glj.unitPrice);
|
|
|
+ rst = (rst + parseFloat(glj[quantityType] * dffPrc).toDecimal(decimalObj.bills.totalPrice)).toDecimal(decimalObj.bills.totalPrice);
|
|
|
}
|
|
|
}
|
|
|
return rst;
|
|
|
},
|
|
|
- 'FBFXJXJC': function () {//分部分项机械价差
|
|
|
+ 'FBFXJXJC': function (tender) {//分部分项机械价差
|
|
|
+ const quantityType = tender ? 'tenderSubdivisionQuantity' : 'subdivisionQuantity';
|
|
|
let rst = 0;
|
|
|
let projGljs = calcBase.project.projectGLJ.datas.gljList;
|
|
|
for(let glj of projGljs){
|
|
@@ -616,8 +627,9 @@ let baseFigureTemplate = {
|
|
|
//调整价
|
|
|
let adjPrc = calcBase.project.projectGLJ.getAdjustPrice(glj);
|
|
|
//价差
|
|
|
- let dffPrc = parseFloat(glj.unit_price.market_price - adjPrc).toDecimal(decimalObj.glj.unitPrice);
|
|
|
- rst = (rst + parseFloat(glj.subdivisionQuantity * dffPrc).toDecimal(decimalObj.bills.totalPrice)).toDecimal(decimalObj.bills.totalPrice);
|
|
|
+ let marketPrice = tender ? calcBase.project.projectGLJ.getTenderMarketPrice(glj) : glj.unit_price.market_price;
|
|
|
+ let dffPrc = parseFloat(marketPrice - adjPrc).toDecimal(decimalObj.glj.unitPrice);
|
|
|
+ rst = (rst + parseFloat(glj[quantityType] * dffPrc).toDecimal(decimalObj.bills.totalPrice)).toDecimal(decimalObj.bills.totalPrice);
|
|
|
}
|
|
|
}
|
|
|
return rst;
|
|
@@ -625,7 +637,8 @@ let baseFigureTemplate = {
|
|
|
'JSCSXMRCJJC': function (tender) {//技术措施项目人材机价差
|
|
|
return (this['JSCSXMRGJC'](tender) + this['JSCSXMCLJC'](tender) + this['JSCSXMJXJC'](tender)).toDecimal(decimalObj.bills.totalPrice);
|
|
|
},
|
|
|
- 'JSCSXMRGJC': function () {//技术措施项目人工价差
|
|
|
+ 'JSCSXMRGJC': function (tender) {//技术措施项目人工价差
|
|
|
+ const quantityType = tender ? 'tenderTechQuantity' : 'techQuantity';
|
|
|
let rst = 0;
|
|
|
let projGljs = calcBase.project.projectGLJ.datas.gljList;
|
|
|
for(let glj of projGljs){
|
|
@@ -633,13 +646,15 @@ let baseFigureTemplate = {
|
|
|
//调整价
|
|
|
let adjPrc = calcBase.project.projectGLJ.getAdjustPrice(glj);
|
|
|
//价差
|
|
|
- let dffPrc = parseFloat(glj.unit_price.market_price - adjPrc).toDecimal(decimalObj.glj.unitPrice);
|
|
|
- rst = (rst + parseFloat(glj.techQuantity * dffPrc).toDecimal(decimalObj.bills.totalPrice)).toDecimal(decimalObj.bills.totalPrice);
|
|
|
+ let marketPrice = tender ? calcBase.project.projectGLJ.getTenderMarketPrice(glj) : glj.unit_price.market_price;
|
|
|
+ let dffPrc = parseFloat(marketPrice - adjPrc).toDecimal(decimalObj.glj.unitPrice);
|
|
|
+ rst = (rst + parseFloat(glj[quantityType] * dffPrc).toDecimal(decimalObj.bills.totalPrice)).toDecimal(decimalObj.bills.totalPrice);
|
|
|
}
|
|
|
}
|
|
|
return rst;
|
|
|
},
|
|
|
- 'JSCSXMCLJC': function () {//技术措施项目材料价差
|
|
|
+ 'JSCSXMCLJC': function (tender) {//技术措施项目材料价差
|
|
|
+ const quantityType = tender ? 'tenderTechQuantity' : 'techQuantity';
|
|
|
let rst = 0;
|
|
|
let projGljs = calcBase.project.projectGLJ.datas.gljList;
|
|
|
for(let glj of projGljs){
|
|
@@ -647,13 +662,15 @@ let baseFigureTemplate = {
|
|
|
//调整价
|
|
|
let adjPrc = calcBase.project.projectGLJ.getAdjustPrice(glj);
|
|
|
//价差
|
|
|
- let dffPrc = parseFloat(glj.unit_price.market_price - adjPrc).toDecimal(decimalObj.glj.unitPrice);
|
|
|
- rst = (rst + parseFloat(glj.techQuantity * dffPrc).toDecimal(decimalObj.bills.totalPrice)).toDecimal(decimalObj.bills.totalPrice);
|
|
|
+ let marketPrice = tender ? calcBase.project.projectGLJ.getTenderMarketPrice(glj) : glj.unit_price.market_price;
|
|
|
+ let dffPrc = parseFloat(marketPrice - adjPrc).toDecimal(decimalObj.glj.unitPrice);
|
|
|
+ rst = (rst + parseFloat(glj[quantityType] * dffPrc).toDecimal(decimalObj.bills.totalPrice)).toDecimal(decimalObj.bills.totalPrice);
|
|
|
}
|
|
|
}
|
|
|
return rst;
|
|
|
},
|
|
|
- 'JSCSXMJXJC': function () {//技术措施项目机械价差
|
|
|
+ 'JSCSXMJXJC': function (tender) {//技术措施项目机械价差
|
|
|
+ const quantityType = tender ? 'tenderTechQuantity' : 'techQuantity';
|
|
|
let rst = 0;
|
|
|
let projGljs = calcBase.project.projectGLJ.datas.gljList;
|
|
|
for(let glj of projGljs){
|
|
@@ -661,8 +678,9 @@ let baseFigureTemplate = {
|
|
|
//调整价
|
|
|
let adjPrc = calcBase.project.projectGLJ.getAdjustPrice(glj);
|
|
|
//价差
|
|
|
- let dffPrc = parseFloat(glj.unit_price.market_price - adjPrc).toDecimal(decimalObj.glj.unitPrice);
|
|
|
- rst = (rst + parseFloat(glj.techQuantity * dffPrc).toDecimal(decimalObj.bills.totalPrice)).toDecimal(decimalObj.bills.totalPrice);
|
|
|
+ let marketPrice = tender ? calcBase.project.projectGLJ.getTenderMarketPrice(glj) : glj.unit_price.market_price;
|
|
|
+ let dffPrc = parseFloat(marketPrice - adjPrc).toDecimal(decimalObj.glj.unitPrice);
|
|
|
+ rst = (rst + parseFloat(glj[quantityType] * dffPrc).toDecimal(decimalObj.bills.totalPrice)).toDecimal(decimalObj.bills.totalPrice);
|
|
|
}
|
|
|
}
|
|
|
return rst;
|
|
@@ -780,52 +798,62 @@ let baseFigureTemplate = {
|
|
|
}
|
|
|
return rst;
|
|
|
},
|
|
|
- 'JDRGF': function () {//甲定人工费
|
|
|
+ 'JDRGF': function (tender) {//甲定人工费
|
|
|
+ const quantityType = tender ? 'tenderQuantity' : 'quantity';
|
|
|
let rst = 0;
|
|
|
let projGljs = calcBase.project.projectGLJ.datas.gljList;
|
|
|
for(let glj of projGljs){
|
|
|
if(glj.type === gljType.LABOUR && (glj.supply === supplyType.JDYG || glj.supply === supplyText.JDYG)){
|
|
|
- rst = (rst + parseFloat(glj.quantity * glj.unit_price.market_price).toDecimal(decimalObj.bills.totalPrice)).toDecimal(decimalObj.bills.totalPrice);
|
|
|
+ let marketPrice = tender ? calcBase.project.projectGLJ.getTenderMarketPrice(glj) : glj.unit_price.market_price;
|
|
|
+ rst = (rst + parseFloat(glj[quantityType] * marketPrice).toDecimal(decimalObj.bills.totalPrice)).toDecimal(decimalObj.bills.totalPrice);
|
|
|
}
|
|
|
}
|
|
|
return rst;
|
|
|
},
|
|
|
- 'JDCLF': function () {//甲定材料费
|
|
|
+ 'JDCLF': function (tender) {//甲定材料费
|
|
|
+ const quantityType = tender ? 'tenderQuantity' : 'quantity';
|
|
|
let rst = 0;
|
|
|
let projGljs = calcBase.project.projectGLJ.datas.gljList;
|
|
|
for(let glj of projGljs){
|
|
|
if(baseMaterialTypes.includes(glj.type) && glj.ratio_data.length === 0 && (glj.supply === supplyType.JDYG || glj.supply === supplyText.JDYG)){
|
|
|
- rst = (rst + parseFloat(glj.quantity * glj.unit_price.market_price).toDecimal(decimalObj.bills.totalPrice)).toDecimal(decimalObj.bills.totalPrice);
|
|
|
+ let marketPrice = tender ? calcBase.project.projectGLJ.getTenderMarketPrice(glj) : glj.unit_price.market_price;
|
|
|
+ rst = (rst + parseFloat(glj[quantityType] * marketPrice).toDecimal(decimalObj.bills.totalPrice)).toDecimal(decimalObj.bills.totalPrice);
|
|
|
}
|
|
|
}
|
|
|
return rst;
|
|
|
},
|
|
|
- 'JDJXF': function () {//甲定机械费
|
|
|
+ 'JDJXF': function (tender) {//甲定机械费
|
|
|
+ const quantityType = tender ? 'tenderQuantity' : 'quantity';
|
|
|
let rst = 0;
|
|
|
let projGljs = calcBase.project.projectGLJ.datas.gljList;
|
|
|
for(let glj of projGljs){
|
|
|
if(baseMachineTypes.includes(glj.type) && glj.ratio_data.length === 0 && (glj.supply === supplyType.JDYG || glj.supply === supplyText.JDYG)){
|
|
|
- rst = (rst + parseFloat(glj.quantity * glj.unit_price.market_price).toDecimal(decimalObj.bills.totalPrice)).toDecimal(decimalObj.bills.totalPrice);
|
|
|
+ let marketPrice = tender ? calcBase.project.projectGLJ.getTenderMarketPrice(glj) : glj.unit_price.market_price;
|
|
|
+ rst = (rst + parseFloat(glj[quantityType] * marketPrice).toDecimal(decimalObj.bills.totalPrice)).toDecimal(decimalObj.bills.totalPrice);
|
|
|
}
|
|
|
}
|
|
|
return rst;
|
|
|
},
|
|
|
- 'JDZCF': function () {//甲定主材费
|
|
|
+ 'JDZCF': function (tender) {//甲定主材费
|
|
|
+ const quantityType = tender ? 'tenderQuantity' : 'quantity';
|
|
|
let rst = 0;
|
|
|
let projGljs = calcBase.project.projectGLJ.datas.gljList;
|
|
|
for(let glj of projGljs){
|
|
|
if(glj.type === gljType.MAIN_MATERIAL && (glj.supply === supplyType.JDYG || glj.supply === supplyText.JDYG)){
|
|
|
- rst = (rst + parseFloat(glj.quantity * glj.unit_price.market_price).toDecimal(decimalObj.bills.totalPrice)).toDecimal(decimalObj.bills.totalPrice);
|
|
|
+ let marketPrice = tender ? calcBase.project.projectGLJ.getTenderMarketPrice(glj) : glj.unit_price.market_price;
|
|
|
+ rst = (rst + parseFloat(glj[quantityType] * marketPrice).toDecimal(decimalObj.bills.totalPrice)).toDecimal(decimalObj.bills.totalPrice);
|
|
|
}
|
|
|
}
|
|
|
return rst;
|
|
|
},
|
|
|
- 'JDSBF': function () {//甲定设备费
|
|
|
+ 'JDSBF': function (tender) {//甲定设备费
|
|
|
+ const quantityType = tender ? 'tenderQuantity' : 'quantity';
|
|
|
let rst = 0;
|
|
|
let projGljs = calcBase.project.projectGLJ.datas.gljList;
|
|
|
for(let glj of projGljs){
|
|
|
if(glj.type === gljType.EQUIPMENT && (glj.supply === supplyType.JDYG || glj.supply === supplyText.JDYG)){
|
|
|
- rst = (rst + parseFloat(glj.quantity * glj.unit_price.market_price).toDecimal(decimalObj.bills.totalPrice)).toDecimal(decimalObj.bills.totalPrice);
|
|
|
+ let marketPrice = tender ? calcBase.project.projectGLJ.getTenderMarketPrice(glj) : glj.unit_price.market_price;
|
|
|
+ rst = (rst + parseFloat(glj[quantityType] * marketPrice).toDecimal(decimalObj.bills.totalPrice)).toDecimal(decimalObj.bills.totalPrice);
|
|
|
}
|
|
|
}
|
|
|
return rst;
|