Browse Source

修复调差bug

ellisran 2 years ago
parent
commit
d4cd5f8e1f
1 changed files with 2 additions and 2 deletions
  1. 2 2
      app/service/material_audit.js

+ 2 - 2
app/service/material_audit.js

@@ -205,13 +205,13 @@ module.exports = app => {
         }
         }
 
 
         async getTpData(materialId) {
         async getTpData(materialId) {
-            const materialInfo = await this.ctx.material.getDataById(materialId);
+            const materialInfo = await this.ctx.service.material.getDataById(materialId);
             const tp_data = {
             const tp_data = {
                 m_tp: materialInfo.m_tp,
                 m_tp: materialInfo.m_tp,
                 m_tax_tp: materialInfo.m_tax_tp,
                 m_tax_tp: materialInfo.m_tax_tp,
             }
             }
             if (materialInfo.is_stage_self) {
             if (materialInfo.is_stage_self) {
-                const materialStageList = await this.ctx.materialStage.getAllDataByCondition({ where: { mid: materialId }});
+                const materialStageList = await this.ctx.service.materialStage.getAllDataByCondition({ where: { mid: materialId }});
                 const stage_tp = [];
                 const stage_tp = [];
                 for (const ms of materialStageList) {
                 for (const ms of materialStageList) {
                     stage_tp.push({
                     stage_tp.push({