|
@@ -234,7 +234,9 @@
|
|
<!-- 右侧新审批流程 -->
|
|
<!-- 右侧新审批流程 -->
|
|
<div class="col-6">
|
|
<div class="col-6">
|
|
<div class=" ml-auto">
|
|
<div class=" ml-auto">
|
|
- <div class="dropdown text-right" id="show-audit-select">
|
|
|
|
|
|
+ <div class="dropdown text-right">
|
|
|
|
+ <button class="btn btn-sm btn-primary" id="synchronize_shenpi_btn">同步流程至其它已勾选变更令</button>
|
|
|
|
+ <span id="show-audit-select"></span>
|
|
</div>
|
|
</div>
|
|
<div class="card mt-1">
|
|
<div class="card mt-1">
|
|
<div class="card-header">
|
|
<div class="card-header">
|
|
@@ -248,11 +250,11 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</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>
|
|
<div class="modal-footer">
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-sm btn-secondary" data-dismiss="modal">取消</button>
|
|
<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>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -484,6 +486,36 @@
|
|
$('#uncheck_list tr').find('input[type="checkbox"]').prop('checked', $(this).prop('checked'));
|
|
$('#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(2).html(setAuditList(res.uncheckList[index].auditList));
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+
|
|
let timer = null;
|
|
let timer = null;
|
|
let oldSearchVal = null;
|
|
let oldSearchVal = null;
|
|
$('body').on('input propertychange', 'div[id$="_dropdownMenu"] .gr-search', function(e) {
|
|
$('body').on('input propertychange', 'div[id$="_dropdownMenu"] .gr-search', function(e) {
|