|
@@ -730,46 +730,50 @@
|
|
|
});
|
|
|
|
|
|
$('dl').on('click', 'dd', function () {
|
|
|
- const auditorId = parseInt($(this).data('id'))
|
|
|
- if (auditorId) {
|
|
|
- postData('/tender/<%- ctx.tender.id %>/revise/audit/add', { auditorId }, (datas) => {
|
|
|
- const html = [];
|
|
|
- // 如果是重新上报,添加到重新上报列表中
|
|
|
- const auditorshtml = [];
|
|
|
- for (const [index,data] of datas.entries()) {
|
|
|
- if (index !== 0) {
|
|
|
- html.push('<li class="list-group-item" auditorId="' + data.audit_id + '">');
|
|
|
- if (shenpi_status === shenpiConst.sp_status.sqspr || (shenpi_status === shenpiConst.sp_status.gdzs && index+1 !== datas.length)) {
|
|
|
- html.push('<a href="javascript: void(0)" class="text-danger pull-right">移除</a>');
|
|
|
- }
|
|
|
- html.push('<span>');
|
|
|
- html.push(data.audit_order + ' ');
|
|
|
- html.push(data.name + ' ');
|
|
|
- html.push('</span>');
|
|
|
- html.push('<small class="text-muted">');
|
|
|
- html.push(data.role);
|
|
|
- html.push('</small></li>');
|
|
|
+ const auditorId = parseInt($(this).data('id'));
|
|
|
+ if (!auditorId) return;
|
|
|
+
|
|
|
+ postData('/tender/<%- ctx.tender.id %>/revise/audit/add', { auditorId }, (datas) => {
|
|
|
+ const html = [];
|
|
|
+ // 如果是重新上报,添加到重新上报列表中
|
|
|
+ const auditorshtml = [];
|
|
|
+ for (const [index,data] of datas.entries()) {
|
|
|
+ if (index !== 0) {
|
|
|
+ html.push('<li class="list-group-item d-flex" auditorId="'+ data[0].audit_id +'">');
|
|
|
+ html.push(`<div class="col-auto">${index}</div>`);
|
|
|
+ html.push('<div class="col">');
|
|
|
+ for (const auditor of data) {
|
|
|
+ html.push(`<div class="d-inline-block mx-1"><i class="fa fa-user text-muted"></i> ${auditor.name} <small class="text-muted">${auditor.role}</small></div>`);
|
|
|
}
|
|
|
- auditorshtml.push('<li class="list-group-item" ' + (index !== 0 ? 'data-auditorid="' + data.audit_id + '"' : '') + '>');
|
|
|
- auditorshtml.push('<i class="fa ' + (index+1 === datas.length ? 'fa-stop-circle' : 'fa-chevron-circle-down') + '"></i> ');
|
|
|
- auditorshtml.push(data.name + ' <small class="text-muted">' + data.role + '</small>');
|
|
|
- if (index === 0) {
|
|
|
- auditorshtml.push('<span class="pull-right">原报</span>');
|
|
|
- } else if (index+1 === datas.length) {
|
|
|
- auditorshtml.push('<span class="pull-right">终审</span>');
|
|
|
- } else {
|
|
|
- auditorshtml.push('<span class="pull-right">'+ transFormToChinese(index) +'审</span>');
|
|
|
+ html.push('</div>');
|
|
|
+ html.push('<div class="col-auto">');
|
|
|
+ // todo 添加会签或签时
|
|
|
+ // html.push('<span class="badge badge-pill badge-primary badge-bg-small"><small></small></span>');
|
|
|
+ if (shenpi_status === shenpiConst.sp_status.sqspr || (shenpi_status === shenpiConst.sp_status.gdzs && index+1 !== datas.length)) {
|
|
|
+ html.push('<a href="javascript: void(0)" class="text-danger pull-right">移除</a>');
|
|
|
}
|
|
|
- auditorshtml.push('</li>');
|
|
|
+ html.push('</div>');
|
|
|
+ html.push('</li>');
|
|
|
}
|
|
|
- $('#auditors').html(html.join(''));
|
|
|
- $('#auditors-list').html(auditorshtml.join(''));
|
|
|
- });
|
|
|
- }
|
|
|
+ auditorshtml.push('<li class="list-group-item" data-auditorid="' + data.audit_id + '">');
|
|
|
+ auditorshtml.push('<i class="fa ' + (index+1 === datas.length ? 'fa-stop-circle' : 'fa-chevron-circle-down') + '"></i> ');
|
|
|
+ auditorshtml.push(data.name + ' <small class="text-muted">' + data.role + '</small>');
|
|
|
+ if (index === 0) {
|
|
|
+ auditorshtml.push('<span class="pull-right">原报</span>');
|
|
|
+ } else if (index+1 === datas.length) {
|
|
|
+ auditorshtml.push('<span class="pull-right">终审</span>');
|
|
|
+ } else {
|
|
|
+ auditorshtml.push('<span class="pull-right">'+ transFormToChinese(index) +'审</span>');
|
|
|
+ }
|
|
|
+ auditorshtml.push('</li>');
|
|
|
+ }
|
|
|
+ $('#auditors').html(html.join(''));
|
|
|
+ $('#auditors-list').html(auditorshtml.join(''));
|
|
|
+ });
|
|
|
});
|
|
|
|
|
|
- $('body').on('click', '#auditors li>a', function () {
|
|
|
- const li = $(this).parent();
|
|
|
+ $('body').on('click', '#auditors li>div>a', function () {
|
|
|
+ const li = $(this).parent().parent();
|
|
|
const data = {
|
|
|
auditorId: parseInt(li.attr('auditorId')),
|
|
|
};
|