|
@@ -978,6 +978,7 @@ $(document).ready(() => {
|
|
|
},
|
|
|
loadRelaData: function () {
|
|
|
const billsSheet = slSpread.getActiveSheet();
|
|
|
+ console.log(SpreadJsObj.getSelectObject(billsSheet));
|
|
|
SpreadJsObj.saveTopAndSelect(billsSheet, ckBillsSpread);
|
|
|
const posSheet = spSpread.getActiveSheet();
|
|
|
SpreadJsObj.resetTopAndSelect(posSheet);
|
|
@@ -2046,6 +2047,7 @@ $(document).ready(() => {
|
|
|
|
|
|
// 加载计量单元数据 - 暂时统一加载,如有需要,切换成动态加载并缓存
|
|
|
postData(window.location.pathname + '/load', { filter: 'ledger;pos;detail;change;import_change;tag;cooperation;minus_change' }, function (result) {
|
|
|
+ console.log(result.minus_change, result.changeData);
|
|
|
// 加载树结构
|
|
|
stageTree.loadDatas(result.ledgerData);
|
|
|
// 加载部位明细
|
|
@@ -2054,7 +2056,7 @@ $(document).ready(() => {
|
|
|
if (result.minus_change && result.minus_change.length > 0) {
|
|
|
for (const mc of result.minus_change) {
|
|
|
if (!mcIndex[mc.lid]) mcIndex[mc.lid] = stageTree.nodes.find(x => { return x.id === mc.lid; });
|
|
|
- if (!mcIndex[mc.lid]) {
|
|
|
+ if (mcIndex[mc.lid]) {
|
|
|
mcIndex[mc.lid].pre_minus_qc_qty = ZhCalc.add(mcIndex[mc.lid].pre_minus_qc_qty, mc.qty);
|
|
|
}
|
|
|
const mcP = stagePos.getPos(mc.pid);
|
|
@@ -2067,7 +2069,7 @@ $(document).ready(() => {
|
|
|
for (const mc of result.changeData) {
|
|
|
if (!mc.minus || !mc.qty) continue;
|
|
|
if (!mcIndex[mc.lid]) mcIndex[mc.lid] = stageTree.nodes.find(x => { return x.id === mc.lid; });
|
|
|
- if (!mcIndex[mc.lid]) {
|
|
|
+ if (mcIndex[mc.lid]) {
|
|
|
mcIndex[mc.lid].minus_qc_qty = ZhCalc.add(mcIndex[mc.lid].minus_qc_qty, mc.qty);
|
|
|
}
|
|
|
const mcP = stagePos.getPos(mc.pid);
|