|
@@ -19,12 +19,12 @@ $('a[data-target="#sp-list" ]').on('click', function () {
|
|
|
const auditHistory = result.auditHistory;
|
|
|
// 生成左边列表流程
|
|
|
const lefthtml = [];
|
|
|
- lefthtml.push('<li class="list-group-item"><i class="fa fa fa-play-circle fa-rotate-90"></i> '+ stageAuditor.name +' <small class="text-muted">'+ stageAuditor.role +'</small></li>');
|
|
|
+ lefthtml.push('<li class="list-group-item"><i class="fa fa fa-play-circle fa-rotate-90"></i> '+ stageAuditor.name +' <small class="text-muted">'+ stageAuditor.role +'</small><span class="pull-right">原报</span></li>');
|
|
|
for (const [index,a] of auditors.entries()) {
|
|
|
if (index+1 === auditors.length) {
|
|
|
- lefthtml.push('<li class="list-group-item"><i class="fa fa-stop-circle"></i> '+ a.name +' <small class="text-muted">'+ a.role +'</small></li>');
|
|
|
+ lefthtml.push('<li class="list-group-item"><i class="fa fa-stop-circle"></i> '+ a.name +' <small class="text-muted">'+ a.role +'</small><span class="pull-right">终审</span></li>');
|
|
|
} else {
|
|
|
- lefthtml.push('<li class="list-group-item"><i class="fa fa-chevron-circle-down"></i> '+ a.name +' <small class="text-muted">'+ a.role +'</small></li>');
|
|
|
+ lefthtml.push('<li class="list-group-item"><i class="fa fa-chevron-circle-down"></i> '+ a.name +' <small class="text-muted">'+ a.role +'</small><span class="pull-right">' + transFormToChinese(index+1) + '审</span></li>');
|
|
|
}
|
|
|
}
|
|
|
$('#auditor-list').html(lefthtml.join(''));
|
|
@@ -36,41 +36,47 @@ $('a[data-target="#sp-list" ]').on('click', function () {
|
|
|
for (let iA = 0; iA < ah.length; iA++) {
|
|
|
if (iA === 0) {
|
|
|
righthtml.push('<li class="list-group-item">');
|
|
|
- righthtml.push('<span class="text-success pull-right">'+ (auditHistory.indexOf(ah) > 0 ? '重新' : '') +'上报</span>');
|
|
|
righthtml.push('<h5 class="card-title">');
|
|
|
- righthtml.push('<i class="fa fa-play-circle fa-rotate-90 text-success"></i> '+ stageAuditor.name +' <small class="text-muted">'+ stageAuditor.role +'</small></h5>');
|
|
|
- righthtml.push('<p class="card-text"><small class="text-muted">' + (ah[iA].begin_time ? moment(ah[iA].begin_time).format('YYYY-MM-DD') : '') + '</small></p></li>');
|
|
|
+ righthtml.push('<i class="fa fa-play-circle fa-rotate-90 text-success"></i> '+ stageAuditor.name +' <small class="text-muted">'+ stageAuditor.role +'</small><span class="pull-right">原报</span></h5>');
|
|
|
+ righthtml.push('<div class="ml-3">');
|
|
|
+ righthtml.push('<span class="text-success"><small>' + (ah[iA].begin_time ? moment(ah[iA].begin_time).format('YYYY-MM-DD') : '') + '</small> '+ (auditHistory.indexOf(ah) > 0 ? '重新' : '') + '上报</span></div></li>');
|
|
|
righthtml.push('<li class="list-group-item">');
|
|
|
+ righthtml.push('<h5 class="card-title"><i class="fa '+ (iA === ah.length - 1 ? 'fa-stop-circle ' : 'fa-chevron-circle-down ') + auditConst.statusClass[ah[iA].status] +'"></i> '+ ah[iA].name +' <small class="text-muted">'+ ah[iA].role +'</small><span class="pull-right">' + (ah[iA].sort === ah[iA].max_sort ? '终' : transFormToChinese(ah[iA].sort)) + '审</span></h5>');
|
|
|
+ righthtml.push('<div class="ml-3">');
|
|
|
if (ah[iA].status !== auditConst.status.uncheck) {
|
|
|
- righthtml.push('<span class="'+ auditConst.statusClass[ah[iA].status] +' pull-right">' + auditConst.statusString[ah[iA].status] + (ah[iA].status === auditConst.status.checkNo ? ' ' + stageAuditor.name : '') + '</span>');
|
|
|
- }
|
|
|
- righthtml.push('<h5 class="card-title"><i class="fa '+ (iA === ah.length - 1 ? 'fa-stop-circle ' : 'fa-chevron-circle-down ') + auditConst.statusClass[ah[iA].status] +'"></i> '+ ah[iA].name +' <small class="text-muted">'+ ah[iA].role +'</small></h5>');
|
|
|
- if (ah[iA].status === auditConst.status.checked || ah[iA].status === auditConst.status.checkNo || ah[iA].status === auditConst.status.checkNoPre) {
|
|
|
- righthtml.push('<p class="card-text mb-1">'+ ah[iA].opinion +'</p>');
|
|
|
- righthtml.push('<p class="card-text"><small class="text-muted">'+ (ah[iA].end_time ? moment(ah[iA].end_time).format('YYYY-MM-DD') : '') +'</small></p>');
|
|
|
+ let timeHtml = '';
|
|
|
+ if (ah[iA].status === auditConst.status.checked || ah[iA].status === auditConst.status.checkNo || ah[iA].status === auditConst.status.checkNoPre) {
|
|
|
+ timeHtml = '<small>'+ (ah[iA].end_time ? moment(ah[iA].end_time).format('YYYY-MM-DD') : '') +'</small> ';
|
|
|
+ }
|
|
|
+ righthtml.push('<span class="' + auditConst.statusClass[ah[iA].status] +'">'+ timeHtml + auditConst.statusString[ah[iA].status] + (ah[iA].status === auditConst.status.checkNo ? ' ' + stageAuditor.name : '') + '</span>');
|
|
|
}
|
|
|
+ righthtml.push('<p class="card-text">'+ ah[iA].opinion !== null ? ah[iA].opinion : '' +'</p></div>');
|
|
|
righthtml.push('</li>');
|
|
|
} else if (iA === ah.length - 1) {
|
|
|
righthtml.push('<li class="list-group-item">');
|
|
|
+ righthtml.push('<h5 class="card-title"><i class="fa fa-stop-circle '+ auditConst.statusClass[ah[iA].status] +'"></i> '+ ah[iA].name +' <small class="text-muted">'+ ah[iA].role +'</small><span class="pull-right">终审</span></h5>');
|
|
|
+ righthtml.push('<div class="ml-3">');
|
|
|
if (ah[iA].status !== auditConst.status.uncheck) {
|
|
|
- righthtml.push('<span class="'+ auditConst.statusClass[ah[iA].status] +' pull-right">' + auditConst.statusString[ah[iA].status] + (ah[iA].status === auditConst.status.checkNo ? ' ' + stageAuditor.name : '') + '</span>');
|
|
|
- }
|
|
|
- righthtml.push('<h5 class="card-title"><i class="fa fa-stop-circle '+ auditConst.statusClass[ah[iA].status] +'"></i> '+ ah[iA].name +' <small class="text-muted">'+ ah[iA].role +'</small></h5>');
|
|
|
- if (ah[iA].status === auditConst.status.checked || ah[iA].status === auditConst.status.checkNo || ah[iA].status === auditConst.status.checkNoPre) {
|
|
|
- righthtml.push('<p class="card-text mb-1">'+ ah[iA].opinion +'</p>');
|
|
|
- righthtml.push('<p class="card-text"><small class="text-muted">'+ (ah[iA].end_time ? moment(ah[iA].end_time).format('YYYY-MM-DD') : '') +'</small></p>');
|
|
|
+ let timeHtml = '';
|
|
|
+ if (ah[iA].status === auditConst.status.checked || ah[iA].status === auditConst.status.checkNo || ah[iA].status === auditConst.status.checkNoPre) {
|
|
|
+ timeHtml = '<small>'+ (ah[iA].end_time ? moment(ah[iA].end_time).format('YYYY-MM-DD') : '') +'</small> ';
|
|
|
+ }
|
|
|
+ righthtml.push('<span class="' + auditConst.statusClass[ah[iA].status] +'">' + timeHtml + auditConst.statusString[ah[iA].status] + (ah[iA].status === auditConst.status.checkNo ? ' ' + stageAuditor.name : '') + '</span>');
|
|
|
}
|
|
|
+ righthtml.push('<p class="card-text">'+ ah[iA].opinion !== null ? ah[iA].opinion : '' +'</p></div>');
|
|
|
righthtml.push('</li>');
|
|
|
} else {
|
|
|
righthtml.push('<li class="list-group-item">');
|
|
|
+ righthtml.push('<h5 class="card-title"><i class="fa '+ (iA === ah.length - 1 ? 'fa-stop-circle ' : 'fa-chevron-circle-down ') + auditConst.statusClass[ah[iA].status] +'"></i> '+ ah[iA].name +' <small class="text-muted">'+ ah[iA].role +'</small><span class="pull-right">' + (ah[iA].sort === ah[iA].max_sort ? '终' : transFormToChinese(ah[iA].sort)) + '审</span></h5>');
|
|
|
+ righthtml.push('<div class="ml-3">');
|
|
|
if (ah[iA].status !== auditConst.status.uncheck) {
|
|
|
- righthtml.push('<span class="'+ auditConst.statusClass[ah[iA].status] +' pull-right">' + auditConst.statusString[ah[iA].status] + (ah[iA].status === auditConst.status.checkNo ? ' ' + stageAuditor.name : '') + '</span>');
|
|
|
- }
|
|
|
- righthtml.push('<h5 class="card-title"><i class="fa fa-chevron-circle-down '+ auditConst.statusClass[ah[iA].status] +'"></i> '+ ah[iA].name +' <small class="text-muted">'+ ah[iA].role +'</small></h5>');
|
|
|
- if (ah[iA].status === auditConst.status.checked || ah[iA].status === auditConst.status.checkNo || ah[iA].status === auditConst.status.checkNoPre) {
|
|
|
- righthtml.push('<p class="card-text mb-1">'+ ah[iA].opinion +'</p>');
|
|
|
- righthtml.push('<p class="card-text"><small class="text-muted">'+ (ah[iA].end_time ? moment(ah[iA].end_time).format('YYYY-MM-DD') : '') +'</small></p>');
|
|
|
+ let timeHtml = '';
|
|
|
+ if (ah[iA].status === auditConst.status.checked || ah[iA].status === auditConst.status.checkNo || ah[iA].status === auditConst.status.checkNoPre) {
|
|
|
+ timeHtml = '<small>'+ (ah[iA].end_time ? moment(ah[iA].end_time).format('YYYY-MM-DD') : '') +'</small> ';
|
|
|
+ }
|
|
|
+ righthtml.push('<span class="' + auditConst.statusClass[ah[iA].status] +'">'+ timeHtml + auditConst.statusString[ah[iA].status] + (ah[iA].status === auditConst.status.checkNo ? ' ' + stageAuditor.name : '') + '</span>');
|
|
|
}
|
|
|
+ righthtml.push('<p class="card-text">'+ ah[iA].opinion !== null ? ah[iA].opinion : '' +'</p></div>');
|
|
|
righthtml.push('</li>');
|
|
|
}
|
|
|
}
|