|
@@ -304,7 +304,7 @@ const projTreeObj = {
|
|
|
},
|
|
},
|
|
|
saveAs: {
|
|
saveAs: {
|
|
|
name: "另存为",
|
|
name: "另存为",
|
|
|
- icon: 'fa-copy',
|
|
|
|
|
|
|
+ icon: 'fa-paste',
|
|
|
disabled: function () {
|
|
disabled: function () {
|
|
|
const node = projTreeObj.tree.selected;
|
|
const node = projTreeObj.tree.selected;
|
|
|
return !(node && node.data.projType === projectType.tender);
|
|
return !(node && node.data.projType === projectType.tender);
|
|
@@ -2069,7 +2069,7 @@ $(document).ready(function() {
|
|
|
$('#save-as-name').val(name);
|
|
$('#save-as-name').val(name);
|
|
|
setTimeout(() => $('#save-as-name')[0].focus(), 300);
|
|
setTimeout(() => $('#save-as-name')[0].focus(), 300);
|
|
|
});
|
|
});
|
|
|
- $('#save-as-confirm').click(async function () {
|
|
|
|
|
|
|
+ $('#save-as-confirm').click(_.throttle(async function () {
|
|
|
try {
|
|
try {
|
|
|
const name = $('#save-as-name').val().trim();
|
|
const name = $('#save-as-name').val().trim();
|
|
|
if (!name) {
|
|
if (!name) {
|
|
@@ -2092,15 +2092,20 @@ $(document).ready(function() {
|
|
|
projectData['shareInfo'] = [];
|
|
projectData['shareInfo'] = [];
|
|
|
projectData['name'] = name;
|
|
projectData['name'] = name;
|
|
|
projectMap['copy'] = { document: projectData };
|
|
projectMap['copy'] = { document: projectData };
|
|
|
- $("#save-as-dialog").modal('hide');
|
|
|
|
|
|
|
+ //$("#save-as-dialog").modal('hide');
|
|
|
$.bootstrapLoading.progressStart('拷贝项目', true);
|
|
$.bootstrapLoading.progressStart('拷贝项目', true);
|
|
|
$("#progress_modal_body").text('正在拷贝项目,请稍候……');
|
|
$("#progress_modal_body").text('正在拷贝项目,请稍候……');
|
|
|
await ajaxPost('/pm/api/copyProjects', {projectMap:projectMap,user_id: userID, tenderCount: 1});
|
|
await ajaxPost('/pm/api/copyProjects', {projectMap:projectMap,user_id: userID, tenderCount: 1});
|
|
|
- await importProcessChecking(null, null, (newProjectData) => handleTenderAfterChecking(newProjectData, projectData));
|
|
|
|
|
|
|
+ await importProcessChecking(null, null, (newProjectData) => {
|
|
|
|
|
+ handleTenderAfterChecking(newProjectData, projectData);
|
|
|
|
|
+ if (newProjectData) {
|
|
|
|
|
+ $('#save-as-dialog').modal('hide');
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
} catch (err) {
|
|
} catch (err) {
|
|
|
alert(err);
|
|
alert(err);
|
|
|
}
|
|
}
|
|
|
- });
|
|
|
|
|
|
|
+ }, 2000));
|
|
|
|
|
|
|
|
$('#selectSameTypeProject').click(function(){
|
|
$('#selectSameTypeProject').click(function(){
|
|
|
let value = $(this).prop('checked') == true?1:0;
|
|
let value = $(this).prop('checked') == true?1:0;
|