|
@@ -69,68 +69,52 @@ $(document).ready(function () {
|
|
|
})
|
|
|
}
|
|
|
return false
|
|
|
- })
|
|
|
+ });
|
|
|
+
|
|
|
+ function remakeShenpiHtml(datas) {
|
|
|
+ const html = [];
|
|
|
+ // 如果是重新上报,添加到重新上报列表中
|
|
|
+ const auditorshtml = [];
|
|
|
+ for (const [index,data] of datas.entries()) {
|
|
|
+ if (index !== 0) {
|
|
|
+ html.push('<li class="list-group-item" auditorId="'+ data.aid +'">');
|
|
|
+ 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.order + ' ');
|
|
|
+ html.push(data.name + ' ');
|
|
|
+ html.push('</span>');
|
|
|
+ if (_.findIndex(rptAuditList, { uid: data.aid }) !== -1) {
|
|
|
+ html.push(' (' + _.find(rptAuditList, { uid: data.aid }).signature_name + ')');
|
|
|
+ }
|
|
|
+ html.push('<small class="text-muted">');
|
|
|
+ html.push(data.role);
|
|
|
+ html.push('</small></li>');
|
|
|
+ }
|
|
|
+ // 添加新审批人流程修改
|
|
|
+ auditorshtml.push('<li class="list-group-item" data-auditorid="' + data.aid + '">');
|
|
|
+ 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(''));
|
|
|
+ }
|
|
|
|
|
|
// 添加到审批流程中
|
|
|
$('dl').on('click', 'dd', function () {
|
|
|
const id = parseInt($(this).data('id'));
|
|
|
if (id) {
|
|
|
postData('/payment/' + tenderId + '/detail/' + detailId + '/save', { type: 'add_audit', auditorId: id }, (datas) => {
|
|
|
- const html = [];
|
|
|
- // 如果是重新上报,添加到重新上报列表中
|
|
|
- const auditorshtml = [];
|
|
|
- for (const [index,data] of datas.entries()) {
|
|
|
- if (index !== 0) {
|
|
|
- html.push('<li class="list-group-item" auditorId="'+ data.aid +'">');
|
|
|
- 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.order + ' ');
|
|
|
- html.push(data.name + ' ');
|
|
|
- html.push('</span>');
|
|
|
- if (_.findIndex(rptAuditList, { uid: data.aid }) !== -1) {
|
|
|
- html.push(' (' + _.find(rptAuditList, { uid: data.aid }).signature_name + ')');
|
|
|
- }
|
|
|
- html.push('<small class="text-muted">');
|
|
|
- html.push(data.role);
|
|
|
- html.push('</small></li>');
|
|
|
- }
|
|
|
- // 添加新审批人流程修改
|
|
|
- auditorshtml.push('<li class="list-group-item" data-auditorid="' + data.aid + '">');
|
|
|
- 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 li i').removeClass('fa-stop-circle').addClass('fa-chevron-circle-down');
|
|
|
- // for (let i = 0; i < $('#auditors-list li').length; i++) {
|
|
|
- // $('#auditors-list li').eq(i).find('.pull-right').text(transFormToChinese(i+1) + '审');
|
|
|
- // $('#auditors-list2 li').eq(i).find('.pull-right').text(transFormToChinese(i+1) + '审');
|
|
|
- // }
|
|
|
-
|
|
|
- $('#auditors-list').html(auditorshtml.join(''));
|
|
|
-
|
|
|
- // const auditorshtml2 = [];
|
|
|
- // // 重新上报时。令其它的审批人流程图标转换
|
|
|
- // $('#auditors-list2 li i').removeClass('fa-stop-circle').addClass('fa-chevron-circle-down');
|
|
|
- // // 添加新审批人
|
|
|
- // auditorshtml2.push('<li class="list-group-item" data-auditid="' + data.aid + '">');
|
|
|
- // auditorshtml2.push('<h5 class="card-title"><i class="fa fa-stop-circle"></i> ');
|
|
|
- // auditorshtml2.push(data.name + ' <small class="text-muted">' + data.role + '</small>');
|
|
|
- // auditorshtml2.push('<span class="pull-right">终审</span>');
|
|
|
- // auditorshtml2.push('</h5></li>');
|
|
|
- // $('#auditors-list2').append(auditorshtml2.join(''));
|
|
|
+ remakeShenpiHtml(datas);
|
|
|
});
|
|
|
}
|
|
|
});
|
|
@@ -207,6 +191,14 @@ $(document).ready(function () {
|
|
|
}
|
|
|
});
|
|
|
});
|
|
|
+
|
|
|
+ // 同步报表角色
|
|
|
+ $('#follow_rpt_audit_btn').click(function () {
|
|
|
+ postData('/payment/' + tenderId + '/detail/' + detailId + '/save', { type: 'follow_rpt_audit' }, (datas) => {
|
|
|
+ toastr.success('同步成功');
|
|
|
+ remakeShenpiHtml(datas);
|
|
|
+ });
|
|
|
+ });
|
|
|
});
|
|
|
// 检查上报情况
|
|
|
function checkAuditorFrom () {
|