瀏覽代碼

用户交互,审批人选择调整

MaiXinRong 4 年之前
父節點
當前提交
4c751f7127
共有 2 個文件被更改,包括 12 次插入4 次删除
  1. 6 4
      app/lib/rpt_data_analysis.js
  2. 6 0
      app/public/report/js/rpt_custom.js

+ 6 - 4
app/lib/rpt_data_analysis.js

@@ -1429,9 +1429,9 @@ const loadCooperationData = {
                 const c = stageCooperation.find(x => {return x.ledger_id == id});
                 if (c) return c.sign_path;
             }
-            return auditor.sign_path;
+            return '';
         } else {
-            return auditor.sign_path;
+            return '';
         }
     },
     _loadImCooperationData: function (ctx, data, options, csRela) {
@@ -1448,7 +1448,7 @@ const loadCooperationData = {
 
         const stageCooperation = [];
         for (const sa of data.stage_audit) {
-            stageCooperation.push(data.ledger_cooperation.filter(x => {return x.user_id === sa.aid}));
+            if (sa.end_time) stageCooperation.push(data.ledger_cooperation.filter(x => {return x.user_id === sa.aid}));
         }
         for (const d of data[options.table]) {
             const bills = data.mem_stage_bills.find(x => {return x.id === d.lid});
@@ -1460,8 +1460,10 @@ const loadCooperationData = {
             }
 
             for (const [i, cs] of coSignOrder.entries()) {
-                d['co_sign' + (i+1)] = d.cooperation[cs] || '';
+                if (data.stage_audit[cs] && data.stage_audit[cs].end_time)
+                    d['co_sign' + (i+1)] = d.cooperation[cs] || (data.stage_audit[cs] ? data.stage_audit[cs].sign_path : '');
             }
+            console.log(d);
         }
     },
     fun: function (ctx, data, fieldsKey, options, csRela) {

+ 6 - 0
app/public/report/js/rpt_custom.js

@@ -183,6 +183,11 @@ const rptCustomObj = (function () {
     const initAuditSelect = function (asSetting, asSelect) {
         const setting = JSON.parse(asSetting), select = asSelect;
         $('#audit-select-title').html(setting.title);
+        if (setting.hideSign) {
+            $('#pnl_eSignature').hide();
+        } else {
+            $('#pnl_eSignature').show();
+        }
         const html = [];
         for (const [i, s] of setting.select.entries()) {
             html.push('<tr>');
@@ -291,6 +296,7 @@ const rptCustomObj = (function () {
             $('#pnl_audit_select').show();
             initAuditSelect(cDefine[sAuditSelect].setting, cSelect ? cSelect[sAuditSelect] : []);
         } else {
+            $('#pnl_eSignature').show();
             $('#pnl_audit_select').hide();
         }
         if (cDefine && cDefine[sGatherSelect] && cDefine[sGatherSelect].enable && cDefine[sGatherSelect].setting) {