流程发布校验重复
This commit is contained in:
parent
898a048d24
commit
0e4069aef1
File diff suppressed because it is too large
Load Diff
@ -33,7 +33,6 @@ var stopPageSetting = {
|
||||
}
|
||||
var isHighSecurity;
|
||||
$(document).ready(function(){
|
||||
getWsId();
|
||||
$('td,th').css('padding-top','0px');
|
||||
$('td,th').css('padding-bottom','0px');
|
||||
// $('#alertMsg').css('background', '#fff');
|
||||
@ -52,32 +51,6 @@ $(document).ready(function(){
|
||||
// listenCloseEvent();// 关闭窗口执行,关闭窗口/刷新都会造成流程实例被删除,注释掉
|
||||
})
|
||||
|
||||
|
||||
|
||||
//获取wsid
|
||||
function getWsId() {
|
||||
var param = {
|
||||
sid : $("#sid").val(),
|
||||
cmd : "com.actionsoft.apps.coe.pal.publisher_publish_getWsId"
|
||||
}
|
||||
$.ajax({
|
||||
url : "./jd",
|
||||
type : "POST",
|
||||
dataType : "JSON",
|
||||
data : param,
|
||||
async: false,
|
||||
success : function(r) {
|
||||
if (r.result == 'ok') {
|
||||
var wsId=$("#WSID").val();
|
||||
if(wsId==""){
|
||||
$("#WSID").val(r.data.wsId);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
var paginationSetting = {
|
||||
pageLimit: pageLimit,
|
||||
showItem: 10,
|
||||
@ -270,9 +243,9 @@ function initHtml() {
|
||||
newHtml += '<tr>';
|
||||
newHtml += '<th style="background-color:#fff;" class="width_5"><input name="checkAll" id="new_check_all" type="checkbox" class="awsui-checkbox"></th>';
|
||||
newHtml += '<th style="background-color:#fff;" class="width_5">序号</th>';
|
||||
newHtml += '<th style="background-color:#fff;" class="width_30">流程制度</th>';
|
||||
newHtml += '<th style="background-color:#fff;" class="width_25">文件文本</th>';
|
||||
newHtml += '<th style="background-color:#fff;" class="width_35">文件编号</th>';
|
||||
newHtml += '<th style="background-color:#fff;" class="width_30">流程制度模型</th>';
|
||||
newHtml += '<th style="background-color:#fff;" class="width_35">文件预览</th>';
|
||||
newHtml += '<th style="background-color:#fff;" class="width_25">文件编号</th>';
|
||||
newHtml += '</tr>';
|
||||
newHtml += '</thead>';
|
||||
newHtml += '<tbody id="publish_new_tbody"></tbody>';
|
||||
@ -304,12 +277,12 @@ function initHtml() {
|
||||
changeHtml += '<table class="awsui-table awsui-table-thin awsui-table-hover data-table">';
|
||||
changeHtml += '<thead>';
|
||||
changeHtml += '<tr>';
|
||||
changeHtml += '<th style="background-color:#fff;" class="width_5"><input name="checkAll" id="change_check_all" type="checkbox" class="awsui-checkbox"></th>';
|
||||
changeHtml += '<th style="background-color:#fff;" class="width_5">序号</th>';
|
||||
changeHtml += '<th style="background-color:#fff;" class="width_25">流程制度</th>';
|
||||
changeHtml += '<th style="background-color:#fff;" class="width_20">变更后流程制度</th>';
|
||||
changeHtml += '<th style="background-color:#fff;" class="width_20">文件文本</th>';
|
||||
changeHtml += '<th style="background-color:#fff;" class="width_25">文件编号</th>';
|
||||
changeHtml += '<th style="background-color:#fff;" class="width_2"><input name="checkAll" id="change_check_all" type="checkbox" class="awsui-checkbox"></th>';
|
||||
changeHtml += '<th style="background-color:#fff;" class="width_2">序号</th>';
|
||||
changeHtml += '<th style="background-color:#fff;" class="width_20">流程制度模型</th>';
|
||||
changeHtml += '<th style="background-color:#fff;" class="width_20">变更后流程制度模型</th>';
|
||||
changeHtml += '<th style="background-color:#fff;" class="width_35">文件预览</th>';
|
||||
changeHtml += '<th style="background-color:#fff;" class="width_20">文件编号</th>';
|
||||
changeHtml += '</tr>';
|
||||
changeHtml += '</thead>';
|
||||
changeHtml += '<tbody id="publish_change_tbody"></tbody>';
|
||||
@ -339,8 +312,8 @@ function initHtml() {
|
||||
stopHtml += '<tr>';
|
||||
stopHtml += '<th style="background-color:#fff;" class="width_5"><input name="checkAll" id="stop_check_all" type="checkbox" class="awsui-checkbox"></th>';
|
||||
stopHtml += '<th style="background-color:#fff;" class="width_5">序号</th>';
|
||||
stopHtml += '<th style="background-color:#fff;" class="width_30">流程制度</th>';
|
||||
stopHtml += '<th style="background-color:#fff;" class="width_25">文件文本</th>';
|
||||
stopHtml += '<th style="background-color:#fff;" class="width_30">流程制度模型</th>';
|
||||
stopHtml += '<th style="background-color:#fff;" class="width_25">文件预览</th>';
|
||||
stopHtml += '<th style="background-color:#fff;" class="width_35">文件编号</th>';
|
||||
stopHtml += '</tr>';
|
||||
stopHtml += '</thead>';
|
||||
@ -451,9 +424,7 @@ function initPublishData(data, type, pageNumber, start){
|
||||
// 初始化数据
|
||||
function selectPublishData(data, type, pageNumber, start) {
|
||||
|
||||
|
||||
//渲染到前台的流程架构L1,L2,L3
|
||||
|
||||
var param = {
|
||||
cmd: 'com.actionsoft.apps.coe.pal.publisher_getPublishNameByJs',
|
||||
processInstId: processInstId,
|
||||
@ -475,20 +446,7 @@ function selectPublishData(data, type, pageNumber, start) {
|
||||
var L1old = ui("LEVEL_1_PROCESS_NAME");
|
||||
var L2old = ui("LEVEL_2_PROCESS_NAME");
|
||||
var L3old = ui("LEVEL_3_PROCESS_NAME");
|
||||
if((L1old != '' && L1 != L1old) || (L2old != '' && L2 != L2old) || (L3old != '' && L3 != L3old)){
|
||||
$('#publisher_dialog').find('div.dlg-button').find('button:first').prop('disabled', '');
|
||||
$.simpleAlert("只能选择同一级别下的流程,请重新选择");
|
||||
return;
|
||||
}
|
||||
//不属于同一L3 所以直接提示
|
||||
if(info == true){
|
||||
$('#publisher_dialog').find('div.dlg-button').find('button:first').prop('disabled', '');
|
||||
$.simpleAlert("只能选择同一级别下的流程,请重新选择");
|
||||
return;
|
||||
}else{
|
||||
if(ui("LEVEL_1_PROCESS_NAME").length > 0){
|
||||
return;
|
||||
}
|
||||
|
||||
ui("LEVEL_1_PROCESS_NAME",L1);
|
||||
ui("LEVEL_2_PROCESS_NAME",L2);
|
||||
ui("LEVEL_3_PROCESS_NAME",L3);
|
||||
@ -499,7 +457,6 @@ function selectPublishData(data, type, pageNumber, start) {
|
||||
ui("ADAPT_REGION_NAME",""),
|
||||
ui("APPLICABLE_PRODUCT",""),
|
||||
$("#publisher_dialog").dialog("close");
|
||||
}
|
||||
//展示未发布过的流程
|
||||
//data = r.data.is_not_publish_data;
|
||||
}
|
||||
@ -670,7 +627,8 @@ function showlist(data, type, pageNumber, start){
|
||||
var selectPerm = editPerm ? '<select id="change_' + curr.changeFileId + '"></select>' : '<a href="javascript:void(0);" onclick="openPortalPage(\'' + targetId + '\', \'' + curr.taskId + '\')">' + targetFileName + '</a>';
|
||||
html += '<td ' + tableTdCss + '>' + selectPerm + '</td>';
|
||||
html += '<td ' + tableTdCss + '></p>' + reportName + fName +'</td>';
|
||||
//html += '<td ' + tableTdCss + ' id="report_' + curr.changeFileId + '">' + reportName + fName +'</td>';
|
||||
//html += '<td ' + tableTdCss + ' id="report_' + curr.changeFileId + '">' + reportName + '</td>';
|
||||
//html += '<td ' + tableTdCss + '>' + fName + '</td>';
|
||||
html += '<td ' + tableTdCss + '>' + curr.changedNumber + '</td>';
|
||||
//html += '<td style="padding:1px;"><textarea onblur="changeDesc(\'change\',\'' + curr.changeFileId + '\', this)" style="width:100%;height:30px;" ' + textareaPerm + ' class="awsui-input">' + curr.changedDesc + '</textarea></td>';
|
||||
html += '</tr>';
|
||||
@ -823,6 +781,7 @@ function addProcess(type) {
|
||||
height:height,
|
||||
buttons:[
|
||||
{text:'确定',cls:"blue",handler:function(){
|
||||
debugger;
|
||||
window.$.simpleAlert("请稍等...", "loading");
|
||||
if (type == 'new') {
|
||||
if (treeCheckedNewArr.length == 0) {
|
||||
@ -860,6 +819,7 @@ function addProcess(type) {
|
||||
temps[i].publishDesc = desc;
|
||||
newTemp.push(temps[i]);
|
||||
}
|
||||
//校验支持文件是否上传
|
||||
publishFlowCheck(newTemp);
|
||||
// 初始化页数及当前页
|
||||
initNewPagination(newPageSetting.pageNum - 1);
|
||||
@ -1096,6 +1056,7 @@ function openQueryDataDialog(type) {
|
||||
buttons:[
|
||||
{text:'确定',cls:"blue",handler:function(){
|
||||
if (type == 'new') {
|
||||
debugger;
|
||||
getNewPublishBatchResult(type);
|
||||
// 数据写入主dialog
|
||||
var names = '';
|
||||
@ -1249,8 +1210,42 @@ function loadNewData(treeNode) {
|
||||
|
||||
// 发布类型批量结果数据回填主dialog
|
||||
function getNewPublishBatchResult(type) {
|
||||
debugger;
|
||||
var nodes = initTree.getCheckedNodes();
|
||||
treeCheckedNewArr = [];
|
||||
var param = {
|
||||
cmd: 'com.actionsoft.apps.coe.pal.publisher_getPublishNameByJs',
|
||||
processInstId: processInstId,
|
||||
wsId : wsId,
|
||||
sid: sid,
|
||||
datas:JSON.stringify(nodes)
|
||||
};
|
||||
|
||||
$.ajax({
|
||||
url : "./jd",
|
||||
type : "POST",
|
||||
dataType : "JSON",
|
||||
async : false,
|
||||
data : param,
|
||||
success : function(r) {
|
||||
var info = r.data.info;
|
||||
var L1 = r.data.data.Process_Architecture_L1;
|
||||
var L2 = r.data.data.Process_Architecture_L2;
|
||||
var L3 = r.data.data.Process_Architecture_L3;
|
||||
var L1old = ui("LEVEL_1_PROCESS_NAME");
|
||||
var L2old = ui("LEVEL_2_PROCESS_NAME");
|
||||
var L3old = ui("LEVEL_3_PROCESS_NAME");
|
||||
if((L1old != '' && L1 != L1old) || (L2old != '' && L2 != L2old) || (L3old != '' && L3 != L3old)){
|
||||
$('#publisher_dialog').find('div.dlg-button').find('button:first').prop('disabled', '');
|
||||
$.simpleAlert("只能选择同一级别下的流程,请重新选择");
|
||||
return;
|
||||
}else if(info == true){
|
||||
$('#publisher_dialog').find('div.dlg-button').find('button:first').prop('disabled', '');
|
||||
$.simpleAlert("只能选择同一级别下的流程,请重新选择");
|
||||
return;
|
||||
|
||||
}else{
|
||||
//treeCheckedNewArr = nodes;
|
||||
for (var i = 0; i < nodes.length; i++) {
|
||||
var node = nodes[i];
|
||||
if (node.id.length > 36) continue;
|
||||
@ -1270,6 +1265,9 @@ function getNewPublishBatchResult(type) {
|
||||
treeCheckedNewArr.push(obj);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//获取已发布文件数据结构
|
||||
function getPublishedTreeData(type) {
|
||||
@ -1326,8 +1324,40 @@ function getPublishedTreeData(type) {
|
||||
|
||||
//变更类型批量结果数据回填主dialog
|
||||
function getChangeBatchResult(type) {
|
||||
debugger;
|
||||
var nodes = initTree.getCheckedNodes();
|
||||
treeCheckedChangeArr = [];
|
||||
var param = {
|
||||
cmd: 'com.actionsoft.apps.coe.pal.publisher_getPublishNameByJs',
|
||||
processInstId: processInstId,
|
||||
wsId : wsId,
|
||||
sid: sid,
|
||||
datas:JSON.stringify(nodes)
|
||||
};
|
||||
$.ajax({
|
||||
url : "./jd",
|
||||
type : "POST",
|
||||
dataType : "JSON",
|
||||
async : false,
|
||||
data : param,
|
||||
success : function(r) {
|
||||
var info = r.data.info;
|
||||
var L1 = r.data.data.Process_Architecture_L1;
|
||||
var L2 = r.data.data.Process_Architecture_L2;
|
||||
var L3 = r.data.data.Process_Architecture_L3;
|
||||
var L1old = ui("LEVEL_1_PROCESS_NAME");
|
||||
var L2old = ui("LEVEL_2_PROCESS_NAME");
|
||||
var L3old = ui("LEVEL_3_PROCESS_NAME");
|
||||
if((L1old != '' && L1 != L1old) || (L2old != '' && L2 != L2old) || (L3old != '' && L3 != L3old)){
|
||||
$('#publisher_dialog').find('div.dlg-button').find('button:first').prop('disabled', '');
|
||||
$.simpleAlert("只能选择同一级别下的流程,请重新选择");
|
||||
return;
|
||||
}else if(info == true){
|
||||
$('#publisher_dialog').find('div.dlg-button').find('button:first').prop('disabled', '');
|
||||
$.simpleAlert("只能选择同一级别下的流程,请重新选择");
|
||||
return;
|
||||
}else{
|
||||
//treeCheckedNewArr = nodes;
|
||||
for (var i = 0; i < nodes.length; i++) {
|
||||
var node = nodes[i];
|
||||
if (node.id.length > 36) continue;
|
||||
@ -1349,11 +1379,45 @@ function getChangeBatchResult(type) {
|
||||
treeCheckedChangeArr.push(obj);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 停用类型批量结果数据回填主dialog
|
||||
function getStopBatchResult(type) {
|
||||
var nodes = initTree.getCheckedNodes();
|
||||
treeCheckedStopArr = [];
|
||||
var param = {
|
||||
cmd: 'com.actionsoft.apps.coe.pal.publisher_getPublishNameByJs',
|
||||
processInstId: processInstId,
|
||||
wsId : wsId,
|
||||
sid: sid,
|
||||
datas:JSON.stringify(nodes)
|
||||
};
|
||||
$.ajax({
|
||||
url : "./jd",
|
||||
type : "POST",
|
||||
dataType : "JSON",
|
||||
async : false,
|
||||
data : param,
|
||||
success : function(r) {
|
||||
var info = r.data.info;
|
||||
var L1 = r.data.data.Process_Architecture_L1;
|
||||
var L2 = r.data.data.Process_Architecture_L2;
|
||||
var L3 = r.data.data.Process_Architecture_L3;
|
||||
var L1old = ui("LEVEL_1_PROCESS_NAME");
|
||||
var L2old = ui("LEVEL_2_PROCESS_NAME");
|
||||
var L3old = ui("LEVEL_3_PROCESS_NAME");
|
||||
if((L1old != '' && L1 != L1old) || (L2old != '' && L2 != L2old) || (L3old != '' && L3 != L3old)){
|
||||
$('#publisher_dialog').find('div.dlg-button').find('button:first').prop('disabled', '');
|
||||
$.simpleAlert("只能选择同一级别下的流程,请重新选择");
|
||||
return;
|
||||
}else if(info == true){
|
||||
$('#publisher_dialog').find('div.dlg-button').find('button:first').prop('disabled', '');
|
||||
$.simpleAlert("只能选择同一级别下的流程,请重新选择");
|
||||
return;
|
||||
}else{
|
||||
//treeCheckedNewArr = nodes;
|
||||
for (var i = 0; i < nodes.length; i++) {
|
||||
var node = nodes[i];
|
||||
if (node.id.length > 36) continue;
|
||||
@ -1369,6 +1433,9 @@ function getStopBatchResult(type) {
|
||||
treeCheckedStopArr.push(obj);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 获取已有的流程手册
|
||||
function queryBatchReport(data) {
|
||||
@ -1509,7 +1576,7 @@ function getOutputName(category, method) {
|
||||
return '制度手册';
|
||||
}
|
||||
if (method == 'data.form') {
|
||||
return '表单手册'
|
||||
return '表单封面'
|
||||
}
|
||||
if (method.indexOf('process.') > -1) {
|
||||
return '流程手册';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user