|
@@ -442,6 +442,9 @@ class StageIm {
|
|
|
|
|
|
_addBwBillsGclBills(im, bills) {
|
|
|
const helper = this.ctx.helper;
|
|
|
+ if (!im.imBills) im.imBills = [];
|
|
|
+ im.imBills.push(bills);
|
|
|
+
|
|
|
if (!im.gclBills) im.gclBills = [];
|
|
|
let gcl = im.gclBills.find(function (x) {
|
|
|
return (!bills.b_code || bills.b_code === x.b_code) &&
|
|
@@ -551,13 +554,25 @@ class StageIm {
|
|
|
}
|
|
|
if (imDefault.contract_jl || imDefault.qc_jl) {
|
|
|
imDefault.jl = this.ctx.helper.add(imDefault.contract_jl, imDefault.qc_jl);
|
|
|
+ imDefault.id = this.ImData.length + 1;
|
|
|
this.ImData.push(imDefault);
|
|
|
+ for (const b of imDefault.imBills) {
|
|
|
+ b.imid = imDefault.id;
|
|
|
+ this.ImBillsData.push(b);
|
|
|
+ }
|
|
|
+ delete imDefault.imBills;
|
|
|
}
|
|
|
for (const im of nodeImData) {
|
|
|
this._calculateBwBillsIm(im);
|
|
|
im.drawing_code = this.ctx.helper._.uniq(im.drawing_code).join(mergeChar);
|
|
|
im.position = this.ctx.helper._.uniq(im.position).join(mergeChar);
|
|
|
+ im.id = this.ImData.length + 1;
|
|
|
this.ImData.push(im);
|
|
|
+ for (const b of im.imBills) {
|
|
|
+ b.imid = im.id;
|
|
|
+ this.ImBillsData.push(b);
|
|
|
+ }
|
|
|
+ delete im.imBills;
|
|
|
}
|
|
|
}
|
|
|
|