Browse Source

审批流程设置相关

MaiXinRong 2 years ago
parent
commit
fbedc07432
2 changed files with 4 additions and 5 deletions
  1. 3 4
      app/public/js/shenpi.js
  2. 1 1
      app/view/tender/shenpi.ejs

+ 3 - 4
app/public/js/shenpi.js

@@ -293,11 +293,10 @@ $(document).ready(function () {
                 html.push(this.getSelectAuditHtml(code));
             }
             html.push('</span>');
-            console.log(html.join('\n'));
             return html.join('');
         },
         getAuditGroupHtml: function (code, auditGroup, i) {
-            return `<li class="d-flex justify-content-start mb-3">${this.getAuditGroupInnerHtml(code, auditGroup, i)}</li>`;
+            return `<li class="d-flex justify-content-start align-items-center mb-3">${this.getAuditGroupInnerHtml(code, auditGroup, i)}</li>`;
         },
         getFinalAuditHtml: function (audit) {
             const html = [];
@@ -320,7 +319,7 @@ $(document).ready(function () {
                 flow.auditGroupList.splice(i, 1);
                 return null;
             }
-            flow.auditGroupList[i].splice(flow.auditGroupList[i].findIndex(x => { return x.id === audit_id; }), 1);
+            flow.auditGroupList[i].splice(flow.auditGroupList[i].findIndex(x => { return x.audit_id === audit_id; }), 1);
             return flow.auditGroupList[i];
         },
         setAuditType: function (code, audit_type, i) {
@@ -489,10 +488,10 @@ $(document).ready(function () {
             postData('/tender/' + cur_tenderid + '/shenpi/audit/save', prop, function (data) {
                 if (this_status === sp_status.gdspl) {
                     const auditGroup = auditUtils.addAudit(this_code, { audit_id: data.audit_id, name: user.name, audit_type: data.audit_type, audit_order: data.audit_order }, prop.audit_order - 1);
-                    _self.parents('li').html(auditUtils.getAuditGroupInnerHtml(this_code, auditGroup, prop.audit_order));
                     if (_self.parents('ul').find('.add-audit').length === 0) {
                         _self.parents('ul').append('<li class="pl-3"><a href="javascript:void(0);" class="add-audit"><i class="fa fa-plus"></i> 添加流程</a></li>');
                     }
+                    _self.parents('li').html(auditUtils.getAuditGroupInnerHtml(this_code, auditGroup, prop.audit_order));
                 } else {
                     _self.parents('.spr-span').html('<span class="d-inline-block"></span>\n' +
                         '<span class="d-inline-block"><span class="badge badge-light">'+ user.name +' <span class="dropdown">\n' +

+ 1 - 1
app/view/tender/shenpi.ejs

@@ -36,7 +36,7 @@
                                     <ul class="list-unstyled">
                                         <% if (sp.auditGroupList.length > 0) { %>
                                         <% for (const [i, auditGroup] of sp.auditGroupList.entries()) { %>
-                                        <li class="d-flex justify-content-start mb-3">
+                                        <li class="d-flex justify-content-start mb-3 align-items-center">
                                             <span class="col-auto"><%- ctx.helper.transFormToChinese(i+1) %>审</span>
                                             <span class="col-7 spr-span">
                                                 <span class="d-inline-block">