le>
    <?php // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK IT ] // +---------------------------------------------------------------------- // | Copyright (c) 2006-2016 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- // | Author: yunwuxin <448901948@qq.com> // +---------------------------------------------------------------------- namespace think\exception; class RouteNotFoundException extends HttpException { public function __construct() { parent::__construct(404); } }
ekexiu.app - Gogs: Go Git Service

説明なし

lipengtao 3c4fd4d120 添加学生,企业专家,专家的模块,加上认证标示 8 年 前
..
arttmpl.js 6a7904f1b5 添加咨询对话界面 8 年 前
base.js d9ac310cc7 去掉alert 8 年 前
city.data-3.js 150ddae386 添加搜索相关页面 8 年 前
city.data.js f7aaaa675a app bug修改 8 年 前
exif.js 0dc2b31556 新添加获取图片属性js 8 年 前
mui.imageViewer.js 6a7904f1b5 添加咨询对话界面 8 年 前
mui.min.js 8fffca8842 ekexiu.app页面首次上传 8 年 前
mui.picker.all.js 32effc82f7 时间 8 年 前
mui.picker.min.js 150ddae386 添加搜索相关页面 8 年 前
upload-avatar.js 3c4fd4d120 添加学生,企业专家,专家的模块,加上认证标示 8 年 前
zepto.min.js 772ddc7e13 朋涛专家信息修改 8 年 前
portal-front - Gogs: Go Git Service

portal html css js resource

