|
@@ -494,10 +494,13 @@ class StageIm {
|
|
im = {
|
|
im = {
|
|
id: this.ImData.length + 1,
|
|
id: this.ImData.length + 1,
|
|
lid: node.id, pid: '', code: p.b_code, name: p.name, unit: p.unit, unit_price: p.unit_price,
|
|
lid: node.id, pid: '', code: p.b_code, name: p.name, unit: p.unit, unit_price: p.unit_price,
|
|
- quantity: 0,
|
|
|
|
|
|
+ quantity: 0, total_price: 0,
|
|
jl: 0, contract_jl: 0, qc_jl: 0,
|
|
jl: 0, contract_jl: 0, qc_jl: 0,
|
|
pre_jl: 0, pre_contract_jl: 0, pre_qc_jl: 0,
|
|
pre_jl: 0, pre_contract_jl: 0, pre_qc_jl: 0,
|
|
end_jl: 0, end_contract_jl: 0, end_qc_jl: 0,
|
|
end_jl: 0, end_contract_jl: 0, end_qc_jl: 0,
|
|
|
|
+ tp: 0, contract_tp: 0, qc_tp: 0,
|
|
|
|
+ pre_tp: 0, pre_contract_tp: 0, pre_qc_tp: 0,
|
|
|
|
+ end_tp: 0, end_contract_tp: 0, end_qc_tp: 0,
|
|
peg: peg ? this._getPegStr(peg.name) : '',
|
|
peg: peg ? this._getPegStr(peg.name) : '',
|
|
position: '',
|
|
position: '',
|
|
};
|
|
};
|
|
@@ -521,22 +524,36 @@ class StageIm {
|
|
//}
|
|
//}
|
|
this._generateZlChangeData(p, im);
|
|
this._generateZlChangeData(p, im);
|
|
im.quantity = this.ctx.helper.add(im.quantity, p.quantity);
|
|
im.quantity = this.ctx.helper.add(im.quantity, p.quantity);
|
|
|
|
+ im.total_price = this.ctx.helper.add(im.total_price, p.total_price);
|
|
|
|
|
|
im.jl = this.ctx.helper.add(im.jl, p.gather_qty);
|
|
im.jl = this.ctx.helper.add(im.jl, p.gather_qty);
|
|
im.contract_jl = this.ctx.helper.add(im.contract_jl, p.contract_qty);
|
|
im.contract_jl = this.ctx.helper.add(im.contract_jl, p.contract_qty);
|
|
im.qc_jl = this.ctx.helper.add(im.qc_jl, p.qc_qty);
|
|
im.qc_jl = this.ctx.helper.add(im.qc_jl, p.qc_qty);
|
|
|
|
|
|
|
|
+ im.tp = this.ctx.helper.add(im.tp, p.gather_tp);
|
|
|
|
+ im.contract_tp = this.ctx.helper.add(im.contract_tp, p.contract_tp);
|
|
|
|
+ im.qc_tp = this.ctx.helper.add(im.qc_tp, p.qc_tp);
|
|
|
|
+
|
|
im.pre_jl = this.ctx.helper.add(im.pre_jl, p.pre_gather_qty);
|
|
im.pre_jl = this.ctx.helper.add(im.pre_jl, p.pre_gather_qty);
|
|
im.pre_contract_jl = this.ctx.helper.add(im.pre_contract_jl, p.pre_contract_qty);
|
|
im.pre_contract_jl = this.ctx.helper.add(im.pre_contract_jl, p.pre_contract_qty);
|
|
im.pre_qc_jl = this.ctx.helper.add(im.pre_qc_jl, p.pre_qc_qty);
|
|
im.pre_qc_jl = this.ctx.helper.add(im.pre_qc_jl, p.pre_qc_qty);
|
|
|
|
|
|
|
|
+ im.pre_tp = this.ctx.helper.add(im.pre_tp, p.pre_gather_tp);
|
|
|
|
+ im.pre_contract_tp = this.ctx.helper.add(im.pre_contract_tp, p.pre_contract_tp);
|
|
|
|
+ im.pre_qc_tp = this.ctx.helper.add(im.pre_qc_tp, p.pre_qc_tp);
|
|
|
|
+
|
|
im.end_jl = this.ctx.helper.add(im.end_jl, p.end_gather_qty);
|
|
im.end_jl = this.ctx.helper.add(im.end_jl, p.end_gather_qty);
|
|
im.end_contract_jl = this.ctx.helper.add(im.end_contract_jl, p.end_contract_qty);
|
|
im.end_contract_jl = this.ctx.helper.add(im.end_contract_jl, p.end_contract_qty);
|
|
im.end_qc_jl = this.ctx.helper.add(im.end_qc_jl, p.end_qc_qty);
|
|
im.end_qc_jl = this.ctx.helper.add(im.end_qc_jl, p.end_qc_qty);
|
|
|
|
+
|
|
|
|
+ im.end_tp = this.ctx.helper.add(im.end_tp, p.end_gather_tp);
|
|
|
|
+ im.end_contract_tp = this.ctx.helper.add(im.end_contract_tp, p.end_contract_tp);
|
|
|
|
+ im.end_qc_tp = this.ctx.helper.add(im.end_qc_tp, p.end_qc_tp);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
_generateBwImData (node) {
|
|
_generateBwImData (node) {
|
|
|
|
+ const tp_decimal = this.ctx.tender.info.decimal.tp;
|
|
const posterity = this.billsTree.getPosterity(node);
|
|
const posterity = this.billsTree.getPosterity(node);
|
|
for (const p of posterity) {
|
|
for (const p of posterity) {
|
|
if (p.children && p.children.length > 0 ) { continue; }
|
|
if (p.children && p.children.length > 0 ) { continue; }
|
|
@@ -550,7 +567,7 @@ class StageIm {
|
|
const im = {
|
|
const im = {
|
|
id: this.ImData.length + 1,
|
|
id: this.ImData.length + 1,
|
|
lid: node.id, code: p.b_code, name: p.name, unit: p.unit, unit_price: p.unit_price, pid: pp.id,
|
|
lid: node.id, code: p.b_code, name: p.name, unit: p.unit, unit_price: p.unit_price, pid: pp.id,
|
|
- quantity: pp.quantity,
|
|
|
|
|
|
+ quantity: pp.quantity
|
|
jl: pp.gather_qty, contract_jl: pp.contract_qty, qc_jl: pp.qc_qty,
|
|
jl: pp.gather_qty, contract_jl: pp.contract_qty, qc_jl: pp.qc_qty,
|
|
pre_jl: pp.pre_gather_qty, pre_contract_jl: pp.pre_contract_qty, pre_qc_jl: pp.pre_qc_qty,
|
|
pre_jl: pp.pre_gather_qty, pre_contract_jl: pp.pre_contract_qty, pre_qc_jl: pp.pre_qc_qty,
|
|
end_jl: pp.end_gather_qty, end_contract_jl: pp.end_contract_qty, end_qc_jl: pp.end_qc_qty,
|
|
end_jl: pp.end_gather_qty, end_contract_jl: pp.end_contract_qty, end_qc_jl: pp.end_qc_qty,
|
|
@@ -561,6 +578,16 @@ class StageIm {
|
|
changes: [],
|
|
changes: [],
|
|
position: pp.position,
|
|
position: pp.position,
|
|
};
|
|
};
|
|
|
|
+ im.total_price = this.ctx.helper.mul(im.quantity, im.unit_price, tp_decimal);
|
|
|
|
+ im.tp = this.ctx.helper.mul(im.jl, im.unit_price, tp_decimal);
|
|
|
|
+ im.contract_tp = this.ctx.helper.mul(im.contract_jl, im.unit_price, tp_decimal);
|
|
|
|
+ im.qc_tp = this.ctx.helper.mul(im.pre_qc_jl, im.unit_price, tp_decimal);
|
|
|
|
+ im.pre_tp = this.ctx.helper.mul(im.pre_jl, im.unit_price, tp_decimal);
|
|
|
|
+ im.pre_contract_tp = this.ctx.helper.mul(im.pre_contract_jl, im.unit_price, tp_decimal);
|
|
|
|
+ im.pre_qc_tp = this.ctx.helper.mul(im.pre_qc_jl, im.unit_price, tp_decimal);
|
|
|
|
+ im.end_tp = this.ctx.helper.mul(im.end_jl, im.unit_price, tp_decimal);
|
|
|
|
+ im.end_contract_tp = this.ctx.helper.mul(im.end_contract_jl, im.unit_price, tp_decimal);
|
|
|
|
+ im.end_qc_tp = this.ctx.helper.mul(im.end_qc_jl, im.unit_price, tp_decimal);
|
|
im.calc_memo = '本期计量:' + im.jl + ' ' + im.unit;
|
|
im.calc_memo = '本期计量:' + im.jl + ' ' + im.unit;
|
|
this._checkCustomDetail(im);
|
|
this._checkCustomDetail(im);
|
|
this.ImData.push(im);
|
|
this.ImData.push(im);
|
|
@@ -578,10 +605,13 @@ class StageIm {
|
|
const im = {
|
|
const im = {
|
|
id: this.ImData.length + 1,
|
|
id: this.ImData.length + 1,
|
|
lid: node.id, code: p.b_code, name: p.name, unit: p.unit, unit_price: p.unit_price, pid: '',
|
|
lid: node.id, code: p.b_code, name: p.name, unit: p.unit, unit_price: p.unit_price, pid: '',
|
|
- quantity: p.quantity,
|
|
|
|
|
|
+ quantity: p.quantity, total_price: p.total_price,
|
|
jl: p.gather_qty, contract_jl: p.contract_qty, qc_jl: p.qc_qty,
|
|
jl: p.gather_qty, contract_jl: p.contract_qty, qc_jl: p.qc_qty,
|
|
pre_jl: p.pre_gather_qty, pre_contract_jl: p.pre_contract_qty, pre_qc_jl: p.pre_qc_qty,
|
|
pre_jl: p.pre_gather_qty, pre_contract_jl: p.pre_contract_qty, pre_qc_jl: p.pre_qc_qty,
|
|
end_jl: p.end_gather_qty, end_contract_jl: p.end_contract_qty, end_qc_jl: p.end_qc_qty,
|
|
end_jl: p.end_gather_qty, end_contract_jl: p.end_contract_qty, end_qc_jl: p.end_qc_qty,
|
|
|
|
+ tp: p.gather_tp, contract_tp: p.contract_tp, qc_tp: p.qc_tp,
|
|
|
|
+ pre_tp: p.pre_gather_tp, pre_contract_tp: p.pre_contract_tp, pre_qc_tp: p.pre_qc_tp,
|
|
|
|
+ end_tp: p.end_gather_tp, end_contract_tp: p.end_contract_tp, end_qc_tp: p.end_qc_tp,
|
|
bw: bw,
|
|
bw: bw,
|
|
peg: peg ? this._getPegStr(peg.name) : '',
|
|
peg: peg ? this._getPegStr(peg.name) : '',
|
|
xm: node.name,
|
|
xm: node.name,
|