|
@@ -217,11 +217,12 @@
|
|
|
<div class="row">
|
|
|
<!-- 左侧变更令 -->
|
|
|
<div class="col-6" >
|
|
|
- <div class="modal-height-500" style="overflow-y:auto;">
|
|
|
+ <div class="modal-height-500" style="height:521px;overflow-y:auto;">
|
|
|
<table class="table table-hover table-bordered">
|
|
|
<thead>
|
|
|
<tr>
|
|
|
- <th width="15%" class="text-center"><div class="align-middle"><input id="select-all-uncheck" type="checkbox"></div></th>
|
|
|
+ <th width="10%" class="text-center"><div class="align-middle"><input id="select-all-uncheck" type="checkbox"></div></th>
|
|
|
+ <th width="7%">序号</th>
|
|
|
<th width="40%">变更令编号</th>
|
|
|
<th width="">原审批流程</th>
|
|
|
</tr>
|
|
@@ -233,8 +234,10 @@
|
|
|
</div>
|
|
|
<!-- 右侧新审批流程 -->
|
|
|
<div class="col-6">
|
|
|
- <div class=" ml-auto">
|
|
|
- <div class="dropdown text-right" id="show-audit-select">
|
|
|
+ <div class="ml-auto">
|
|
|
+ <div class="dropdown row">
|
|
|
+ <span class="col-7"><button class="btn btn-sm btn-primary" id="synchronize_shenpi_btn">同步流程至其它已勾选变更令</button></span>
|
|
|
+ <span class="col-5 text-right" id="show-audit-select"></span>
|
|
|
</div>
|
|
|
<div class="card mt-1">
|
|
|
<div class="card-header">
|
|
@@ -248,11 +251,11 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="alert alert-warning mt-2 mb-0">批量操作会覆盖原审批流程,请合理选择。</div>
|
|
|
+ <div class="alert alert-warning mt-2 mb-0">没有设置审批流的变更令将无法上报,请先设置审批流。</div>
|
|
|
</div>
|
|
|
<div class="modal-footer">
|
|
|
<button type="button" class="btn btn-sm btn-secondary" data-dismiss="modal">取消</button>
|
|
|
- <button class="btn btn-sm btn-primary" id="batch_uncheck_btn">确定</button>
|
|
|
+ <button class="btn btn-sm btn-primary" id="batch_uncheck_btn">确定上报</button>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -269,7 +272,7 @@
|
|
|
<div class="progress-tz-bar progress-bar progress-bar-striped progress-bar-animated" role="progressbar" style="width: 100%" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100"></div>
|
|
|
</div>
|
|
|
<div class="mt-1 progress-tz-text">台账获取并处理中...</div>
|
|
|
- <div class="change-progress">
|
|
|
+ <div class="change-progress modal-height-500" style="overflow-y:auto;">
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="modal-footer" style="display: none">
|
|
@@ -295,9 +298,10 @@
|
|
|
<thead>
|
|
|
<tr>
|
|
|
<th width="5%"><div class="align-middle text-center"><input type="checkbox" id="select-all-checking"></div></th>
|
|
|
+ <th width="7%">序号</th>
|
|
|
<th width="25%">变更令编号</th>
|
|
|
<th width="">变更令名称</th>
|
|
|
- <th width="25%">批量编号</th>
|
|
|
+ <th width="25%">批复编号</th>
|
|
|
</tr>
|
|
|
</thead>
|
|
|
<tbody id="checking_list">
|
|
@@ -324,7 +328,7 @@
|
|
|
<div class="progress-tz-bar progress-bar progress-bar-striped progress-bar-animated" role="progressbar" style="width: 100%" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100"></div>
|
|
|
</div>
|
|
|
<div class="mt-1 progress-tz-text">台账获取并处理中...</div>
|
|
|
- <div class="change-progress">
|
|
|
+ <div class="change-progress modal-height-500" style="overflow-y:auto;">
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="modal-footer" style="display: none">
|
|
@@ -383,12 +387,14 @@
|
|
|
$('#select-all-uncheck').prop('checked', false);
|
|
|
shenpi_status = res.shenpi_status;
|
|
|
uncheckList = res.uncheckList;
|
|
|
- for (const l of res.uncheckList) {
|
|
|
- html += '<tr>' +
|
|
|
- `<td class="text-center"><input type="checkbox" value="${l.cid}"></td>` +
|
|
|
- `<td class=""><a href="/tender/${tenderId}/change/${l.cid}/information" target="_blank">${l.code}</a></td>` +
|
|
|
- '<td>' + setAuditList(l.auditList) +'</td>' +
|
|
|
- '</tr>';
|
|
|
+ if (res.uncheckList.length > 0) {
|
|
|
+ for (const [i, l] of res.uncheckList.entries()) {
|
|
|
+ html += '<tr>' +
|
|
|
+ `<td class="text-center"><input type="checkbox" value="${l.cid}"></td><td>${i + 1}</td>` +
|
|
|
+ `<td class=""><a href="/tender/${tenderId}/change/${l.cid}/information" target="_blank">${l.code}</a></td>` +
|
|
|
+ '<td>' + setAuditList(l.auditList) +'</td>' +
|
|
|
+ '</tr>';
|
|
|
+ }
|
|
|
}
|
|
|
$('#uncheck_list').html(html);
|
|
|
if (res.uncheckList.length > 0) {
|
|
@@ -406,11 +412,8 @@
|
|
|
for (const g of res.spGroupList) { %>
|
|
|
optionHtml += `<option value="${g.id}" ${res.uncheckList.length > 0 && g.id === res.uncheckList[0].sp_group ? 'selected' : ''}>${g.name}</option>`;
|
|
|
}
|
|
|
- showAuditSelectHtml += '<div class="row">' +
|
|
|
- '<div class="col-7"></div>' +
|
|
|
- '<div class="col-5">' +
|
|
|
- '<select class="form-control form-control-sm change-sp-group">' + optionHtml + '</select>' +
|
|
|
- '</div></div>';
|
|
|
+ showAuditSelectHtml += '<select class="form-control form-control-sm change-sp-group">' + optionHtml + '</select>';
|
|
|
+ $('#synchronize_shenpi_btn').css('margin-top', '5px');
|
|
|
} else {
|
|
|
accountList = res.accountList;
|
|
|
accountGroup = res.accountGroup;
|
|
@@ -484,6 +487,36 @@
|
|
|
$('#uncheck_list tr').find('input[type="checkbox"]').prop('checked', $(this).prop('checked'));
|
|
|
});
|
|
|
|
|
|
+ $('#synchronize_shenpi_btn').click(function () {
|
|
|
+ const this_cid = $('#uncheck_list tr[class="table-warning"]').find('a').attr('href').split('/')[4];
|
|
|
+ const info = uncheckList.find(l => l.cid === this_cid);
|
|
|
+ if (!this_cid || !info) {
|
|
|
+ toastr.error('请先选择一个变更令');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ if ($('#uncheck_list input:checked').length === 0) {
|
|
|
+ toastr.error('请至少勾选一个变更令');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ const cids = [];
|
|
|
+ $('#uncheck_list input:checked').each(function () {
|
|
|
+ cids.push($(this).val());
|
|
|
+ });
|
|
|
+ if (cids.length === 1 && cids[0] === this_cid) {
|
|
|
+ toastr.error('请至少勾选一个其它变更令');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ if (cids.indexOf(this_cid) !== -1) cids.splice(cids.indexOf(this_cid), 1);
|
|
|
+ console.log(cids, info);
|
|
|
+ postData(`/tender/${tenderId}/change/batch/fun`, { type: 'set_shenpi_list', cids, from_cid: this_cid }, function (res) {
|
|
|
+ toastr.success('同步流程成功');
|
|
|
+ uncheckList = res.uncheckList;
|
|
|
+ for (const index in res.uncheckList) {
|
|
|
+ $('#uncheck_list tr').eq(index).children('td').eq(3).html(setAuditList(res.uncheckList[index].auditList));
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
let timer = null;
|
|
|
let oldSearchVal = null;
|
|
|
$('body').on('input propertychange', 'div[id$="_dropdownMenu"] .gr-search', function(e) {
|
|
@@ -559,7 +592,7 @@
|
|
|
const index = uncheckList.findIndex(item => item.cid === this_cid);
|
|
|
if (index !== -1) {
|
|
|
uncheckList[index].auditList = datas;
|
|
|
- $('#uncheck_list tr').eq(index).children('td').eq(2).html(setAuditList(datas));
|
|
|
+ $('#uncheck_list tr').eq(index).children('td').eq(3).html(setAuditList(datas));
|
|
|
}
|
|
|
});
|
|
|
}
|
|
@@ -586,7 +619,7 @@
|
|
|
const index = uncheckList.findIndex(item => item.cid === this_cid);
|
|
|
if (index !== -1) {
|
|
|
uncheckList[index].auditList = datas;
|
|
|
- $('#uncheck_list tr').eq(index).children('td').eq(2).html(setAuditList(datas));
|
|
|
+ $('#uncheck_list tr').eq(index).children('td').eq(3).html(setAuditList(datas));
|
|
|
}
|
|
|
});
|
|
|
});
|
|
@@ -610,7 +643,7 @@
|
|
|
const index = uncheckList.findIndex(item => item.cid === this_cid);
|
|
|
if (index !== -1) {
|
|
|
uncheckList[index].auditList = datas;
|
|
|
- $('#uncheck_list tr').eq(index).children('td').eq(2).html(setAuditList(datas));
|
|
|
+ $('#uncheck_list tr').eq(index).children('td').eq(3).html(setAuditList(datas));
|
|
|
}
|
|
|
});
|
|
|
});
|
|
@@ -709,10 +742,10 @@
|
|
|
for (const c of cids) {
|
|
|
const cInfo = uncheckList.find(item => item.cid === c);
|
|
|
if (cInfo) {
|
|
|
- $('#batch-sb-progress .change-progress').append(`<div id="change-${cInfo.cid}-progress"><div class="mt-3 progress">` +
|
|
|
+ $('#batch-sb-progress .change-progress').append(`<div class="mt-3" id="change-${cInfo.cid}-progress"><div>变更令 <a href="/tender/${cInfo.tid}/change/${cInfo.cid}/information" target="_blank"><b>${cInfo.code}</b></a> :</div><div class="progress">` +
|
|
|
'<div class="progress-bar progress-bar-striped progress-bar-animated" role="progressbar" style="width: 0%" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100"></div>' +
|
|
|
- '</div>' +
|
|
|
- `<div class="mt-1">变更令 <b>${cInfo.code}</b> <span class="progress-change-text">上报处理中...</span></div></div>`);
|
|
|
+ '</div>' +
|
|
|
+ `<div class="mt-1"><span class="progress-change-text">上报处理中...</span></div></div>`);
|
|
|
await checkAndChange(cInfo, changeListData, result.changeLedgerList);
|
|
|
}
|
|
|
}
|
|
@@ -726,14 +759,17 @@
|
|
|
let html = '';
|
|
|
$('#select-all-checking').prop('checked', false);
|
|
|
checkingList = res.checkingList;
|
|
|
- for (const l of res.checkingList) {
|
|
|
- const finalHtml = l.is_finalAudit ? `<input type="text" class="form-control form-control-sm final_pcode_input" data-cid="${l.cid}" value="${l.p_code}" />` : '';
|
|
|
- html += '<tr>' +
|
|
|
- `<td class="text-center"><input type="checkbox" value="${l.cid}"></td>` +
|
|
|
- `<td class=""><a href="/tender/${tenderId}/change/${l.cid}/information" target="_blank">${l.code}</a></td>` +
|
|
|
- `<td>${l.name}</td>` +
|
|
|
- `<td>${finalHtml}</td>` +
|
|
|
- '</tr>';
|
|
|
+ if (checkingList.length > 0) {
|
|
|
+ for (const [i, l] of res.checkingList.entries()) {
|
|
|
+ const finalHtml = l.is_finalAudit ? `<input type="text" class="form-control form-control-sm final_pcode_input" data-cid="${l.cid}" value="${l.p_code}" />` : '';
|
|
|
+ html += '<tr>' +
|
|
|
+ `<td class="text-center"><input type="checkbox" value="${l.cid}"></td>` +
|
|
|
+ `<td>${i+1}</td>` +
|
|
|
+ `<td class=""><a href="/tender/${tenderId}/change/${l.cid}/information" target="_blank">${l.code}</a></td>` +
|
|
|
+ `<td>${l.name}</td>` +
|
|
|
+ `<td>${finalHtml}</td>` +
|
|
|
+ '</tr>';
|
|
|
+ }
|
|
|
}
|
|
|
$('#checking_list').html(html);
|
|
|
});
|