Tony Kang il y a 3 semaines
Parent
commit
4c77b5220e
1 fichiers modifiés avec 24 ajouts et 3 suppressions
  1. 24 3
      app/view/report/rpt_all_popup.ejs

+ 24 - 3
app/view/report/rpt_all_popup.ejs

@@ -916,6 +916,16 @@
         //还要请求各标段的原签名数据
         const params = {};
         params.selectedTenders = [];
+        // 考虑到实际情况,会有报表模板的改动(BUG #3824),需要整理出实际显示的前面signature_name
+        const curr_signature_names = [];
+        if (zTreeOprObj.currentRptPageRst && zTreeOprObj.currentRptPageRst.items.length > 0) {
+            for (const rel of zTreeOprObj.currentRptPageRst.items[0].signature_cells) {
+                if (!curr_signature_names.includes(rel.signature_name) && !rel.signature_name.includes('dummy_')) {
+                    curr_signature_names.push(rel.signature_name);
+                }
+            }
+        }
+
         const _getTenderRelatedInfos = (parentItem, rstArr) => {
             if (parentItem.items.length === 0) {
                 if (!parentItem.isParent) {
@@ -934,12 +944,23 @@
                         if (rel.tender_id === parentItem.tender_id && rel.sid === parentItem.last_stage_id && rel.rpt_id === parentItem.report_id) {
                             let hintStr = '';
                             if (rel.rel_content instanceof Array) {
+                                let curIdx = 0;
                                 for (let idx = 0; idx < rel.rel_content.length; idx++) {
                                     const dtlRel = rel.rel_content[idx];
-                                    if (idx > 0) {
-                                        hintStr = hintStr + '、';
+                                    if (curr_signature_names.length > 0) {
+                                        if (curr_signature_names.includes(dtlRel.signature_name)) {
+                                            if (curIdx > 0) {
+                                                hintStr = hintStr + '、';
+                                            }
+                                            hintStr = hintStr + '(' + dtlRel.signature_name + ')' + dtlRel.user_name;
+                                            curIdx++;
+                                        }
+                                    } else {
+                                        if (idx > 0) {
+                                            hintStr = hintStr + '、';
+                                        }
+                                        hintStr = hintStr + '(' + dtlRel.signature_name + ')' + dtlRel.user_name;
                                     }
-                                    hintStr = hintStr + '(' + dtlRel.signature_name + ')' + dtlRel.user_name;
                                 }
                             }
                             parentItem.signature = hintStr;