|
@@ -72,9 +72,9 @@ class loadStageExcelTree {
|
|
|
let ssp = sourceStagePos.find(x => { return x.pid === sp.id; });
|
|
|
sourceStagePos.splice(sourceStagePos.indexOf(ssp), 1);
|
|
|
if (ssp) {
|
|
|
- this.updatePos.push({ id: ssp.id, contract_qty: p.contract_qty });
|
|
|
+ this.updatePos.push({ id: ssp.id, contract_qty: p.contract_qty, postil: p.postil || ssp.postil || '' });
|
|
|
} else {
|
|
|
- this.insertPos.push({ tid: this.default.tid, sid: this.default.sid, said: this.default.said, times: 1, order: 0, lid: source.id, pid:sp.id, contract_qty: p.contract_qty });
|
|
|
+ this.insertPos.push({ tid: this.default.tid, sid: this.default.sid, said: this.default.said, times: 1, order: 0, lid: source.id, pid:sp.id, contract_qty: p.contract_qty, postil: p.postil || ssp.postil || '' });
|
|
|
}
|
|
|
}
|
|
|
for (const ssp of sourceStagePos) {
|
|
@@ -82,9 +82,9 @@ class loadStageExcelTree {
|
|
|
}
|
|
|
const contract_tp = this.ctx.helper.mul(contract_qty, source.unit_price, this.decimal.tp);
|
|
|
if (curStageBills) {
|
|
|
- this.updateBills.push({ id: curStageBills.id, contract_qty, contract_tp });
|
|
|
+ this.updateBills.push({ id: curStageBills.id, contract_qty, contract_tp, postil: node.postil || source.postil || '' });
|
|
|
} else {
|
|
|
- if (contract_qty) this.insertBills.push({ tid: this.default.tid, sid: this.default.sid, said: this.default.said, times: 1, order: 0, lid: source.id, contract_qty, contract_tp });
|
|
|
+ if (contract_qty) this.insertBills.push({ tid: this.default.tid, sid: this.default.sid, said: this.default.said, times: 1, order: 0, lid: source.id, contract_qty, contract_tp, postil: node.postil || source.postil || '' });
|
|
|
}
|
|
|
} else {
|
|
|
if (!node.contract_qty && !node.contract_tp) return;
|
|
@@ -94,9 +94,9 @@ class loadStageExcelTree {
|
|
|
: this.ctx.helper.round(contract_tp, this.decimal.tp);
|
|
|
|
|
|
if (curStageBills) {
|
|
|
- this.updateBills.push({ id: curStageBills.id, contract_qty: contract_qty, contract_tp: contract_tp });
|
|
|
+ this.updateBills.push({ id: curStageBills.id, contract_qty: contract_qty, contract_tp: contract_tp, postil: node.postil || source.postil || '' });
|
|
|
} else {
|
|
|
- this.insertBills.push({ tid: this.default.tid, sid: this.default.sid, said: this.default.said, times: 1, order: 0, lid: source.id, contract_qty: contract_qty, contract_tp: contract_tp });
|
|
|
+ this.insertBills.push({ tid: this.default.tid, sid: this.default.sid, said: this.default.said, times: 1, order: 0, lid: source.id, contract_qty: contract_qty, contract_tp: contract_tp, postil: node.postil || source.postil || '' });
|
|
|
}
|
|
|
}
|
|
|
}
|