PAL重复添加
This commit is contained in:
parent
694ccaf09b
commit
22860eae1a
@ -986,118 +986,202 @@ function openRelationDialog(obj, callback) {
|
||||
methodName="新建绩效模型";
|
||||
}
|
||||
if(title=="支持文件" || method=="control.kpi"){
|
||||
var relationDlg = parent.FrmDialog.open({
|
||||
title: title,
|
||||
width:710,
|
||||
height: 400,
|
||||
url:"./w",
|
||||
data:{
|
||||
sid: $("#sid").val(),
|
||||
cmd: "com.actionsoft.apps.coe.pal_pl_repository_designer_shapes_tree",
|
||||
wsId: $("#wsid").val(),
|
||||
ref: ref,
|
||||
shapeId: "",
|
||||
attrId: obj.attr("id"),
|
||||
relationShapeIds: obj.attr("relationShapeId"),
|
||||
relationFileIds: obj.attr("relationFileId"),
|
||||
modelId: $("#id").val(),
|
||||
ruuid: uuid
|
||||
},
|
||||
id:"relationDialog",
|
||||
buttons: [
|
||||
{
|
||||
text : '刷新',
|
||||
cls : "yellow",
|
||||
handler : function() {
|
||||
// 刷新页面
|
||||
parent.document.getElementById("id-awsui-win-frm-2013-frmrelationDialog").contentWindow.location.reload(true);
|
||||
}
|
||||
},{
|
||||
text : methodName,
|
||||
cls : "green",
|
||||
handler : function() {
|
||||
|
||||
//根据角色
|
||||
$.ajax({
|
||||
type : "POST",
|
||||
url : "./jd?sid="
|
||||
+ $("#sid").val()
|
||||
+ "&cmd=com.actionsoft.apps.coe.pal_pl_repository_designer_relation_find_same_role",
|
||||
data : {
|
||||
uuid:uuid,
|
||||
methodId:method
|
||||
},
|
||||
success : function(msg) {
|
||||
if (msg.data.result == "ok") {
|
||||
window.top.$.simpleAlert("请勿重复"+methodName+"!!!");
|
||||
}else{
|
||||
//跳转表单/绩效模型
|
||||
//根据角色
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "./jd?sid="
|
||||
+ $("#sid").val()
|
||||
+ "&cmd=com.actionsoft.apps.coe.pal_pl_repository_designer_relation_find_same_role",
|
||||
data: {
|
||||
uuid: uuid,
|
||||
methodId: method
|
||||
},
|
||||
success: function (msg) {
|
||||
if (msg.data.result == "ok") {
|
||||
|
||||
var relationDlg = parent.FrmDialog.open({
|
||||
title: title,
|
||||
width:710,
|
||||
height: 400,
|
||||
url:"./w",
|
||||
data:{
|
||||
sid: $("#sid").val(),
|
||||
cmd: "com.actionsoft.apps.coe.pal_pl_repository_designer_shapes_tree",
|
||||
wsId: $("#wsid").val(),
|
||||
ref: ref,
|
||||
shapeId: "",
|
||||
attrId: obj.attr("id"),
|
||||
relationShapeIds: obj.attr("relationShapeId"),
|
||||
relationFileIds: obj.attr("relationFileId"),
|
||||
modelId: $("#id").val(),
|
||||
ruuid: uuid
|
||||
},
|
||||
id:"relationDialog",
|
||||
|
||||
buttons: [
|
||||
{text:'确定',cls:"blue",handler:function(){
|
||||
var attrId = obj.attr("id");
|
||||
var relationFileId = "";
|
||||
var relationShapeId = "";
|
||||
var relationShapeText = "";
|
||||
var relations = relationDlg.win().getRelationShapeInfos();
|
||||
var isRequired = obj.attr('isRequired')
|
||||
if (isRequired == 'true' && relations.length == 0) {
|
||||
obj.val('');
|
||||
obj.attr('placeholder',title +'不能为空')
|
||||
obj.addClass("required_input_css");
|
||||
parent.FrmDialog.close("relationDialog");
|
||||
return;
|
||||
}
|
||||
if (relations != undefined && relations.length > 0) {
|
||||
for(var i = 0; i < relations.length; i++) {
|
||||
var relationShape = relations[i];
|
||||
if(i == relations.length -1) {
|
||||
relationFileId += relationShape.relationFileId;
|
||||
relationShapeId += relationShape.relationShapeId;
|
||||
relationShapeText += relationShape.relationShapeText;
|
||||
} else {
|
||||
relationFileId += relationShape.relationFileId + ",";
|
||||
relationShapeId += relationShape.relationShapeId + ",";
|
||||
relationShapeText += relationShape.relationShapeText + ",";
|
||||
}
|
||||
}
|
||||
}
|
||||
obj.attr("attrId", attrId);
|
||||
obj.attr("relationFileId", relationFileId);
|
||||
obj.attr("relationShapeId", relationShapeId);
|
||||
obj.val(relationShapeText);
|
||||
if (callback && callback == "saveContent") {
|
||||
saveContent(obj);
|
||||
}
|
||||
parent.FrmDialog.close("relationDialog");
|
||||
}},
|
||||
{text:'取消',handler:function(){
|
||||
parent.FrmDialog.close("relationDialog");
|
||||
}}
|
||||
]
|
||||
});
|
||||
}else{
|
||||
var relationDlg = parent.FrmDialog.open({
|
||||
title: title,
|
||||
width:710,
|
||||
height: 400,
|
||||
url:"./w",
|
||||
data:{
|
||||
sid: $("#sid").val(),
|
||||
cmd: "com.actionsoft.apps.coe.pal_pl_repository_designer_shapes_tree",
|
||||
wsId: $("#wsid").val(),
|
||||
ref: ref,
|
||||
shapeId: "",
|
||||
attrId: obj.attr("id"),
|
||||
relationShapeIds: obj.attr("relationShapeId"),
|
||||
relationFileIds: obj.attr("relationFileId"),
|
||||
modelId: $("#id").val(),
|
||||
ruuid: uuid
|
||||
},
|
||||
id:"relationDialog",
|
||||
buttons: [
|
||||
{
|
||||
text : '刷新',
|
||||
cls : "yellow",
|
||||
handler : function() {
|
||||
// 刷新页面
|
||||
parent.document.getElementById("id-awsui-win-frm-2013-frmrelationDialog").contentWindow.location.reload(true);
|
||||
}
|
||||
},{
|
||||
text : methodName,
|
||||
cls : "green",
|
||||
handler : function() {
|
||||
|
||||
//根据角色
|
||||
$.ajax({
|
||||
type : "POST",
|
||||
url : "./jd?sid="
|
||||
+ $("#sid").val()
|
||||
+ "&cmd=com.actionsoft.apps.coe.pal_pl_repository_designer_relation_shape_createDialogModel",
|
||||
+ "&cmd=com.actionsoft.apps.coe.pal_pl_repository_designer_relation_find_same_role",
|
||||
data : {
|
||||
uuid:uuid,
|
||||
methodId:method,
|
||||
wsId:$("#wsid").val()
|
||||
methodId:method
|
||||
},
|
||||
success : function(msg) {
|
||||
if (msg.result == "ok") {
|
||||
window.open("./w?uuid=" + msg.data.uuid+"&teamId"
|
||||
+ "&cmd=com.actionsoft.apps.coe.pal_pl_repository_designer&sid=" + encodeURIComponent($('#sid').val()));
|
||||
}
|
||||
if (msg.data.result == "ok") {
|
||||
window.top.$.simpleAlert("请勿重复"+methodName+"!!!");
|
||||
}else{
|
||||
//跳转表单/绩效模型
|
||||
$.ajax({
|
||||
type : "POST",
|
||||
url : "./jd?sid="
|
||||
+ $("#sid").val()
|
||||
+ "&cmd=com.actionsoft.apps.coe.pal_pl_repository_designer_relation_shape_createDialogModel",
|
||||
data : {
|
||||
uuid:uuid,
|
||||
methodId:method,
|
||||
wsId:$("#wsid").val()
|
||||
},
|
||||
success : function(msg) {
|
||||
if (msg.result == "ok") {
|
||||
window.open("./w?uuid=" + msg.data.uuid+"&teamId"
|
||||
+ "&cmd=com.actionsoft.apps.coe.pal_pl_repository_designer&sid=" + encodeURIComponent($('#sid').val()));
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
},
|
||||
{text:'确定',cls:"blue",handler:function(){
|
||||
var attrId = obj.attr("id");
|
||||
var relationFileId = "";
|
||||
var relationShapeId = "";
|
||||
var relationShapeText = "";
|
||||
var relations = relationDlg.win().getRelationShapeInfos();
|
||||
var isRequired = obj.attr('isRequired')
|
||||
if (isRequired == 'true' && relations.length == 0) {
|
||||
obj.val('');
|
||||
obj.attr('placeholder',title +'不能为空')
|
||||
obj.addClass("required_input_css");
|
||||
parent.FrmDialog.close("relationDialog");
|
||||
return;
|
||||
}
|
||||
if (relations != undefined && relations.length > 0) {
|
||||
for(var i = 0; i < relations.length; i++) {
|
||||
var relationShape = relations[i];
|
||||
if(i == relations.length -1) {
|
||||
relationFileId += relationShape.relationFileId;
|
||||
relationShapeId += relationShape.relationShapeId;
|
||||
relationShapeText += relationShape.relationShapeText;
|
||||
} else {
|
||||
relationFileId += relationShape.relationFileId + ",";
|
||||
relationShapeId += relationShape.relationShapeId + ",";
|
||||
relationShapeText += relationShape.relationShapeText + ",";
|
||||
}
|
||||
}
|
||||
}
|
||||
obj.attr("attrId", attrId);
|
||||
obj.attr("relationFileId", relationFileId);
|
||||
obj.attr("relationShapeId", relationShapeId);
|
||||
obj.val(relationShapeText);
|
||||
if (callback && callback == "saveContent") {
|
||||
saveContent(obj);
|
||||
}
|
||||
parent.FrmDialog.close("relationDialog");
|
||||
}},
|
||||
{text:'取消',handler:function(){
|
||||
parent.FrmDialog.close("relationDialog");
|
||||
}}
|
||||
]
|
||||
});
|
||||
},
|
||||
{text:'确定',cls:"blue",handler:function(){
|
||||
var attrId = obj.attr("id");
|
||||
var relationFileId = "";
|
||||
var relationShapeId = "";
|
||||
var relationShapeText = "";
|
||||
var relations = relationDlg.win().getRelationShapeInfos();
|
||||
var isRequired = obj.attr('isRequired')
|
||||
if (isRequired == 'true' && relations.length == 0) {
|
||||
obj.val('');
|
||||
obj.attr('placeholder',title +'不能为空')
|
||||
obj.addClass("required_input_css");
|
||||
parent.FrmDialog.close("relationDialog");
|
||||
return;
|
||||
}
|
||||
if (relations != undefined && relations.length > 0) {
|
||||
for(var i = 0; i < relations.length; i++) {
|
||||
var relationShape = relations[i];
|
||||
if(i == relations.length -1) {
|
||||
relationFileId += relationShape.relationFileId;
|
||||
relationShapeId += relationShape.relationShapeId;
|
||||
relationShapeText += relationShape.relationShapeText;
|
||||
} else {
|
||||
relationFileId += relationShape.relationFileId + ",";
|
||||
relationShapeId += relationShape.relationShapeId + ",";
|
||||
relationShapeText += relationShape.relationShapeText + ",";
|
||||
}
|
||||
}
|
||||
}
|
||||
obj.attr("attrId", attrId);
|
||||
obj.attr("relationFileId", relationFileId);
|
||||
obj.attr("relationShapeId", relationShapeId);
|
||||
obj.val(relationShapeText);
|
||||
if (callback && callback == "saveContent") {
|
||||
saveContent(obj);
|
||||
}
|
||||
parent.FrmDialog.close("relationDialog");
|
||||
}},
|
||||
{text:'取消',handler:function(){
|
||||
parent.FrmDialog.close("relationDialog");
|
||||
}}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
}else{
|
||||
var relationDlg = parent.FrmDialog.open({
|
||||
title: title,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user