|
@@ -0,0 +1,543 @@
|
|
|
|
+
|
|
|
|
+$.namespace("jsjdzx.detail");
|
|
|
|
+
|
|
|
|
+jsjdzx.detail.szd =null;
|
|
|
|
+jsjdzx.detail.gk=null;
|
|
|
|
+jsjdzx.detail.gq=null;
|
|
|
|
+jsjdzx.detail.taskKey=null;
|
|
|
|
+jsjdzx.detail.opflag = null;
|
|
|
|
+jsjdzx.detail.init=function(){
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+jsjdzx.detail.back=function(){
|
|
|
|
+ location.href=$.app+"/jsjdzx/main";
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+van=function(a,b){
|
|
|
|
+ if(!isFDS(a.val())){
|
|
|
|
+ ts(b+"必须为正数",a);
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+jsjdzx.detail.save=function(){
|
|
|
|
+ //验证浮点类型
|
|
|
|
+ if(van($('#addform input[name=ztz]'),"总投资")==false){return false;}
|
|
|
|
+ if(van($('#addform input[name=axcd]'),"岸线长度 ")==false){return false;}
|
|
|
|
+ if(van($('#addform input[name=bwdj]'),"泊位吨级 ")==false){return false;}
|
|
|
|
+ if(van($('#addform input[name=tgnl]'),"通过能力")==false){return false;}
|
|
|
|
+
|
|
|
|
+ $(".btn").attr("disabled",true);
|
|
|
|
+ $.ajax({
|
|
|
|
+ url:$.app+"/jsjdzx/save",
|
|
|
|
+ data:$("#addform").serialize(),
|
|
|
|
+ type:"post",
|
|
|
|
+ dataType:"json",
|
|
|
|
+ success:function(data){//ajax返回的数据
|
|
|
|
+ if (data.success) {
|
|
|
|
+ $.alert({
|
|
|
|
+ title: '提示',
|
|
|
|
+ content: '操作成功',
|
|
|
|
+ confirm: function(){
|
|
|
|
+ location.href=$.app+'/jsjdzx/main';
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }else {
|
|
|
|
+ $.alert({
|
|
|
|
+ title: '提示',
|
|
|
|
+ content: data.message,
|
|
|
|
+ confirm: function(){
|
|
|
|
+ $(".btn").attr("disabled",false);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+jsjdzx.detail.submit=function(){
|
|
|
|
+ //验证浮点类型
|
|
|
|
+ if(van($('#addform input[name=ztz]'),"总投资")==false){return false;}
|
|
|
|
+ if(van($('#addform input[name=axcd]'),"岸线长度 ")==false){return false;}
|
|
|
|
+ if(van($('#addform input[name=bwdj]'),"泊位吨级 ")==false){return false;}
|
|
|
|
+ if(van($('#addform input[name=tgnl]'),"通过能力")==false){return false;}
|
|
|
|
+
|
|
|
|
+ $(".btn").attr("disabled",true);
|
|
|
|
+ $.ajax({
|
|
|
|
+ url:$.app+"/jsjdzx/submit",
|
|
|
|
+ data:$("#addform").serialize(),
|
|
|
|
+ type:"post",
|
|
|
|
+ dataType:"json",
|
|
|
|
+ success:function(data){//ajax返回的数据
|
|
|
|
+ if (data.success) {
|
|
|
|
+ $.alert({
|
|
|
|
+ title: '提示',
|
|
|
|
+ content: '操作成功',
|
|
|
|
+ confirm: function(){
|
|
|
|
+ location.href=$.app+'/jsjdzx/main';
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }else {
|
|
|
|
+ $.alert({
|
|
|
|
+ title: '提示',
|
|
|
|
+ content: data.message,
|
|
|
|
+ confirm: function(){
|
|
|
|
+ $(".btn").attr("disabled",false);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+// 构建项目类型下拉
|
|
|
|
+ function initXmlxSelect(divid,existVal,width){
|
|
|
|
+ $.post($.app+"/jsjdzx/selectXmlx",{
|
|
|
|
+ },function(data) {
|
|
|
|
+ var str="";
|
|
|
|
+ str+="<select class='xmlxselectpicker' name='xmlxid' id='xmlxid'>";
|
|
|
|
+ str+="<option></option>";
|
|
|
|
+ if(data){
|
|
|
|
+ for(var i=0;i<data.length;i++){
|
|
|
|
+ var xmlx=data[i];
|
|
|
|
+ if(xmlx.val==existVal){
|
|
|
|
+ str+=" <option selected='selected' value='"+xmlx.id+"' >"+xmlx.text+"</option>";
|
|
|
|
+ }else{
|
|
|
|
+ str+="<option value='"+xmlx.id+"'>"+xmlx.text+"</option>" ;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ str+="</select>";
|
|
|
|
+ $("#"+divid).empty;
|
|
|
|
+ $("#"+divid).append(str);
|
|
|
|
+ $('.xmlxselectpicker').selectpicker({
|
|
|
|
+ width:width
|
|
|
|
+ });
|
|
|
|
+ }, "json");
|
|
|
|
+ }
|
|
|
|
+ // 构建投资类型下拉
|
|
|
|
+function initTzlxSelect(divid,existVal,width){
|
|
|
|
+ $.post($.app+"/jsjdzx/selectTzlx",{
|
|
|
|
+},function(data) {
|
|
|
|
+ var str="";
|
|
|
|
+str+="<select class='tzlxselectpicker' name='tzlxid' id='tzlxid'>";
|
|
|
|
+str+="<option></option>";
|
|
|
|
+if(data){
|
|
|
|
+ for(var i=0;i<data.length;i++){
|
|
|
|
+ var tzlx=data[i];
|
|
|
|
+ if(tzlx.val==existVal){
|
|
|
|
+ str+=" <option selected='selected' value='"+tzlx.id+"' >"+tzlx.text+"</option>";
|
|
|
|
+ }else{
|
|
|
|
+ str+="<option value='"+tzlx.id+"'>"+tzlx.text+"</option>" ;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+str+="</select>";
|
|
|
|
+$("#"+divid).empty();
|
|
|
|
+$("#"+divid).append(str);
|
|
|
|
+$('.tzlxselectpicker').selectpicker({
|
|
|
|
+ width:width
|
|
|
|
+ });
|
|
|
|
+}, "json");
|
|
|
|
+}
|
|
|
|
+ // 构建项目核准级别下拉
|
|
|
|
+function initXmhzjbSelect(divid,existVal,width){
|
|
|
|
+ $.post($.app+"/jsjdzx/selectXmhzjb",{
|
|
|
|
+},function(data) {
|
|
|
|
+ var str="";
|
|
|
|
+str+="<select class='xmhzjbselectpicker' name='xmhzjbid' id='xmhzjbid'>";
|
|
|
|
+str+="<option></option>";
|
|
|
|
+if(data){
|
|
|
|
+ for(var i=0;i<data.length;i++){
|
|
|
|
+ var xmhzjb=data[i];
|
|
|
|
+ if(xmhzjb.val==existVal){
|
|
|
|
+ str+=" <option selected='selected' value='"+xmhzjb.id+"' >"+xmhzjb.text+"</option>";
|
|
|
|
+ }else{
|
|
|
|
+ str+="<option value='"+xmhzjb.id+"'>"+xmhzjb.text+"</option>" ;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+str+="</select>";
|
|
|
|
+$("#"+divid).empty();
|
|
|
|
+$("#"+divid).append(str);
|
|
|
|
+$('.xmhzjbselectpicker').selectpicker({
|
|
|
|
+ width:width
|
|
|
|
+ });
|
|
|
|
+}, "json");
|
|
|
|
+}
|
|
|
|
+ // 构建岸线审批级别下拉
|
|
|
|
+function initAxspjbSelect(divid,existVal,width){
|
|
|
|
+ $.post($.app+"/jsjdzx/selectAxspjb",{
|
|
|
|
+},function(data) {
|
|
|
|
+ var str="";
|
|
|
|
+ str+="<select class='axspjbselectpicker' name='axspjbid' id='axspjbid'>";
|
|
|
|
+ str+="<option></option>";
|
|
|
|
+ if(data){
|
|
|
|
+ for(var i=0;i<data.length;i++){
|
|
|
|
+ var axspjb=data[i];
|
|
|
|
+ if(axspjb.val==existVal){
|
|
|
|
+ str+=" <option selected='selected' value='"+axspjb.id+"' >"+axspjb.text+"</option>";
|
|
|
|
+ }else{
|
|
|
|
+ str+="<option value='"+axspjb.id+"'>"+axspjb.text+"</option>" ;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ str+="</select>";
|
|
|
|
+ $("#"+divid).empty();
|
|
|
|
+ $("#"+divid).append(str);
|
|
|
|
+ $('.axspjbselectpicker').selectpicker({
|
|
|
|
+ width:width
|
|
|
|
+ });
|
|
|
|
+}, "json");
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+ jsjdzx.detail.initZyhbwfl=function(divid, existVal,bwytstr){
|
|
|
|
+ var flag = "2";
|
|
|
|
+// var bwytstr = $('.bwytselectpicker').val()+"";
|
|
|
|
+if(bwytstr.indexOf("1804")>=0){
|
|
|
|
+ flag="1";
|
|
|
|
+}
|
|
|
|
+ $.post($.app + "/bw/selectZyhbwfl?flag="+flag, {
|
|
|
|
+
|
|
|
|
+ }, function(data) {
|
|
|
|
+ if (data) {
|
|
|
|
+ var str = "";
|
|
|
|
+ str+="<select class='zyhbwflselectpicker' name='zyhbwflid' id='zyhbwflid'>";
|
|
|
|
+ str+="<option></option>";
|
|
|
|
+ for(var i=0;i<data.length;i++){
|
|
|
|
+ var zyhbwfl = data[i];
|
|
|
|
+ if(zyhbwfl.id==existVal){
|
|
|
|
+ str+=" <option selected='selected' value='"+zyhbwfl.id+"' >"+zyhbwfl.text+"</option>";
|
|
|
|
+ }else{
|
|
|
|
+ str+=" <option value='"+zyhbwfl.id+"' >"+zyhbwfl.text+"</option>";
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ str+="</select>";
|
|
|
|
+ $("#"+divid).empty();
|
|
|
|
+ $("#"+divid).append(str);
|
|
|
|
+
|
|
|
|
+ $('.zyhbwflselectpicker').selectpicker({
|
|
|
|
+ width:'80%'
|
|
|
|
+ });
|
|
|
|
+ } else {
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ }, "json");
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+jsjdzx.detail.initBwyt=function(divid, existVal){
|
|
|
|
+ $.post($.app + "/bw/selectBwyt", {
|
|
|
|
+
|
|
|
|
+ }, function(data) {
|
|
|
|
+ if (data) {
|
|
|
|
+ var existValArr = existVal.split(",");
|
|
|
|
+ var str = "";
|
|
|
|
+ str+="<select multiple='multiple' onchange='ytsel()' class='bwytselectpicker' name='bwyt' id='bwyt' >";
|
|
|
|
+ str+="<option></option>";
|
|
|
|
+ for(var i=0;i<data.length;i++){
|
|
|
|
+ var flag = false;
|
|
|
|
+ var bwyt = data[i];
|
|
|
|
+ for(var j = 0; j < existValArr.length; j++){
|
|
|
|
+ if(bwyt.id==existValArr[j]){
|
|
|
|
+ flag = true;
|
|
|
|
+ str+=" <option selected='selected' value='"+bwyt.id+"' >"+bwyt.text+"</option>";
|
|
|
|
+ break;
|
|
|
|
+ } else {
|
|
|
|
+ flag = false;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if(!flag){
|
|
|
|
+ str+=" <option value='"+bwyt.id+"' >"+bwyt.text+"</option>";
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ str+="</select>";
|
|
|
|
+ $("#"+divid).empty();
|
|
|
|
+ $("#"+divid).append(str);
|
|
|
|
+
|
|
|
|
+ $('.bwytselectpicker').selectpicker({
|
|
|
|
+ width: '80%'
|
|
|
|
+ });
|
|
|
|
+ } else {
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ }, "json");
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+//构建所在地的下拉
|
|
|
|
+//参数说明依次,1(必须)存放下拉的div的id,2(非必须)下拉初始选中的值,没有传没有传空字符串,3(非必须)下拉change事件,根据需要添加4(必须)下拉框的长度
|
|
|
|
+//此下拉如果跟着form一起提交后台的话,对应的是szd属性,
|
|
|
|
+jsjdzx.detail.initszdSelect=function(divid,existVal,changefunc,width,disable){
|
|
|
|
+ $.post($.app + "/selectSzd", {
|
|
|
|
+
|
|
|
|
+}, function(data) {
|
|
|
|
+ var str = "";
|
|
|
|
+ if(changefunc!=null&&changefunc!=""){
|
|
|
|
+ if(disable!=null&&disable!=''){
|
|
|
|
+ str+="<select disabled class='szdselectpicker' name='szdid' onchange='"+changefunc+"()' id='szdid'>";
|
|
|
|
+ }else{
|
|
|
|
+ str+="<select class='szdselectpicker' name='szdid' onchange='"+changefunc+"()' id='szdid'>";
|
|
|
|
+ }
|
|
|
|
+ }else{
|
|
|
|
+ if(disable!=null&&disable!=''){
|
|
|
|
+ str+="<select disabled class='szdselectpicker' name='szdid' id='szdid'>";
|
|
|
|
+ }else{
|
|
|
|
+ str+="<select class='szdselectpicker' name='szdid' id='szdid'>";
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ str+="<option></option>";
|
|
|
|
+ if(data){
|
|
|
|
+ for(var i=0;i<data.length;i++){
|
|
|
|
+ var szd = data[i];
|
|
|
|
+ if(szd.val==existVal){
|
|
|
|
+ str+=" <option selected='selected' value='"+szd.id+"' >"+szd.text+"</option>";
|
|
|
|
+ }else{
|
|
|
|
+ str+=" <option value='"+szd.id+"' >"+szd.text+"</option>";
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ str+="</select>";
|
|
|
|
+ $("#"+divid).empty();
|
|
|
|
+ $("#"+divid).append(str);
|
|
|
|
+ $('.szdselectpicker').selectpicker({
|
|
|
|
+ width:width
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+}, "json");
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+//构建港口的下拉
|
|
|
|
+//参数说明依次,1(必须)存放下拉的div的id,2(非必须)下拉初始选中的值,没有传空字符串,3(非必须)参数,根据所在地过滤结果,一般级联需要4(非必须)下拉change事件5(必须)下拉框的长度
|
|
|
|
+//此下拉如果跟着form一起提交后台的话,对应的是szd属性,
|
|
|
|
+ jsjdzx.detail.initgkSelect=function(divid,existVal,szd,changefunc,width,disable){
|
|
|
|
+ $.post($.app + "/selectGk", {
|
|
|
|
+ szd:szd
|
|
|
|
+ }, function(data) {
|
|
|
|
+ var str = "";
|
|
|
|
+if(changefunc!=null&&changefunc!=""){
|
|
|
|
+ if(disable!=null&&disable!=''){
|
|
|
|
+ str+="<select disabled class='gkselectpicker' name='szgkid' onchange='"+changefunc+"()' id='szgkid'>";
|
|
|
|
+ }else{
|
|
|
|
+ str+="<select class='gkselectpicker' name='szgkid' onchange='"+changefunc+"()' id='szgkid'>";
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+}else{
|
|
|
|
+ if(disable!=null&&disable!=''){
|
|
|
|
+ str+="<select disabled class='gkselectpicker' name='szgkid' id='szgkid'>";
|
|
|
|
+ }else{
|
|
|
|
+ str+="<select class='gkselectpicker' name='szgkid' id='szgkid'>";
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+str+="<option></option>";
|
|
|
|
+if(data){
|
|
|
|
+ for(var i=0;i<data.length;i++){
|
|
|
|
+ var gk = data[i];
|
|
|
|
+ if(gk.id==existVal){
|
|
|
|
+ str+=" <option selected='selected' value='"+gk.id+"' >"+gk.gkmc+"</option>";
|
|
|
|
+ }else{
|
|
|
|
+ str+=" <option value='"+gk.id+"' >"+gk.gkmc+"</option>";
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+str+="</select>";
|
|
|
|
+$("#"+divid).empty();
|
|
|
|
+$("#"+divid).append(str);
|
|
|
|
+$('.gkselectpicker').selectpicker({
|
|
|
|
+ width:width
|
|
|
|
+});
|
|
|
|
+ //如果所在地选择为空,重置港区select;
|
|
|
|
+ }, "json");
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+//构建港区的下拉
|
|
|
|
+//参数说明依次,1(必须)存放下拉的div的id,2(非必须)下拉初始选中的值,没有传空字符串,3(非必须)参数,根据所在地过滤结果,一般级联需要4(非必须)下拉change事件5(必须)下拉框的长度
|
|
|
|
+//此下拉如果跟着form一起提交后台的话,对应的是szd属性,
|
|
|
|
+ jsjdzx.detail.initgqSelect=function(divid,existVal,szd,gk,changefunc,width,disable){
|
|
|
|
+ $.post($.app + "/selectGq", {
|
|
|
|
+ szd:szd,
|
|
|
|
+ szgk:gk
|
|
|
|
+}, function(data) {
|
|
|
|
+ var str = "";
|
|
|
|
+ if(changefunc!=null&&changefunc!=""){
|
|
|
|
+ if(disable!=null&&disable!=''){
|
|
|
|
+ str+="<select disabled class='gqselectpicker' name='szgqid' onchange='"+changefunc+"()' id='szgqid'>";
|
|
|
|
+ }else{
|
|
|
|
+ str+="<select class='gqselectpicker' name='szgqid' onchange='"+changefunc+"()' id='szgqid'>";
|
|
|
|
+ }
|
|
|
|
+ }else{
|
|
|
|
+ if(disable!=null&&disable!=''){
|
|
|
|
+ str+="<select disabled class='gqselectpicker' name='szgqid' id='szgqid'>";
|
|
|
|
+ }else{
|
|
|
|
+ str+="<select class='gqselectpicker' name='szgqid' id='szgqid'>";
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ str+="<option></option>";
|
|
|
|
+ if(data){
|
|
|
|
+ for(var i=0;i<data.length;i++){
|
|
|
|
+ var gq = data[i];
|
|
|
|
+ if(gq.id==existVal){
|
|
|
|
+ str+=" <option selected='selected' value='"+gq.id+"' >"+gq.gqmc+"</option>";
|
|
|
|
+ }else{
|
|
|
|
+ str+=" <option value='"+gq.id+"' >"+gq.gqmc+"</option>";
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ str+="</select>";
|
|
|
|
+ $("#"+divid).empty();
|
|
|
|
+ $("#"+divid).append(str);
|
|
|
|
+ $('.gqselectpicker').selectpicker({
|
|
|
|
+ width:width
|
|
|
|
+ });
|
|
|
|
+}, "json");
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ jsjdzx.detail.audit=function(auditpass,id){
|
|
|
|
+ if(auditpass=="Y" && (jsjdzx.detail.opflag == 5 || jsjdzx.detail.opflag == 9)){
|
|
|
|
+ if(isEmpty($('#userids').val())){
|
|
|
|
+ $.alert({
|
|
|
|
+ title: '提示',
|
|
|
|
+ content: "请选择人员会签!!!",
|
|
|
|
+ confirm: function(){
|
|
|
|
+ $(".btn").attr("disabled",false);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ //附件
|
|
|
|
+ var accidName= document.getElementsByName("accid");
|
|
|
|
+ var accids = [];
|
|
|
|
+ for (i=0; i<accidName.length; i++){
|
|
|
|
+ accids.push(accidName[i].value)
|
|
|
|
+ }
|
|
|
|
+ $('#accids').val(accids);
|
|
|
|
+ $(".btn").attr("disabled",true);
|
|
|
|
+ var opflag = $('#opflag').val();
|
|
|
|
+ var shyj = $('#yj').val();
|
|
|
|
+ var audit;
|
|
|
|
+ if(auditpass=="Y"){
|
|
|
|
+ audit=true;
|
|
|
|
+ }else{
|
|
|
|
+ audit=false;
|
|
|
|
+ }
|
|
|
|
+ $.post($.app + "/jsjdzx/audit", {
|
|
|
|
+ id:id,
|
|
|
|
+ shyj:shyj,
|
|
|
|
+ flag:audit,
|
|
|
|
+ userids:$('#userids').val(),
|
|
|
|
+ accid:$('#accids').val()
|
|
|
|
+ }, function(data) {
|
|
|
|
+ if (data.success) {
|
|
|
|
+ $.alert({
|
|
|
|
+ title: '提示',
|
|
|
|
+ content: '操作成功',
|
|
|
|
+ confirm: function(){
|
|
|
|
+ jsjdzx.detail.back();
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }else {
|
|
|
|
+ $.alert({
|
|
|
|
+ title: '提示',
|
|
|
|
+ content: data.message,
|
|
|
|
+ confirm: function(){
|
|
|
|
+ $(".btn").attr("disabled",false);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }, "json");
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+jsjdzx.detail.submitFile = function(){
|
|
|
|
+ $('#addform').form('submit',{
|
|
|
|
+ url : $.app + '/jsjdzx/saveFile',
|
|
|
|
+ onSubmit : function() {},
|
|
|
|
+ success : function(data, status) {
|
|
|
|
+ if (data) {
|
|
|
|
+ data = data.replace("<audio controls=\"controls\" style=\"display: none;\"></audio>","");
|
|
|
|
+ data = $.parseJSON(data);
|
|
|
|
+ }
|
|
|
|
+ if (data.success) {
|
|
|
|
+ var len = $('#tableId tr').length;
|
|
|
|
+ var accContect = data.attrs.acc.fjmc;
|
|
|
|
+ var fjid = data.attrs.acc.fjid;
|
|
|
|
+ var accid = data.attrs.acc.id;
|
|
|
|
+ var str = "<tr align='center'>";
|
|
|
|
+ str =str +"<td style='width:40%'>"+ "<input id='accid' value='"
|
|
|
|
+ + accid
|
|
|
|
+ + "' name='accid' type='hidden'>"
|
|
|
|
+ + "<a class='main_title' href='/jsjy/accessory/download?id="
|
|
|
|
+ + fjid + "'> " + accContect + "</a>" +"</td>";
|
|
|
|
+
|
|
|
|
+ str =str+"<td style='width:15%'>"+ '<a class="btn btn-default btn-xs" href="#" onclick="jsjdzx.detail.delFj(\''
|
|
|
|
+ + accid
|
|
|
|
+ + '\','
|
|
|
|
+ + '$(this)'
|
|
|
|
+ + ')">删除</a>' +"</td></tr>";
|
|
|
|
+ $('#tableId').append(str);
|
|
|
|
+ } else {
|
|
|
|
+ $.messager.showError(data.message);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+//删除accid 附件关联ID,id 是第几行附件
|
|
|
|
+jsjdzx.detail.delFj = function(accid, tr) {
|
|
|
|
+ $.confirm({
|
|
|
|
+ title : '确认框',
|
|
|
|
+ content : '确认删除吗',
|
|
|
|
+ confirm : function() {
|
|
|
|
+ $.post($.app + "/jsjdzx/delFile", {
|
|
|
|
+ accid : accid
|
|
|
|
+ }, function(data) {
|
|
|
|
+ if (data.success) {
|
|
|
|
+ $(tr).parent().parent().remove();
|
|
|
|
+ } else {
|
|
|
|
+ $.alert({
|
|
|
|
+ title : '提示',
|
|
|
|
+ content : data.message,
|
|
|
|
+ confirm : function() {
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ }, "json");
|
|
|
|
+ },
|
|
|
|
+ cancel : function() {
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+jsjdzx.detail.submitAudit=function(){
|
|
|
|
+ $(".btn").attr("disabled",true);
|
|
|
|
+ $.ajax({
|
|
|
|
+ url:$.app+"/jsjdzx/submitAudit",
|
|
|
|
+ data:$("#addform").serialize(),
|
|
|
|
+ type:"post",
|
|
|
|
+ dataType:"json",
|
|
|
|
+ success:function(data){//ajax返回的数据
|
|
|
|
+ if (data.success) {
|
|
|
|
+ $.alert({
|
|
|
|
+ title: '提示',
|
|
|
|
+ content: '操作成功',
|
|
|
|
+ confirm: function(){
|
|
|
|
+ location.href=$.app+'/jsjdzx/main';
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }else {
|
|
|
|
+ $.alert({
|
|
|
|
+ title: '提示',
|
|
|
|
+ content: data.message,
|
|
|
|
+ confirm: function(){
|
|
|
|
+ $(".btn").attr("disabled",false);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+}
|