|
@@ -8,7 +8,7 @@
|
|
|
|
|
|
let defaultBillTemplate = {
|
|
|
ID: 15,
|
|
|
- name: "清单缺省",
|
|
|
+ name: "清单公式",
|
|
|
calcItems: [
|
|
|
{
|
|
|
ID: 1,
|
|
@@ -336,8 +336,10 @@ let executeObj = {
|
|
|
},
|
|
|
HJ: function () {
|
|
|
let me = this;
|
|
|
- let rst = me.treeNode.data.marketUnitFee ? me.treeNode.data.marketUnitFee : 0;
|
|
|
- return rst;
|
|
|
+ let p = me.treeNode.data.calcBase ? me.treeNode.data.calcBase : 0;
|
|
|
+ let q = me.treeNode.data.quantity ? me.treeNode.data.quantity : 1;
|
|
|
+ let u = (p / q).toDecimal(me.digit);
|
|
|
+ return u;
|
|
|
}
|
|
|
};
|
|
|
|
|
@@ -622,10 +624,16 @@ class CalcProgram {
|
|
|
};
|
|
|
}
|
|
|
else if (treeNode.calcType == treeNodeCalcType.ctRationCalcProgram) {
|
|
|
- let muf = treeNode.data.marketUnitFee ? treeNode.data.marketUnitFee : 0;
|
|
|
- let q = treeNode.data.quantity ? treeNode.data.quantity : 0;
|
|
|
- treeNode.data.marketTotalFee = (muf * q).toDecimal(me.digit);
|
|
|
- treeNode.data.gljList = me.project.ration_glj.getGljArrByRation(treeNode.data.ID);
|
|
|
+ if (treeNode.sourceType === me.project.Ration.getSourceType()){
|
|
|
+ treeNode.data.gljList = me.project.ration_glj.getGljArrByRation(treeNode.data.ID);
|
|
|
+ }
|
|
|
+ else if (treeNode.sourceType === me.project.VolumePrice.getSourceType()){
|
|
|
+ delete treeNode.data.gljList;
|
|
|
+ let muf = treeNode.data.marketUnitFee ? treeNode.data.marketUnitFee : 0;
|
|
|
+ let q = treeNode.data.quantity ? treeNode.data.quantity : 0;
|
|
|
+ treeNode.data.marketTotalFee = (muf * q).toDecimal(me.digit);
|
|
|
+ };
|
|
|
+
|
|
|
if (treeNode.data.programID == undefined){
|
|
|
treeNode.data.programID = projectInfoObj.projectInfo.property.engineering;
|
|
|
};
|
|
@@ -732,6 +740,7 @@ class CalcProgram {
|
|
|
projectID: me.project.ID(),
|
|
|
type: node.data.type,
|
|
|
quantity: node.data.quantity,
|
|
|
+ calcBase: node.data.calcBase,
|
|
|
programID: node.data.programID,
|
|
|
marketUnitFee: node.data.marketUnitFee,
|
|
|
marketTotalFee: node.data.marketTotalFee,
|