sciresource.js 60KB

    // JavaScript Document $(function(){ //alert("sciresouser"); loginStatus();//判断个人是否登录 var userid = $.cookie("userid"); var name = $.cookie("userName"); var flag; ////发布资源发布及修改 var resourceNamePass = true; //var professorPass=true; var supportedServicesPass=true; function resourceName() { var code = $("#resourceName").val(); if(code.length==0||code==" ") { $(".workmsg1").text("发布资源名称不能为空"); resourceNamePass = false; } else { $(".workmsg1").text(""); resourceNamePass= true; } } $("#resourceName").blur(function(){ resourceName(); }); //验证可提供服务 function supportedServices() { var code = $("#supportedServices").val(); if(code.length==0||code==" ") { $(".workmsg3").text("可提供服务不能为空"); supportedServicesPass= false; } else { $(".workmsg3").text(""); supportedServicesPass= true; } } $("#supportedServices").blur(function(){ supportedServices(); }); function industryShow(data,industryList,deleteIndustry) { if(data != undefined && data.length != 0 ) { var subs = new Array(); if(data.indexOf(',')) { subs = data.split(','); } else { subs[0] = data; } if(subs.length>0) { for (var i = 0; i < subs.length; i++) { $("#"+industryList+"").append("<div class='"+deleteIndustry+"'>"+ subs[i] +"<span class='removeNu'><img src='images/move.png'></span></div>"); }; } } } //添加或者删除应用行业及学术领域 function addDele(){ $("#industryList").on("click",".removeNu",function(){ $(this).parent().remove(); }); $("#industryAdd").click(function(){ var val=$("#industry").val(); $("#industryList").append("<div class='deleteIndustry'>"+ val +"<span class='removeNu'><img src='images/move.png'></span></div>") }); $("#SubjectList").on("click",".removeNu",function(){ $(this).parent().remove(); }); $("#subjectAdd").click(function(){ var val=$("#subject").val(); $("#SubjectList").append("<div class='deleteSubject'>"+ val +"<span class='removeNu'><img src='images/move.png'></span></div>") }); } //我的资源的删除,修改 $("#workmysrc").on("click",".resoumag",function() { ResourceInfo(); addDele() $(".limitBox").removeClass("limitBox"); $(".limitwords").removeClass("limitwords"); $(".limitwordbox").removeClass("limitwordbox"); $(".respublisher").css("display","none"); $(".stateinfor span").text("资源发布中"); var resourceID=$(this).attr("resourceId"); function delet(){ $.ajax({ "url" : "/ajax/resource/"+resourceID, "type" : "DELETE", "success" : function($data) { if ($data.success) { $(".blackcover").remove(); $("body").css("position",""); getDataResource(); } else { $.MsgBox.Alert('message',$data.msg); } } }) } if(resourceID){ $("#deletedResource").on("click",function(){ $(".blackcover").remove(); $("body").css("position",""); $.MsgBox.Confirm("消息", "执行删除后资源信息将无法恢复,确定继续吗?",delet) }) $.ajax({ "url":"/ajax/resource/"+resourceID, "type":"get", "async": true, "success":function(info){ if(info.success) { //console.log(info); $("#resourceName").val(info.data.resourceName); $("#supportedServices").val(info.data.supportedServices); $("#hopePayMethod").val(info.data.hopePayMethod) ; $("#cooperationNotes").val(info.data.cooperationNotes) ; industryShow(info.data.subject,"SubjectList","deleteSubject"); industryShow(info.data.industry,"industryList","deleteIndustry"); $("#descp").val(info.data.descp); $("#professor").text(name); if(info.data.images.length) { var $liMages = $( '<div id="WU_FILE" class="file-item thumbnail">'+ '<img src="/images/resource/'+resourceID+'.jpg">'+ '</div>' ) } else { var $liMages = $( '<div id="WU_FILE" class="file-item thumbnail">'+ '<img src="/images/default-resource.jpg">'+ '</div>' ) } $("#fileList").append($liMages); } else { $.MsgBox.Alert('message',"系统异常!"); } }, "error":function(){$.MsgBox.Alert('message','failed')} }); } function captiureSubInd(subIndu) { var industrys = $("#"+subIndu+""); var industryAll = ""; if(industrys.size()>0){ for (var i = 0; i <industrys.size(); i++) { industryAll += industrys[i].innerText; industryAll += ','; }; industryAll = industryAll.substring(0, industryAll.length-1); } return industryAll; } $("#inputb").on("click",function() { var $data = {}; $data.resourceName = $("#resourceName").val(); $data.supportedServices = $("#supportedServices").val(); $data.professorId = userid; $data.hopePayMethod = $("#hopePayMethod").val(); $data.cooperationNotes = $("#cooperationNotes").val(); $data.subject=captiureSubInd("SubjectList .deleteSubject"); $data.industry=captiureSubInd("industryList .deleteIndustry"); $data.descp=$("#descp").val(); if(cacheImageKey){ //console.log(cacheImageKey); $data.fn=cacheImageKey; } if (resourceID) { $data.resourceId = resourceID; } function getDataput(){ $.ajax({"url" : "ajax/resource/updateResource", "type" : "post" , "success" : function(rdata) { if (rdata.success){ getDataResource(); } else { $.MsgBox.Alert("消息","资源发布失败"); } }, "data" :$data, "beforeSend":function(){/*console.log(this.data)*/ }, "contentType" : "application/x-www-form-urlencoded", dataType : "json" }); } //console.log($data); resourceName(); // professor(); supportedServices(); if(resourceNamePass && supportedServicesPass) { if(resourceID){ $(".blackcover").remove(); $("body").css("position",""); $.MsgBox.Confirm("消息", "确定修改资源信息吗?", getDataput) $data.fn=cacheImageKey; }else{ $.ajax({"url" : "/ajax/resource", "type" : "POST", "success" : function(rdata) { if (rdata.success) { $(".blackcover").remove(); $("body").css("position",""); getDataResource(); $.MsgBox.Alert("消息","资源发布成功"); $("#mb_msgicon").css("background", 'url("images/sign_icon_chenggong_nor.png") 0% 0% / contain'); } else { $.MsgBox.Alert("消息","资源发布失败"); } }, "data" : $data, "beforeSend":function(){/*console.log(this.data)*/ }, "contentType" : "application/x-www-form-urlencoded", dataType : "json" }); } } }); }); getDataResource(); function getDataResource(){ $.ajax({ "url":"/ajax/resource/qapro", "type":"get", "async": true, "data":{"professorId":userid}, "success":function(data){ if(data.success) { var add=''; var k=0; $("#consd").html(""); for(var i=0;i<data.data.length;i++) { var add='<div class="maintab"><div class="lefttab fl"><table class="resoubrief"><tr><td><div class="resoimgbox"><div class="ResImgBox" style="max-width:160px;width:160px;height: 160px;"><img class="resImg headRadius resourceImg" src="" /></div></div></td>' add+='</tr><tr><td><ul><li>'+data.data[i].resourceName+'</li><li>'+data.data[i].supportedServices+'</li> ' /*add+='<li class="li1">'+data.data[i].subject+'</li>' */ add+='</ul></td></tr><tr>' add+='<td><span class="managebtn resoumag"">资源管理</span></td></tr></table></div>' add+='<div class="righttab fr"><table width="100%" class="worktab tablecon">' add+='<tr class="worktabtit"><th width="20%" height="40">申请时间</th><th width="20%">需求方</th>' add+='<th width="12%">联系人</th><th width="14%">交付时间</th>' add+='<th width="20%">付款进程</th><th width="12%">状态/操作</th></tr></table><div class="tcdPageCode tcdPageCod'+i+'"></div></div>'; $add = $(add); $("#consd").append($add); if(data.data[i].subject==undefined){ $(".li1").eq(i).css({"display":"none"}); } $add.find('.resoumag').attr("resourceId",data.data[i].resourceId); //$('.resoumag').eq(i+1).attr("resourceId",data.data[i].resourceId); if(data.data[i].images.length){ $add.find(".resourceImg").attr("src","/images/resource/"+data.data[i].resourceId+".jpg"); } else { $add.find(".resourceImg").attr("src","/images/default-resource.jpg"); } //console.log($('.resoumag').eq(i+1).attr("resourceId")); //资源所对应的记录 (function(i){ getPageResource(3,1,true,i,k) k++; })(i); add=""; } } else { $.MsgBox.Alert('message',"系统异常!"); } }, "error":function(){$.MsgBox.Alert('message','failed')} }); } function getPageResource(pageSize,pageNo,isbind,e,f) { $.ajax({ "url":"/ajax/operation/pqres", "type":"get", "async": false, "data":{"resourceId":$('.resoumag').eq(e+1).attr("resourceId"),"pageSize":pageSize,"pageNo":pageNo}, "success":function(data){ if(data.success) { $(".maintab").eq(f).find(".workitem").remove(); for(var j=0;j<data.data.data.length;j++) { if(data.data.data[j].dealPrice==undefined) { data.data.data[j].dealPrice=0; } if(data.data.data[j].payMethod==undefined){ data.data.data[j].payMethod=""; } data.data.data[j].deliverTime=changeTime(data.data.data[j].deliverTime); data.data.data[j].createTime=changeTime(data.data.data[j].createTime); var inquiry=inquiryGetPaidMoney(data.data.data[j].operationId); var addString='<tr class="workitem">' addString+='<td>'+data.data.data[j].createTime+'</td>' addString+='<td class="workitemsrc">'+data.data.data[j].applysquare+'</td>' addString+='<td> <span class="worktel">'+data.data.data[j].professor.name+'<!--<span class="worktelbtn"></span>--></span></td>' addString+='<td>'+data.data.data[j].deliverTime+'</td>' //addString+='<td class="price1'+e+'">'+data.data.data[j].dealPrice+'</td>' //addString+='<td>'+data.data.data[j].payMethod+'</td>' addString+='<td><span>'+inquiry+'</span>/<span>'+data.data.data[j].dealPrice+'</span><br></td>' addString+='<td><div class="modification'+e+'"></div></td> </tr>' $(".tablecon").eq(e).append(addString); //console.log($(".tablecon").eq(e)); if($(".price1"+e+"").eq(j).text()==0){ $(".price1"+e+"").eq(j).text(""); } switch(data.data.data[j].operationStatus) { case 1: var string='<span>新的申请</span><br/>' string+='<a class="operatebtn">' string+='<span class="detailmess"resourId='+data.data.data[j].resource.resourceId+' operationStatus='+data.data.data[j].operationStatus+' operationId='+data.data.data[j].operationId+'>回复申请</span><br />' string+='</a>' $(".modification"+e+"").eq(j).html(string); break; case 2: var string='<span>已发送报价待对方确认</span><br/>' string+='<a class="operatebtn">' string+='<span class="detailmess"resourId='+data.data.data[j].resource.resourceId+' operationStatus="2" operationId='+data.data.data[j].operationId+'>修改报价</span><br />' string+='</a>' $(".modification"+e+"").eq(j).html(string); break; case 3: var string='<span>对方发来报价合作进行中</span><br/>' string+='<a class="operatebtn">' string+='<span class="detailmess"resourId='+data.data.data[j].resource.resourceId+' operationStatus='+data.data.data[j].operationStatus+' operationId='+data.data.data[j].operationId+' dealPrice='+data.data.data[j].dealPrice+'>查看详情</span><br />' string+='<span class="drawback"resourId='+data.data.data[j].resource.resourceId+' operationStatus='+data.data.data[j].operationStatus+' operationId='+data.data.data[j].operationId+' dealPrice='+data.data.data[j].dealPrice+'>退款</span><br />' string+='<span resourId='+data.data.data[j].resource.resourceId+' operationStatus='+data.data.data[j].operationStatus+' operationId='+data.data.data[j].operationId+'>投诉</span>' string+='</a>' $(".modification"+e+"").eq(j).html(string); break; case 4: var string='<span>对方拒绝报价合作结束</span><br/>' string+='<a class="operatebtn">' string+='<span class="detailmess"resourId='+data.data.data[j].resource.resourceId+' operationStatus='+data.data.data[j].operationStatus+' operationId='+data.data.data[j].operationId+'>查看详情</span><br />' string+='</a>' $(".modification"+e+"").eq(j).html(string); break; case 5: var string='<span>本人拒绝合作</span><br/>' string+='<a class="operatebtn">' string+='<span class="detailmess"resourId='+data.data.data[j].resource.resourceId+' operationStatus='+data.data.data[j].operationStatus+' operationId='+data.data.data[j].operationId+'>查看详情</span><br />' string+='</a>' $(".modification"+e+"").eq(j).html(string); break; case 6: var string='<span>对方中止合作合作结束</span><br/>' string+='<a class="operatebtn">' string+='<span class="detailmess"resourId='+data.data.data[j].resource.resourceId+' operationStatus='+data.data.data[j].operationStatus+' operationId='+data.data.data[j].operationId+' dealPrice='+data.data.data[j].dealPrice+'>查看详情</span><br />' //string+='<span class="discuss" dataStatus="1"resourceId='+data.data.data[j].resource.resourceId+' operationStatus='+data.data.data[j].operationStatus+' operationId='+data.data.data[j].operationId+'>评价</span><br />' string+='<span class="drawback"resourId='+data.data.data[j].resource.resourceId+' operationStatus='+data.data.data[j].operationStatus+' operationId='+data.data.data[j].operationId+' dealPrice='+data.data.data[j].dealPrice+'>退款</span><br />' string+='<span class="complain"resourId='+data.data.data[j].resource.resourceId+' operationStatus='+data.data.data[j].operationStatus+' operationId='+data.data.data[j].operationId+'>投诉</span>' string+='</a>' $(".modification"+e+"").eq(j).html(string); break; case 7: var string='<span>合作进行中</span><br/>' string+='<a class="operatebtn">' string+='<span class="detailmess"resourId='+data.data.data[j].resource.resourceId+' operationStatus='+data.data.data[j].operationStatus+' operationId='+data.data.data[j].operationId+' dealPrice='+data.data.data[j].dealPrice+'>查看详情</span><br />' //string+='<span class="acknowledgement"resourceId='+data.data.data[j].resource.resourceId+' operationStatus='+data.data.data[j].operationStatus+' operationId='+data.data.data[j].operationId+'>确认完成</span><br />' string+='<span class="complain"resourId='+data.data.data[j].resource.resourceId+' operationStatus='+data.data.data[j].operationStatus+' operationId='+data.data.data[j].operationId+'>投诉</span>' string+='</a>' $(".modification"+e+"").eq(j).html(string); break; case 8: var string='<span>完成</span><br/>' string+='<a class="operatebtn">' string+='<span class="detailmess"resourId='+data.data.data[j].resource.resourceId+' operationStatus='+data.data.data[j].operationStatus+' operationId='+data.data.data[j].operationId+' dealPrice='+data.data.data[j].dealPrice+'>查看详情</span><br />' //string+='<span class="discuss" dataStatus="1"resourceId='+data.data.data[j].resource.resourceId+' operationStatus='+data.data.data[j].operationStatus+' operationId='+data.data.data[j].operationId+'>评价</span><br />' string+='<span class="complain"resourId='+data.data.data[j].resource.resourceId+' operationStatus='+data.data.data[j].operationStatus+' operationId='+data.data.data[j].operationId+'>投诉</span>' string+='</a>' $(".modification"+e+"").eq(j).html(string); break; default: } addString=""; } if(data.data.total == 0){ }else{ if(isbind == true) { $(".tcdPageCod"+e+"").createPage({ pageCount:Math.ceil(data.data.total/pageSize), current:data.data.pageNo, backFn:function(p){ getPageResource(3,p,false,e,f); } }); } } } else { $.MsgBox.Alert("消息","系统异常!"); } }, "error":function(){$.MsgBox.Alert('message','failed')} }); } //我的资源状态的回复 $("#consd").on("click",".detailmess",function(){ $(".stateinfor span").text("回复申请"); var operationId=$(this).attr("operationId"); var operationStatus=$(this).attr("operationStatus"); var priceDifference=$(this).attr("dealPrice"); opo=operationId; flag=0; if(flag==0&&operationStatus==1) { ResourceApply(); //移出有textare标签的相关class $(".limitBox").eq(1).removeClass("limitBox"); $(".limitwords").eq(1).removeClass("limitwords"); $(".limitwordbox").eq(1).removeClass("limitwordbox"); ajaxGet(operationId); $(".dealTime").replaceWith("<span class='dealTime'></span>"); $(".detail").replaceWith("<span class='detail'></span>"); $("select").replaceWith("<span class='sname'></span>") $(".btnboxdown").css({"display":"none"}); $(".applysure").css({"display":"none"}); $("#nextStep").click(function(){ $(".stateinfor span").text("报价中"); $(".btnboxup").css({"display":"none"}); $(".btnboxdown").css({"display":"block"}); $(".applysure").css({"display":"block"}); $(".bag").css("display","none"); $("#reject").hide(); $(".frm").click(function(){ var $date = {}; $date.detailDemand=$(".detail").text(); $date.deliverTime=replaceStr($.trim($(".dealTime").text())); $date.dealPrice =$.trim($("#dealPrice").val()); $date.payMethod = $.trim($("#payMethod").val()); $date.replyNotes = $("#consultContent").val(); $date.applysquare = $(".sname").text(); $date.operationId=operationId; $date.operationStatus=2; $.ajax({ "url" : "/ajax/operation", "type" : "put", "data" :JSON.stringify($date), "contentType" :"application/json", "success" : function(data) { if (data.success) { $(".blackcover").remove(); $("body").css("position",""); getDataResource(); $.MsgBox.Alert('message',"报价成功"); $("#mb_msgicon").css("background", 'url("images/sign_icon_chenggong_nor.png") 0% 0% / contain'); } else { $.MsgBox.Alert('message',data.msg); } }, "beforeSend":function(){ //console.log(this.data); }, }); }) }) $("#refuses").click(function(){ ResourceApply(); ajaxGet(operationId); n=5; $(".blackcover").remove(); $("body").css("position",""); $.MsgBox.Confirm("消息", "确定拒绝吗?",upStatus1); }); } if(flag==0&&operationStatus==2){ ResourceApply(); //移出有textare标签的相关class $(".limitBox").eq(1).removeClass("limitBox"); $(".limitwords").eq(1).removeClass("limitwords"); $(".limitwordbox").eq(1).removeClass("limitwordbox"); ajaxGet(operationId); $(".dealTime").replaceWith("<span class='dealTime'></span>"); $(".detail").replaceWith("<span class='detail'></span>"); $("select").replaceWith("<span class='sname'></span>") $(".btnboxdown").css({"display":"none"}); $(".applysure").css({"display":"none"}); $(".stateinfor span").text("修改报价中"); $(".btnboxup").css({"display":"none"}); $(".btnboxdown").css({"display":"block"}); $(".applysure").css({"display":"block"}); $(".bag").css("display","none"); $(".frm").click(function(){ var $date = {}; $date.detailDemand=$(".detail").text(); $date.deliverTime=replaceStr($.trim($(".dealTime").text())); $date.dealPrice = $("#dealPrice").val(); $date.payMethod = $("#payMethod").val(); $date.replyNotes = $("#consultContent").val(); $date.applysquare = $(".sname").text(); $date.operationId=operationId; $date.operationStatus=2; $.ajax({ "url" : "/ajax/operation", "type" : "put", "data" :JSON.stringify($date), "contentType" :"application/json", "success" : function(data) { if (data.success) { $(".blackcover").remove(); $("body").css("position",""); getDataResource(); $.MsgBox.Alert('message',"报价成功"); $("#mb_msgicon").css("background", 'url("images/sign_icon_chenggong_nor.png") 0% 0% / contain'); } else { $.MsgBox.Alert('message',data.msg); } }, "beforeSend":function(){ //console.log(this.data); }, }); }) } if(flag==0&&operationStatus==3){ DetailInfo(); $("#totalPrice").text(priceDifference); $(".liuyaninfo").css("display","none"); $(".pingjiainfo").css("display","none"); $(".filebox").css("display","none"); ajaxGet1(operationId); $(".payaddbox1").css("display","none"); discussGetPaidMoney(operationId,priceDifference) } if(flag==0&&operationStatus==5){ ResourceApply(); ajaxGet(operationId); $(".dealTime").replaceWith("<span class='dealTime'></span>"); $(".detail").replaceWith("<span class='detail'></span>"); $("select").replaceWith("<span class='sname'></span>") $(".btnboxdown").css({"display":"none"}); $(".applysure").css({"display":"none"}); $(".addrebtn").css("display","none"); } if(flag==0&&operationStatus==4){ ResourceApply(); ajaxGet1(operationId); $(".dealTime").replaceWith("<span class='dealTime'></span>"); $(".detail").replaceWith("<span class='detail'></span>"); $("select").replaceWith("<span class='sname'></span>") $(".btnboxdown").css({"display":"none"}); $(".applysure").css({"display":"none"}); $(".stateinfor span").text("详情"); $(".btnboxup").css({"display":"none"}); $(".btnboxdown").css({"display":"block"}); $(".applysure").css({"display":"block"}); $(".bag").css("display","none"); $(".addrebtn").css("display","none"); $("#payMethod").replaceWith("<span id='payMethod'><span>"); $("#dealPrice").replaceWith("<span id='dealPrice'><span>"); $("#consultContent").replaceWith("<span id='consultContent'><span>"); } if(flag==0&&operationStatus==6){ DetailInfo(); $("#totalPrice").text(priceDifference); $(".liuyaninfo").css("display","none"); $(".pingjiainfo").css("display","none"); $(".filebox").css("display","none"); ajaxGet1(operationId); $(".payaddbox1").css("display","none"); discussGetPaidMoney(operationId,priceDifference) } if(flag==0&&operationStatus==7){ DetailInfo(); $("#totalPrice").text(priceDifference); $(".liuyaninfo").css("display","none"); $(".pingjiainfo").css("display","none"); $(".filebox").css("display","none"); ajaxGet1(operationId); $(".payaddbox1").css("display","none"); //根据内容的多少获取高度给父级设置高度 limitHeight(); discussGetPaidMoney(operationId,priceDifference) } if(flag==0&&operationStatus==8){ DetailInfo(); $("#totalPrice").text(priceDifference); $(".liuyaninfo").css("display","none"); $(".pingjiainfo").css("display","none"); $(".filebox").css("display","none"); ajaxGet1(operationId); $(".payaddbox1").css("display","none"); //根据内容的多少获取高度给父级设置高度 limitHeight(); discussGetPaidMoney(operationId,priceDifference) } }) //我的需求查询 function getPageData(pageSize,pageNo,isbind){ $.ajax({ "url":"/ajax/operation/pqdem", "type":"get", "async": true, "data":{"demandId":userid,"pageSize":pageSize,"pageNo":pageNo}, "success":function(data){ if(data.success) { $(".worktabb").html(""); var stringTitle=""; stringTitle +='<tr class="worktabtit"><th width="20%" height="40">申请时间</th><th width="22%">需求资源</th><th width="12%">发布者</th><th width="14%">交付时间</th><th width="22%">付款进程</th><th width="10%">状态/操作</th></tr>'; $(".worktabb").append( stringTitle); //console.log(data); //alert(data.data.data.length); for(var i=0;i<data.data.data.length;i++) { var inq=inquiryGetPaidMoney(data.data.data[i].operationId); if(data.data.data[i].dealPrice==undefined){ data.data.data[i].dealPrice=0; } if(data.data.data[i].payMethod==undefined){ data.data.data[i].payMethod=""; } data.data.data[i].deliverTime=changeTime(data.data.data[i].deliverTime); data.data.data[i].createTime=changeTime(data.data.data[i].createTime); var stringContent=""; stringContent +='<tr class="workitem">' stringContent +='<td>'+data.data.data[i].createTime+'</td>' stringContent +='<td class="workitemsrc">'+data.data.data[i].resource.resourceName+'</td>' stringContent +='<td> <span class="worktel">'+data.data.data[i].resource.professor.name+'<!--<span class="worktelbtn"></span>--></span></td>' stringContent +='<td>'+data.data.data[i].deliverTime+'</td>' //stringContent +='<td class="price2">'+data.data.data[i].dealPrice+'</td>' //stringContent +='<td>'+data.data.data[i].payMethod+'</td>' stringContent +='<td><span>'+inq+'</span>/<span>'+data.data.data[i].dealPrice+'</span><br></td>' stringContent +='<td><div class="loginStatus"></div></td></tr>' $(".worktabb").append( stringContent); if($(".price2").eq(i).text()==0){ $(".price2").eq(i).text(""); } switch(data.data.data[i].operationStatus) { case 1: var string='<span>申请已发送待对方确认</span><br/>' string+='<a class="opbtn">' string+='<span class="detailm"resourId='+data.data.data[i].resource.resourceId+' operationStatus='+data.data.data[i].operationStatus+' operationId='+data.data.data[i].operationId+'>修改申请</span><br />' string+='</a>' $(".loginStatus").eq(i).html(string); break; case 2: var string='<span>对方发来报价</span><br/>' string+='<a class="opbtn">' string+='<span class="detailm"resourId='+data.data.data[i].resource.resourceId+' operationStatus='+data.data.data[i].operationStatus+' operationId='+data.data.data[i].operationId+'>回复报价</span><br />' string+='</a>' $(".loginStatus").eq(i).html(string); break; case 3: var string='<span>合作进行中</span><br/>' string+='<a class="opbtn">' string+='<span class="detailm"resourId='+data.data.data[i].resource.resourceId+' operationStatus='+data.data.data[i].operationStatus+' operationId='+data.data.data[i].operationId+' dealPrice='+data.data.data[i].dealPrice+'>查看详情</span><br />' string+='<span class="payMonety"resourId='+data.data.data[i].resource.resourceId+' operationStatus='+data.data.data[i].operationStatus+' operationId='+data.data.data[i].operationId+' dealPrice='+data.data.data[i].dealPrice+'>付款</span><br />' string+='<span class="stopcoo"resourId='+data.data.data[i].resource.resourceId+' operationStatus='+data.data.data[i].operationStatus+' operationId='+data.data.data[i].operationId+'>中止合作</span>' string+='</a>' $(".loginStatus").eq(i).html(string); break; case 4: var string='<span>本人拒绝合作</span><br/>' string+='<a class="opbtn">' string+='<span class="detailm"resourId='+data.data.data[i].resource.resourceId+' operationStatus='+data.data.data[i].operationStatus+' operationId='+data.data.data[i].operationId+'>查看详情</span><br />' string+='</a>' $(".loginStatus").eq(i).html(string); break; case 5: var string='<span>对方拒绝合作合作结束</span><br/>' string+='<a class="opbtn">' string+='<span class="detailm"resourId='+data.data.data[i].resource.resourceId+' operationStatus='+data.data.data[i].operationStatus+' operationId='+data.data.data[i].operationId+'>查看详情</span><br />' string+='</a>' $(".loginStatus").eq(i).html(string); break; case 6: var string='<span>本人中止合作</span><br/>' string+='<a class="opbtn">' string+='<span class="detailm"resourId='+data.data.data[i].resource.resourceId+' operationStatus='+data.data.data[i].operationStatus+' operationId='+data.data.data[i].operationId+' dealPrice='+data.data.data[i].dealPrice+'>查看详情</span><br />' //string+='<span class=" discuss"dataStatus="0"resourceId='+data.data.data[i].resource.resourceId+' operationStatus='+data.data.data[i].operationStatus+' operationId='+data.data.data[i].operationId+'>评价</span><br />' string+='<span class="complain"resourId='+data.data.data[i].resource.resourceId+' operationStatus='+data.data.data[i].operationStatus+' operationId='+data.data.data[i].operationId+'>投诉</span>' string+='</a>' $(".loginStatus").eq(i).html(string); break; case 7: var string='<span>合作进行中</span><br/>' string+='<a class="opbtn">' string+='<span class="detailm"resourId='+data.data.data[i].resource.resourceId+' operationStatus='+data.data.data[i].operationStatus+' operationId='+data.data.data[i].operationId+' dealPrice='+data.data.data[i].dealPrice+'>查看详情</span><br />' string+='<span class="acknowledgement"resourceId='+data.data.data[i].resource.resourceId+' operationStatus='+data.data.data[i].operationStatus+' operationId='+data.data.data[i].operationId+'>确认完成</span><br />' string+='<span class="complain"resourId='+data.data.data[i].resource.resourceId+' operationStatus='+data.data.data[i].operationStatus+' operationId='+data.data.data[i].operationId+'>投诉</span>' string+='</a>' $(".loginStatus").eq(i).html(string); break; case 8: var string='<span>完成</span><br/>' string+='<a class="opbtn">' string+='<span class="detailm"resourId='+data.data.data[i].resource.resourceId+' operationStatus='+data.data.data[i].operationStatus+' operationId='+data.data.data[i].operationId+' dealPrice='+data.data.data[i].dealPrice+'>查看详情</span><br />' //string+='<span class="discuss"dataStatus="0"resourceId='+data.data.data[i].resource.resourceId+' operationStatus='+data.data.data[i].operationStatus+' operationId='+data.data.data[i].operationId+'>评价</span><br />' string+='<span class="complain"resourId='+data.data.data[i].resource.resourceId+' operationStatus='+data.data.data[i].operationStatus+' operationId='+data.data.data[i].operationId+'>投诉</span>' string+='</a>' $(".loginStatus").eq(i).html(string); break; default: } } if(data.data.total == 0){ }else{ if(isbind == true) { $(".tcdPageCode1").createPage({ pageCount:Math.ceil(data.data.total/pageSize), current:data.data.pageNo, backFn:function(p){ getPageData(pageSize,p,false); }, }); } } } else { $.MsgBox.Alert('message',"系统异常!"); } }, "error":function(){$.MsgBox.Alert('message','failddd')} }); } getPageData(6,1,true); //确认完成 $("#workmysrc2").on("click",".acknowledgement",function(){ opo=$(this).attr("operationId"); n=8; $.MsgBox.Confirm("消息", "确认合作完成?",upStatus); }) //退款 $(".workmysrc").on("click",".drawback",function(){ DetailInfo(); $(".resoubox").css("display","none"); $(".liuyaninfo").css("display","none"); $(".pingjiainfo").css("display","none"); var op=$(this).attr("operationId"); opo=op; var $price=$(this).attr("dealPrice"); $("#totalPrice").text($price); discussGetPaidMoney(opo,$price); $("#paytit").on("click",".ret",function(){ var payStatus=$(this).attr("payStatus"); //console.log(payStatus); if(payStatus==0){ payHistoryId=$(this).attr("payhistoryid"); getPayhistoryData(); } }); function getPayhistoryData(){ $.ajax({ "url":"/ajax/payhistory/status", "type":"post", "async": true, "data":{"payHistoryId":payHistoryId,"payStatus":"1"}, "success":function(data) { if(data.success) { $("#paytit").find(".payitem").remove(); discussGetPaidMoney(opo,$price); } else { $.MsgBox.Alert('message',"系统异常!"); } }, "error":function(){$.MsgBox.Alert('message','failddd')} }); } $(".panbtn").click(function(){ var payed= Number($("#realCharge").text());//已经收到的付款 var paying= Number($("#payMoney").val());//此次正在付入金额 //alert(payed+","+paying); if(paying <= payed) { $.MsgBox.Confirm("消息", "确定退款吗?",getPay1) } if(paying > payed){ $.MsgBox.Alert('消息',"您所退的款项有误,请核对您已经收到的款项"); } }); }); //付款 function getPay(){ $.ajax({"url" : "/ajax/payhistory", "type" : "POST", "success" : function(rdata) { if (rdata.success) { $(".blackcover").remove(); $("body").css("position",""); getPageData(6,1,false); } else { $.MsgBox.Alert('消息',"付款失败!"); } }, "data" :{"operationId":opo,"paidMoney":$("#payMoney").val(), "remark":$("#payRemark").val(),"payStatus":$("#payStatus").val(),"professorId":userid, "isonline":$("#isOnline").find("option:selected").val()}, "contentType" :"application/x-www-form-urlencoded", "beforeSend":function(){}, dataType : "json" }); } //退款 function getPay1(){ $.ajax({"url" : "/ajax/payhistory", "type" : "POST", "success" : function(rdata) { if (rdata.success) { $(".blackcover").remove(); $("body").css("position",""); getDataResource(); } else { $.MsgBox.Alert('消息',"付款失败!"); } }, "data" :{"operationId":opo,"returnMoney":$("#payMoney").val(), "remark":$("#payRemark").val(),"payStatus":$("#payStatus").val(),"professorId":userid, "isonline":$("#isOnline").find("option:selected").val()}, "contentType" :"application/x-www-form-urlencoded", "beforeSend":function(){}, dataType : "json" }); } $(".workmysrc").on("click",".payMonety",function(){ DetailInfo(); $(".resoubox").css("display","none"); $(".liuyaninfo").css("display","none"); $(".pingjiainfo").css("display","none"); opo=$(this).attr("operationId"); var $price=$(this).attr("dealPrice"); $("#totalPrice").text($price); discussGetPaidMoney(opo,$price); $("#paytit").on("click",".ret",function(){ var payStatus=$(this).attr("payStatus"); //console.log(payStatus); if(payStatus==0){ payHistoryId=$(this).attr("payhistoryid"); getPayhistoryData(); } }); function getPayhistoryData(){ $.ajax({ "url":"/ajax/payhistory/status", "type":"post", "async": true, "data":{"payHistoryId":payHistoryId,"payStatus":"1"}, "success":function(data) { if(data.success) { $("#paytit").find(".payitem").remove(); discussGetPaidMoney(opo,$price); } else { $.MsgBox.Alert('message',"系统异常!"); } }, "error":function(){$.MsgBox.Alert('message','failddd')} }); } $("#panaddbtn").click(function(){ var aa= Number($("#payMoney").val()); var bb=Number($("#balance").text()); if(aa<bb){ $.MsgBox.Confirm("消息", "确定支付吗?",getPay); $.MsgBox.Alert('消息',"此次付款成功!"); $("#mb_msgicon").css("background", 'url("images/sign_icon_chenggong_nor.png") 0% 0% / contain'); } if(aa>bb){ $.MsgBox.Alert('消息',"所付款项已经超出预计款项!"); } if(aa==bb){ $.MsgBox.Confirm("消息", "确定支付吗?",getPay); n=7; upStatus(); $.MsgBox.Alert('消息',"款项已经全部付清!"); } }); }); function inquiryGetPaidMoney(operationId){ var realCharge=0,balance=0; $.ajax({ "url":"/ajax/payhistory/qadetail", "type":"get", "async": false, "data":{"operationId":operationId}, "success":function(data){ if(data.success) { var $data=data.data; var m; for(var i=0;i<$data.length;i++) { if($data[i].paidMoney==undefined) { $data[i].paidMoney=0; } if($data[i].returnMoney==undefined) { $data[i].returnMoney=0; } m=$data[i].paidMoney-$data[i].returnMoney; realCharge+=m; } } else { //console.log("系统异常!"); } }, "error":function(){$.MsgBox.Alert('message','failddd')} }); return realCharge; } //获取订单付款历史记录 function discussGetPaidMoney(operationId,priceDifference){ var realCharge=0,balance=0; $.ajax({ "url":"/ajax/payhistory/qadetail", "type":"get", "async": true, "data":{"operationId":operationId}, "success":function(data){ if(data.success){ //console.log(data); var popHtml=""; var $data=data.data; var m; for(var i=0;i<$data.length;i++){ if($data[i].paidMoney==undefined) { $data[i].paidMoney=0; } if($data[i].returnMoney==undefined) { $data[i].returnMoney=0; } if($data[i].remark==undefined) { $data[i].remark="--"; } PopHtml = '<tr class="payitem">'; PopHtml += '<td><div class="resouinforcon">'+changeTime($data[i].createTime)+'</div></td>'; PopHtml += '<td><div class="resouinforcon">'+$data[i].professor.name+'</div></td>'; PopHtml += '<td><div class="resouinforcon resou"></div></td>'; PopHtml += '<td><div class="resouinforcon to"></div></td>'; if(userid==$data[i].professor.id){ PopHtml += '<td><div class="resouinforcon resta"></div></td>'; }else{ PopHtml += '<td><div class="resouinforcon resta ret"payHistoryId='+$data[i].payHistoryId+' payStatus='+$data[i].payStatus+'></div></td>'; } PopHtml += '<td><div class="resouinforcon">'+$data[i].remark+'</div></td>'; PopHtml += '</tr>'; $("#paytit").append(PopHtml); m=$data[i].paidMoney-$data[i].returnMoney; $(".to").eq(i).text(m); if($data[i].isonline==0){ $(".resou").eq(i).text("线上支付"); }else{ $(".resou").eq(i).text("线下支付"); } if($data[i].payStatus==0){ $(".resta").eq(i).text("未确认"); }else{ $(".resta").eq(i).text("确认收款"); } popHtml=""; realCharge+=m; } balance=priceDifference-realCharge; $("#balance").text(balance); $("#realCharge").text(realCharge); } else { //console.log("系统异常!"); } }, "error":function(){$.MsgBox.Alert('message','failddd')} }); } //中止合作 $(".workmysrc").on("click",".stopcoo",function(){ opo=$(this).attr("operationId"); n=6; $.MsgBox.Confirm("消息", "你确定要中止吗?",upStatus); }); //评论 var start; $(".workmysrc").on("click",".discuss",function(){ var resourceId=$(this).attr("resourceId"); var operationId=$(this).attr("operationId"); var dataStatus=$(this).attr("dataStatus"); getAssess1(operationId); CommentInfo(); if(lengths==0&&dataStatus==0){ $(".sqlcomment").css("display","none"); $(".evastar2").click(function(){ $(".evastar2").removeClass('span'); start=$(this).index()+1; for(var i=0;i<start;i++){ if(i<start){ $(".evastar2").eq(i).addClass("span"); } else{ $(".evastar2").eq(i).removeClass('span'); } } }); $("#discuss").click(function(){ //discussContent(resourceId,operationId,start,userid); $.ajax({ "url":"/ajax/assess", "type":"post", "async": true, "data":{"operationId":operationId,"professorId":userid,"resourceId":resourceId,"starLevel":start,"descp":$("#discussContent").val()}, "success":function(data){ if(data.success) { location.reload(true); } else { //console.log("系统异常!"); } }, "beforeSend":function(){/*console.log(this.data)*/}, "error":function(){$.MsgBox.Alert('message','failddd')} }); }) }else if(lengths==0&&dataStatus==1){ $(".addcomment").css("display","none"); var string='<tr><td><div class="righteva"><div class="noconmment">对方还未评价</div></div></div></td></tr>'; $("#commbox").append(string); }else if(lengths==1&&dataStatus==0){ $(".addcomment").css("display","none"); getAssess(operationId,1); }else if(lengths==1&&dataStatus==1){ getAssess(operationId,1); $(".evastar2").click(function(){ $(".evastar2").removeClass('span'); start=$(this).index()+1; for(var i=0;i<start;i++){ if(i<start){ $(".evastar2").eq(i).addClass("span"); } else{ $(".evastar2").eq(i).removeClass('span'); } } }); $("#discuss").click(function(){ //discussContent(resourceId,operationId,start,userid); $.ajax({ "url":"/ajax/assess", "type":"post", "async": true, "data":{"operationId":operationId,"professorId":userid,"resourceId":resourceId,"starLevel":start,"descp":$("#discussContent").val()}, "success":function(data){ if(data.success) { } else { //console.log("系统异常!"); } }, "beforeSend":function(){/*console.log(this.data)*/}, "error":function(){$.MsgBox.Alert('message','failddd')} }); }) }else if(lengths==2){ $(".addcomment").css("display","none"); getAssess(operationId,2); } }) var lengths; //获取每条记录的评论 function getAssess1(operationId){ $.ajax({"url" : "/ajax/assess/qaoper", "type" : "get", "async":false, "success" : function(rdata) { if (rdata.success) { //console.log(rdata); lengths=rdata.data.length; } else { //alert("jjj"); } }, "data" :{"operationId":operationId}, "contentType" :"application/x-www-form-urlencoded", dataType : "json" }); } function getAssess(operationId,le){ $.ajax({"url" : "/ajax/assess/qaoper", "type" : "get", "async":true, "success" : function(rdata) { if (rdata.success) { $data=rdata.data; if(le==1){ var string=""; string+='<div class="ass"><tr><td><div class="teamwork"><div class="lefteva"><a href="" class="evaimg"><img src="images/default-photo.jpg" width="100%" height="100%"></a>' string+='<p>'+ $data[0].professor.name +'</p></div>' string+='<div class="righteva"><ul class="evasort">' string+='<li class="teamname"><span>'+$data[0].resource.resourceName+'资源的合作</span><span class="teamtime">2016-09-06</span></li></ul>' string+='<div class="evastarbox"><span class="evastar evastar1"></span><span class="evastar evastar1"></span><span class="evastar evastar1"></span><span class="evastar evastar1"></span><span class="evastar evastar1"></span></div>' string+='<p class="evabrief">'+$data[0].descp+'</p>' string+='</div></div></td></tr>' string+='<tr><td><div class="righteva"><div class="noconmment">对方还未评价</div></div></div></td></tr></div>' $("#commbox").append(string); //console.log($data[0].starLevel); for(var i=0;i<$data[0].starLevel;i++) { //console.log(i); $(".evastar1").eq(i).addClass('span'); } }else if(le==2){ for(var j=0;j<2;j++){ var string=""; string+='<div class="ass"><tr><td><div class="teamwork"><div class="lefteva"><a href="" class="evaimg"><img src="images/default-photo.jpg" width="100%" height="100%"></a>' string+='<p>'+ $data[j].professor.name +'</p></div>' string+='<div class="righteva"><ul class="evasort">' string+='<li class="teamname"><span>'+$data[j].resource.resourceName+'资源的合作</span><span class="teamtime">2016-09-06</span></li></ul>' string+='<div class="evastarbox"><span class="evastar evastar1"></span><span class="evastar evastar1"></span><span class="evastar evastar1"></span><span class="evastar evastar1"></span><span class="evastar evastar1"></span></div>' string+='<p class="evabrief">'+$data[j].descp+'</p>' string+='</div></div></td></tr></div>' $("#commbox").append(string); if(j==0) { for(var i=0;i<$data[j].starLevel;i++) { //console.log(i); $(".evastar1").eq(i).addClass('span'); } } else{ for(var i=0;i<$data[j].starLevel;i++) { //console.log(i); $(".evastar1").eq(i+5).addClass('span'); } } string=""; } } } else { //alert("jjj"); } }, "data" :{"operationId":operationId}, "contentType" :"application/x-www-form-urlencoded", dataType : "json" }); } function discussContent(){ $.ajax({ "url":"/ajax/assess", "type":"post", "async": true, "data":{"operationId":operationId,"professorId":userid,"resourceId":resourceId,"starLeval":start,"descp":$("#discussContent").val()}, "success":function(data){ if(data.success) { location.reload(true); } else { //console.log("系统异常!"); } }, "error":function(){$.MsgBox.Alert('message','failddd')} }); } //我的需求中修改申请,对方已经回复(合作),我拒绝合作或者约对方合作 function getIdentity(professorId){ $.ajax({ "url":"ajax/professor/"+professorId, "type":"get", "async": false, "success":function(data){ if(data.success) { $("option")[0].value=data.data.name; $("option")[1].value=data.data.organization.name; } else { $.MsgBox.Alert("消息","系统异常!"); } }, "error":function(){$.MsgBox.Alert('message','failddd')} }) } $(".workmysrc").on("click",".detailm",function(){ var resourceId=$(this).attr("resourId"); var operationStatus=$(this).attr("operationStatus"); var operationId=$(this).attr("operationId"); var priceDifference=$(this).attr("dealPrice"); flag=1; opo=operationId; if(flag==1&&operationStatus==1) { ResourceApply(); $(".limitBox").removeClass("limitBox"); $(".limitwords").removeClass("limitwords"); $(".limitwordbox").removeClass("limitwordbox"); $( "#datepicker" ).datepicker({ "dateFormat":" yy-mm-dd"}); $(".stateinfor span").text("修改申请中"); $(".btnboxup").css({"display":"none"}); $(".applysure").css({"display":"none"}); ajaxGet(operationId,1,1); getIdentity(userid); //if($(".dealTime").val()!=""&&$(".detail").val()!="") //{ $("#deliver").on("click",function() { var $data = {}; $data.demandId = userid; $data.resourceId = resourceId; $data.operationId=operationId; $data.detailDemand=$(".detail").val(); $data.deliverTime=replaceStr($.trim($("#datepicker").val())); $data.applysquare=$("select option:selected").val(); $data.operationStatus=1; $.ajax({ "url" : "/ajax/operation", "type" : "put", "success" : function(rdata) { if (rdata.success){ getPageData(6,1,false); $(".blackcover").remove(); $("body").css("position",""); $.MsgBox.Alert('消息',"资源申请信息修改成功"); $("#mb_msgicon").css("background", 'url("images/sign_icon_chenggong_nor.png") 0% 0% / contain'); } else { $.MsgBox.Alert('消息',"资源申请信息修改失败"); } }, "data" : JSON.stringify($data) , "contentType" :"application/json", dataType : "json" }); }); //} } if(flag==1&&operationStatus==2) { ResourceApply(); ajaxGet1(operationId); $(".dealTime").replaceWith("<span class='dealTime'></span>"); $(".detail").replaceWith("<span class='detail'></span>"); $("select").replaceWith("<span class='sname'></span>") $(".btnboxdown").css({"display":"none"}); $(".applysure").css({"display":"none"}); $(".stateinfor span").text("回复报价中"); $(".btnboxup").css({"display":"none"}); $(".btnboxdown").css({"display":"block"}); $(".applysure").css({"display":"block"}); $(".bag").css("display","none"); $(".sendpri").text(""); $("#payMethod").replaceWith("<span id='payMethod'><span>"); $("#dealPrice").replaceWith("<span id='dealPrice'><span>"); $("#consultContent").replaceWith("<span id='consultContent'><span>"); $("#del")[0].value="合作"; $("#reject")[0].value="直接拒绝"; $("#reject").click(function(){ n=4; $(".blackcover").remove(); $("body").css("position",""); $.MsgBox.Confirm("消息", "确定继续吗?",upStatus); }) $("#del").click(function(){ n=3; $(".blackcover").remove(); $("body").css("position",""); upStatus(); }) } if(flag==1&&operationStatus==3){ DetailInfo(); $("#totalPrice").text(priceDifference); $(".liuyaninfo").css("display","none"); $(".pingjiainfo").css("display","none"); $(".filebox").css("display","none"); ajaxGet1(operationId); $(".payaddbox1").css("display","none"); discussGetPaidMoney(operationId,priceDifference); } if(flag==1&&operationStatus==4){ ResourceApply(); ajaxGet1(operationId); $(".dealTime").replaceWith("<span class='dealTime'></span>"); $(".detail").replaceWith("<span class='detail'></span>"); $("select").replaceWith("<span class='sname'></span>") $(".btnboxdown").css({"display":"none"}); $(".applysure").css({"display":"none"}); $(".sendpri").text(""); $(".stateinfor span").text("详情"); $(".resde").text("详情页面"); $(".btnboxup").css({"display":"none"}); $(".btnboxdown").css({"display":"block"}); $(".applysure").css({"display":"block"}); $(".bag").css("display","none"); $(".addrebtn").css("display","none"); $("#payMethod").replaceWith("<span id='payMethod'><span>"); $("#dealPrice").replaceWith("<span id='dealPrice'><span>"); $("#consultContent").replaceWith("<span id='consultContent'><span>"); } if(flag==1&&operationStatus==5){ ResourceApply(); ajaxGet(operationId); $(".stateinfor").find("span").text("合作结束"); $(".dealTime").replaceWith("<span class='dealTime'></span>"); $(".detail").replaceWith("<span class='detail'></span>"); $("select").replaceWith("<span class='sname'></span>") $(".btnboxdown").css({"display":"none"}); $(".applysure").css({"display":"none"}); //$(".resouinfotype2").text(""); $(".addrebtn").css("display","none"); } if(flag==1&&operationStatus==6){ DetailInfo(); $("#totalPrice").text(priceDifference); $(".filebox").css("display","none"); $(".liuyaninfo").css("display","none"); $(".pingjiainfo").css("display","none"); $(".filebox").css("display","none"); ajaxGet1(operationId); $(".payaddbox1").css("display","none"); discussGetPaidMoney(operationId,priceDifference) } if(flag==1&&operationStatus==7){ DetailInfo(); $("#totalPrice").text(priceDifference); $(".liuyaninfo").css("display","none"); $(".pingjiainfo").css("display","none"); $(".filebox").css("display","none"); ajaxGet1(operationId); $(".payaddbox1").css("display","none"); discussGetPaidMoney(operationId,priceDifference) } if(flag==1&&operationStatus==8){ DetailInfo(); $("#totalPrice").text(priceDifference); $(".liuyaninfo").css("display","none"); $(".pingjiainfo").css("display","none"); $(".filebox").css("display","none"); ajaxGet1(operationId); $(".payaddbox1").css("display","none"); discussGetPaidMoney(operationId,priceDifference) } }) //获取评论 function discussGetContent(operationId){ $.ajax({ "url":"/ajax/assess/qaoper", "type":"get", "async": true, "data":{"operationId":operationId}, "success":function(data){ if(data.success){ //console.log(data); } else { //console.log("系统异常!"); } }, "error":function(){$.MsgBox.Alert('message','failddd')} }); } //更新状态 function upStatus(){ $.ajax({"url" : "/ajax/operation/operationStatus", "type" : "POST", "success" : function(rdata) { if (rdata.success) { getPageData(6,1,false); } else { $.MsgBox.Alert('message','状态更新失败'); } }, "data" :{"operationId":opo,"operationStatus":n}, "beforeSend":function(){/*console.log(this.data)*/}, "contentType" :"application/x-www-form-urlencoded", dataType : "json" }); } function upStatus1(){ $.ajax({"url" : "/ajax/operation/operationStatus", "type" : "POST", "success" : function(rdata) { if (rdata.success) { getDataResource(); } else { $.MsgBox.Alert('message','状态更新失败'); } }, "data" :{"operationId":opo,"operationStatus":n}, "beforeSend":function(){/*console.log(this.data)*/}, "contentType" :"application/x-www-form-urlencoded", dataType : "json" }); } //我的需求,获取每条记录的数据根据合作id function ajaxGet(operationId,o,p){ $.ajax({ "url":"/ajax/operation/"+operationId, "type":"get", "async": true, "success":function(data){ if(data.success) { //console.log(data); $(".log").text(data.data.resource.resourceName); $(".timelog").text(changeTime(data.data.createTime)); $(".contration").text(data.data.operationId); $(".detail").text(data.data.detailDemand); if(o==1&&p==1){ $(".dealTime").val(changeTime(data.data.deliverTime)); }else{ $(".dealTime").text(changeTime(data.data.deliverTime)); } if(data.data.professor.name==data.data.applysquare){ $("select").find("option[title=个人]").attr("selected",true); }else{ $("select").find("option[title=所属机构]").attr("selected",true); } $(".sname").text(data.data.applysquare); $(".namecon").text(data.data.resource.professor.name); $(".resouImage").attr("src","/images/resource/"+data.data.resource.resourceId+".jpg"); $(".resouImage").load(function(){}) .error(function(){ $(this).attr("src","/images/default-resource.jpg"); }); if(data.data.payMethod){ $("#payMethod").val(data.data.payMethod); } if(data.data.dealPrice){ $("#dealPrice").val(data.data.dealPrice); } if(data.data.replyNotes){ $("#consultContent").val(data.data.replyNotes); } //根据内容的多少获取高度给父级设置高度 limitHeight(); } else { //console.log("系统异常!"); } }, "error":function(){$.MsgBox.Alert('message','failddd')} }); } function ajaxGet1(operationId){ $.ajax({ "url":"/ajax/operation/"+operationId, "type":"get", "async": true, "success":function(data){ if(data.success) {//console.log(data); $(".log").text(data.data.resource.resourceName); $(".timelog").text(changeTime(data.data.createTime)); $(".contration").text(data.data.operationId); $(".detail").text(data.data.detailDemand); $(".dealTime").text(changeTime(data.data.deliverTime)); $(".namecon").text(data.data.resource.professor.name); $(".sname").text(data.data.applysquare); $(".resouImage").attr("src","/images/resource/"+data.data.resource.resourceId+".jpg"); $(".resouImage").load(function(){}) .error(function(){ $(this).attr("src","/images/default-resource.jpg"); }); if(data.data.payMethod){ $("#payMethod").text(data.data.payMethod); } if(data.data.dealPrice){ $("#dealPrice").text(data.data.dealPrice); } if(data.data.replyNotes){ $("#consultContent").text(data.data.replyNotes); } //根据内容的多少获取高度给父级设置高度 limitHeight(); } else { //console.log("系统异常!"); } }, "error":function(){$.MsgBox.Alert('message','failddd')} }); } /*科研资源菜单点击切换*/ $(".worksamlltit1").click(function(){ var index = $(this).index(); $(this).addClass("worksamlltitnow").siblings().removeClass("worksamlltitnow"); $(".workmysrc1").eq(index).show().siblings().hide(); }); });
