|
@@ -811,6 +811,8 @@ class StageIm {
|
|
|
lxid: leafXmj.id,
|
|
|
code: leafXmj.code,
|
|
|
name: leafXmj.name,
|
|
|
+ contract_expr: [],
|
|
|
+ qc_expr: [],
|
|
|
};
|
|
|
im.leafXmjs.push(lx);
|
|
|
}
|
|
@@ -818,6 +820,8 @@ class StageIm {
|
|
|
lx.contract_jl = this.ctx.helper.add(lx.contract_jl, node.contract_qty);
|
|
|
lx.qc_jl = this.ctx.helper.add(lx.qc_jl, node.qc_qty);
|
|
|
lx.qc_minus_jl = this.ctx.helper.add(lx.qc_minus_jl, node.qc_minus_qty);
|
|
|
+ lx.contract_expr.push(node.contract_expr);
|
|
|
+ lx.qc_expr.push(node.qc_qty)
|
|
|
this._generateZlPosData(node, lx);
|
|
|
}
|
|
|
_generateZlChangeData(node, im) {
|
|
@@ -966,13 +970,35 @@ class StageIm {
|
|
|
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 = '本期计量:' + (this.ctx.helper.checkZero(im.jl) ? 0 : im.jl) + (im.qc_minus_jl ? (` (不计价 ${im.qc_minus_jl}) `) : ' ') + im.unit;
|
|
|
this.ImData.push(im);
|
|
|
for (const c of this.changes) {
|
|
|
if (c.lid === p.id && c.pid === pp.id && c.qty && c.qty !== 0) {
|
|
|
im.changes.push(c);
|
|
|
}
|
|
|
}
|
|
|
+ const calc_memo = [];
|
|
|
+ calc_memo.push('本期计量:' + (this.ctx.helper.checkZero(im.jl) ? 0 : im.jl) + (im.qc_minus_jl ? (` (不计价 ${im.qc_minus_jl}) `) : ' ') + im.unit);
|
|
|
+ const contract_expr = pp.contract_expr ? pp.contract_qty + '=' + pp.contract_expr : (pp.contract_qty || 0);
|
|
|
+ let qc_expr = '', minus_qc_expr = '';
|
|
|
+ im.changes.forEach(x => {
|
|
|
+ if (x.no_value) {
|
|
|
+ if (minus_qc_expr) {
|
|
|
+ minus_qc_expr = minus_qc_expr + (x.qty > 0 ? '+' + x.qty : x.qty);
|
|
|
+ } else {
|
|
|
+ minus_qc_expr = minus_qc_expr + x.qty;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (qc_expr) {
|
|
|
+ qc_expr = qc_expr + (x.qty > 0 ? '+' + x.qty : x.qty);
|
|
|
+ } else {
|
|
|
+ qc_expr = qc_expr + x.qty;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ qc_expr = qc_expr ? pp.qc_qty + '=' + qc_expr : (pp.qc_qty || 0);
|
|
|
+ minus_qc_expr = minus_qc_expr ? pp.qc_minus_qty + '=' + minus_qc_expr : (pp.qc_minus_qty || 0);
|
|
|
+ calc_memo.push(`其中合同计量:${contract_expr};变更计量:${qc_expr};变更不计价:${minus_qc_expr}`);
|
|
|
+ im.calc_memo = calc_memo.join('\n');
|
|
|
}
|
|
|
} else {
|
|
|
if (this.ctx.helper.checkZero(p.gather_qty) && this.ctx.helper.checkZero(p.gather_tp) && this.ctx.helper.checkZero(p.qc_minus_qty)) { continue; }
|
|
@@ -996,14 +1022,37 @@ class StageIm {
|
|
|
position: '',
|
|
|
lIndex: this.billsTree.getNodeSerialNo(node),
|
|
|
};
|
|
|
- im.calc_memo = '本期计量:' + (this.ctx.helper.checkZero(im.jl) ? 0 : im.jl) + (im.qc_minus_jl ? (` (不计价 ${im.qc_minus_jl}) `) : ' ') + im.unit;
|
|
|
this.ImData.push(im);
|
|
|
for (const c of this.changes) {
|
|
|
if (c.lid === p.id && c.pid == -1 && c.qty && c.qty !== 0) {
|
|
|
im.changes.push(c);
|
|
|
}
|
|
|
}
|
|
|
- this.import_changes.forEach(x => { if (x.lid === p.id) im.changes.push(x) });
|
|
|
+ this.import_changes.forEach(x => { if (x.lid === p.id && x.rela_qty) im.changes.push(x)});
|
|
|
+ const calc_memo = [];
|
|
|
+ calc_memo.push('本期计量:' + (this.ctx.helper.checkZero(im.jl) ? 0 : im.jl) + (im.qc_minus_jl ? (` (不计价 ${im.qc_minus_jl}) `) : ' ') + im.unit);
|
|
|
+ const contract_expr = p.contract_expr ? p.contract_qty + '=' + p.contract_expr : (p.contract_qty || 0);
|
|
|
+ let qc_expr = '', minus_qc_expr = '';
|
|
|
+ im.changes.forEach(x => {
|
|
|
+ const prefix = x.rela_no_value === undefined ? '' : 'rela_';
|
|
|
+ if (x[prefix + 'no_value']) {
|
|
|
+ if (minus_qc_expr) {
|
|
|
+ minus_qc_expr = minus_qc_expr + (x[prefix + 'qty'] > 0 ? '+' + x[prefix + 'qty'] : x[prefix + 'qty']);
|
|
|
+ } else {
|
|
|
+ minus_qc_expr = minus_qc_expr + x[prefix + 'qty'];
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (qc_expr) {
|
|
|
+ qc_expr = qc_expr + (x[prefix + 'qty'] > 0 ? '+' + x[prefix + 'qty'] : x[prefix + 'qty']);
|
|
|
+ } else {
|
|
|
+ qc_expr = qc_expr + x[prefix + 'qty'];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ qc_expr = qc_expr ? p.qc_qty + '=' + qc_expr : (p.qc_qty || 0);
|
|
|
+ minus_qc_expr = minus_qc_expr ? p.qc_minus_qty + '=' + minus_qc_expr : (p.qc_minus_qty || 0);
|
|
|
+ calc_memo.push(`其中合同计量:${contract_expr};变更计量:${qc_expr};变更不计价:${minus_qc_expr}`);
|
|
|
+ im.calc_memo = calc_memo.join('\n');
|
|
|
}
|
|
|
}
|
|
|
}
|