|
@@ -148,18 +148,60 @@ $('.submit').click(function(){
|
|
|
name: qcName,
|
|
|
qcTypeCasesEntryVOList
|
|
|
}
|
|
|
-
|
|
|
- post(api.saveOrUpdate,param).then(res =>{
|
|
|
- let result = res.data
|
|
|
- if(result.code == '0'){
|
|
|
- $.alerModal({"message":submitMsg,type:"tip",time:'1000',isFather: true,win:win, fatherWrapper: $("#mainBox", parent.document)});
|
|
|
- setTimeout(function(){
|
|
|
- $(parent.document).find("#contentIframe").attr("src","./assertType.html")
|
|
|
- },1000)
|
|
|
- }else{
|
|
|
- $.alerModal({"message":res.data.msg,type:"tip",time:'1000',isFather: true,win:"default", fatherWrapper: $("#mainBox", parent.document)});
|
|
|
- }
|
|
|
- }).catch((e) =>{
|
|
|
+ if(!paramType){
|
|
|
+ post(api.addqcType,param).then(res =>{
|
|
|
+ let result = res.data
|
|
|
+ if(result.code == '0'){
|
|
|
+ $.alerModal({"message":submitMsg,type:"tip",time:'1000',isFather: true,win:win, fatherWrapper: $("#mainBox", parent.document)});
|
|
|
+ setTimeout(function(){
|
|
|
+ $(parent.document).find("#contentIframe").attr("src","./assertType.html")
|
|
|
+ },1000)
|
|
|
+ }else{
|
|
|
+ $.alerModal({"message":res.data.msg,type:"tip",time:'1000',isFather: true,win:"default", fatherWrapper: $("#mainBox", parent.document)});
|
|
|
+ }
|
|
|
+ }).catch((e) =>{
|
|
|
+
|
|
|
+ })
|
|
|
+ }else if(paramType == '"edit"'){
|
|
|
+ post(api.updateqcType,param).then(res =>{
|
|
|
+ let result = res.data
|
|
|
+ if(result.code == '0'){
|
|
|
+ $.alerModal({"message":submitMsg,type:"tip",time:'1000',isFather: true,win:win, fatherWrapper: $("#mainBox", parent.document)});
|
|
|
+ setTimeout(function(){
|
|
|
+ $(parent.document).find("#contentIframe").attr("src","./assertType.html")
|
|
|
+ },1000)
|
|
|
+ }else{
|
|
|
+ $.alerModal({"message":res.data.msg,type:"tip",time:'1000',isFather: true,win:"default", fatherWrapper: $("#mainBox", parent.document)});
|
|
|
+ }
|
|
|
+ }).catch((e) =>{
|
|
|
+
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ post(api.copyqcType,param).then(res =>{
|
|
|
+ let result = res.data
|
|
|
+ if(result.code == '0'){
|
|
|
+ $.alerModal({"message":submitMsg,type:"tip",time:'1000',isFather: true,win:win, fatherWrapper: $("#mainBox", parent.document)});
|
|
|
+ setTimeout(function(){
|
|
|
+ $(parent.document).find("#contentIframe").attr("src","./assertType.html")
|
|
|
+ },1000)
|
|
|
+ }else{
|
|
|
+ $.alerModal({"message":res.data.msg,type:"tip",time:'1000',isFather: true,win:"default", fatherWrapper: $("#mainBox", parent.document)});
|
|
|
+ }
|
|
|
+ }).catch((e) =>{
|
|
|
+
|
|
|
+ })
|
|
|
+ }
|
|
|
+ // post(api.saveOrUpdate,param).then(res =>{
|
|
|
+ // let result = res.data
|
|
|
+ // if(result.code == '0'){
|
|
|
+ // $.alerModal({"message":submitMsg,type:"tip",time:'1000',isFather: true,win:win, fatherWrapper: $("#mainBox", parent.document)});
|
|
|
+ // setTimeout(function(){
|
|
|
+ // $(parent.document).find("#contentIframe").attr("src","./assertType.html")
|
|
|
+ // },1000)
|
|
|
+ // }else{
|
|
|
+ // $.alerModal({"message":res.data.msg,type:"tip",time:'1000',isFather: true,win:"default", fatherWrapper: $("#mainBox", parent.document)});
|
|
|
+ // }
|
|
|
+ // }).catch((e) =>{
|
|
|
|
|
|
- })
|
|
|
+ // })
|
|
|
})
|