|
@@ -467,26 +467,14 @@ let calcTools = {
|
|
|
return result;
|
|
return result;
|
|
|
},
|
|
},
|
|
|
// masterTypeFilter 过滤机械机型:[]全部, [1,2]特大机械 [3,4]中小机械。 detailType 如机上人工费、机械折旧费等
|
|
// masterTypeFilter 过滤机械机型:[]全部, [1,2]特大机械 [3,4]中小机械。 detailType 如机上人工费、机械折旧费等
|
|
|
- machineDetailFee: function (
|
|
|
|
|
- treeNode,
|
|
|
|
|
- gljArr,
|
|
|
|
|
- masterTypeFilter,
|
|
|
|
|
- detailType,
|
|
|
|
|
- isTender
|
|
|
|
|
- ) {
|
|
|
|
|
|
|
+ machineDetailFee: function (treeNode, gljArr, masterTypeFilter, detailType, isTender) {
|
|
|
if (!gljArr) return 0;
|
|
if (!gljArr) return 0;
|
|
|
let result = 0;
|
|
let result = 0;
|
|
|
- let nodeQ = isTender
|
|
|
|
|
- ? calcTools.uiNodeTenderQty(treeNode)
|
|
|
|
|
- : calcTools.uiNodeQty(treeNode);
|
|
|
|
|
|
|
+ let nodeQ = isTender ? calcTools.uiNodeTenderQty(treeNode) : calcTools.uiNodeQty(treeNode);
|
|
|
for (let glj of gljArr) {
|
|
for (let glj of gljArr) {
|
|
|
if (baseMachineMasterTypes.includes(glj.type)) {
|
|
if (baseMachineMasterTypes.includes(glj.type)) {
|
|
|
// 机型不符
|
|
// 机型不符
|
|
|
- if (
|
|
|
|
|
- masterTypeFilter.length > 0 &&
|
|
|
|
|
- glj.model &&
|
|
|
|
|
- !masterTypeFilter.includes(glj.model)
|
|
|
|
|
- )
|
|
|
|
|
|
|
+ if (masterTypeFilter.length > 0 && glj.model && !masterTypeFilter.includes(glj.model))
|
|
|
continue;
|
|
continue;
|
|
|
|
|
|
|
|
let gljQ = isTender ? glj.tenderQuantity : glj.quantity;
|
|
let gljQ = isTender ? glj.tenderQuantity : glj.quantity;
|
|
@@ -497,13 +485,7 @@ let calcTools = {
|
|
|
for (let md of mds) {
|
|
for (let md of mds) {
|
|
|
if (md.type == detailType) {
|
|
if (md.type == detailType) {
|
|
|
let q = md["consumption"] ? md["consumption"] : 0;
|
|
let q = md["consumption"] ? md["consumption"] : 0;
|
|
|
- let p = isTender
|
|
|
|
|
- ? md["tenderPrice"]
|
|
|
|
|
- ? md["tenderPrice"]
|
|
|
|
|
- : 0
|
|
|
|
|
- : md["marketPrice"]
|
|
|
|
|
- ? md["marketPrice"]
|
|
|
|
|
- : 0;
|
|
|
|
|
|
|
+ let p = isTender ? md["tenderPrice"] ? md["tenderPrice"] : 0 : md["marketPrice"] ? md["marketPrice"] : 0;
|
|
|
mdSum = mdSum + (q * p).toDecimal(decimalObj.glj.unitPriceHasMix);
|
|
mdSum = mdSum + (q * p).toDecimal(decimalObj.glj.unitPriceHasMix);
|
|
|
mdSum = mdSum.toDecimal(decimalObj.glj.unitPriceHasMix);
|
|
mdSum = mdSum.toDecimal(decimalObj.glj.unitPriceHasMix);
|
|
|
}
|
|
}
|
|
@@ -839,15 +821,10 @@ let calcTools = {
|
|
|
specs: treeNode.data.specs,
|
|
specs: treeNode.data.specs,
|
|
|
unit: treeNode.data.unit,
|
|
unit: treeNode.data.unit,
|
|
|
quantity: 1,
|
|
quantity: 1,
|
|
|
|
|
+ tenderQuantity: 1,
|
|
|
type: treeNode.data.subType, // 注意:这里要取subType
|
|
type: treeNode.data.subType, // 注意:这里要取subType
|
|
|
};
|
|
};
|
|
|
- result = me.machineDetailFee(
|
|
|
|
|
- treeNode,
|
|
|
|
|
- [glj],
|
|
|
|
|
- [],
|
|
|
|
|
- gljType.MACHINE_LABOUR,
|
|
|
|
|
- isTender
|
|
|
|
|
- );
|
|
|
|
|
|
|
+ result = me.machineDetailFee(treeNode, [glj], [], gljType.MACHINE_LABOUR, isTender);
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
|
if (isRCJZC(treeNode, baseName)) {
|
|
if (isRCJZC(treeNode, baseName)) {
|