|
@@ -25,15 +25,13 @@ layui.config({
|
|
|
if(res.sharemodetypename!="接口"){
|
|
|
str+= "<a class=\"layui-table-link\" href=\"javascript:void();\" lay-event=\"gjchange\"><i class=\"iconfont icon-rizhichaxun1\"></i>变更</a> ";
|
|
|
str+= "<a class=\"layui-table-link\" href=\"javascript:viewHitchInfo(\'"+res.id+"\');\"><i class=\"iconfont icon-rizhichaxun1\"></i>查看</a> ";
|
|
|
-
|
|
|
- }
|
|
|
- else{
|
|
|
-
|
|
|
}
|
|
|
}else{
|
|
|
str+= "<a class=\"layui-table-link\" href=\"javascript:void();\" lay-event=\"gjqk\"><i class=\"iconfont icon-rizhichaxun1\"></i>挂接情况</a> ";
|
|
|
- }
|
|
|
-
|
|
|
+ if(res.parentState == 1) {
|
|
|
+ str+= "<a class=\"layui-table-link\" href=\"javascript:void();\" lay-event=\"disableParent\"><i class=\"iconfont icon-rizhichaxun1\"></i>停用历史版本</a> ";
|
|
|
+ }
|
|
|
+ }
|
|
|
return str;
|
|
|
}}
|
|
|
,{field:'gjcheckstate', title:'状态',
|
|
@@ -153,6 +151,9 @@ layui.config({
|
|
|
layer.close(index);
|
|
|
});
|
|
|
}
|
|
|
+ else if(obj.event === 'disableParent'){
|
|
|
+ disableParent(data.id)
|
|
|
+ }
|
|
|
else if(obj.event === 'gjqk'){
|
|
|
if(data.sharemodetypename=='接口'){
|
|
|
var index = layer.open({
|
|
@@ -248,7 +249,7 @@ layui.config({
|
|
|
}
|
|
|
/*查看历史版本*/
|
|
|
function viewVersionList(id){
|
|
|
- var dgurl="../tinfoclass/tinfoclass_versionlist"+id;
|
|
|
+ var dgurl="../tinfohitchclass/tinfoclass_versionlist"+id;
|
|
|
var index = layer.open({
|
|
|
type: 2,
|
|
|
title:'历史版本信息',
|
|
@@ -261,6 +262,33 @@ layui.config({
|
|
|
});
|
|
|
layer.full(index);
|
|
|
}
|
|
|
+
|
|
|
+function disableParent(id){
|
|
|
+
|
|
|
+ if(confirm("确定要设置为历史版本已停用吗?")){
|
|
|
+ var data1={"id":id};
|
|
|
+ $.ajax({
|
|
|
+ async:false,
|
|
|
+ type:"post",
|
|
|
+ url:"../tinfohitchclass/disableParent",
|
|
|
+ contentType: "application/x-www-form-urlencoded;charset=utf-8",
|
|
|
+ dataType: 'json',
|
|
|
+ data:data1,
|
|
|
+ success:function(result){
|
|
|
+ if(result.remark == "success"){
|
|
|
+ layer.msg('提交成功', {icon: 6});
|
|
|
+ window.location.reload();
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ layer.msg('提交失败', {icon: 6});
|
|
|
+ }
|
|
|
+ },
|
|
|
+ error:function(){
|
|
|
+ layer.msg('服务器异常', {icon: 6});
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+}
|
|
|
|
|
|
function jianbiaosqlOra(id){
|
|
|
jianbiaosql(id,"oracle");
|