|
@@ -555,10 +555,9 @@ const projTreeObj = {
|
|
|
}
|
|
|
if(hitinfo.sheet.name() != "copyToSheet"){//如果是复制到sheet,不用执行
|
|
|
//建设项目,侧滑汇总
|
|
|
- if(node.data.projType === projectType.project && withingClickArea()){
|
|
|
+ if(node.data.projType === projectType.project && withingClickArea() && !$('.slide-sidebar').hasClass('open')){
|
|
|
setDataToSideBar();
|
|
|
$(".slide-sidebar").animate({width:"440"}).addClass("open");
|
|
|
- $('body').unbind('click');
|
|
|
setTimeout(function () {
|
|
|
$("body").bind('click', function (event) {
|
|
|
var e = event || window.event; //浏览器兼容性
|
|
@@ -568,23 +567,29 @@ const projTreeObj = {
|
|
|
if (elem.className == "open-sidebar" || elem.className == 'slide-sidebar open') {
|
|
|
return false;
|
|
|
}
|
|
|
+ if($(elem).attr('id') && $(elem).attr('id') === 'del-wj'){
|
|
|
+ return false;
|
|
|
+ }
|
|
|
elem = elem.parentNode;
|
|
|
}
|
|
|
$(".slide-sidebar").animate({width: "0"}).removeClass("open")// 关闭处理
|
|
|
+ $('body').unbind('click');
|
|
|
}
|
|
|
});
|
|
|
}, 500);
|
|
|
}
|
|
|
//单项文件,进入造价书界面
|
|
|
else if(node.data.projType === projectType.tender && withingClickArea()){
|
|
|
- let newTab = window.open('about:blank');
|
|
|
- BeforeOpenProject(node.data.ID, {'fullFolder': GetFullFolder(node.parent)}, function () {
|
|
|
- let mainUrl = `/main?project=${node.data.ID}`;
|
|
|
- CommonAjax.get(mainUrl, [], function () {
|
|
|
- newTab.location.href = mainUrl;
|
|
|
+ setTimeout(function () {
|
|
|
+ let newTab = window.open('about:blank');
|
|
|
+ BeforeOpenProject(node.data.ID, {'fullFolder': GetFullFolder(node.parent)}, function () {
|
|
|
+ let mainUrl = `/main?project=${node.data.ID}`;
|
|
|
+ CommonAjax.get(mainUrl, [], function () {
|
|
|
+ newTab.location.href = mainUrl;
|
|
|
+ });
|
|
|
});
|
|
|
- });
|
|
|
- return;
|
|
|
+ return;
|
|
|
+ }, 200);
|
|
|
}
|
|
|
if (!node || node.children.length === 0) { return; }
|
|
|
}
|
|
@@ -861,6 +866,7 @@ $(document).ready(function() {
|
|
|
a_updateFiles([updateObj], function () {
|
|
|
fileDelObj = null;
|
|
|
$('#fileDelCancel').click();
|
|
|
+ setDataToSideBar();
|
|
|
//refresh front?
|
|
|
});
|
|
|
}
|
|
@@ -2470,8 +2476,8 @@ function bindEvents_file_table(jqS, usedObj, targetBody, type){
|
|
|
let newName = $(jqS + ' input').val().trim();
|
|
|
if(newName !== orgName){
|
|
|
if(hasThisFileName(fileObjs, newName)){
|
|
|
- alert('本建设项目已存在该文件名,请重新输入!');
|
|
|
- $(jqS + ' input').val(orgName);
|
|
|
+ $(jqS).find('span:eq(2)').show();
|
|
|
+ //$(jqS + ' input').val(orgName);
|
|
|
return;
|
|
|
}
|
|
|
if(newName.trim().length === 0){
|
|
@@ -2510,6 +2516,7 @@ function bindEvents_file_table(jqS, usedObj, targetBody, type){
|
|
|
$(jqS + ' .btn-secondary').on('click', function () {
|
|
|
$(jqS + ' div:eq(0)').show();
|
|
|
$(jqS + ' div:eq(1)').hide();
|
|
|
+ $(jqS).find('span:eq(2)').hide();
|
|
|
});
|
|
|
});
|
|
|
//悬浮框显示使用该文件的单位工程
|
|
@@ -2552,7 +2559,9 @@ function set_file_table(target, poj_tenders, fileList, type){
|
|
|
+ '<span class="input-group-btn">'
|
|
|
+ '<button class="btn btn-secondary btn-sm" type="button"><i class="fa fa-remove"></i></button>'
|
|
|
+ '</span>'
|
|
|
- + '</div></td>';
|
|
|
+ + '</div>'
|
|
|
+ + '<span class="form-text text-danger" style="display: none">本建设项目已存在该文件名,请重新输入!' +
|
|
|
+ '</span></td>';
|
|
|
let fileTypeStr = type === fileType.unitPriceFile ? '单价文件' : '费率文件';
|
|
|
let fileHtml = '<tr><td>' + fileCounter + '</td><td id="file_' + fileId + '"><div>' + fileList[i].name + hoverHtml + renHtml + usedHtml + '</tr>';
|
|
|
fileCounter++;
|
|
@@ -2568,8 +2577,7 @@ function getFileObj(jqS, type){
|
|
|
let trs = $('tr', jqS);
|
|
|
for(let i = 0, len = trs.length; i < len; i++){
|
|
|
let td = $('td:eq(1)', trs[i])[0];
|
|
|
- let dispName = td.childNodes[0].childNodes[0].textContent;
|
|
|
- let name = dispName.slice(0, dispName.length - 4);
|
|
|
+ let name = td.childNodes[0].childNodes[0].textContent;
|
|
|
let attrId = $(td).attr('id');
|
|
|
let id = attrId.slice(5, attrId.length);
|
|
|
if(type === fileType.unitPriceFile){
|