Browse Source

feat: 优化审核员信息展示,合并公司和角色信息

caipin 4 months ago
parent
commit
e8bcacb7d2

+ 7 - 4
app/public/js/advance.js

@@ -221,15 +221,18 @@ $(document).ready(function () {
                         <div class="card">
                         <div class="card">
                             <div class="card-body p-3">
                             <div class="card-body p-3">
                                 <div class="card-text">
                                 <div class="card-text">
-                                    <p class="mb-1"><span class="h5">${auditor.name}</span>
-                                        <span
+                                    <div class="col-9">
+                                        <span class="h6">${auditor.name}</span>
+                                        <span class="text-muted">${auditor.company} - ${auditor.role}</span>
+                                    </div>
+                                    <div class="col">
+                                                <span
                                             class="pull-right
                                             class="pull-right
                                                             ${auditConst.statusClass[auditor.status]}">${auditor.status !== auditConst.status.uncheck ? auditConst.statusString[auditor.status] : ''}
                                                             ${auditConst.statusClass[auditor.status]}">${auditor.status !== auditConst.status.uncheck ? auditConst.statusString[auditor.status] : ''}
                                             ${auditor.status === auditConst.status.checkNo ? user.name : ''}
                                             ${auditor.status === auditConst.status.checkNo ? user.name : ''}
                                             ${auditor.status === auditConst.status.checkNoPre ? auditors[index-1].name : ''}
                                             ${auditor.status === auditConst.status.checkNoPre ? auditors[index-1].name : ''}
                                         </span>
                                         </span>
-                                    </p>
-                                    <p class="text-muted mb-0">${auditor.role}</p>
+                                    </div>
                                 </div>
                                 </div>
                             </div>`
                             </div>`
 
 

+ 2 - 4
app/public/js/change_apply.js

@@ -281,10 +281,8 @@ $(document).ready(() => {
                     for (const [i, auditor] of group.auditors.entries()) {
                     for (const [i, auditor] of group.auditors.entries()) {
                         historyHTML.push(`<div class="card-text p-2 py-3 row ${(i > 0 ? 'border-top' : '')}">`);
                         historyHTML.push(`<div class="card-text p-2 py-3 row ${(i > 0 ? 'border-top' : '')}">`);
                         let companyRolePart = '';
                         let companyRolePart = '';
-                        if (group.audit_order !== 0) {
-                            const rolePart = auditor.role ? ' - ' + auditor.role : '';
-                            companyRolePart = `<span class="text-muted ml-1">${auditor.company}${rolePart}</span>`;
-                        }
+                        const rolePart = auditor.role ? ' - ' + auditor.role : '';
+                        companyRolePart = `<span class="text-muted ml-1">${auditor.company}${rolePart}</span>`;
                         historyHTML.push(`<div class="col-10"><span class="h6">${auditor.name}</span>${companyRolePart}</div>`);
                         historyHTML.push(`<div class="col-10"><span class="h6">${auditor.name}</span>${companyRolePart}</div>`);
                         historyHTML.push('<div class="col">');
                         historyHTML.push('<div class="col">');
                         if (auditor.status === auditConst.status.checked || group.status === auditConst.status.cancelRevise) {
                         if (auditor.status === auditConst.status.checked || group.status === auditConst.status.cancelRevise) {

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

@@ -280,10 +280,9 @@ $(document).ready(() => {
                     for (const [i, auditor] of group.auditors.entries()) {
                     for (const [i, auditor] of group.auditors.entries()) {
                         historyHTML.push(`<div class="card-text p-2 py-3 row ${(i > 0 ? 'border-top' : '')}">`);
                         historyHTML.push(`<div class="card-text p-2 py-3 row ${(i > 0 ? 'border-top' : '')}">`);
                         let companyRolePart = '';
                         let companyRolePart = '';
-                        if (group.audit_order !== 0) {
-                            const rolePart = auditor.role ? ' - ' + auditor.role : '';
-                            companyRolePart = `<span class="text-muted ml-1">${auditor.company}${rolePart}</span>`;
-                        }
+                        const rolePart = auditor.role ? ' - ' + auditor.role : '';
+                        companyRolePart = `<span class="text-muted ml-1">${auditor.company}${rolePart}</span>`;
+                        
                         historyHTML.push(`<div class="col-10"><span class="h6">${auditor.name}</span>${companyRolePart}</div>`);
                         historyHTML.push(`<div class="col-10"><span class="h6">${auditor.name}</span>${companyRolePart}</div>`);
                         historyHTML.push('<div class="col">');
                         historyHTML.push('<div class="col">');
                         if (auditor.status === auditConst.status.checked || group.status === auditConst.status.cancelRevise) {
                         if (auditor.status === auditConst.status.checked || group.status === auditConst.status.cancelRevise) {

+ 4 - 4
app/public/js/change_project.js

@@ -288,10 +288,10 @@ $(document).ready(() => {
                     for (const [i, auditor] of group.auditors.entries()) {
                     for (const [i, auditor] of group.auditors.entries()) {
                         historyHTML.push(`<div class="card-text p-2 py-3 row ${ ( i > 0 ? 'border-top' : '') }">`);
                         historyHTML.push(`<div class="card-text p-2 py-3 row ${ ( i > 0 ? 'border-top' : '') }">`);
                         let companyRolePart = '';
                         let companyRolePart = '';
-                        if (group.audit_order !== 0) {
-                            const rolePart = auditor.role ? ' - ' + auditor.role : '';
-                            companyRolePart = `<span class="text-muted ml-1">${auditor.company}${rolePart}</span>`;
-                        }
+                        
+                        const rolePart = auditor.role ? ' - ' + auditor.role : '';
+                        companyRolePart = `<span class="text-muted ml-1">${auditor.company}${rolePart}</span>`;
+                        
                         historyHTML.push(`<div class="col-10"><span class="h6">${auditor.name}</span>${companyRolePart}</div>`);
                         historyHTML.push(`<div class="col-10"><span class="h6">${auditor.name}</span>${companyRolePart}</div>`);
                         historyHTML.push('<div class="col">');
                         historyHTML.push('<div class="col">');
                         if (auditor.status === auditConst.status.checked || group.status === auditConst.status.cancelRevise) {
                         if (auditor.status === auditConst.status.checked || group.status === auditConst.status.cancelRevise) {

+ 2 - 2
app/public/js/measure_material.js

@@ -85,9 +85,9 @@ $(function () {
                                                 <div class="card">
                                                 <div class="card">
                                                     <div class="card-body px-3 py-0">
                                                     <div class="card-body px-3 py-0">
                                                         <div class="card-text p-2 py-3 row">
                                                         <div class="card-text p-2 py-3 row">
-                                                            <div class="col">
+                                                            <div class="col-10">
                                                                 <span class="h6">${user.name}</span>
                                                                 <span class="h6">${user.name}</span>
-                                                                <span class="text-muted ml-1">${user.role}</span>
+                                                                <span class="text-muted ml-1">${user.company} - ${user.role}</span>
                                                             </div>
                                                             </div>
                                                             <div class="col">
                                                             <div class="col">
                                                                 <span class="pull-right text-success"><i class="fa fa-check-circle"></i></span>
                                                                 <span class="pull-right text-success"><i class="fa fa-check-circle"></i></span>

+ 3 - 18
app/view/change/apply_information_modal.ejs

@@ -346,18 +346,13 @@
                                                                 <div class="card-text p-2 py-3 row <%- ( i > 0 ? 'border-top' : '') %>">
                                                                 <div class="card-text p-2 py-3 row <%- ( i > 0 ? 'border-top' : '') %>">
                                                                     <div class="col-10">
                                                                     <div class="col-10">
                                                                         <span class="h6"><%- auditor.name %></span>
                                                                         <span class="h6"><%- auditor.name %></span>
-                                                                        <% if (group.audit_order === 0) { %>
-                                                                                <% if (auditor.role && auditor.role.trim()) { %>
-                                                                                    <span class="text-muted ml-1"><%- auditor.role %></span>
-                                                                                <% } %>
-                                                                            <% } else { %>
+                                                                        
                                                                                 <span class="text-muted ml-1">
                                                                                 <span class="text-muted ml-1">
                                                                                     <%- auditor.company %>
                                                                                     <%- auditor.company %>
                                                                                     <% if (auditor.role && auditor.role.trim()) { %>
                                                                                     <% if (auditor.role && auditor.role.trim()) { %>
                                                                                         - <%- auditor.role %>
                                                                                         - <%- auditor.role %>
                                                                                     <% } %>
                                                                                     <% } %>
                                                                                 </span>
                                                                                 </span>
-                                                                            <% } %>
                                                                     </div>
                                                                     </div>
                                                                     <div class="col">
                                                                     <div class="col">
                                                                         <% if (auditor.status === auditConst.status.checked || auditor.status === auditConst.status.cancelRevise) { %>
                                                                         <% if (auditor.status === auditConst.status.checked || auditor.status === auditConst.status.cancelRevise) { %>
@@ -546,18 +541,13 @@
                                                                     <div class="card-text p-2 py-3 row <%- ( i > 0 ? 'border-top' : '') %>">
                                                                     <div class="card-text p-2 py-3 row <%- ( i > 0 ? 'border-top' : '') %>">
                                                                         <div class="col-10">
                                                                         <div class="col-10">
                                                                             <span class="h6"><%- auditor.name %></span>
                                                                             <span class="h6"><%- auditor.name %></span>
-                                                                            <% if (group.audit_order === 0) { %>
-                                                                                <% if (auditor.role && auditor.role.trim()) { %>
-                                                                                    <span class="text-muted ml-1"><%- auditor.role %></span>
-                                                                                <% } %>
-                                                                            <% } else { %>
+                                                                            
                                                                                 <span class="text-muted ml-1">
                                                                                 <span class="text-muted ml-1">
                                                                                     <%- auditor.company %>
                                                                                     <%- auditor.company %>
                                                                                     <% if (auditor.role && auditor.role.trim()) { %>
                                                                                     <% if (auditor.role && auditor.role.trim()) { %>
                                                                                         - <%- auditor.role %>
                                                                                         - <%- auditor.role %>
                                                                                     <% } %>
                                                                                     <% } %>
                                                                                 </span>
                                                                                 </span>
-                                                                            <% } %>
                                                                         </div>
                                                                         </div>
                                                                         <div class="col">
                                                                         <div class="col">
                                                                             <% if (auditor.status === auditConst.status.checked || auditor.status === auditConst.status.cancelRevise) { %>
                                                                             <% if (auditor.status === auditConst.status.checked || auditor.status === auditConst.status.cancelRevise) { %>
@@ -750,18 +740,13 @@
                                                                     <div class="card-text p-2 py-3 row <%- ( i > 0 ? 'border-top' : '') %>">
                                                                     <div class="card-text p-2 py-3 row <%- ( i > 0 ? 'border-top' : '') %>">
                                                                         <div class="col">
                                                                         <div class="col">
                                                                             <span class="h6"><%- auditor.name %></span>
                                                                             <span class="h6"><%- auditor.name %></span>
-                                                                            <% if (group.audit_order === 0) { %>
-                                                                                <% if (auditor.role && auditor.role.trim()) { %>
-                                                                                    <span class="text-muted ml-1"><%- auditor.role %></span>
-                                                                                <% } %>
-                                                                            <% } else { %>
+                                                                            
                                                                                 <span class="text-muted ml-1">
                                                                                 <span class="text-muted ml-1">
                                                                                     <%- auditor.company %>
                                                                                     <%- auditor.company %>
                                                                                     <% if (auditor.role && auditor.role.trim()) { %>
                                                                                     <% if (auditor.role && auditor.role.trim()) { %>
                                                                                         - <%- auditor.role %>
                                                                                         - <%- auditor.role %>
                                                                                     <% } %>
                                                                                     <% } %>
                                                                                 </span>
                                                                                 </span>
-                                                                            <% } %>
                                                                         </div>
                                                                         </div>
                                                                         <div class="col">
                                                                         <div class="col">
                                                                             <% if (auditor.status === auditConst.status.checked || auditor.status === auditConst.status.cancelRevise) { %>
                                                                             <% if (auditor.status === auditConst.status.checked || auditor.status === auditConst.status.cancelRevise) { %>

+ 3 - 18
app/view/change/information_modal.ejs

@@ -357,18 +357,13 @@
                                                                 <div class="card-text p-2 py-3 row <%- ( i > 0 ? 'border-top' : '') %>">
                                                                 <div class="card-text p-2 py-3 row <%- ( i > 0 ? 'border-top' : '') %>">
                                                                     <div class="col-10">
                                                                     <div class="col-10">
                                                                         <span class="h6"><%- auditor.name %></span>
                                                                         <span class="h6"><%- auditor.name %></span>
-                                                                        <% if (group.audit_order === 0) { %>
-                                                                                <% if (auditor.role && auditor.role.trim()) { %>
-                                                                                    <span class="text-muted ml-1"><%- auditor.role %></span>
-                                                                                <% } %>
-                                                                            <% } else { %>
+                                                                        
                                                                                 <span class="text-muted ml-1">
                                                                                 <span class="text-muted ml-1">
                                                                                     <%- auditor.company %>
                                                                                     <%- auditor.company %>
                                                                                     <% if (auditor.role && auditor.role.trim()) { %>
                                                                                     <% if (auditor.role && auditor.role.trim()) { %>
                                                                                         - <%- auditor.role %>
                                                                                         - <%- auditor.role %>
                                                                                     <% } %>
                                                                                     <% } %>
                                                                                 </span>
                                                                                 </span>
-                                                                            <% } %>
                                                                     </div>
                                                                     </div>
                                                                     <div class="col">
                                                                     <div class="col">
                                                                         <% if (auditor.status === auditConst.status.checked || group.status === auditConst.status.cancelRevise) { %>
                                                                         <% if (auditor.status === auditConst.status.checked || group.status === auditConst.status.cancelRevise) { %>
@@ -525,18 +520,13 @@
                                                                 <div class="card-text p-2 py-3 row <%- ( i > 0 ? 'border-top' : '') %>">
                                                                 <div class="card-text p-2 py-3 row <%- ( i > 0 ? 'border-top' : '') %>">
                                                                     <div class="col-10">
                                                                     <div class="col-10">
                                                                         <span class="h6"><%- auditor.name %></span>
                                                                         <span class="h6"><%- auditor.name %></span>
-                                                                        <% if (group.audit_order === 0) { %>
-                                                                                <% if (auditor.role && auditor.role.trim()) { %>
-                                                                                    <span class="text-muted ml-1"><%- auditor.role %></span>
-                                                                                <% } %>
-                                                                            <% } else { %>
+                                                                        
                                                                                 <span class="text-muted ml-1">
                                                                                 <span class="text-muted ml-1">
                                                                                     <%- auditor.company %>
                                                                                     <%- auditor.company %>
                                                                                     <% if (auditor.role && auditor.role.trim()) { %>
                                                                                     <% if (auditor.role && auditor.role.trim()) { %>
                                                                                         - <%- auditor.role %>
                                                                                         - <%- auditor.role %>
                                                                                     <% } %>
                                                                                     <% } %>
                                                                                 </span>
                                                                                 </span>
-                                                                            <% } %>
                                                                     </div>
                                                                     </div>
                                                                     <div class="col">
                                                                     <div class="col">
                                                                         <% if (auditor.status === auditConst.status.checked || group.status === auditConst.status.cancelRevise) { %>
                                                                         <% if (auditor.status === auditConst.status.checked || group.status === auditConst.status.cancelRevise) { %>
@@ -705,18 +695,13 @@
                                                                 <div class="card-text p-2 py-3 row <%- ( i > 0 ? 'border-top' : '') %>">
                                                                 <div class="card-text p-2 py-3 row <%- ( i > 0 ? 'border-top' : '') %>">
                                                                     <div class="col-10">
                                                                     <div class="col-10">
                                                                         <span class="h6"><%- auditor.name %></span>
                                                                         <span class="h6"><%- auditor.name %></span>
-                                                                        <% if (group.audit_order === 0) { %>
-                                                                                <% if (auditor.role && auditor.role.trim()) { %>
-                                                                                    <span class="text-muted ml-1"><%- auditor.role %></span>
-                                                                                <% } %>
-                                                                            <% } else { %>
+                                                                        
                                                                                 <span class="text-muted ml-1">
                                                                                 <span class="text-muted ml-1">
                                                                                     <%- auditor.company %>
                                                                                     <%- auditor.company %>
                                                                                     <% if (auditor.role && auditor.role.trim()) { %>
                                                                                     <% if (auditor.role && auditor.role.trim()) { %>
                                                                                         - <%- auditor.role %>
                                                                                         - <%- auditor.role %>
                                                                                     <% } %>
                                                                                     <% } %>
                                                                                 </span>
                                                                                 </span>
-                                                                            <% } %>
                                                                     </div>
                                                                     </div>
                                                                     <div class="col">
                                                                     <div class="col">
                                                                         <% if (auditor.status === auditConst.status.checked || group.status === auditConst.status.cancelRevise) { %>
                                                                         <% if (auditor.status === auditConst.status.checked || group.status === auditConst.status.cancelRevise) { %>