| @@ -44,6 +44,12 @@ var userConsulting = '/transaction/communicate/communicateList/member' //我的 | |||
| */ | |||
| var userBidding = '/transaction/outproject/biddinglist/member' //我的竞价类接口 | |||
| /* | |||
| @purl /transaction/signup/getSignupByMemberId | |||
| @param | |||
| */ | |||
| var getSignupByMemberId = '/transaction/signup/getSignupByMemberId' //我的报名类接口 | |||
| /* | |||
| @purl /transaction/outproject/biddinglist/member | |||
| @param | |||
| @@ -2,6 +2,7 @@ var serverApi = ''; | |||
| var friendsLinksList = []; | |||
| var themeColor = ''; | |||
| var logo = ''; | |||
| var lastTime = 0.00; | |||
| define(['jquery', 'dialog','jsencrypt'], function ($, dialog,JSEncrypt) { | |||
| // 工具类 | |||
| function Tool() { | |||
| @@ -502,6 +503,8 @@ define(['jquery', 'dialog','jsencrypt'], function ($, dialog,JSEncrypt) { | |||
| $("#webConfigAddress").html(content[0].configValue + '<span style="margin-left: 10px;"></span>' + content[3].configValue); | |||
| serverApi = content[11].configValue; | |||
| lastTime = parseFloat(content[8].configValue); | |||
| } | |||
| }, | |||
| /** | |||
| @@ -13,7 +13,8 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function | |||
| timer:null, | |||
| biddinglistInformationDetailLength:-1, | |||
| biddingTimeType:0, | |||
| biddinglistInformationDetail:[] | |||
| biddinglistInformationDetail:[], | |||
| timeConfig:0.00 | |||
| }, | |||
| }; | |||
| var tools = new Tools(); | |||
| @@ -99,7 +100,7 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function | |||
| var content = data.data; | |||
| console.log(content) | |||
| //document.getElementById('time').innerHTML = '延时周期:'+content[8].configValue+content[8].remark+'<i class="wh">?</i>' | |||
| module.data.timeConfig = content[8].configValue; | |||
| module.data.timeConfig = parseFloat(content[8].configValue); | |||
| module.data.titleConfig = content[9].configValue; | |||
| module.data.importantTitle = content[7].configName+':'+ content[7].configValue.substr(3).substr(0,(content[7].configValue.substr(3).length-4)); | |||
| module.data.know = content[6].configValue; | |||
| @@ -118,12 +119,14 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function | |||
| } | |||
| } | |||
| module.dataCompare = function(signupStartTime,signupStopTime,biddingStartTime,biddingStopTime){ | |||
| var signupStartTime = signupStartTime; | |||
| var signupStopTime = signupStopTime; | |||
| var biddingStartTime = biddingStartTime; | |||
| var biddingStopTime = biddingStopTime; | |||
| var nowTime = Date.parse(new Date()); | |||
| var beginTimes=signupStartTime.substring(0,10).split('-'); | |||
| var endTimes=signupStopTime.substring(0,10).split('-'); | |||
| @@ -348,7 +351,7 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function | |||
| let biddingStopTime = content.biddingStopTime; | |||
| var nowTime = Date.parse(new Date()); | |||
| var difference = Date.parse(biddingStopTime)-nowTime; | |||
| var centerTime = 2 * 60 * 1000 | |||
| var centerTime = module.data.timeConfig * 60 * 1000 | |||
| if ( 0 < difference&&difference <= centerTime){ | |||
| console.log("竞价最后两分钟") | |||
| //正在竞价 | |||
| @@ -367,6 +370,10 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function | |||
| document.getElementById('biddingTitle').style.display = 'block'; | |||
| } | |||
| }else{ | |||
| if (!signupStartTime){console.log('缺失报名开始时间');return;} | |||
| if (!signupStopTime){console.log('缺失报名结束时间');return;} | |||
| if (!biddingStartTime){console.log('缺失竞价开始时间');return;} | |||
| if (!biddingStopTime){console.log('缺失竞价结束时间');return;} | |||
| module.dataCompare(signupStartTime,signupStopTime,biddingStartTime,biddingStopTime); | |||
| } | |||
| },1000) | |||
| @@ -306,6 +306,8 @@ define(['jquery', "template", "Tools", "user", "paging","cupload","kindeditor", | |||
| tools.doGet(userConsulting, {memberId:content.id,pageNum:module.data.pageNum,pageSize:module.data.pageSize}, module.consulting); | |||
| //我的竞价 | |||
| tools.doGet(userBidding, {memberId:content.id,pageNum:module.data.pageNum,pageSize:module.data.pageSize}, module.bidding); | |||
| //我的报名 | |||
| tools.doGet(getSignupByMemberId, {memberId:content.id,pageNum:module.data.pageNum,pageSize:module.data.pageSize}, module.application); | |||
| tools.doPost(listHistory, {processInstanceId:content.instanceId}, module.listHistory); | |||
| //个人资料提交 | |||
| @@ -629,6 +631,33 @@ define(['jquery', "template", "Tools", "user", "paging","cupload","kindeditor", | |||
| } | |||
| } | |||
| //个人中心我的报名 | |||
| module.application = function(data){ | |||
| if (data.code == 200) { | |||
| var content = data.rows; | |||
| //console.log(content) | |||
| var pageCount = (data.total/module.data.pageSize).toFixed(0); | |||
| if (pageCount < 1){ | |||
| pageCount = 1; | |||
| } | |||
| if(module.data.biddingInformationList == '') { | |||
| // 初始化 分页器 | |||
| var page_s1=createPage('.page_s4'); | |||
| // 设置分页 | |||
| setPage(page_s1, { | |||
| pageTotal: data.total, // 数据总条数 | |||
| pageSize: module.data.pageSize, // 每页显示条数 | |||
| pageCurrent: 1, // 当前页 | |||
| maxBtnNum: 5, // 最多按钮个数(最少5个) | |||
| }) | |||
| $('#page_s4').html('共' + pageCount + '页') | |||
| } | |||
| module.data.applicationInformationList = content; | |||
| var applicationInformationData = template('applicationInformationData', module.data); | |||
| $("#applicationInformationContent").html(applicationInformationData); | |||
| } | |||
| } | |||
| tabCheck = function(type){ | |||
| document.getElementById('user').className = ''; | |||
| // document.getElementById('bank').className = ''; | |||
| @@ -660,7 +689,7 @@ define(['jquery', "template", "Tools", "user", "paging","cupload","kindeditor", | |||
| } | |||
| tabLeftCheck = function(type){ | |||
| for (var i = 1 ; i < 5 ; i++){ | |||
| for (var i = 1 ; i < 6 ; i++){ | |||
| document.getElementById('icon-list'+i).className = ''; | |||
| } | |||
| document.getElementById(type).className = 'active'; | |||
| @@ -668,6 +697,7 @@ define(['jquery', "template", "Tools", "user", "paging","cupload","kindeditor", | |||
| document.getElementById('supplyInformation').style.display = 'none'; | |||
| document.getElementById('consultingInformation').style.display = 'none'; | |||
| document.getElementById('biddingInformation').style.display = 'none'; | |||
| document.getElementById('applicationInformation').style.display = 'none'; | |||
| document.getElementById('releaseSupply').style.display = 'none'; | |||
| document.getElementById('release').style.display = 'none'; | |||
| @@ -697,6 +727,10 @@ define(['jquery', "template", "Tools", "user", "paging","cupload","kindeditor", | |||
| document.getElementById('biddingInformation').style.display = 'block'; | |||
| module.data.clickType = 'bidding'; | |||
| } | |||
| if(type == 'icon-list5'){ | |||
| document.getElementById('applicationInformation').style.display = 'block'; | |||
| module.data.clickType = 'application'; | |||
| } | |||
| module.data.pageNum = 1 ; | |||
| } | |||
| @@ -161,6 +161,11 @@ | |||
| <p class="fl">我的竞价</p> | |||
| <div class="clear"></div> | |||
| </li> | |||
| <li id="icon-list5" onclick="tabLeftCheck('icon-list5')"> | |||
| <img src="../../static/images/user_index_icon4.png" id="icon5" alt="" class="fl"/> | |||
| <p class="fl">我的报名</p> | |||
| <div class="clear"></div> | |||
| </li> | |||
| </ul> | |||
| </div> | |||
| @@ -178,7 +183,7 @@ | |||
| <p class="m-l-10 m-r-10 fl">{{userInformationDetail.phone}}</p> | |||
| <!-- <span onclick="phoneUpdate('user')">修改手机号</span>--> | |||
| <p class="activitiStatus"> | |||
| {{userInformationDetail.activitiStatus == '1' ? '待审':userInformationDetail.activitiStatus == '2' ? '驳回':userInformationDetail.activitiStatus == '3' ? '通过':''}} | |||
| {{userInformationDetail.activitiStatus == '1' ? '待审(点击查看)':userInformationDetail.activitiStatus == '2' ? '驳回':userInformationDetail.activitiStatus == '3' ? '通过':''}} | |||
| </p> | |||
| </td> | |||
| </tr> | |||
| @@ -236,7 +241,7 @@ | |||
| <p class="m-l-10 m-r-10 fl">{{userInformationDetail.phone}}</p> | |||
| <!-- <span onclick="phoneUpdate('company')">修改手机号</span>--> | |||
| <p class="activitiStatus" onclick="$('#dialog-02').css('display','block')"> | |||
| {{userInformationDetail.activitiStatus == '1' ? '待审':userInformationDetail.activitiStatus == '2' ? '驳回':userInformationDetail.activitiStatus == '3' ? '通过':''}} | |||
| {{userInformationDetail.activitiStatus == '1' ? '待审(点击查看)':userInformationDetail.activitiStatus == '2' ? '驳回':userInformationDetail.activitiStatus == '3' ? '通过':''}} | |||
| </p> | |||
| </td> | |||
| <td style="border: none;"></td> | |||
| @@ -690,6 +695,40 @@ | |||
| </div> | |||
| </div> | |||
| <!-- 我的报名 --> | |||
| <div class="fl supplyTable" id="applicationInformation" style="display: none;"> | |||
| <script id="applicationInformationData" type="text/html"> | |||
| <tr> | |||
| <td>序号</td> | |||
| <td>项目名称</td> | |||
| <td>报名是否成功</td> | |||
| <td>竞价开始时间</td> | |||
| <td>竞价结束时间</td> | |||
| <td>结束倒计时</td> | |||
| <td>操作</td> | |||
| </tr> | |||
| {{each applicationInformationList as value i}} | |||
| <tr> | |||
| <td>{{i+1}}</td> | |||
| <td>{{value.projectName}}</td> | |||
| <td>{{value.depositStatus=='1'?'成功':'失败'}}</td> | |||
| <td>{{value.biddingStartTime}}</td> | |||
| <td>{{value.biddingStopTime}}</td> | |||
| <td>{{value.biddingStopTime}}</td> | |||
| <td> | |||
| <input type="button" value="查看详情" onclick="goProject({{value.projectId}})" class="iWanna"/> | |||
| </td> | |||
| </tr> | |||
| {{/each}} | |||
| </script> | |||
| <table width="100%" cellspacing="0" cellpadding="0" id="applicationInformationContent"></table> | |||
| <div class="pageNum" id="applicationNum"> | |||
| <div style="display: inline-block;margin: 0 auto;" class="page_s4"></div> | |||
| <p style="display: inline-block;margin: 0 auto;" id="page_s4"></p> | |||
| </div> | |||
| </div> | |||
| <div class="clear"></div> | |||
| <div class="dialog" id="dialog-01"> | |||