|
@@ -433,6 +433,7 @@ const stageIm = (function () {
|
|
|
position: '',
|
|
|
lIndex: nodeIndex,
|
|
|
custom_define: [],
|
|
|
+ source: [{id: node.ledger_id, code: node.code, b_code: node.b_code}],
|
|
|
};
|
|
|
if (stage.im_gather && node.check) {
|
|
|
im.bw = getZlGatherBw(node, peg);
|
|
@@ -490,6 +491,7 @@ const stageIm = (function () {
|
|
|
bw: bw, jldy: node.name,
|
|
|
changes: [], gclBills: [],
|
|
|
custom_define: [],
|
|
|
+ source: [{id: node.ledger_id, code: node.code, b_code: node.b_code}],
|
|
|
};
|
|
|
checkCustomDetail(imDefault);
|
|
|
for (const p of posterity) {
|
|
@@ -513,10 +515,12 @@ const stageIm = (function () {
|
|
|
bw: bw, jldy: pp.name,
|
|
|
changes: [], gclBills: [],
|
|
|
custom_define: [],
|
|
|
+ source: [],
|
|
|
};
|
|
|
nodeImData.push(im);
|
|
|
checkCustomDetail(im);
|
|
|
}
|
|
|
+ im.source.push({id: p.ledger_id, code: p.code, b_code: p.b_code});
|
|
|
|
|
|
for (const c of changes) {
|
|
|
if (c.lid === p.id && c.pid == pp.id && c.qty && c.qty !== 0) {
|
|
@@ -651,6 +655,7 @@ const stageIm = (function () {
|
|
|
position: '',
|
|
|
lIndex: nodeIndex,
|
|
|
custom_define: [],
|
|
|
+ source: [],
|
|
|
};
|
|
|
if (stage.im_gather && node.check) {
|
|
|
im.bw = getZlGatherBw(node, peg);
|
|
@@ -665,6 +670,7 @@ const stageIm = (function () {
|
|
|
checkCustomDetail(im);
|
|
|
ImData.push(im);
|
|
|
}
|
|
|
+ im.source.push({id: p.ledger_id, code: p.code, b_code: p.b_code});
|
|
|
//if (!stage.im_gather || !node.check) {
|
|
|
generateZlLeafXmjData(p, im, 'gather_qty');
|
|
|
//}
|
|
@@ -691,7 +697,7 @@ const stageIm = (function () {
|
|
|
lid: node.id, code: p.b_code, name: p.name, unit: p.unit, unit_price: p.unit_price, pid: pp.id,
|
|
|
jl: pp.gather_qty, contract_jl: pp.contract_qty, qc_jl: pp.qc_qty,
|
|
|
//im_code: getNewImCode(),
|
|
|
- bw: bw,
|
|
|
+ bw: bw, jldy: pp.name,
|
|
|
peg: CheckPeg(pp.name) ? getPegStr(pp.name) : (peg ? getPegStr(peg.name) : ''),
|
|
|
xm: pp.name,
|
|
|
drawing_code: pp.drawing_code,
|
|
@@ -699,6 +705,7 @@ const stageIm = (function () {
|
|
|
position: pp.position,
|
|
|
lIndex: nodeIndex,
|
|
|
custom_define: [],
|
|
|
+ source: [{id: p.ledger_id, code: p.code, b_code: p.b_code}],
|
|
|
};
|
|
|
im.calc_memo = '本期计量:' + (checkZero(im.jl) ? 0 : im.jl) + ' ' + im.unit;
|
|
|
checkCustomDetail(im);
|
|
@@ -726,6 +733,7 @@ const stageIm = (function () {
|
|
|
position: '',
|
|
|
lIndex: gsTree.getNodeIndex(node),
|
|
|
custom_define: [],
|
|
|
+ source: [{id: p.ledger_id, code: p.code, b_code: p.b_code}],
|
|
|
};
|
|
|
im.calc_memo = '本期计量:' + (checkZero(im.jl) ? 0 : im.jl) + ' ' + im.unit;
|
|
|
checkCustomDetail(im);
|
|
@@ -784,6 +792,11 @@ const stageIm = (function () {
|
|
|
});
|
|
|
}
|
|
|
for (const [i, im] of ImData.entries()) {
|
|
|
+ if (im.source.length > 1) {
|
|
|
+ im.source.sort(function (x, y) {
|
|
|
+ return compareCode(x.b_code, y.b_code);
|
|
|
+ });
|
|
|
+ }
|
|
|
getCalcMemo(im);
|
|
|
getChangeInfo(im);
|
|
|
im.im_code = pre + getNumberFormat(stage.order, 2) + splitChar + getNumberFormat(i + 1, 3)
|