|
@@ -507,7 +507,7 @@ let treeNodeTools = {
|
|
|
return treeNodeCalcType.ctRationCalcProgram;
|
|
|
}
|
|
|
else if (this.isNullBill(treeNode)){
|
|
|
- return treeNodeCalcType.ctCommonUnitFee;
|
|
|
+ return treeNodeCalcType.ctNull;
|
|
|
}
|
|
|
else if (this.isLeafBill(treeNode)) {
|
|
|
if (treeNode.children && treeNode.children.length > 0){
|
|
@@ -827,7 +827,6 @@ class CalcProgram {
|
|
|
for (let glj of treeNode.data.gljList) {
|
|
|
if (eTypes.indexOf(glj.type) >= 0) {
|
|
|
if (glj.isEstimate){
|
|
|
- 'code','name','specs','unit','type'
|
|
|
GLJObjs.push({code: glj.code, name: glj.name, specs: glj.specs, unit: glj.unit, type: glj.type,
|
|
|
quantity: glj.quantity, marketPrice: glj.marketPrice});
|
|
|
}
|
|
@@ -976,22 +975,17 @@ class CalcProgram {
|
|
|
};
|
|
|
treeNode.data.calcTemplate = {"calcItems": rst};
|
|
|
}
|
|
|
- // 叶子清单的手工综合单价计算
|
|
|
- else if (treeNode.calcType == treeNodeCalcType.ctCommonUnitFee){
|
|
|
+ // 叶子清单无子结点、无公式计算(啥都没有时)
|
|
|
+ else if (treeNode.calcType == treeNodeCalcType.ctNull){
|
|
|
delete treeNode.data.gljList;
|
|
|
if (treeNode.data.calcBase) treeNode.data.calcBase = null; // 不能直接删除该属性,否则无法冲掉库中已存储的值
|
|
|
if (treeNode.data.calcBaseValue) treeNode.data.calcBaseValue = null; // 不能直接删除该属性,否则无法冲掉库中已存储的值
|
|
|
if (treeNode.data.programID) treeNode.data.programID = null;
|
|
|
-
|
|
|
- let uf = (treeNode.data.feesIndex && treeNode.data.feesIndex.common && treeNode.data.feesIndex.common.unitFee) ? treeNode.data.feesIndex.common.unitFee : 0;
|
|
|
- uf = uf.toDecimal(decimalObj.bills.unitPrice);
|
|
|
- let tuf = (treeNode.data.feesIndex && treeNode.data.feesIndex.common && treeNode.data.feesIndex.common.tenderUnitFee) ? treeNode.data.feesIndex.common.tenderUnitFee : 0;
|
|
|
- tuf = tuf.toDecimal(decimalObj.bills.unitPrice);
|
|
|
- let q = treeNode.data.quantity ? treeNode.data.quantity : 0;
|
|
|
- let tf = (uf * q).toDecimal(decimalObj.bills.totalPrice);
|
|
|
- let ttf = (tuf * q).toDecimal(decimalObj.bills.totalPrice);
|
|
|
- deleteUselessFees(treeNode);
|
|
|
- treeNodeTools.checkFeeField(treeNode, {'fieldName': 'common', 'unitFee': uf, 'totalFee': tf});
|
|
|
+ if (treeNode.data.fees && treeNode.data.fees.length > 0){
|
|
|
+ treeNode.data.fees = null;
|
|
|
+ treeNode.data.feesIndex = null;
|
|
|
+ treeNode.changed = true;
|
|
|
+ }
|
|
|
treeNode.data.calcTemplate = {"calcItems": []};
|
|
|
}
|
|
|
// 叶子清单公式计算
|