解决绩效模型可重复新建问题

This commit is contained in:
zhal 2022-07-19 14:49:53 +08:00
parent f08360fc7e
commit c2deee5393

View File

@ -971,7 +971,7 @@ function removeTr(obj) {
//打开对象关联Dialog //打开对象关联Dialog
function openRelationDialog(obj, callback) { function openRelationDialog(obj, callback) {
; debugger;
var title = obj.closest('tr').find('td:first').text(); var title = obj.closest('tr').find('td:first').text();
if (title == undefined || title == '') { if (title == undefined || title == '') {
title = '选择模型对象'; title = '选择模型对象';
@ -1016,25 +1016,44 @@ function openRelationDialog(obj, callback) {
text : methodName, text : methodName,
cls : "green", cls : "green",
handler : function() { handler : function() {
//跳转表单/绩效模型
//根据角色
$.ajax({ $.ajax({
type : "POST", type : "POST",
url : "./jd?sid=" url : "./jd?sid="
+ $("#sid").val() + $("#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 : { data : {
uuid:uuid, uuid:uuid,
methodId:method, methodId:method
wsId:$("#wsid").val()
}, },
success : function(msg) { success : function(msg) {
if (msg.result == "ok") { if (msg.data.result == "ok") {
window.open("./w?uuid=" + msg.data.uuid+"&teamId" window.top.$.simpleAlert("请勿重复"+methodName+"!!!");
+ "&cmd=com.actionsoft.apps.coe.pal_pl_repository_designer&sid=" + encodeURIComponent($('#sid').val())); }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(){ {text:'确定',cls:"blue",handler:function(){