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

Merge branch 'dev' of http://192.168.1.41:3000/maixinrong/Calculation into dev

MaiXinRong 1 день назад
Родитель
Сommit
a0aa098013
1 измененных файлов с 12 добавлено и 8 удалено
  1. 12 8
      app/public/report/js/rpt_format_setup.js

+ 12 - 8
app/public/report/js/rpt_format_setup.js

@@ -353,19 +353,19 @@ const reportFormatSetupObj = {
         const me = reportFormatSetupObj;
         const rst = { fields_collection: [], params_collection: [] };
         for (const param of rptTpl['离散参数_集合']) {
-            rst.params_collection.push({ PID: +param.ID, name: param.Name, dftValue: param.Default_Value || '' });
+            rst.params_collection.push({ PID: + param.ID, name: param.Name, dftValue: param.Default_Value || '' });
         }
         for (const fd of rptTpl['指标_数据_映射']['离散指标_集合']) {
-            rst.fields_collection.push({ FID: +fd.ID, name: fd.Name });
+            rst.fields_collection.push({ FID: + fd.ID, name: fd.Name });
         }
         for (const fd of rptTpl['电子签名离散指标_集合']) {
-            rst.fields_collection.push({ FID: +fd.ID, name: fd.Name });
+            rst.fields_collection.push({ FID: + fd.ID, name: fd.Name });
         }
-        for (const fd of rptTpl['动态日期离散参数_集合']) {
-            rst.fields_collection.push({ FID: +fd.ID, name: fd.Name });
+        for (const param of rptTpl['动态日期离散参数_集合']) {
+            rst.params_collection.push({ PID: + param.ID, name: param.Name });
         }
-        for (const fd of rptTpl['电子签名审核意见指标_集合']) {
-            rst.fields_collection.push({ FID: +fd.ID, name: fd.Name });
+        for (const param of rptTpl['电子签名审核意见指标_集合']) {
+            rst.params_collection.push({ PID: + param.ID, name: param.Name });
         }
         const collectAdhocFields = (hfBandInfo) => {
             if (hfBandInfo && hfBandInfo.discrete_field_s) {
@@ -670,7 +670,11 @@ const reportFormatSetupObj = {
                                         if (fIdOpt.attributes['fid']) {
                                             fieldObj.FieldID = +fIdOpt.attributes[fIdOpt.attributes.length - 1].nodeValue;
                                         } else {
-                                            fieldObj.ParamID = fIdOpt.attributes[fIdOpt.attributes.length - 1].nodeValue;
+                                            let pid = +fIdOpt.attributes[fIdOpt.attributes.length - 1].nodeValue;
+                                            if ([5001, 5010, 5011].includes(pid)) {
+                                                pid = `${pid}`;
+                                            }
+                                            fieldObj.ParamID = pid;
                                             fieldObj.Default_Value = ParamDftValMap[fieldObj.ParamID] || '';
                                         }
                                         break;