ソースを参照

精简node打包后导入出错

vian 5 年 前
コミット
51f7fe7194

+ 2 - 3
modules/pm/facade/pm_facade.js

@@ -2308,11 +2308,10 @@ async function isTenderOverrun(tenderCount, session) {
     const userID = session.sessionUser.id;
     const compilation = session.sessionCompilation._id;
     const compilationVersion = session.compilationVersion || '免费';
-    let systemSetting = session.systemSetting;
+    let systemSetting = session.systemSetting || (session.systemSetting = await systemSettingMiddleware.getSystemSetting());
     // 这种情况只有在刚上线此功能时会出现,不考虑时间差
     if (!systemSetting) {
-        systemSetting = await systemSettingMiddleware.getSystemSetting();
-        session.systemSetting = systemSetting;
+        return false;
     }
     const type = compilationVersion.includes('免费') ? 'normal' : 'professional';
     const limit = systemSetting[type].project;

+ 2 - 1
modules/templates/models/bills_template.js

@@ -103,7 +103,8 @@ function setSeqByNext(billsData) {
         sameDepthDatas[data.ParentID].push(data);
     }
     //设置同层节点的序号
-    for (let sameDepth of Object.values(sameDepthDatas)) {
+    for (let attr in sameDepthDatas) {
+        let sameDepth = sameDepthDatas[attr];
         let sortedData = getDataBySorted(sameDepth),
             seq = 1;
         sortedData.forEach((data => data.seq = seq++));