被覆盖文件还原
This commit is contained in:
parent
2e1f6cb992
commit
d8b5450ad8
@ -487,7 +487,6 @@ function queryapprove(){
|
|||||||
async : true,
|
async : true,
|
||||||
data : param,
|
data : param,
|
||||||
success : function(r) {
|
success : function(r) {
|
||||||
debugger;
|
|
||||||
var info = r.data.data;
|
var info = r.data.data;
|
||||||
if(info != ''){
|
if(info != ''){
|
||||||
ui("PERSON_THREE_LEVEL_PROCESS",info.AUDITOR_NO_3);
|
ui("PERSON_THREE_LEVEL_PROCESS",info.AUDITOR_NO_3);
|
||||||
@ -496,13 +495,13 @@ function queryapprove(){
|
|||||||
ui("LEVEL_AUDIT_REQUIRED",info.L3_SP);
|
ui("LEVEL_AUDIT_REQUIRED",info.L3_SP);
|
||||||
ui("SECONDARY_AUDIT_REQUIRED",info.L2_SP);
|
ui("SECONDARY_AUDIT_REQUIRED",info.L2_SP);
|
||||||
ui("LEVEL_1_AUDIT_REQUIRED",info.L1_SP);
|
ui("LEVEL_1_AUDIT_REQUIRED",info.L1_SP);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
//by bzp
|
//by bzp
|
||||||
function showlist(data, type, pageNumber, start){
|
function showlist(data, type, pageNumber, start){
|
||||||
|
debugger;
|
||||||
var tableTdCss = 'style="padding-top: 0;padding-bottom: 0;"';
|
var tableTdCss = 'style="padding-top: 0;padding-bottom: 0;"';
|
||||||
if (type == 'new') {
|
if (type == 'new') {
|
||||||
$('#new_check_all').check("option", "checked", false);
|
$('#new_check_all').check("option", "checked", false);
|
||||||
@ -514,8 +513,9 @@ function showlist(data, type, pageNumber, start){
|
|||||||
for (var i = 0, s = start; i < pageLimit; i++, s++) {
|
for (var i = 0, s = start; i < pageLimit; i++, s++) {
|
||||||
var curr;
|
var curr;
|
||||||
if ((curr = data[s - 1]) != undefined) {
|
if ((curr = data[s - 1]) != undefined) {
|
||||||
var fileName = curr.publishFileName + ' V' + curr.fileVersion + '.0';
|
var fileName = curr.publishFileName + ' V' + curr.fileVersion;
|
||||||
var reportName = '<a href="javascript:void(0);" onclick="openReportFile(\'' + curr.taskId + '\')">' + fileName + "-流程手册" + '</a>';
|
var outputName = (curr.category == 'process' ? '流程' : curr.category == 'data' ? '表单' : curr.category == 'control' ? '制度' : '') + '手册';
|
||||||
|
var reportName = '<a href="javascript:void(0);" onclick="openReportFile(\'' + curr.taskId + '\')">' + fileName + "-" + outputName + '</a><span id="download_output_' + curr.publishFileId + '" style="cursor: pointer;" onclick="downloadReport(\'' + curr.publishFileId + '\',\'' + curr.taskId + '\')"><i class="awsui-iconfont" style="font-size: 12px;"></i></span>';
|
||||||
var quickCreate = "<a href='javascript:void(0);' onclick='quickCreateReport(" + JSON.stringify(curr) + ", $(this), \"new\")'>立即创建</a>";
|
var quickCreate = "<a href='javascript:void(0);' onclick='quickCreateReport(" + JSON.stringify(curr) + ", $(this), \"new\")'>立即创建</a>";
|
||||||
var processNumber = '';
|
var processNumber = '';
|
||||||
if(curr.processNumber != undefined){
|
if(curr.processNumber != undefined){
|
||||||
@ -542,6 +542,7 @@ function showlist(data, type, pageNumber, start){
|
|||||||
$("#publish_new_tbody .awsui-checkbox").check();
|
$("#publish_new_tbody .awsui-checkbox").check();
|
||||||
}
|
}
|
||||||
if (type == 'change') {
|
if (type == 'change') {
|
||||||
|
var createButtonObj = {};
|
||||||
$('#change_check_all').check("option", "checked", false);
|
$('#change_check_all').check("option", "checked", false);
|
||||||
if (data.length > pageLimit) {// 显示分页
|
if (data.length > pageLimit) {// 显示分页
|
||||||
$('#change_pagination').show();
|
$('#change_pagination').show();
|
||||||
@ -550,20 +551,24 @@ function showlist(data, type, pageNumber, start){
|
|||||||
var html = '';
|
var html = '';
|
||||||
var tempSelect = [];
|
var tempSelect = [];
|
||||||
for (var i = 0, s = start; i < pageLimit; i++, s++) {
|
for (var i = 0, s = start; i < pageLimit; i++, s++) {
|
||||||
|
debugger;
|
||||||
var curr;
|
var curr;
|
||||||
if ((curr = data[s - 1]) != undefined) {
|
if ((curr = data[s - 1]) != undefined) {
|
||||||
var sourceFileName = curr.changeFileName + ' V' + curr.fileVersion + '.0';
|
var sourceFileName = curr.changeFileName + ' V' + curr.fileVersion;
|
||||||
// 变更目标文件处理
|
// 变更目标文件处理
|
||||||
var targetFileName = "";
|
var targetFileName = "";
|
||||||
if (curr.changedFileNameNew != undefined && curr.changedFileNameNew != '') {
|
if (curr.changedFileNameNew != undefined && curr.changedFileNameNew != '') {
|
||||||
targetFileName = curr.changedFileNameNew + ' V' + curr.targetFileVersion + '.0';
|
targetFileName = curr.changedFileNameNew + ' V' + curr.targetFileVersion;
|
||||||
}
|
}
|
||||||
var targetId = "";
|
var targetId = "";
|
||||||
if (curr.changedFileIdNew != undefined && curr.changedFileIdNew != '') {
|
if (curr.changedFileIdNew != undefined && curr.changedFileIdNew != '') {
|
||||||
targetId = curr.changedFileIdNew;
|
targetId = curr.changedFileIdNew;
|
||||||
}
|
}
|
||||||
var reportName = '<a href="javascript:void(0);" onclick="openReportFile(\'' + curr.taskId + '\')">' + targetFileName + "-流程手册" + '</a>';
|
debugger;
|
||||||
|
var outputName = (curr.category == 'process' ? '流程' : curr.category == 'data' ? '表单' : curr.category == 'control' ? '制度' : '') + '手册';
|
||||||
|
var reportName = '<a href="javascript:void(0);" onclick="openReportFile(\'' + curr.taskId + '\')">' + targetFileName + "-" + outputName + '</a><span id="download_output_' + curr.changeFileId + '" style="cursor: pointer;" onclick="downloadReport(\'' + curr.changeFileId + '\',\'' + curr.taskId + '\')"><i class="awsui-iconfont" style="font-size: 12px;"></i></span>';
|
||||||
var quickCreate = "<a href='javascript:void(0);' onclick='quickCreateReport(" + JSON.stringify(curr) + ", $(this), \"change\")'>立即创建</a>";
|
var quickCreate = "<a href='javascript:void(0);' onclick='quickCreateReport(" + JSON.stringify(curr) + ", $(this), \"change\")'>立即创建</a>";
|
||||||
|
createButtonObj[curr.changeFileId] = quickCreate;
|
||||||
reportName = (curr.taskId == undefined || curr.taskId == '') ? '无' : curr.taskId == 'submit_create' ? quickCreate : reportName;
|
reportName = (curr.taskId == undefined || curr.taskId == '') ? '无' : curr.taskId == 'submit_create' ? quickCreate : reportName;
|
||||||
|
|
||||||
// 三员管理,taskId为change标识未创建手册
|
// 三员管理,taskId为change标识未创建手册
|
||||||
@ -589,7 +594,7 @@ function showlist(data, type, pageNumber, start){
|
|||||||
var targetFiles = $.extend(true, [], curr.targetFiles);
|
var targetFiles = $.extend(true, [], curr.targetFiles);
|
||||||
for (var j = 0; j < targetFiles.length; j++) {
|
for (var j = 0; j < targetFiles.length; j++) {
|
||||||
var temp = targetFiles[j];
|
var temp = targetFiles[j];
|
||||||
var name = temp.text + ' V' + temp.version + '.0';
|
var name = temp.text + ' V' + temp.version;
|
||||||
var obj = {id:temp.id, text:name, name:temp.text, version:temp.version};
|
var obj = {id:temp.id, text:name, name:temp.text, version:temp.version};
|
||||||
opt1.data.push(obj);
|
opt1.data.push(obj);
|
||||||
if (targetId == temp.id) {
|
if (targetId == temp.id) {
|
||||||
@ -603,6 +608,7 @@ function showlist(data, type, pageNumber, start){
|
|||||||
tempObj.selectId = 'change_' + curr.changeFileId;
|
tempObj.selectId = 'change_' + curr.changeFileId;
|
||||||
tempObj.taskId = curr.taskId;
|
tempObj.taskId = curr.taskId;
|
||||||
tempObj.id = curr.changeFileId;
|
tempObj.id = curr.changeFileId;
|
||||||
|
tempObj.category = curr.category;
|
||||||
tempSelect.push(tempObj);
|
tempSelect.push(tempObj);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -618,11 +624,13 @@ function showlist(data, type, pageNumber, start){
|
|||||||
if (tempObj.taskId != undefined && tempObj.taskId != '') {
|
if (tempObj.taskId != undefined && tempObj.taskId != '') {
|
||||||
// 三员管理,taskId为change标识未创建手册
|
// 三员管理,taskId为change标识未创建手册
|
||||||
if (tempObj.taskId == 'submit_create' || tempObj.taskId == 'change') {
|
if (tempObj.taskId == 'submit_create' || tempObj.taskId == 'change') {
|
||||||
$('#report_' + tempObj.id).html(quickCreate);
|
// $('#report_' + tempObj.id).html(quickCreate);
|
||||||
|
$('#report_' + tempObj.id).html(createButtonObj[tempObj.id]);
|
||||||
} else {
|
} else {
|
||||||
for (var m = 0; m < tempObj.opt.data.length; m++) {
|
for (var m = 0; m < tempObj.opt.data.length; m++) {
|
||||||
if (tempObj.opt.data[m].id == tempObj.targetId) {
|
if (tempObj.opt.data[m].id == tempObj.targetId) {
|
||||||
var targetFileName2 = tempObj.opt.data[m].name + ' V' + tempObj.opt.data[m].version + '.0' + '-流程手册';
|
var outputName = (tempObj.category == 'process' ? '流程' : tempObj.category == 'data' ? '表单' : tempObj.category == 'control' ? '制度' : '') + '手册';
|
||||||
|
var targetFileName2 = tempObj.opt.data[m].name + ' V' + tempObj.opt.data[m].version + '-' + outputName + '</a><span id="download_output_' + tempObj.targetId + '" style="cursor: pointer;" onclick="downloadReport(\'' + tempObj.targetId + '\',\'' + tempObj.taskId + '\')"><i class="awsui-iconfont" style="font-size: 12px;"></i></span>';
|
||||||
$('#report_' + tempObj.id).html('<a href="javascript:void(0);" onclick="openReportFile(\'' + tempObj.taskId + '\')">' + targetFileName2 + '</a>');
|
$('#report_' + tempObj.id).html('<a href="javascript:void(0);" onclick="openReportFile(\'' + tempObj.taskId + '\')">' + targetFileName2 + '</a>');
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -654,7 +662,7 @@ function showlist(data, type, pageNumber, start){
|
|||||||
for (var i = 0, s = start; i < pageLimit; i++, s++) {
|
for (var i = 0, s = start; i < pageLimit; i++, s++) {
|
||||||
var curr;
|
var curr;
|
||||||
if ((curr = data[s - 1]) != undefined) {
|
if ((curr = data[s - 1]) != undefined) {
|
||||||
var fileName = curr.stopFileName + ' V' + curr.fileVersion + '.0';
|
var fileName = curr.stopFileName + ' V' + curr.fileVersion;
|
||||||
var reportName = '<a href="javascript:void(0);" onclick="openReportFile(\'' + curr.taskId + '\')">' + fileName + "-流程手册" + '</a>';
|
var reportName = '<a href="javascript:void(0);" onclick="openReportFile(\'' + curr.taskId + '\')">' + fileName + "-流程手册" + '</a>';
|
||||||
reportName = (curr.taskId == undefined || curr.taskId == '') ? '无' : reportName;
|
reportName = (curr.taskId == undefined || curr.taskId == '') ? '无' : reportName;
|
||||||
var checkboxPerm = editPerm ? '' : 'disabled="disabled"';
|
var checkboxPerm = editPerm ? '' : 'disabled="disabled"';
|
||||||
@ -784,6 +792,7 @@ function addProcess(type) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
disabledButton();
|
disabledButton();
|
||||||
|
debugger;
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
// 获取说明内容
|
// 获取说明内容
|
||||||
var desc = $('#publisher_dialog_desc').val();
|
var desc = $('#publisher_dialog_desc').val();
|
||||||
@ -890,13 +899,7 @@ function initChangedData(changeFileId) {
|
|||||||
// 获取流程手册
|
// 获取流程手册
|
||||||
var selectedTaskId = "";
|
var selectedTaskId = "";
|
||||||
selectedTaskId = createReport(changeTemp[i].category, changeTemp[i].methodId, selectedId, selectedTaskId);
|
selectedTaskId = createReport(changeTemp[i].category, changeTemp[i].methodId, selectedId, selectedTaskId);
|
||||||
// 更新界面手册
|
|
||||||
if (selectedTaskId != '') {
|
|
||||||
var targetFileName2 = changeTemp[i].targetFiles[j].text + ' V' + changeTemp[i].targetFiles[j].version + '.0' + '-流程手册';
|
|
||||||
$('#report_' + changeFileId).html('<a href="javascript:void(0);" onclick="openReportFile(\'' + selectedTaskId + '\')">' + targetFileName2 + '</a>');
|
|
||||||
} else {
|
|
||||||
$('#report_' + changeFileId).html('无');
|
|
||||||
}
|
|
||||||
// 更新数据
|
// 更新数据
|
||||||
changeTemp[i].changedFileIdNew = selectedId;
|
changeTemp[i].changedFileIdNew = selectedId;
|
||||||
changeTemp[i].changedFileNameNew = changeTemp[i].targetFiles[j].text;
|
changeTemp[i].changedFileNameNew = changeTemp[i].targetFiles[j].text;
|
||||||
@ -904,6 +907,17 @@ function initChangedData(changeFileId) {
|
|||||||
changeTemp[i].targetFileVersion = changeTemp[i].targetFiles[j].version;
|
changeTemp[i].targetFileVersion = changeTemp[i].targetFiles[j].version;
|
||||||
changeTemp[i].targetMethodId = changeTemp[i].methodId;
|
changeTemp[i].targetMethodId = changeTemp[i].methodId;
|
||||||
changeTemp[i].targetCategory = changeTemp[i].category;
|
changeTemp[i].targetCategory = changeTemp[i].category;
|
||||||
|
|
||||||
|
// 更新界面手册
|
||||||
|
if (selectedTaskId != '') {
|
||||||
|
var outputName = (changeTemp[i].category == 'process' ? '流程' : changeTemp[i].category == 'data' ? '表单' : changeTemp[i].category == 'control' ? '制度' : '') + '手册';
|
||||||
|
|
||||||
|
var targetFileName2 = changeTemp[i].targetFiles[j].text + ' V' + changeTemp[i].targetFiles[j].version + '-' + outputName + '</a><span id="download_output_' + changeTemp[i].changeFileId + '" style="cursor: pointer;" onclick="downloadReport(\'' + changeTemp[i].changeFileId + '\',\'' + changeTemp[i].taskId + '\')"><i class="awsui-iconfont" style="font-size: 12px;"></i></span>';
|
||||||
|
$('#report_' + changeFileId).html('<a href="javascript:void(0);" onclick="openReportFile(\'' + selectedTaskId + '\')">' + targetFileName2 + '</a>');
|
||||||
|
} else {
|
||||||
|
$('#report_' + changeFileId).html('无');
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1261,7 +1275,8 @@ function queryBatchReport(data) {
|
|||||||
|
|
||||||
// 创建流程手册
|
// 创建流程手册
|
||||||
function createReport(category, method, uuid, taskId) {
|
function createReport(category, method, uuid, taskId) {
|
||||||
if (category == 'process' && method != "process.evc" && method != 'default') {
|
debugger;
|
||||||
|
if ((category == 'process' || category == 'control' || category == 'data') && method != 'default') {
|
||||||
var param = {
|
var param = {
|
||||||
sid : sid,
|
sid : sid,
|
||||||
cmd : "com.actionsoft.apps.coe.pal.publisher_output_pr_report_create",
|
cmd : "com.actionsoft.apps.coe.pal.publisher_output_pr_report_create",
|
||||||
@ -1281,6 +1296,8 @@ function createReport(category, method, uuid, taskId) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
$.simpleAlert('不支持创建手册');
|
||||||
}
|
}
|
||||||
return taskId;
|
return taskId;
|
||||||
}
|
}
|
||||||
@ -1290,7 +1307,7 @@ function createBatchReport(data, createTime) {
|
|||||||
var ids = [];
|
var ids = [];
|
||||||
for (var i = 0; i < data.length; i++) {
|
for (var i = 0; i < data.length; i++) {
|
||||||
var temp = data[i];
|
var temp = data[i];
|
||||||
if (temp.category == 'process' && temp.methodId != "process.evc" && temp.methodId != 'default') {
|
if ((temp.category == 'process' || temp.category == 'control' || temp.category == 'data') && temp.methodId != 'default') {
|
||||||
ids.push(temp.publishFileId);
|
ids.push(temp.publishFileId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1354,14 +1371,22 @@ function getVersionsAndCreateReport(data, createTime) {
|
|||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取手册专属名称
|
||||||
|
function getOutputName(category) {
|
||||||
|
return (category == 'process' ? '流程' : category == 'data' ? '表单' : category == 'control' ? '制度' : '') + '手册';
|
||||||
|
}
|
||||||
|
|
||||||
//单个流程立即创建流程手册
|
//单个流程立即创建流程手册
|
||||||
function quickCreateReport(obj, object, type) {
|
function quickCreateReport(obj, object, type) {
|
||||||
|
debugger;
|
||||||
var taskId;
|
var taskId;
|
||||||
var category = obj.category;
|
var category = obj.category;
|
||||||
var method = obj.methodId;
|
var method = obj.methodId;
|
||||||
var uuid = obj.id === undefined ? obj.publishFileId: obj.id;
|
var uuid = '';
|
||||||
if (isHighSecurity){
|
if (type == 'new') {
|
||||||
uuid = uuid == undefined ? obj.changedFileIdNew : uuid;
|
uuid = obj.publishFileId;
|
||||||
|
} else if (type == 'change') {
|
||||||
|
uuid = obj.changedFileIdNew;
|
||||||
}
|
}
|
||||||
$.simpleAlert("正在创建", "loading");
|
$.simpleAlert("正在创建", "loading");
|
||||||
taskId = createReport(category, method, uuid, taskId);
|
taskId = createReport(category, method, uuid, taskId);
|
||||||
@ -1373,32 +1398,34 @@ function quickCreateReport(obj, object, type) {
|
|||||||
if(isHighSecurity){
|
if(isHighSecurity){
|
||||||
//更新数据记录
|
//更新数据记录
|
||||||
if (type == 'new') {
|
if (type == 'new') {
|
||||||
var fileName = obj.publishFileName + ' V' + obj.fileVersion + '.0-流程手册';
|
var fileName = obj.publishFileName + ' V' + obj.fileVersion + '-' + getOutputName(category);
|
||||||
$(object).text(fileName);
|
$(object).text(fileName);
|
||||||
} else if (type == 'change') {
|
} else if (type == 'change') {
|
||||||
var targetFileName = obj.changedFileNameNew + ' V' + obj.targetFileVersion + '.0-流程手册';
|
var targetFileName = obj.changedFileNameNew + ' V' + obj.targetFileVersion + '-' + getOutputName(category);
|
||||||
$(object).text(targetFileName);
|
$(object).text(targetFileName);
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
|
debugger;
|
||||||
//更新数据记录
|
//更新数据记录
|
||||||
if (type == 'new') {
|
if (type == 'new') {
|
||||||
var fileName = obj.publishFileName + ' V' + obj.fileVersion + '.0-流程手册';
|
var fileName = obj.publishFileName + ' V' + obj.fileVersion + '-' + getOutputName(category);
|
||||||
$(object).text(fileName);
|
$(object).text(fileName);
|
||||||
for (var i = 0; i < newTemp.length; i++) {
|
for (var i = 0; i < newTemp.length; i++) {
|
||||||
if (newTemp[i].id == uuid) {
|
if (newTemp[i].publishFileId == uuid) {
|
||||||
newTemp[i].taskId = taskId;
|
newTemp[i].taskId = taskId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (type == 'change') {
|
} else if (type == 'change') {
|
||||||
var targetFileName = obj.changedFileNameNew + ' V' + obj.targetFileVersion + '.0-流程手册';
|
var targetFileName = obj.changedFileNameNew + ' V' + obj.targetFileVersion + '-' + getOutputName(category);
|
||||||
$(object).text(targetFileName);
|
$(object).text(targetFileName);
|
||||||
for (var i = 0; i < changeTemp.length; i++) {
|
for (var i = 0; i < changeTemp.length; i++) {
|
||||||
if (changeTemp[i].id == uuid) {
|
if (changeTemp[i].changedFileIdNew == uuid) {
|
||||||
changeTemp[i].taskId = taskId;
|
changeTemp[i].taskId = taskId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$(object).parent().append('<span id="download_output_' + uuid + '" style="cursor: pointer;" onclick="downloadReport(\'' + uuid + '\',\'' + taskId + '\')"><i class="awsui-iconfont" style="font-size: 12px;"></i></span>');
|
||||||
}
|
}
|
||||||
|
|
||||||
// 清空树结构
|
// 清空树结构
|
||||||
@ -1464,24 +1491,24 @@ function deleteFile(type) {
|
|||||||
tempIds.push($(this).attr('data-id'));
|
tempIds.push($(this).attr('data-id'));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
var param = {
|
// var param = {
|
||||||
cmd: 'com.actionsoft.apps.coe.pal.publisher_update_isApproval_status',
|
// cmd: 'com.actionsoft.apps.coe.pal.publisher_update_isApproval_status',
|
||||||
repositoryIds: JSON.stringify(tempIds),
|
// repositoryIds: JSON.stringify(tempIds),
|
||||||
wsId : wsId,
|
// wsId : wsId,
|
||||||
sid: sid,
|
// sid: sid,
|
||||||
isApproval: 0
|
// isApproval: 0
|
||||||
};
|
// };
|
||||||
$.ajax({
|
// $.ajax({
|
||||||
url : "./jd",
|
// url : "./jd",
|
||||||
type : "POST",
|
// type : "POST",
|
||||||
dataType : "JSON",
|
// dataType : "JSON",
|
||||||
async : true,
|
// async : true,
|
||||||
data : param,
|
// data : param,
|
||||||
success : function(r) {},
|
// success : function(r) {},
|
||||||
error : function(XMLHttpRequest, textStatus, errorThrown) {
|
// error : function(XMLHttpRequest, textStatus, errorThrown) {
|
||||||
$.simpleAlert("", 'error');
|
// $.simpleAlert("", 'error');
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
for (var j = 0; j < tempIds.length; j++) {
|
for (var j = 0; j < tempIds.length; j++) {
|
||||||
for (var m = 0; m < newTemp.length; m++) {
|
for (var m = 0; m < newTemp.length; m++) {
|
||||||
if (tempIds[j] == newTemp[m].publishFileId) {
|
if (tempIds[j] == newTemp[m].publishFileId) {
|
||||||
@ -1529,24 +1556,24 @@ function deleteFile(type) {
|
|||||||
tempIds.push($(this).attr('data-id'));
|
tempIds.push($(this).attr('data-id'));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
var param = {
|
// var param = {
|
||||||
cmd: 'com.actionsoft.apps.coe.pal.publisher_update_isApproval_status',
|
// cmd: 'com.actionsoft.apps.coe.pal.publisher_update_isApproval_status',
|
||||||
repositoryIds: JSON.stringify(tempIds),
|
// repositoryIds: JSON.stringify(tempIds),
|
||||||
wsId : wsId,
|
// wsId : wsId,
|
||||||
sid: sid,
|
// sid: sid,
|
||||||
isApproval: 0
|
// isApproval: 0
|
||||||
};
|
// };
|
||||||
$.ajax({
|
// $.ajax({
|
||||||
url : "./jd",
|
// url : "./jd",
|
||||||
type : "POST",
|
// type : "POST",
|
||||||
dataType : "JSON",
|
// dataType : "JSON",
|
||||||
async : true,
|
// async : true,
|
||||||
data : param,
|
// data : param,
|
||||||
success : function(r) {},
|
// success : function(r) {},
|
||||||
error : function(XMLHttpRequest, textStatus, errorThrown) {
|
// error : function(XMLHttpRequest, textStatus, errorThrown) {
|
||||||
$.simpleAlert("", 'error');
|
// $.simpleAlert("", 'error');
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
for (var j = 0; j < tempIds.length; j++) {
|
for (var j = 0; j < tempIds.length; j++) {
|
||||||
for (var m = 0; m < changeTemp.length; m++) {
|
for (var m = 0; m < changeTemp.length; m++) {
|
||||||
if (tempIds[j] == changeTemp[m].changeFileId) {
|
if (tempIds[j] == changeTemp[m].changeFileId) {
|
||||||
@ -1594,24 +1621,24 @@ function deleteFile(type) {
|
|||||||
tempIds.push($(this).attr('data-id'));
|
tempIds.push($(this).attr('data-id'));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
var param = {
|
// var param = {
|
||||||
cmd: 'com.actionsoft.apps.coe.pal.publisher_update_isApproval_status',
|
// cmd: 'com.actionsoft.apps.coe.pal.publisher_update_isApproval_status',
|
||||||
repositoryIds: JSON.stringify(tempIds),
|
// repositoryIds: JSON.stringify(tempIds),
|
||||||
wsId : wsId,
|
// wsId : wsId,
|
||||||
sid: sid,
|
// sid: sid,
|
||||||
isApproval: 0
|
// isApproval: 0
|
||||||
};
|
// };
|
||||||
$.ajax({
|
// $.ajax({
|
||||||
url : "./jd",
|
// url : "./jd",
|
||||||
type : "POST",
|
// type : "POST",
|
||||||
dataType : "JSON",
|
// dataType : "JSON",
|
||||||
async : true,
|
// async : true,
|
||||||
data : param,
|
// data : param,
|
||||||
success : function(r) {},
|
// success : function(r) {},
|
||||||
error : function(XMLHttpRequest, textStatus, errorThrown) {
|
// error : function(XMLHttpRequest, textStatus, errorThrown) {
|
||||||
$.simpleAlert("", 'error');
|
// $.simpleAlert("", 'error');
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
for (var j = 0; j < tempIds.length; j++) {
|
for (var j = 0; j < tempIds.length; j++) {
|
||||||
for (var m = 0; m < stopTemp.length; m++) {
|
for (var m = 0; m < stopTemp.length; m++) {
|
||||||
if (tempIds[j] == stopTemp[m].stopFileId) {
|
if (tempIds[j] == stopTemp[m].stopFileId) {
|
||||||
@ -1780,7 +1807,7 @@ function saveFormData(type) {
|
|||||||
var msg = '以下文件已经在其他未办理完成的表单中,不允许保存/办理';
|
var msg = '以下文件已经在其他未办理完成的表单中,不允许保存/办理';
|
||||||
if (tempData.length > 0) {
|
if (tempData.length > 0) {
|
||||||
for (var i = 0; i < tempData.length; i++) {
|
for (var i = 0; i < tempData.length; i++) {
|
||||||
msg += '<br>' + tempData[i].name + ' V' + tempData[i].version + '.0';
|
msg += '<br>' + tempData[i].name + ' V' + tempData[i].version;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var options = {
|
var options = {
|
||||||
@ -1809,6 +1836,7 @@ function formSave(isTransact){
|
|||||||
$.simpleAlert('发布内容不能为空', 'info');
|
$.simpleAlert('发布内容不能为空', 'info');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
debugger;
|
||||||
var index = 0;
|
var index = 0;
|
||||||
if (!($("#publisher_new_tr").css('display') == 'none') && newTemp.length > 0) {
|
if (!($("#publisher_new_tr").css('display') == 'none') && newTemp.length > 0) {
|
||||||
index++;
|
index++;
|
||||||
@ -1832,7 +1860,7 @@ function formSave(isTransact){
|
|||||||
for (var i = 0; i < changeTemp.length; i++) {
|
for (var i = 0; i < changeTemp.length; i++) {
|
||||||
if (changeTemp[i].changedFileIdNew == "") {
|
if (changeTemp[i].changedFileIdNew == "") {
|
||||||
flag = true;
|
flag = true;
|
||||||
msg += '<br>' + changeTemp[i].changeFileName + ' V' + changeTemp[i].fileVersion + '.0';
|
msg += '<br>' + changeTemp[i].changeFileName + ' V' + changeTemp[i].fileVersion;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (flag) {
|
if (flag) {
|
||||||
@ -1870,7 +1898,7 @@ function formSave(isTransact){
|
|||||||
for (var j = 0; j < stopTempData.length; j++) {
|
for (var j = 0; j < stopTempData.length; j++) {
|
||||||
if (changeTempData[i].changeFileId == stopTempData[j].stopFileId) {
|
if (changeTempData[i].changeFileId == stopTempData[j].stopFileId) {
|
||||||
$.simpleAlert('close');
|
$.simpleAlert('close');
|
||||||
$.simpleAlert(stopTempData[j].stopFileName + ' V' + stopTempData[j].fileVersion + '.0' + "<br>在变更流程和停用流程中同时存在,不允许办理", 'error');
|
$.simpleAlert(stopTempData[j].stopFileName + ' V' + stopTempData[j].fileVersion + "<br>在变更流程和停用流程中同时存在,不允许办理", 'error');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1925,7 +1953,7 @@ function formSave(isTransact){
|
|||||||
var msg = '以下文件已经在其他未办理完成的表单中,不允许保存/办理';
|
var msg = '以下文件已经在其他未办理完成的表单中,不允许保存/办理';
|
||||||
if (tempData.length > 0) {
|
if (tempData.length > 0) {
|
||||||
for (var i = 0; i < tempData.length; i++) {
|
for (var i = 0; i < tempData.length; i++) {
|
||||||
msg += '<br>' + tempData[i].name + ' V' + tempData[i].version + '.0';
|
msg += '<br>' + tempData[i].name + ' V' + tempData[i].version;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var options = {
|
var options = {
|
||||||
@ -2219,3 +2247,26 @@ function listenCloseEvent() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function downloadReport(uuid, taskId) {
|
||||||
|
awsui.ajax.request({
|
||||||
|
type: "POST",
|
||||||
|
url: "./jd",
|
||||||
|
async: false,
|
||||||
|
data: {
|
||||||
|
sid: sid,
|
||||||
|
cmd: "com.actionsoft.apps.coe.pal.publisher_output_download",
|
||||||
|
taskId: taskId,
|
||||||
|
uuid: uuid
|
||||||
|
},
|
||||||
|
success : function(r) {
|
||||||
|
debugger;
|
||||||
|
if (r.result == "ok") {
|
||||||
|
debugger;
|
||||||
|
window.open (r.data.url);
|
||||||
|
} else {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
@ -228,7 +228,7 @@ var changeOption;
|
|||||||
*/
|
*/
|
||||||
function initPublishData(data, type, isEnd, proNumber) {
|
function initPublishData(data, type, isEnd, proNumber) {
|
||||||
if (type == 'new') {
|
if (type == 'new') {
|
||||||
var fileName = data.publishFileName + ' V' + data.fileVersion + '.0';
|
var fileName = data.publishFileName + ' V' + data.fileVersion;
|
||||||
var aHtml = '<a class="link" href="javascript:void(0);" onclick="openPortalPage(\'' + data.publishFileId + '\', \'' + data.taskId + '\')">' + fileName + '</a>';
|
var aHtml = '<a class="link" href="javascript:void(0);" onclick="openPortalPage(\'' + data.publishFileId + '\', \'' + data.taskId + '\')">' + fileName + '</a>';
|
||||||
$('#publisher_new_file_name').children('span.file_name').html(aHtml);
|
$('#publisher_new_file_name').children('span.file_name').html(aHtml);
|
||||||
$('#publisher_new_file_id').val(data.publishFileId);
|
$('#publisher_new_file_id').val(data.publishFileId);
|
||||||
@ -250,14 +250,14 @@ function initPublishData(data, type, isEnd, proNumber) {
|
|||||||
if (type == 'change') {
|
if (type == 'change') {
|
||||||
changeData = data;
|
changeData = data;
|
||||||
// 变更文件处理
|
// 变更文件处理
|
||||||
var sourceFileName = data.changeFileName + ' V' + data.fileVersion + '.0';
|
var sourceFileName = data.changeFileName + ' V' + data.fileVersion;
|
||||||
$('#publisher_change_source_file_name').children('span.file_name').html(sourceFileName);
|
$('#publisher_change_source_file_name').children('span.file_name').html(sourceFileName);
|
||||||
$('#publisher_change_source_file_id').val(data.changeFileId);
|
$('#publisher_change_source_file_id').val(data.changeFileId);
|
||||||
|
|
||||||
// 变更目标文件处理
|
// 变更目标文件处理
|
||||||
var targetFileName = "";
|
var targetFileName = "";
|
||||||
if (data.changedFileNameNew != undefined && data.changedFileNameNew != '') {
|
if (data.changedFileNameNew != undefined && data.changedFileNameNew != '') {
|
||||||
targetFileName = data.changedFileNameNew + ' V' + data.targetFileVersion + '.0';
|
targetFileName = data.changedFileNameNew + ' V' + data.targetFileVersion;
|
||||||
}
|
}
|
||||||
var targetId = "";
|
var targetId = "";
|
||||||
if (data.changedFileIdNew != undefined && data.changedFileIdNew != '') {
|
if (data.changedFileIdNew != undefined && data.changedFileIdNew != '') {
|
||||||
@ -288,7 +288,7 @@ function initPublishData(data, type, isEnd, proNumber) {
|
|||||||
var flag = false;
|
var flag = false;
|
||||||
for (var i = 0; i < data.targetFiles.length; i++) {
|
for (var i = 0; i < data.targetFiles.length; i++) {
|
||||||
var temp = data.targetFiles[i];
|
var temp = data.targetFiles[i];
|
||||||
var name = temp.text + ' V' + temp.version + '.0';
|
var name = temp.text + ' V' + temp.version;
|
||||||
var obj = {id:temp.id, text:name};
|
var obj = {id:temp.id, text:name};
|
||||||
opt1.data.push(obj);
|
opt1.data.push(obj);
|
||||||
if (targetId == temp.id) {
|
if (targetId == temp.id) {
|
||||||
@ -324,7 +324,7 @@ function initPublishData(data, type, isEnd, proNumber) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (type == 'stop') {
|
if (type == 'stop') {
|
||||||
var fileName = data.stopFileName + ' V' + data.fileVersion + '.0';
|
var fileName = data.stopFileName + ' V' + data.fileVersion;
|
||||||
var aHtml = '<a class="link" href="javascript:void(0);" onclick="openPortalPage(\'' + data.stopFileId + '\', \'' + data.taskId + '\')">' + fileName + '</a>';
|
var aHtml = '<a class="link" href="javascript:void(0);" onclick="openPortalPage(\'' + data.stopFileId + '\', \'' + data.taskId + '\')">' + fileName + '</a>';
|
||||||
$('#publisher_stop_file_name').children('span.file_name').html(aHtml);
|
$('#publisher_stop_file_name').children('span.file_name').html(aHtml);
|
||||||
$('#publisher_stop_file_id').val(data.stopFileId);
|
$('#publisher_stop_file_id').val(data.stopFileId);
|
||||||
@ -957,7 +957,7 @@ function formSave(isTransact){
|
|||||||
if (r.result == 'error') {
|
if (r.result == 'error') {
|
||||||
flag = true;
|
flag = true;
|
||||||
var data = r.data.data;
|
var data = r.data.data;
|
||||||
var name = data.name + ' V' + data.version + '.0';
|
var name = data.name + ' V' + data.version;
|
||||||
console.log(data);
|
console.log(data);
|
||||||
tempName = name;
|
tempName = name;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user