|
@@ -116,15 +116,21 @@ function recursiveGetTenderNodeHtml (node, arr, pid, this_code, this_status, aid
|
|
// html.push('<td>', sp_status_list[node.shenpiInfo[shenpi_type]].name, '</td>');
|
|
// html.push('<td>', sp_status_list[node.shenpiInfo[shenpi_type]].name, '</td>');
|
|
html.push('<td>');
|
|
html.push('<td>');
|
|
if (!node.cid) {
|
|
if (!node.cid) {
|
|
|
|
+ if(cur_tenderid === node.id) {
|
|
|
|
+ html.push(sp_status_list[this_status].name);
|
|
|
|
+ } else {
|
|
|
|
+ html.push(sp_status_list[node.shenpiInfo[this_code]].name);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ html.push('</td>');
|
|
|
|
+ html.push('<td>');
|
|
|
|
+ if (!node.cid) {
|
|
let auditList = [];
|
|
let auditList = [];
|
|
let tender_status = 1;
|
|
let tender_status = 1;
|
|
if(cur_tenderid === node.id) {
|
|
if(cur_tenderid === node.id) {
|
|
- html.push(sp_status_list[this_status].name);
|
|
|
|
auditList = aidList;
|
|
auditList = aidList;
|
|
tender_status = this_status;
|
|
tender_status = this_status;
|
|
} else {
|
|
} else {
|
|
- console.log(node);
|
|
|
|
- html.push(sp_status_list[node.shenpiInfo[this_code]].name);
|
|
|
|
auditList = node.shenpiauditList[this_code];
|
|
auditList = node.shenpiauditList[this_code];
|
|
tender_status = node.shenpiInfo[this_code];
|
|
tender_status = node.shenpiInfo[this_code];
|
|
}
|
|
}
|
|
@@ -136,8 +142,9 @@ function recursiveGetTenderNodeHtml (node, arr, pid, this_code, this_status, aid
|
|
nameList.push(user.name);
|
|
nameList.push(user.name);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- html.push('<i class="fa fa-question-circle text-primary" data-container="body" data-toggle="tooltip" data-placement="bottom" ' +
|
|
|
|
- 'data-original-title="'+ (nameList.length > 0 ? nameList.join('-') : '') +'"></i>');
|
|
|
|
|
|
+ // html.push('<i class="fa fa-question-circle text-primary" data-container="body" data-toggle="tooltip" data-placement="bottom" ' +
|
|
|
|
+ // 'data-original-title="'+ (nameList.length > 0 ? nameList.join('-') : '') +'"></i>');
|
|
|
|
+ html.push(nameList.length > 0 ? nameList.join('-') : '');
|
|
}
|
|
}
|
|
}
|
|
}
|
|
html.push('</td>');
|
|
html.push('</td>');
|
|
@@ -161,7 +168,8 @@ function getTenderTreeHtml (this_code, this_status, aidList = []) {
|
|
html.push('<table class="table table-hover table-bordered">');
|
|
html.push('<table class="table table-hover table-bordered">');
|
|
html.push('<thead>', '<tr>');
|
|
html.push('<thead>', '<tr>');
|
|
html.push('<th>名称</th>');
|
|
html.push('<th>名称</th>');
|
|
- html.push('<th width="100">审批流程</th>');
|
|
|
|
|
|
+ html.push('<th width="80">流程模式</th>');
|
|
|
|
+ html.push('<th>详细流程</th>');
|
|
html.push('<th width="40">选择</th>');
|
|
html.push('<th width="40">选择</th>');
|
|
html.push('</tr>', '</thead>');
|
|
html.push('</tr>', '</thead>');
|
|
parentId = 0;
|
|
parentId = 0;
|
|
@@ -510,6 +518,10 @@ $(document).ready(function () {
|
|
$('#shenpi_status').val(this_status);
|
|
$('#shenpi_status').val(this_status);
|
|
$('#shenpi_auditors').val(aidList.join(','));
|
|
$('#shenpi_auditors').val(aidList.join(','));
|
|
$('#tender-list').html(html);
|
|
$('#tender-list').html(html);
|
|
|
|
+ $('#search-audit').val('');
|
|
|
|
+ $('#search-result').text('0/0');
|
|
|
|
+ $('#up-search').attr('disabled', true);
|
|
|
|
+ $('#down-search').attr('disabled', true);
|
|
setTimeout(function () { $("#tender-list [data-toggle='tooltip']").tooltip(); },800);
|
|
setTimeout(function () { $("#tender-list [data-toggle='tooltip']").tooltip(); },800);
|
|
});
|
|
});
|
|
|
|
|
|
@@ -1025,6 +1037,75 @@ $(document).ready(function () {
|
|
autoFlashHeight();
|
|
autoFlashHeight();
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
+
|
|
|
|
+ let timer2 = null;
|
|
|
|
+ let oldSearchVal2 = null;
|
|
|
|
+ $('body').on('input propertychange', '#batch input[name="audit-name"]', function(e) {
|
|
|
|
+ oldSearchVal2 = e.target.value;
|
|
|
|
+ timer2 && clearTimeout(timer2);
|
|
|
|
+ timer2 = setTimeout(() => {
|
|
|
|
+ const newVal = $(this).val();
|
|
|
|
+
|
|
|
|
+ const resultLength = $('#tender-list').find('.result').length;
|
|
|
|
+ if (resultLength > 0) {
|
|
|
|
+ let content = $('#tender-list').html();
|
|
|
|
+ const replaceStr = $('#tender-list').find('.result').eq(0).html();
|
|
|
|
+ const regExp2 = new RegExp('<span class="result" style="background: yellow;">' + replaceStr + '</span>', 'g');
|
|
|
|
+ content = content.replace(regExp2, replaceStr);
|
|
|
|
+ const regExp3 = new RegExp('<span class="result" style="background: orange;">' + replaceStr + '</span>', 'g');
|
|
|
|
+ content = content.replace(regExp3, replaceStr);
|
|
|
|
+ $('#tender-list').html(content);
|
|
|
|
+ }
|
|
|
|
+ $('#search-result').text('0/0');
|
|
|
|
+ $('#up-search').attr('disabled', true);
|
|
|
|
+ $('#down-search').attr('disabled', true);
|
|
|
|
+ if (newVal && newVal === oldSearchVal2) {
|
|
|
|
+ const regExp = new RegExp(newVal, 'g');
|
|
|
|
+ for (let i = 0; i < $('#tender-list tr').length; i++) {
|
|
|
|
+ if (_.includes($('#tender-list tr').eq(i).children('td').eq(2).html(), newVal)) {
|
|
|
|
+ $('#tender-list tr').eq(i).children('td').eq(2).html($('#tender-list tr').eq(i).children('td').eq(2).html().replace(regExp, '<span class="result" style="background: yellow;">' + newVal + '</span>'))
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ const resultLength2 = $('#tender-list').find('.result').length;
|
|
|
|
+ if (resultLength2 > 0) {
|
|
|
|
+ $('#tender-list').find('.result').eq(0).css('background', 'orange');
|
|
|
|
+ $('#search-result').text('1/' + resultLength2);
|
|
|
|
+ $('#up-search').attr('disabled', false);
|
|
|
|
+ $('#down-search').attr('disabled', false);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if($('#tender-list').find('.result').length > 0) {
|
|
|
|
+ const X = $('#tender-list').find('.result').eq(0).offset().top;
|
|
|
|
+ $('#tender-list').scrollTop(X - $('#tender-list').offset().top + $('#tender-list').scrollTop() - 30);
|
|
|
|
+ }
|
|
|
|
+ }, 400);
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ $('#up-search').on('click', function () {
|
|
|
|
+ const cur = parseInt($('#search-result').text().split('/')[0]);
|
|
|
|
+ const total = parseInt($('#search-result').text().split('/')[1]);
|
|
|
|
+ const now = cur - 1 !== 0 ? cur - 1: total;
|
|
|
|
+ $('#tender-list').find('.result').eq(cur-1).css('background', 'yellow');
|
|
|
|
+ $('#tender-list').find('.result').eq(now-1).css('background', 'orange');
|
|
|
|
+ // $('#tender-list tr').eq(searchUser[cur-1]).children('td').eq(2).html($('#tender-list tr').eq(searchUser[cur-1]).children('td').eq(2).html().replace('<span class="result" style="background:orange;">', '<span class="result" style="background:yellow;">'))
|
|
|
|
+ // $('#tender-list tr').eq(searchUser[now-1]).children('td').eq(2).html($('#tender-list tr').eq(searchUser[now-1]).children('td').eq(2).html().replace('<span class="result" style="background:yellow;">', '<span class="result" style="background:orange;">'))
|
|
|
|
+ $('#search-result').text(now + '/' + total);
|
|
|
|
+ const X = $('#tender-list').find('.result').eq(now-1).offset().top;
|
|
|
|
+ $('#tender-list').scrollTop(X - $('#tender-list').offset().top + $('#tender-list').scrollTop() - 30);
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ $('#down-search').on('click', function () {
|
|
|
|
+ const cur = parseInt($('#search-result').text().split('/')[0]);
|
|
|
|
+ const total = parseInt($('#search-result').text().split('/')[1]);
|
|
|
|
+ const now = cur + 1 > total ? 1: cur + 1;
|
|
|
|
+ $('#tender-list').find('.result').eq(cur-1).css('background', 'yellow');
|
|
|
|
+ $('#tender-list').find('.result').eq(now-1).css('background', 'orange');
|
|
|
|
+ // $('#tender-list tr').eq(searchUser[cur-1]).children('td').eq(2).html($('#tender-list tr').eq(searchUser[cur-1]).children('td').eq(2).html().replace('<span class="result" style="background:orange;">', '<span class="result" style="background:yellow;">'))
|
|
|
|
+ // $('#tender-list tr').eq(searchUser[now-1]).children('td').eq(2).html($('#tender-list tr').eq(searchUser[now-1]).children('td').eq(2).html().replace('<span class="result" style="background:yellow;">', '<span class="result" style="background:orange;">'))
|
|
|
|
+ $('#search-result').text(now + '/' + total);
|
|
|
|
+ const X = $('#tender-list').find('.result').eq(now-1).offset().top;
|
|
|
|
+ $('#tender-list').scrollTop(X - $('#tender-list').offset().top + $('#tender-list').scrollTop() -30);
|
|
|
|
+ });
|
|
});
|
|
});
|
|
|
|
|
|
function setRightData(datas, coolist) {
|
|
function setRightData(datas, coolist) {
|