Tony Kang 5 months ago
parent
commit
21bc2b5871
2 changed files with 14 additions and 2 deletions
  1. 13 1
      app/public/report/js/rpt_signature.js
  2. 1 1
      app/view/report/rpt_all_popup.ejs

+ 13 - 1
app/public/report/js/rpt_signature.js

@@ -194,6 +194,11 @@ let rptSignatureHelper = {
                         status, // 记录一下吧,没坏处
                     }
                     newRoleRel.private_stamp_path = rptSignatureHelper._get_newPrivate_stamp_path(newRoleRel, userAcc); // 个人章从PRJ_ACCOUNT_LIST中获取
+                    let dftSignSrc = userAcc.sign_path;
+                    if (userAcc.sign_path !== '') {
+                        dftSignSrc = '/public/upload/sign/' + userAcc.sign_path;
+                    }
+                    newRoleRel.sign_path = dftSignSrc;
                     roleRelObj.assFlowInfos.push(newRoleRel);
                 }
             });
@@ -238,10 +243,17 @@ let rptSignatureHelper = {
             // 公司章 + 签字日期
             const dateIdSuffixStr = `flowdtp_${roleRelObj.signature_name}_${index}`;
             if (flowRoleRel.company_stamp_path && flowRoleRel.company_stamp_path !== '') {
+                let dftDate = '';
+                if (flowRoleRel.sign_date !== '' && flowRoleRel.sign_date.length > 20) {
+                    dftDate = (new Date(flowRoleRel.sign_date)).Format('yyyy-MM-dd');
+                } else if (flowRoleRel.sign_date instanceof Date){
+                    dftDate = flowRoleRel.sign_date.Format('yyyy-MM-dd');
+                }
+        
                 const companyChk = flowRoleRel.sign_output.includes(COMPANY_SIGN_STR) ? 'checked' : '';
                 assFlowElements.push(`<td><input type="checkbox" ${companyChk} onchange="rptSignatureHelper._changeSignType(this, '${roleRelObj.signature_name}', '${COMPANY_SIGN_STR}', '${userAcc.stamp_path || ''}', ${index})" ></td>`);
                 assFlowElements.push(`<td><input type="text" class="form-control form-control-sm datepicker-here height-inputbox" aria-label="Small" aria-describedby="inputGroup-sizing-sm" data-language="zh"
-                    id="${dateIdSuffixStr}" value="${flowRoleRel.sign_date || ''}"></td>`);
+                    id="${dateIdSuffixStr}" value="${dftDate || ''}"></td>`);
                 // elementsStrArr.push(`<input id="${dateIdSuffixStr}" type="text" class="form-control datepicker-here height-inputbox" aria-label="Small" aria-describedby="inputGroup-sizing-sm" data-language="zh" value="${dftDate}"></input>`);
             } else {
                 assFlowElements.push(`<td></td>`);

+ 1 - 1
app/view/report/rpt_all_popup.ejs

@@ -345,7 +345,7 @@
     <div class="modal-dialog modal-lg" role="document">
         <div class="modal-content">
           <div class="modal-header">
-            <h5 class="modal-title">设置签名(业主主管领导)</h5>
+            <h5 class="modal-title">设置签字签章</h5>
               <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                 <span aria-hidden="true">&times;</span>
               </button>