ekexiu.app - Gogs: Go Git Service

Nenhuma Descrição

companyUpdata.js 7.3KB

    mui.ready(function() { mui.plusReady(function() { var userid = plus.storage.getItem('userid'); var oImg=document.getElementsByTagName("img")[0]; var personalMaterial=document.getElementsByClassName('personalMaterial'); var personSummary=document.getElementsByClassName("breifinfo")[0]; var fl; window.addEventListener("newId",function(event){ fl=event.detail.rd; personalMaterial[1].parentNode.style.display = "block"; personalMaterial[2].parentNode.style.display = "block"; personalMaterial[3].parentNode.style.display = "block"; personalMaterial[4].parentNode.style.display = "block"; personalMaterial[5].parentNode.style.display = "block"; personalMaterial[6].parentNode.style.display = "block"; personalMaterial[7].parentNode.style.display = "block"; personalMessage(); }) //获取个人的信息 function personalMessage() { mui.ajax(baseUrl + "/ajax/professor/info/" + userid, { dataType: 'json', //数据格式类型 type: 'GET', //http请求类型 timeout: 10000, //超时设置 success: function(data) { if(!fl){ plus.nativeUI.closeWaiting(); plus.webview.currentWebview().show("slide-in-right", 150); } var $data = data.data; personalMaterial[0].innerText = $data.name; //头像 if($data.hasHeadImage) { oImg.src = baseUrl + "/images/head/" + $data.id + "_l.jpg"; } //基本信息 // if(!$data.authType) { // document.getElementsByClassName('authword')[0].innerText = "未认证"; // document.getElementsByClassName('authword')[0].style.backgroundColor = "#cccccc"; // } if($data.office) { personalMaterial[2].innerText = $data.office } else { personalMaterial[2].parentNode.style.display = "none"; } if($data.title) { personalMaterial[1].innerText = $data.title; } else { personalMaterial[1].parentNode.style.display = "none"; } if($data.department) { personalMaterial[3].innerText = $data.department; } else { personalMaterial[3].parentNode.style.display = "none"; } if($data.orgName) { personalMaterial[4].innerText = $data.orgName; } else { personalMaterial[4].parentNode.style.display = "none"; } if($data.address) { personalMaterial[5].innerText =$data.province+" "+$data.address; } else { personalMaterial[5].parentNode.style.display = "none"; } if($data.phone) { personalMaterial[6].innerText = $data.phone; } else { personalMaterial[6].parentNode.style.display = "none"; } if($data.email) { personalMaterial[7].innerText = $data.email; } else { personalMaterial[7].parentNode.style.display = "none"; } //个人简介 if($data.descp) { personSummary.innerHTML = $data.descp; } //我的资源 if($data.resources.length) { resource($data.resources, $data.resources.length); } }, error: function() { plus.nativeUI.toast("服务器链接超时", toastStyle); return; } }); } //我的所有资源、 function resource(oDa, n) { var $data = oDa; var html = []; for(var i = 0; i < n; i++) { var string = '<li class="mui-table-view-cell mui-media" resouId=' + $data[i].resourceId + '>' string += '<a class="proinfor" href="resinforupdate.html"><div class="mui-media-object mui-pull-left ResImgBox ResImgBox2">' if($data[i].images.length) { string += '<img class="resImg headRadius" src="'+baseUrl+'/images/resource/' + $data[i].resourceId + '.jpg">' } else { string += '<img class="resImg headRadius" src="../images/default-resource.jpg">' } string += '<div class="mui-media-body" style="width:60%">' string += '<span class="listtit">' + $data[i].resourceName + '<div class="updatebox updatebox2" style="top:24px;"><em class="mui-icon mui-icon-compose updatebtn"></em></div></span>' string += '<p class="listtit2">' + $data[i].supportedServices + '</p>' string += '<p class="listtit3 resbrief">' if($data[i].descp) { string += $data[i].descp; } string += '</p></div></a></li>' html.push(string); } document.getElementById("resourceList").innerHTML = html.join(''); } //个人信息修改 document.getElementsByClassName("updatebox")[0].addEventListener("tap", function() { var nwaiting = plus.nativeUI.showWaiting(); //显示原生等待框 var arr = { name: personalMaterial[0].innerText, office: personalMaterial[1].innerText, title: personalMaterial[2].innerText, orgName: personalMaterial[3].innerText, department: personalMaterial[4].innerText, address: personalMaterial[5].innerText } webviewShow = plus.webview.create("../html/companyUpdata1.html", "../html/companyUpdata1.html", {}, arr); //后台创建webview并打开show.html webviewShow.addEventListener("loaded", function() { //注册新webview的载入完成事件 // nwaiting.close(); //新webview的载入完毕后关闭等待框 // webviewShow.show("slide-in-right", 150); //把新webview窗体显示出来,显示动画效果为速度150毫秒的右侧移入动画 }, false); }); document.getElementsByClassName("updatebox")[1].addEventListener("tap", function() { var nwaiting = plus.nativeUI.showWaiting(); //显示原生等待框 var arr = { descp: personSummary.innerText, flag:1 } webviewShow = plus.webview.create("../html/updateinfo2.html", "updateinfo2.html", {}, arr); //后台创建webview并打开show.html webviewShow.addEventListener("loaded", function() { //注册新webview的载入完成事件 nwaiting.close(); //新webview的载入完毕后关闭等待框 webviewShow.show("slide-in-right", 150); //把新webview窗体显示出来,显示动画效果为速度150毫秒的右侧移入动画 }, false); }); //添加我的资源 document.getElementsByClassName("addinfobox")[0].addEventListener("tap", function() { var nwaiting = plus.nativeUI.showWaiting(); var web = plus.webview.create("../html/updateinfo-res01.html", "updateinfo-res01.html",{},{reFlag:1}); //后台创建webview并打开show.html web.addEventListener("loaded", function() { plus.nativeUI.closeWaiting(); web.show("slide-in-right", 150); }, false); }); //修改我的资源 mui("#resourceList").on("tap", "li", function() { var resouId = this.getAttribute("resouId"); var nwaiting = plus.nativeUI.showWaiting(); var web = plus.webview.create("../html/resinforupdate.html", "resinforupdate.html", {}, { resourceId: resouId, reFlag:1 }); //后台创建webview并打开show.html web.addEventListener("loaded", function() { }, false); }) //修改详细页面 document.getElementsByClassName("gotonext2")[0].addEventListener("tap", function() { var nwaiting = plus.nativeUI.showWaiting(); var web = plus.webview.create("../html/proinforupdate-more.html", "proinforupdate-more.html"); //后台创建webview并打开show.html web.addEventListener("loaded", function() {}, false); }); personalMessage(); }); });
Sign In - Gogs: Go Git Service

Sign In