Просмотр исходного кода

成本报审、财务账面、成本分析,历史审批数据相关

MaiXinRong 1 неделя назад
Родитель
Сommit
b75c6d8b5d

+ 1 - 1
app/service/cost_stage_analysis.js

@@ -653,7 +653,7 @@ module.exports = app => {
                     if (fi >= 0) his.splice(fi, 1);
                     const newHis = { ...auditInfo };
                     for (const f of costFields.sumFields) {
-                        newHis[f] = data[f];
+                        newHis[f] = l[f];
                     }
                     his.push(newHis);
                     data.calc_his = JSON.stringify(his);

+ 1 - 1
app/service/cost_stage_analysis_detail.js

@@ -147,7 +147,7 @@ module.exports = app => {
                     if (fi >= 0) his.splice(fi, 1);
                     const newHis = { ...auditInfo };
                     for (const f of costFields.sumFields) {
-                        newHis[f] = data[f];
+                        newHis[f] = l[f];
                     }
                     his.push(newHis);
                     data.calc_his = JSON.stringify(his);

+ 5 - 0
app/service/cost_stage_audit.js

@@ -471,6 +471,11 @@ module.exports = app => {
             await this.ctx.service[stage.typeInfo.dataService].auditCachePre(transaction, stage.id, {
                 user_id: audit.audit_id, audit_times: audit.audit_times, audit_order: audit.audit_order, active_order: audit.active_order,
             });
+            if (stage.typeInfo.detailService) {
+                await this.ctx.service[stage.typeInfo.detailService].auditCachePre(transaction, stage.id, {
+                    user_id: audit.audit_id, audit_times: audit.audit_times, audit_order: audit.audit_order, active_order: audit.active_order,
+                });
+            }
         }
         async start(stage) {
             const audits = await this.getAllDataByCondition({ where: { stage_id: stage.id, audit_times: stage.audit_times, audit_order: 1 } });

+ 1 - 1
app/service/cost_stage_book.js

@@ -182,7 +182,7 @@ module.exports = app => {
                     if (fi >= 0) his.splice(fi, 1);
                     const newHis = { ...auditInfo };
                     for (const f of costFields.curFields) {
-                        newHis[f] = data[f];
+                        newHis[f] = l[f];
                     }
                     his.push(newHis);
                     data.calc_his = JSON.stringify(his);

+ 1 - 1
app/service/cost_stage_book_detail.js

@@ -200,7 +200,7 @@ module.exports = app => {
                     if (fi >= 0) his.splice(fi, 1);
                     const newHis = { ...auditInfo };
                     for (const f of costFields.curFields) {
-                        newHis[f] = data[f];
+                        newHis[f] = l[f];
                     }
                     his.push(newHis);
                     data.calc_his = JSON.stringify(his);

+ 1 - 1
app/service/cost_stage_detail.js

@@ -386,7 +386,7 @@ module.exports = app => {
                     if (fi >= 0) his.splice(fi, 1);
                     const newHis = { ...auditInfo };
                     for (const f of costFields.curFields) {
-                        newHis[f] = data[f];
+                        newHis[f] = l[f];
                     }
                     his.push(newHis);
                     data.calc_his = JSON.stringify(his);

+ 1 - 1
app/service/cost_stage_ledger.js

@@ -492,7 +492,7 @@ module.exports = app => {
                     if (fi >= 0) his.splice(fi, 1);
                     const newHis = { ...auditInfo };
                     for (const f of costFields.curFields) {
-                        newHis[f] = data[f];
+                        newHis[f] = l[f];
                     }
                     his.push(newHis);
                     data.calc_his = JSON.stringify(his);