|
@@ -681,30 +681,36 @@ $(document).ready(function () {
|
|
|
$('body').on('click', '.set-otherShenpi', function () {
|
|
|
let canSetOther = true;
|
|
|
const this_code = $(this).data('code');
|
|
|
- if (['stage', 'change'].indexOf(this_code) !== -1) {
|
|
|
- const select = $(this).siblings('.lc-show').find('select[class*="audit-type-key"]');
|
|
|
- select.each((i, s) => {
|
|
|
- if (s.value !== '1') canSetOther = false;
|
|
|
- });
|
|
|
- }
|
|
|
- if (!canSetOther) {
|
|
|
- toastr.warning('该流程含有会签或签,不可同步至其他流程');
|
|
|
- $('#batch2').modal('hide');
|
|
|
- return;
|
|
|
- }
|
|
|
+ // if (['stage', 'change'].indexOf(this_code) !== -1) {
|
|
|
+ // const select = $(this).siblings('.lc-show').find('select[class*="audit-type-key"]');
|
|
|
+ // select.each((i, s) => {
|
|
|
+ // if (s.value !== '1') canSetOther = false;
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ // if (!canSetOther) {
|
|
|
+ // toastr.warning('该流程含有会签或签,不可同步至其他流程');
|
|
|
+ // $('#batch2').modal('hide');
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
|
|
|
const this_status = parseInt($(this).siblings('.lc-show').siblings('.form-group').find('input:checked').val());
|
|
|
- const aid_num = $(this).siblings('.lc-show').children('ul').find('.remove-audit').length;
|
|
|
- const aidList = [];
|
|
|
- for (let i = 0; i < aid_num; i++) {
|
|
|
- const aid = parseInt($(this).siblings('.lc-show').children('ul').find('.remove-audit').eq(i).data('id'));
|
|
|
- aidList.push(aid);
|
|
|
+ const copyFlow = [];
|
|
|
+ const flow = $('li.d-flex', $(this).siblings('.lc-show'));
|
|
|
+ for (const f of flow) {
|
|
|
+ const audit_type = $('select', f).val();
|
|
|
+ const auditors = $('.remove-audit', f);
|
|
|
+ if (auditors.length === 0) continue;
|
|
|
+ const aid = [];
|
|
|
+ for (const a of auditors) {
|
|
|
+ aid.push(a.getAttribute('data-id'));
|
|
|
+ }
|
|
|
+ copyFlow.push(`${audit_type}:${aid.join(',')}`);
|
|
|
}
|
|
|
const html = getShenpiHtml(this_code);
|
|
|
$('#shenpi-name2').text($(this).data('name'));
|
|
|
$('#shenpi_code2').val(this_code);
|
|
|
$('#shenpi_status2').val(this_status);
|
|
|
- $('#shenpi_auditors2').val(aidList.join(','));
|
|
|
+ $('#shenpi_auditors2').val(copyFlow.join(';'));
|
|
|
$('#shenpi-list').html(html);
|
|
|
setTimeout(function () { $("#shenpi-list [data-toggle='tooltip']").tooltip(); },800);
|
|
|
$('#batch2').modal('show');
|
|
@@ -724,7 +730,7 @@ $(document).ready(function () {
|
|
|
code: $('#shenpi_code2').val(),
|
|
|
};
|
|
|
if(data.status !== shenpi_status.gdspl) {
|
|
|
- data.aidList = $('#shenpi_auditors2').val();
|
|
|
+ data.flowList = $('#shenpi_auditors2').val();
|
|
|
}
|
|
|
// 获取已选中的标段
|
|
|
const shenpiList = [];
|