|
@@ -159,13 +159,14 @@ class PayCalculate {
|
|
|
|
|
|
this.pre = this.stage.preCheckedStage ? await this.ctx.service.stageBillsFinal.getSumTotalPrice(this.stage.tid, this.stage.preCheckedStage.order) : {};
|
|
|
this.cur = await this.ctx.service.stageBills.getSumTotalPrice(this.stage);
|
|
|
+ const pcSum = await this.ctx.service.stageBillsPc.getSumTotalPrice(stage);
|
|
|
this.add = {};
|
|
|
if (this.pre) {
|
|
|
- this.add.contract_tp = this.ctx.helper.sum([this.pre.contract_tp, this.cur.contract_tp, this.cur.contract_pc_tp]);
|
|
|
- this.add.qc_tp = this.ctx.helper.sum([this.pre.qc_tp, this.cur.qc_tp, this.cur.qc_pc_tp]);
|
|
|
+ this.add.contract_tp = this.ctx.helper.sum([this.pre.contract_tp, this.cur.contract_tp, pcSum.contract_pc_tp]);
|
|
|
+ this.add.qc_tp = this.ctx.helper.sum([this.pre.qc_tp, this.cur.qc_tp, pcSum.qc_pc_tp]);
|
|
|
} else {
|
|
|
- this.add.contract_tp = this.ctx.helper.add(this.cur.contract_tp, this.cur.contract_pc_tp);
|
|
|
- this.add.qc_tp = this.ctx.helper.add(this.cur.qc_tp, this.cur.qc_pc_tp);
|
|
|
+ this.add.contract_tp = this.ctx.helper.add(this.cur.contract_tp, pcSum.contract_pc_tp);
|
|
|
+ this.add.qc_tp = this.ctx.helper.add(this.cur.qc_tp, pcSum.qc_pc_tp);
|
|
|
}
|
|
|
this.add.gather_tp = this.ctx.helper.add(this.add.contract_tp, this.add.qc_tp);
|
|
|
}
|