网站
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 

1119 строки
54 KiB

  1. /**
  2. * Created by Administrator on 2021/4/5.
  3. */
  4. define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function ($, template, Tools ,Swiper) {
  5. //数据存储
  6. var module = {
  7. data: {
  8. //焦点图数据
  9. focusListTop: [],
  10. showImgInformationDetail:'',
  11. loginNow:'',
  12. isFirst:'',
  13. timer:null,
  14. timer2:null,
  15. biddinglistInformationDetailLength:-1,
  16. biddingTimeType:0,
  17. biddinglistInformationDetail:[],
  18. timeConfig:0.00
  19. },
  20. };
  21. var tools = new Tools();
  22. module.init = function (page) {
  23. //获取焦点图信息
  24. tools.doGet(websitePicture, {picType:1,status:0,orderByColumn:'picSort',isAsc:'desc'}, module.focusNewsTop , true);
  25. //底部友情链接
  26. tools.doGet(friendsLinks, {}, module.bottomFriendsLinks, true);
  27. //网站配置信息(网站名称 底部联系方式 公安备案号 网站备案号)
  28. tools.getWebConfig();
  29. module.data.loginNow = tools.getCookie('Admin-Token');
  30. //浏览次数
  31. tools.doGet(outProject, {id:getQueryVariable('id')}, module.projectNum,true);
  32. setTimeout(function(){//项目基本信息
  33. tools.doGet(outProject + '/id/'+getQueryVariable('id'), {}, module.outProjectInformation,true);
  34. },100)
  35. //焦点图
  36. setTimeout(function () {
  37. module.swiperBanner();
  38. },5000)
  39. setTimeout(function(){//项目基本信息
  40. tools.doGet(showImg + '/'+getQueryVariable('id'), {}, module.showImgInformation,true);
  41. },100)
  42. tools.doGet(webConfig, {}, module.webConfigInformation, true)
  43. };
  44. //焦点图数据
  45. module.focusNewsTop = function (data) {
  46. if (data.code == 200) {
  47. let focusArray = [];
  48. if(data.data.length<1){
  49. focusArray.push({
  50. picUrl:'../../../static/images/banner1.png'
  51. },{
  52. picUrl:'../../../static/images/banner2.png'
  53. },{
  54. picUrl:'../../../static/images/banner3.png'
  55. })
  56. }else{
  57. data.data.forEach(res=>{
  58. focusArray.push({
  59. picUrl:'/api'+res.picUrl
  60. })
  61. })
  62. }
  63. module.data.focusListTop = focusArray;
  64. var bannerFocusDataTop = template('bannerFocusDataTop', module.data);
  65. $("#bannerFocusTopContent").html(bannerFocusDataTop);
  66. new Swiper('#bannerFocusWrapTop', {
  67. paginationClickable: true,
  68. autoplay : 4000,
  69. loop:true
  70. })
  71. }
  72. }
  73. //获取地址栏参数
  74. function getQueryVariable(variable){
  75. var query = window.location.search.substring(1);
  76. var vars = query.split("&");
  77. for (var i=0;i<vars.length;i++) {
  78. var pair = vars[i].split("=");
  79. if(pair[0] == variable){return pair[1];}
  80. }
  81. return(false);
  82. }
  83. //网站配置信息
  84. module.webConfigInformation = function (data) {
  85. if (data.code == 200) {
  86. var content = data.data;
  87. console.log(content)
  88. //document.getElementById('time').innerHTML = '延时周期:'+content[8].configValue+content[8].remark+'<i class="wh">?</i>'
  89. module.data.timeConfig = parseFloat(content[8].configValue);
  90. module.data.titleConfig = content[9].configValue;
  91. module.data.importantTitle = content[7].configName+':'+ content[7].configValue.substr(3).substr(0,(content[7].configValue.substr(3).length-4));
  92. module.data.know = content[6].configValue;
  93. $("#know").html(content[6].configValue);
  94. // + '<span style="margin-left: 10px;"></span>' + content[6].configValue
  95. }
  96. }
  97. //底部友情链接
  98. module.bottomFriendsLinks = function (data) {
  99. if (data.code == 200) {
  100. var content = data.data;
  101. console.log(content)
  102. module.data.friendsLinksList = content;
  103. var friendsLinksData = template('friendsLinksData', module.data);
  104. $("#friendsLinksContent").html(friendsLinksData);
  105. }
  106. }
  107. var t = 3;
  108. module.dataCompare = function(signupStartTime,signupStopTime,biddingStartTime,biddingStopTime){
  109. // console.log('aaaaaaaaaaa')
  110. var signupStartTime = signupStartTime;
  111. var signupStopTime = signupStopTime;
  112. var biddingStartTime = biddingStartTime;
  113. var biddingStopTime = biddingStopTime;
  114. var nowTime = Date.parse(new Date($.ajax({type:'HEAD',async:false,data:{i: Date.parse(new Date())}}).getResponseHeader("Date")));
  115. // console.log(new Date($.ajax({type:'HEAD',async:false,data:{i: Date.parse(new Date())}}).getResponseHeader("Date")))
  116. var beginTimes=signupStartTime.substring(0,10).split('-');
  117. var endTimes=signupStopTime.substring(0,10).split('-');
  118. var biddingBeginTimes=biddingStartTime.substring(0,10).split('-');
  119. var biddingEndTimes=biddingStopTime.substring(0,10).split('-');
  120. signupStartTime=beginTimes[1]+'/'+beginTimes[2]+'/'+beginTimes[0]+' '+signupStartTime.substring(10,19);
  121. signupStopTime=endTimes[1]+'/'+endTimes[2]+'/'+endTimes[0]+' '+signupStopTime.substring(10,19);
  122. biddingStartTime=biddingBeginTimes[1]+'/'+biddingBeginTimes[2]+'/'+biddingBeginTimes[0]+' '+biddingStartTime.substring(10,19);
  123. biddingStopTime=biddingEndTimes[1]+'/'+biddingEndTimes[2]+'/'+biddingEndTimes[0]+' '+biddingStopTime.substring(10,19);
  124. //时间差
  125. var leftTime = Date.parse(biddingStopTime)-nowTime;
  126. //报名开始时间差
  127. var signupLeftTime = Date.parse(signupStartTime)-nowTime;
  128. //报名结束时间差
  129. var signDownLeftTime = Date.parse(signupStopTime)-nowTime;
  130. //定义变量 d,h,m,s保存倒计时的时间
  131. var d,h,m,s;
  132. if(Date.parse(biddingStartTime)<nowTime&&nowTime<Date.parse(biddingStopTime)){
  133. //正在竞价
  134. // console.log('正在竞价')
  135. module.data.biddingTimeType = 1;
  136. if(module.data.outProjectInformationDetail.biddingType == '自由竞价'){
  137. document.getElementById('biddingTable').style.display = 'none';
  138. document.getElementById('biddingTitle').style.display = 'block';
  139. document.getElementById('biddingTitle').innerHTML = '竞价进行中...';
  140. }
  141. // document.getElementById('swiperType').style.display = 'block';
  142. d = Math.floor(leftTime/1000/60/60/24);
  143. h = Math.floor(leftTime/1000/60/60%24);
  144. m = Math.floor(leftTime/1000/60%60);
  145. s = Math.floor(leftTime/1000%60);
  146. // console.log('<span>距竞价结束还有:'+d+'</span>天<span>'+h+'</span>时<span>'+m+'</span>分<span>'+s+'</span>秒')
  147. $('#countType').html('竞价中')
  148. $('#countDown').html('<span>距竞价结束还有:'+d+'</span>天<span>'+h+'</span>时<span>'+m+'</span>分<span>'+s+'</span>秒')
  149. if(module.data.outProjectInformationDetail.biddingType != '自由竞价' && module.data.biddingTimeType != 2){
  150. document.getElementById('showNowMoney').style.display = 'table-row';
  151. var timName = document.getElementById('timeDown');
  152. if(timName) {
  153. document.getElementById('timeDown').style.display = 'inline-block';
  154. timName.innerHTML = t + '<b style="color: #666666">秒后自动刷新</b>';
  155. }
  156. t--;
  157. if (t < 0) {
  158. t = 3;
  159. tools.doGet(biddinglist, {projectId: getQueryVariable('id')}, module.biddinglistInformation, true);
  160. }
  161. }
  162. }else if (nowTime>Date.parse(biddingStopTime)){
  163. //竞价结束
  164. $('#countType').html('')
  165. $('#countDown').html('竞价结束')
  166. // document.getElementById('swiperType').style.display = 'none';
  167. document.getElementById('biddingTable').style.display = 'table';
  168. document.getElementById('biddingTitle').style.display = 'none';
  169. module.data.biddingTimeType = 2;
  170. }else if (nowTime<Date.parse(biddingStartTime)){
  171. leftTime = Date.parse(biddingStartTime)-nowTime;
  172. d = Math.floor(leftTime/1000/60/60/24);
  173. h = Math.floor(leftTime/1000/60/60%24);
  174. m = Math.floor(leftTime/1000/60%60);
  175. s = Math.floor(leftTime/1000%60);
  176. $('#countType').html('未开始')
  177. $('#countDown').html('<span>距竞价开始还有:'+d+'</span>天<span>'+h+'</span>时<span>'+m+'</span>分<span>'+s+'</span>秒')
  178. //竞价暂未开始
  179. document.getElementById('biddingTitle').innerHTML = '竞价暂未开始...';
  180. module.data.biddingTimeType = 3;
  181. }
  182. if(Date.parse(signupStartTime)<nowTime&&nowTime<Date.parse(signupStopTime)){
  183. //正在报名
  184. module.data.signupTimeType = 1;
  185. // document.getElementById('swiperType').style.display = 'block';
  186. d = Math.floor(signDownLeftTime/1000/60/60/24);
  187. h = Math.floor(signDownLeftTime/1000/60/60%24);
  188. m = Math.floor(signDownLeftTime/1000/60%60);
  189. s = Math.floor(signDownLeftTime/1000%60);
  190. $('#countType').html('报名中')
  191. $('#countDown').html('<span>距报名结束还有:'+d+'</span>天<span>'+h+'</span>时<span>'+m+'</span>分<span>'+s+'</span>秒')
  192. }else if (nowTime>Date.parse(signupStopTime)){
  193. //报名结束
  194. module.data.signupTimeType = 2;
  195. }else if (nowTime<Date.parse(signupStartTime)){
  196. //报名暂未开始
  197. module.data.signupTimeType = 3;
  198. d = Math.floor(signupLeftTime/1000/60/60/24);
  199. h = Math.floor(signupLeftTime/1000/60/60%24);
  200. m = Math.floor(signupLeftTime/1000/60%60);
  201. s = Math.floor(signupLeftTime/1000%60);
  202. $('#countType').html('未开始')
  203. $('#countDown').html('<span>距报名开始还有:'+d+'</span>天<span>'+h+'</span>时<span>'+m+'</span>分<span>'+s+'</span>秒')
  204. }
  205. //moneyText:出价输入框
  206. //moneyBtn:出价按钮
  207. //signYes:已报名显示文字
  208. //signNo:未报名显示文字
  209. //signBtn:已登录但未报名跳转报名按钮
  210. //signBtn2:未登录跳转登录按钮
  211. //noAction:未开始显示文字
  212. if(module.data.loginNow){ //判断是否登录(已登录)
  213. if(module.data.signup == 1){ //判断是否报名(已报名)
  214. if( module.data.biddingTimeType == 1 ){ //判断当前竞价状态(竞价中)
  215. document.getElementById('signYes').style.display = 'none';
  216. document.getElementById('signNo').style.display = 'none';
  217. document.getElementById('signBtn').style.display = 'none';
  218. document.getElementById('signBtn2').style.display = 'none';
  219. document.getElementById('noAction').style.display = 'none';
  220. document.getElementById('moneyText').style.display = 'table-row';
  221. document.getElementById('moneyBtn').style.display = 'flex';
  222. }else if( module.data.biddingTimeType == 3 ){ //判断当前竞价状态(竞价未开始)
  223. document.getElementById('moneyText').style.display = 'none';
  224. document.getElementById('moneyBtn').style.display = 'none';
  225. document.getElementById('signNo').style.display = 'none';
  226. document.getElementById('signBtn').style.display = 'none';
  227. document.getElementById('signBtn2').style.display = 'none';
  228. document.getElementById('noAction').style.display = 'none';
  229. document.getElementById('signYes').style.display = 'block';
  230. }else{ //判断当前竞价状态(竞价结束)
  231. $('.swiperInput').css('display','none');
  232. $('#timeDown').css('display','none');
  233. clearInterval(module.data.timeDown)
  234. }
  235. }else{ //判断是否报名(未报名)
  236. if( module.data.signupTimeType == 1 ){ //判断当前报名状态(正在报名)
  237. document.getElementById('moneyText').style.display = 'none';
  238. document.getElementById('moneyBtn').style.display = 'none';
  239. document.getElementById('signNo').style.display = 'none';
  240. document.getElementById('signBtn2').style.display = 'none';
  241. document.getElementById('noAction').style.display = 'none';
  242. document.getElementById('signYes').style.display = 'none';
  243. document.getElementById('signBtn').style.display = 'block';
  244. }else if( module.data.signupTimeType == 3 ){ //判断当前报名状态(报名未开始)
  245. document.getElementById('moneyText').style.display = 'none';
  246. document.getElementById('moneyBtn').style.display = 'none';
  247. document.getElementById('signBtn2').style.display = 'none';
  248. document.getElementById('signYes').style.display = 'none';
  249. document.getElementById('signBtn').style.display = 'none';
  250. document.getElementById('signNo').style.display = 'none';
  251. document.getElementById('noAction').style.display = 'block';
  252. }else{ //判断当前报名状态(报名结束)
  253. document.getElementById('moneyText').style.display = 'none';
  254. document.getElementById('moneyBtn').style.display = 'none';
  255. document.getElementById('signBtn2').style.display = 'none';
  256. document.getElementById('noAction').style.display = 'none';
  257. document.getElementById('signYes').style.display = 'none';
  258. document.getElementById('signBtn').style.display = 'none';
  259. document.getElementById('signNo').style.display = 'block';
  260. }
  261. }
  262. }else{ //判断是否登录(未登录)
  263. if( module.data.biddingTimeType == 2 ){//判断当前竞价状态(竞价结束)
  264. $('.swiperInput').css('display','none')
  265. }else{
  266. document.getElementById('signBtn2').style.display = 'block';
  267. }
  268. }
  269. if(module.data.outProjectInformationDetail.biddingType != '自由竞价' && module.data.biddingTimeType != 2){
  270. document.getElementById('biddingTable').style.display = 'table';
  271. document.getElementById('biddingTitle').style.display = 'none';
  272. }
  273. }
  274. module.projectNum = function(data){
  275. console.log(data)
  276. }
  277. module.signup = function(data){
  278. console.log(data)
  279. module.data.signup = data.data;
  280. module.data.isFirst = data.signup.isFirst;
  281. var outProjectInformationData = template('outProjectInformationData', module.data);
  282. $("#outProjectInformationContent").html(outProjectInformationData);
  283. }
  284. goBond = function(){
  285. var nowTime = Date.parse(new Date());
  286. var signupStopTime = Date.parse(module.data.outProjectInformationDetail.signupStopTime)
  287. if (nowTime>signupStopTime){
  288. tools.initError('报名已结束!');
  289. return;
  290. }
  291. if (module.data.signHistory == 1){
  292. tools.initError('已报名,请耐心等待审核结果!');
  293. return;
  294. }
  295. tools.doGet(userData, {}, module.userData);
  296. }
  297. module.userData = function(data){
  298. if (data.code == 200) {
  299. var content = data.user;
  300. //console.log(content)
  301. module.data.userId = content.userId;
  302. tools.doGet(userMember + '/' + content.userId, {}, module.userMember);//memberType 1个人 2单位
  303. }
  304. }
  305. module.userMember = function(data){
  306. if (data.code == 200) {
  307. var content = data.data;
  308. if (content.auditStatus == 'Y'){
  309. tools.skip('bond.html?id='+getQueryVariable('id'))
  310. }else{
  311. tools.initError("交易中心审核注册信息后方可进行报名!");
  312. }
  313. }
  314. }
  315. //项目基本信息
  316. module.outProjectInformation = function (data) {
  317. if (data.code == 200) {
  318. var content = data.data;
  319. module.data.biddingStopTime = content.biddingStopTime;
  320. for(var i = 0 ; i < content.fileUrlList.length ; i++){
  321. content.fileUrlList[i].fileUrl = serverApi+content.fileUrlList[i].fileUrl;
  322. }
  323. module.data.outProjectInformationDetail = content;
  324. setTimeout(function(){
  325. var outProjectInformationData = template('outProjectInformationData', module.data);
  326. $("#outProjectInformationContent").html(outProjectInformationData);
  327. // var timName = document.getElementById('timeDown');
  328. // if(timName){
  329. // var t = 3;
  330. //
  331. // module.data.timeDown = setInterval(function(){
  332. // // console.log($('#countType').html())
  333. // // if ($('#countType').html()!='竞价中'){
  334. // // clearInterval(module.data.timeDown)
  335. // // document.getElementById('timeDown').style.display = 'none';
  336. // // return;
  337. // // }
  338. // timName.innerHTML = t+'<b style="color: #666666">秒后自动刷新</b>';
  339. // t--;
  340. // document.getElementById('timeDown').style.display = 'inline-block';
  341. // if(t<0){
  342. // t = 3;
  343. // let biddingStartTime = content.biddingStartTime;
  344. // let biddingStopTime = content.biddingStopTime;
  345. // var nowTime = Date.parse(new Date());
  346. // if(Date.parse(biddingStartTime)<nowTime&&nowTime<Date.parse(biddingStopTime)){
  347. // //正在竞价
  348. // //交易项目竞价记录
  349. // tools.doGet(biddinglist, {projectId:getQueryVariable('id')}, module.biddinglistInformation,true);
  350. // }
  351. // }
  352. // }, 1000)
  353. // }
  354. },2000)
  355. $("#know").html(module.data.know);
  356. //挂牌价格字典
  357. tools.doGet(Dictionaries+'/price_unit', {}, module.unitDictionaries,true);
  358. //经济类型字典
  359. tools.doGet(Dictionaries+'/economic_type', {}, module.economicTypeDictionaries,true);
  360. //项目类型字典
  361. tools.doGet(Dictionaries+'/project_type', {}, module.projectNumberDictionaries,true);
  362. //农地性质字典
  363. // tools.doGet(Dictionaries+'/sub_object_type', {}, module.projectTypeDictionaries,true);
  364. //前次转出方式
  365. tools.doGet(Dictionaries+'/rollout_type', {}, module.oneoutDictionaries,true);
  366. //面积单位字典
  367. tools.doGet(Dictionaries+'/area_unit', {}, module.areaDictionaries,true);
  368. //支付方式字典
  369. tools.doGet(Dictionaries+'/payment_type', {}, module.paymentTypeDictionaries,true);
  370. //缴纳形式字典
  371. tools.doGet(Dictionaries+'/deposit_payment_type', {}, module.depositPaymentTypeDictionaries,true);
  372. //交易方式字典
  373. tools.doGet(Dictionaries+'/deal_type', {}, module.transactionDictionaries,true);
  374. //竞价方式字典
  375. tools.doGet(Dictionaries+'/bidding_type', {}, module.biddingTypeDictionaries,true);
  376. //期满处理字典
  377. tools.doGet(Dictionaries+'/expire_type', {}, module.expireTypeDictionaries,true);
  378. //期满处理字典
  379. tools.doGet(Dictionaries+'/bidding_direct', {}, module.biddingDirectDictionaries,true);
  380. //交易项目竞价记录
  381. tools.doGet(biddinglist, {projectId:getQueryVariable('id')}, module.biddinglistInformation,true);
  382. //倒计时
  383. module.data.timer = setInterval(function(){
  384. // '2023-05-17 14:56:00'
  385. let signupStartTime = module.data.outProjectInformationDetail.signupStartTime;
  386. let signupStopTime = module.data.outProjectInformationDetail.signupStopTime;
  387. let biddingStartTime = module.data.outProjectInformationDetail.biddingStartTime;
  388. let biddingStopTime = module.data.outProjectInformationDetail.biddingStopTime;
  389. var nowTime = Date.parse(new Date($.ajax({type:'HEAD',async:false,data:{i: Date.parse(new Date())}}).getResponseHeader("Date")));
  390. var difference = Date.parse(biddingStopTime)-nowTime;
  391. // var centerTime = module.data.timeConfig * 60 * 1000
  392. var centerTime = content.delayPeriod * 1000
  393. if ( 0 <= difference&&difference <= centerTime){
  394. // console.log("竞价最后两分钟")
  395. //正在竞价
  396. var m,s;
  397. if(module.data.outProjectInformationDetail.biddingType == '自由竞价'){
  398. document.getElementById('biddingTable').style.display = 'none';
  399. document.getElementById('biddingTitle').style.display = 'block';
  400. document.getElementById('biddingTitle').innerHTML = '竞价进行中...';
  401. }
  402. // document.getElementById('swiperType').style.display = 'block';
  403. module.data.biddingTimeType = 1;
  404. m = Math.floor(difference/1000/60%60);
  405. s = Math.floor(difference/1000%60);
  406. $('#countType').html('竞价中')
  407. $('#countDown').html('<span>距竞价结束还有:0</span>天<span>0</span>时<span>'+m+'</span>分<span>'+s+'</span>秒')
  408. if(module.data.loginNow){ //判断是否登录(已登录)
  409. if(module.data.signup == 1){ //判断是否报名(已报名)
  410. if( module.data.biddingTimeType == 1 ){ //判断当前竞价状态(竞价中)
  411. document.getElementById('signYes').style.display = 'none';
  412. document.getElementById('signNo').style.display = 'none';
  413. document.getElementById('signBtn').style.display = 'none';
  414. document.getElementById('signBtn2').style.display = 'none';
  415. document.getElementById('noAction').style.display = 'none';
  416. document.getElementById('moneyText').style.display = 'table-row';
  417. document.getElementById('moneyBtn').style.display = 'flex';
  418. }else if( module.data.biddingTimeType == 3 ){ //判断当前竞价状态(竞价未开始)
  419. document.getElementById('moneyText').style.display = 'none';
  420. document.getElementById('moneyBtn').style.display = 'none';
  421. document.getElementById('signNo').style.display = 'none';
  422. document.getElementById('signBtn').style.display = 'none';
  423. document.getElementById('signBtn2').style.display = 'none';
  424. document.getElementById('noAction').style.display = 'none';
  425. document.getElementById('signYes').style.display = 'block';
  426. }else{ //判断当前竞价状态(竞价结束)
  427. $('.swiperInput').css('display','none');
  428. $('#timeDown').css('display','none');
  429. clearInterval(module.data.timeDown)
  430. }
  431. }else{ //判断是否报名(未报名)
  432. if( module.data.signupTimeType == 1 ){ //判断当前报名状态(正在报名)
  433. document.getElementById('moneyText').style.display = 'none';
  434. document.getElementById('moneyBtn').style.display = 'none';
  435. document.getElementById('signNo').style.display = 'none';
  436. document.getElementById('signBtn2').style.display = 'none';
  437. document.getElementById('noAction').style.display = 'none';
  438. document.getElementById('signYes').style.display = 'none';
  439. document.getElementById('signBtn').style.display = 'block';
  440. }else if( module.data.signupTimeType == 3 ){ //判断当前报名状态(报名未开始)
  441. document.getElementById('moneyText').style.display = 'none';
  442. document.getElementById('moneyBtn').style.display = 'none';
  443. document.getElementById('signBtn2').style.display = 'none';
  444. document.getElementById('signYes').style.display = 'none';
  445. document.getElementById('signBtn').style.display = 'none';
  446. document.getElementById('signNo').style.display = 'none';
  447. document.getElementById('noAction').style.display = 'block';
  448. }else{ //判断当前报名状态(报名结束)
  449. document.getElementById('moneyText').style.display = 'none';
  450. document.getElementById('moneyBtn').style.display = 'none';
  451. document.getElementById('signBtn2').style.display = 'none';
  452. document.getElementById('noAction').style.display = 'none';
  453. document.getElementById('signYes').style.display = 'none';
  454. document.getElementById('signBtn').style.display = 'none';
  455. document.getElementById('signNo').style.display = 'block';
  456. }
  457. }
  458. }else{ //判断是否登录(未登录)
  459. if( module.data.biddingTimeType == 2 ){//判断当前竞价状态(竞价结束)
  460. $('.swiperInput').css('display','none')
  461. }else{
  462. document.getElementById('signBtn2').style.display = 'block';
  463. }
  464. }
  465. console.log(s+'-------------'+m)
  466. if (s < 1 && m < 1){
  467. console.log("竞价结束22222222222")
  468. tools.doGet(getBiddingStopTime+getQueryVariable('id'), {}, function(data){
  469. if (data.code == 200) {
  470. var nowDate = Date.parse(new Date($.ajax({type:'HEAD',async:false,data:{i: Date.parse(new Date())}}).getResponseHeader("Date")));
  471. module.data.outProjectInformationDetail.biddingStopTime = data.data
  472. let timeNew = Date.parse(data.data) + 0 - nowDate;
  473. if (timeNew > 0) {
  474. module.data.outProjectInformationDetail.biddingStopTime = data.data;
  475. // module.dataCompare(signupStartTime,signupStopTime,biddingStartTime,data.data);
  476. }else{
  477. $('#countType').html('')
  478. $('#countDown').html('竞价结束')
  479. // document.getElementById('swiperType').style.display = 'none';
  480. document.getElementById('biddingTable').style.display = 'table';
  481. document.getElementById('biddingTitle').style.display = 'none';
  482. module.data.biddingTimeType = 2;
  483. return;
  484. }
  485. }
  486. },true);
  487. }else if(s%2 == 0&&centerTime!=0){
  488. tools.doGet(getBiddingStopTime+getQueryVariable('id'), {}, module.getBiddingStopTime,true);
  489. }
  490. }else{
  491. if (!signupStartTime){console.log('缺失报名开始时间');return;}
  492. if (!signupStopTime){console.log('缺失报名结束时间');return;}
  493. if (!biddingStartTime){console.log('缺失竞价开始时间');return;}
  494. if (!biddingStopTime){console.log('缺失竞价结束时间');return;}
  495. module.dataCompare(signupStartTime,signupStopTime,biddingStartTime,biddingStopTime);
  496. }
  497. if(module.data.outProjectInformationDetail.biddingType == '自由竞价' && module.data.biddingTimeType != 2){
  498. document.getElementById('biddingTable').style.display = 'none';
  499. document.getElementById('biddingTitle').style.display = 'block';
  500. }
  501. },1000)
  502. //倒计时
  503. // module.data.timer2 = setInterval(function(){
  504. // //交易项目竞价记录
  505. // tools.doGet(biddinglist, {projectId:getQueryVariable('id')}, module.biddinglistInformationNew,true);
  506. //
  507. // },10000)
  508. if(module.data.loginNow){
  509. //判断是否报名
  510. tools.doGet(signup, {projectId:getQueryVariable('id'),depositStatus:'1',memberId:tools.getCookie('memberId')}, module.signup);
  511. tools.doGet(signup, {projectId:getQueryVariable('id'),memberId:tools.getCookie('memberId')}, module.signup2);
  512. }
  513. }
  514. }
  515. module.getBiddingStopTime = function(data){
  516. if (data.code == 200) {
  517. $('#stopTime').html(data.data)
  518. module.data.outProjectInformationDetail.biddingStopTime = data.data
  519. }
  520. }
  521. module.signup2 = function(data){
  522. if (data.code == 200) {
  523. module.data.signHistory = data.data
  524. }
  525. }
  526. //标的物图片
  527. module.showImgInformation = function (data) {
  528. if (data.code == 200) {
  529. var content = data.data;
  530. console.log(content)
  531. var contentList = [];
  532. for(var i = 0 ; i < content.length ; i++){
  533. contentList[i] = serverApi+content[i].fileUrl;
  534. }
  535. module.data.showImgInformationDetail = contentList;
  536. console.log(contentList)
  537. var showImgInformationData = template('showImgInformationData', module.data);
  538. $("#tabDetail2").html(showImgInformationData);
  539. }
  540. }
  541. //竞价记录
  542. module.biddinglistInformation = function (data) {
  543. if (data.code == 200) {
  544. var content = data.rows;
  545. if (content.length>0){
  546. console.log('abccba')
  547. $("#nowMoneyBlock").html('<span id="nowMoney">'+content[0].money+'</span> 元');
  548. }else{
  549. $("#nowMoneyBlock").html('暂无出价');
  550. }
  551. if(module.data.biddinglistInformationDetailLength == content.length){
  552. return;
  553. }
  554. console.log(module.data.outProjectInformationDetail.biddingDirect)
  555. console.log(module.data.outProjectInformationDetail.biddingType)
  556. setTimeout(function(){
  557. if(module.data.outProjectInformationDetail.biddingType == '阶梯竞价'||module.data.outProjectInformationDetail.biddingType == '2'){
  558. if (module.data.outProjectInformationDetail.biddingDirect == '反向竞价'||module.data.outProjectInformationDetail.biddingDirect == '2'){
  559. if (content.length>0){
  560. let money = $('#money').val()?$('#money').val():content[0].money
  561. if(content[0].money<=money) {
  562. document.getElementById('money').value = parseFloat(parseFloat(content[0].money) - parseFloat(module.data.outProjectInformationDetail.ladderPrice)).toFixed(2);
  563. }
  564. }else{
  565. document.getElementById('money').value = parseFloat(parseFloat(module.data.outProjectInformationDetail.price)).toFixed(2);
  566. // + parseFloat(module.data.outProjectInformationDetail.ladderPrice)
  567. }
  568. }else{
  569. if (content.length>0){
  570. let money = $('#money').val()?$('#money').val():content[0].money
  571. if(content[0].money>=money){
  572. document.getElementById('money').value = parseFloat(parseFloat(content[0].money) + parseFloat(module.data.outProjectInformationDetail.ladderPrice)).toFixed(2);
  573. }
  574. }else{
  575. document.getElementById('money').value = parseFloat(parseFloat(module.data.outProjectInformationDetail.price)).toFixed(2);
  576. // + parseFloat(module.data.outProjectInformationDetail.ladderPrice)
  577. }
  578. }
  579. }
  580. },2000)
  581. module.data.biddinglistInformationDetail = content;
  582. module.data.biddinglistInformationDetailLength = content.length;
  583. var biddinglistInformationData = template('biddinglistInformationData', module.data);
  584. $("#tabDetail4").html(biddinglistInformationData);
  585. if (content.length>0){
  586. console.log('abccba')
  587. $("#nowMoneyBlock").html('<span id="nowMoney">'+content[0].money+'</span> 元');}
  588. }
  589. }
  590. //竞价记录
  591. module.biddinglistInformationNew = function (data) {
  592. if (data.code == 200) {
  593. var content = data.rows;
  594. console.log(module.data.biddinglistInformationDetail.length+'----------------------'+content.length)
  595. if (module.data.biddinglistInformationDetailLength<content.length){
  596. let time = new Date(Date.parse(new Date())+(2 * 60 * 1000));
  597. const Y = time.getFullYear()
  598. const M = time.getMonth() + 1 < 10 ? '0'+(time.getMonth()+1) : time.getMonth()+1
  599. const D = time.getDate()
  600. const H = time.getHours() // 小时
  601. const m = time.getMinutes() // 分钟
  602. const S = time.getSeconds() // 秒
  603. module.data.biddingStopTime = Y+'-'+M+'-'+D+' '+H+':'+m+':'+S;
  604. module.data.biddinglistInformationDetailLength = content.length;
  605. }
  606. }
  607. }
  608. //焦点图滚动
  609. module.swiperBanner = function (type) {
  610. console.log('aaaa')
  611. var viewSwiper = new Swiper('.view .swiper-container', {
  612. onSlideChangeStart: function() {
  613. updateNavPosition()
  614. }
  615. })
  616. $('.view .arrow-left,.preview .arrow-left').on('click', function(e) {
  617. console.log('abc')
  618. e.preventDefault()
  619. if (viewSwiper.activeIndex == 0) {
  620. viewSwiper.swipeTo(viewSwiper.slides.length - 1, 1000);
  621. return
  622. }
  623. viewSwiper.swipePrev()
  624. })
  625. $('.view .arrow-right,.preview .arrow-right').on('click', function(e) {
  626. console.log('abc')
  627. e.preventDefault()
  628. if (viewSwiper.activeIndex == viewSwiper.slides.length - 1) {
  629. viewSwiper.swipeTo(0, 1000);
  630. return
  631. }
  632. viewSwiper.swipeNext()
  633. })
  634. var previewSwiper = new Swiper('.preview .swiper-container', {
  635. visibilityFullFit: true,
  636. slidesPerView: 'auto',
  637. onlyExternal: true,
  638. onSlideClick: function() {
  639. viewSwiper.swipeTo(previewSwiper.clickedSlideIndex)
  640. }
  641. })
  642. function updateNavPosition() {
  643. $('.preview .active-nav').removeClass('active-nav')
  644. var activeNav = $('.preview .swiper-slide').eq(viewSwiper.activeIndex).addClass('active-nav')
  645. if (!activeNav.hasClass('swiper-slide-visible')) {
  646. if (activeNav.index() > previewSwiper.activeIndex) {
  647. var thumbsPerNav = Math.floor(previewSwiper.width / activeNav.width()) - 1
  648. previewSwiper.swipeTo(activeNav.index() - thumbsPerNav)
  649. } else {
  650. previewSwiper.swipeTo(activeNav.index())
  651. }
  652. }
  653. }
  654. }
  655. //切换
  656. tabClick = function(type){
  657. //标的物介绍
  658. for (var i = 0 ; i < 4 ; i++){
  659. document.getElementById('tabDetail'+(i+1)).style.display = 'none';
  660. document.getElementById('tab'+(i+1)).classList = '';
  661. }
  662. document.getElementById('tabDetail'+type).style.display = 'block';
  663. document.getElementById('tab'+type).classList = 'active';
  664. }
  665. //挂牌价格
  666. module.unitDictionaries = function (data) {
  667. if (data.code == 200) {
  668. var content = data.data;
  669. var unit = content[(module.data.outProjectInformationDetail.unit-1)].dictLabel;
  670. module.data.outProjectInformationDetail.unit = unit;
  671. var outProjectInformationData = template('outProjectInformationData', module.data);
  672. $("#outProjectInformationContent").html(outProjectInformationData);
  673. }
  674. }
  675. //出价
  676. module.biddingSubmitMethod = function (data2) {
  677. let newMoney;
  678. if (data2.data&&data2.code==200){
  679. console.log(data2)
  680. newMoney = data2.data;
  681. }else{
  682. newMoney = module.data.outProjectInformationDetail.price;
  683. }
  684. if ($('#money').val()<=0){
  685. tools.initError('请正常出价!');
  686. return;
  687. }
  688. if (module.data.outProjectInformationDetail.biddingDirect == '反向竞价'){
  689. //判断用户出价不能高于挂牌价
  690. if(module.data.outProjectInformationDetail.price<$('#money').val()){
  691. tools.initError('出价不能高于挂牌价');
  692. return;
  693. }else{
  694. //判断当前竞价方式
  695. if (module.data.outProjectInformationDetail.biddingType=='阶梯竞价' || module.data.outProjectInformationDetail.biddingType=='公开竞价'){
  696. //判断当前是否有人出价
  697. if (data2.data){
  698. //判断用户出价不能高于当前出价最低价格
  699. if(newMoney <= $('#money').val()){
  700. tools.initError('不能高于当前最低价格!');
  701. return;
  702. }
  703. }
  704. }
  705. }
  706. }else{
  707. if(module.data.outProjectInformationDetail.price>$('#money').val()){
  708. tools.initError('出价不能低于挂牌价');
  709. return;
  710. }else{
  711. //判断当前竞价方式
  712. if (module.data.outProjectInformationDetail.biddingType=='阶梯竞价' || module.data.outProjectInformationDetail.biddingType=='公开竞价'){
  713. //判断当前是否有人出价
  714. if (data2.data){
  715. //判断用户出价不能低于当前出价最高价格
  716. if(newMoney >= $('#money').val()){
  717. tools.initError('不能低于当前最高价格!');
  718. return;
  719. }
  720. }
  721. }
  722. }
  723. }
  724. var data = {};
  725. var projectId = getQueryVariable('id');
  726. var memberId = tools.getCookie('memberId');
  727. var userId = tools.getCookie('userId');
  728. var userAccount = tools.getCookie('phone');
  729. var userName = tools.getCookie('userName');
  730. var money = parseFloat($('#money').val());
  731. var loginTime = Date.now($.ajax({type:'HEAD',async:false,data:{i: Date.parse(new Date())}}).getResponseHeader("Date"));
  732. data['projectId'] = projectId;
  733. data['memberId'] = memberId;
  734. data['userId'] = userId;
  735. data['userAccount'] = userAccount;
  736. data['userName'] = userName;
  737. data['money'] = money;
  738. data['loginTime'] = loginTime;
  739. tools.doPost(biddingSubmit, data, module.biddingSubmitOpen);
  740. }
  741. module.biddingSubmitOpen = function(){
  742. tools.doGet(getBiddingStopTime+getQueryVariable('id'), {}, function(data){
  743. if (data.code == 200) {
  744. var nowDate = Date.parse(new Date($.ajax({type:'HEAD',async:false,data:{i: Date.parse(new Date())}}).getResponseHeader("Date")));
  745. module.data.outProjectInformationDetail.biddingStopTime = data.data
  746. let timeNew = Date.parse(data.data) + 0 - nowDate;
  747. if (timeNew > 0) {
  748. module.data.outProjectInformationDetail.biddingStopTime = data.data;
  749. module.dataCompare(
  750. module.data.outProjectInformationDetail.signupStartTime,
  751. module.data.outProjectInformationDetail.signupStopTime,
  752. module.data.outProjectInformationDetail.biddingStartTime,data.data);
  753. }else{
  754. $('#countType').html('')
  755. $('#countDown').html('竞价结束')
  756. // document.getElementById('swiperType').style.display = 'none';
  757. document.getElementById('biddingTable').style.display = 'table';
  758. document.getElementById('biddingTitle').style.display = 'none';
  759. module.data.biddingTimeType = 2;
  760. return;
  761. }
  762. }
  763. },true);
  764. tools.initError('出价成功');
  765. // $('#money').val(0)
  766. }
  767. //经济类型
  768. module.economicTypeDictionaries = function (data) {
  769. if (data.code == 200 && module.data.outProjectInformationDetail.economicType!='') {
  770. var content = data.data;
  771. if(content[(module.data.outProjectInformationDetail.economicType-1)] != undefined){
  772. var economicType = content[(module.data.outProjectInformationDetail.economicType-1)].dictLabel;
  773. module.data.outProjectInformationDetail.economicType = economicType;
  774. var outProjectInformationData = template('outProjectInformationData', module.data);
  775. $("#outProjectInformationContent").html(outProjectInformationData);
  776. }
  777. }
  778. }
  779. //项目类型
  780. module.projectNumberDictionaries = function (data) {
  781. if (data.code == 200 && module.data.outProjectInformationDetail.projectNumber!='') {
  782. var content = data.data;
  783. var projectNumber = content.filter(function (e) { return e.dictValue == module.data.outProjectInformationDetail.projectNumber; })[0].dictLabel;
  784. module.data.outProjectInformationDetail.projectNumber = projectNumber;
  785. var outProjectInformationData = template('outProjectInformationData', module.data);
  786. $("#outProjectInformationContent").html(outProjectInformationData);
  787. }
  788. }
  789. //农地性质
  790. module.projectTypeDictionaries = function (data) {
  791. if (data.code == 200 && module.data.outProjectInformationDetail.projectType!='') {
  792. var content = data.data;
  793. console.log(content)
  794. console.log((module.data.outProjectInformationDetail.projectType-1))
  795. var projectType = content[(module.data.outProjectInformationDetail.projectType-1)].dictLabel;
  796. module.data.outProjectInformationDetail.projectType = projectType;
  797. var outProjectInformationData = template('outProjectInformationData', module.data);
  798. $("#outProjectInformationContent").html(outProjectInformationData);
  799. }
  800. }
  801. //前次转出方式
  802. module.oneoutDictionaries = function (data) {
  803. if (data.code == 200 && module.data.outProjectInformationDetail.oneout!='') {
  804. var content = data.data;
  805. if(module.data.outProjectInformationDetail.oneout == 0){
  806. module.data.outProjectInformationDetail.oneout = '无';
  807. }else{
  808. var oneout = content[(module.data.outProjectInformationDetail.oneout-1)].dictLabel;
  809. module.data.outProjectInformationDetail.oneout = oneout;
  810. }
  811. var rollout = content[(module.data.outProjectInformationDetail.rollout-1)].dictLabel;
  812. module.data.outProjectInformationDetail.rollout = rollout;
  813. var outProjectInformationData = template('outProjectInformationData', module.data);
  814. $("#outProjectInformationContent").html(outProjectInformationData);
  815. }
  816. }
  817. //面积单位
  818. module.areaDictionaries = function (data) {
  819. if (data.code == 200 && module.data.outProjectInformationDetail.allCountUnit!='') {
  820. var content = data.data;
  821. var allCountUnit = content[(module.data.outProjectInformationDetail.allCountUnit-1)].dictLabel;
  822. module.data.outProjectInformationDetail.allCountUnit = allCountUnit;
  823. if(module.data.outProjectInformationDetail.subjectList.length>0){
  824. for(var i = 0 ; i < module.data.outProjectInformationDetail.subjectList.length ; i++){
  825. module.data.outProjectInformationDetail.subjectList[i].areaUnit = content[(module.data.outProjectInformationDetail.subjectList[i].areaUnit-1)].dictLabel;
  826. }
  827. }
  828. var outProjectInformationData = template('outProjectInformationData', module.data);
  829. $("#outProjectInformationContent").html(outProjectInformationData);
  830. }
  831. }
  832. //支付方式
  833. module.paymentTypeDictionaries = function (data) {
  834. if (data.code == 200 && module.data.outProjectInformationDetail.paymentType!='') {
  835. var content = data.data;
  836. var paymentType = content[(module.data.outProjectInformationDetail.paymentType-1)].dictLabel;
  837. module.data.outProjectInformationDetail.paymentType = paymentType;
  838. var outProjectInformationData = template('outProjectInformationData', module.data);
  839. $("#outProjectInformationContent").html(outProjectInformationData);
  840. }
  841. }
  842. //缴纳形式
  843. module.depositPaymentTypeDictionaries = function (data) {
  844. if (data.code == 200 && module.data.outProjectInformationDetail.depositPaymentType!='') {
  845. var content = data.data;
  846. var depositPaymentType = content[(module.data.outProjectInformationDetail.depositPaymentType-1)].dictLabel;
  847. module.data.outProjectInformationDetail.depositPaymentType = depositPaymentType;
  848. var outProjectInformationData = template('outProjectInformationData', module.data);
  849. $("#outProjectInformationContent").html(outProjectInformationData);
  850. }
  851. }
  852. //交易方式
  853. module.transactionDictionaries = function (data) {
  854. if (data.code == 200 && module.data.outProjectInformationDetail.dealType!='') {
  855. var content = data.data;
  856. var dealType = content[(module.data.outProjectInformationDetail.dealType-1)].dictLabel;
  857. module.data.outProjectInformationDetail.dealType = dealType;
  858. var outProjectInformationData = template('outProjectInformationData', module.data);
  859. $("#outProjectInformationContent").html(outProjectInformationData);
  860. }
  861. }
  862. //竞价方式
  863. module.biddingTypeDictionaries = function (data) {
  864. if (data.code == 200 && module.data.outProjectInformationDetail.biddingType!='') {
  865. var content = data.data;
  866. var biddingType = content[(module.data.outProjectInformationDetail.biddingType-1)].dictLabel;
  867. module.data.outProjectInformationDetail.biddingType = biddingType;
  868. var outProjectInformationData = template('outProjectInformationData', module.data);
  869. $("#outProjectInformationContent").html(outProjectInformationData);
  870. }
  871. }
  872. //系统是否
  873. module.expireTypeDictionaries = function (data) {
  874. if (data.code == 200 && module.data.outProjectInformationDetail.expire!='') {
  875. var content = data.data;
  876. var expire = content[(module.data.outProjectInformationDetail.expire-1)].dictLabel;
  877. module.data.outProjectInformationDetail.expire = expire;
  878. var outProjectInformationData = template('outProjectInformationData', module.data);
  879. $("#outProjectInformationContent").html(outProjectInformationData);
  880. }
  881. }
  882. //系统是否
  883. module.biddingDirectDictionaries = function (data) {
  884. if (data.code == 200 && module.data.outProjectInformationDetail.biddingDirect!='') {
  885. var content = data.data;
  886. var biddingDirect = content[(module.data.outProjectInformationDetail.biddingDirect-1)].dictLabel;
  887. module.data.outProjectInformationDetail.biddingDirect = biddingDirect;
  888. var outProjectInformationData = template('outProjectInformationData', module.data);
  889. $("#outProjectInformationContent").html(outProjectInformationData);
  890. }
  891. }
  892. changeProMoney = function(){
  893. tools.doGet(projectNewBidMoney+getQueryVariable('id'), {}, module.biddingSubmitMethod);
  894. }
  895. changeProMoneyFirst = function(){
  896. tools.doGet(projectNewBidMoney+getQueryVariable('id'), {}, module.biddingSubmitMethodFirst);
  897. }
  898. module.biddingSubmitMethodFirst = function (data) {
  899. if (data.code == 200) {
  900. let newMoney;
  901. if (data.data){
  902. newMoney = data.data;
  903. }else{
  904. newMoney = module.data.outProjectInformationDetail.price;
  905. }
  906. console.log(newMoney);
  907. var data = {};
  908. var projectId = getQueryVariable('id');
  909. var memberId = tools.getCookie('memberId');
  910. var userId = tools.getCookie('userId');
  911. var userAccount = tools.getCookie('phone');
  912. var userName = tools.getCookie('userName');
  913. var money = parseFloat(newMoney);
  914. // var loginTime = tools.getNowFormatDate();
  915. var loginTime = Date.now($.ajax({type:'HEAD',async:false,data:{i: Date.parse(new Date())}}).getResponseHeader("Date"));
  916. data['projectId'] = projectId;
  917. data['memberId'] = memberId;
  918. data['userId'] = userId;
  919. data['userAccount'] = userAccount;
  920. data['userName'] = userName;
  921. data['money'] = money;
  922. data['loginTime'] = loginTime;
  923. tools.doPost(biddingSubmit, data, module.biddingSubmitOpen);
  924. }
  925. }
  926. //向上加价
  927. upMoney = function(){
  928. if (module.data.outProjectInformationDetail.biddingDirect == '反向竞价'){
  929. if (module.data.biddinglistInformationDetail.length<1){
  930. if(module.data.outProjectInformationDetail.price <= $('#money').val()){
  931. tools.initError('出价不能高于挂牌价格');
  932. return;
  933. }
  934. }else{
  935. if(module.data.biddinglistInformationDetail[0].money <= (parseFloat($('#money').val())+parseFloat(module.data.outProjectInformationDetail.ladderPrice)).toFixed(2)){
  936. tools.initError('出价不能高于当前出价最低价格');
  937. return;
  938. }
  939. }
  940. }else{
  941. if (module.data.biddinglistInformationDetail.length<1){
  942. if(module.data.outProjectInformationDetail.price>$('#money').val()){
  943. tools.initError('出价不能低于挂牌价格');
  944. return;
  945. }
  946. }else{
  947. if(module.data.biddinglistInformationDetail[0].money>=$('#money').val()){
  948. tools.initError('出价不能低于当前出价最高价格');
  949. return;
  950. }
  951. }
  952. }
  953. $('#money').val() == null||$('#money').val() == ''?$('#money').val(0):'';
  954. console.log($('#money').val())
  955. module.data.outProjectInformationDetail.ladderPrice?$('#money').val((parseFloat($('#money').val())+parseFloat(module.data.outProjectInformationDetail.ladderPrice)).toFixed(2)):document.getElementById('money').value += 1
  956. }
  957. //向下降价
  958. downMoney = function(){
  959. if (module.data.outProjectInformationDetail.biddingDirect == '反向竞价'){
  960. if (module.data.biddinglistInformationDetail.length<1){
  961. if(module.data.outProjectInformationDetail.price<$('#money').val()){
  962. tools.initError('出价不能高于挂牌价格');
  963. return;
  964. }
  965. }else{
  966. if(module.data.biddinglistInformationDetail[0].money<$('#money').val()){
  967. tools.initError('出价不能高于当前出价最低价格');
  968. return;
  969. }
  970. }
  971. }else{
  972. if (module.data.biddinglistInformationDetail.length<1){
  973. if(module.data.outProjectInformationDetail.price>=$('#money').val()){
  974. tools.initError('出价不能低于挂牌价格');
  975. return;
  976. }
  977. }else{
  978. if(module.data.biddinglistInformationDetail[0].money>=(parseFloat($('#money').val())-parseFloat(module.data.outProjectInformationDetail.ladderPrice)).toFixed(2)){
  979. tools.initError('出价不能低于当前出价最高价格');
  980. return;
  981. }
  982. }
  983. }
  984. $('#money').val() == null?$('#money').val(0):'';
  985. if ($('#money').val() == 0)return;
  986. module.data.outProjectInformationDetail.ladderPrice?$('#money').val((parseFloat($('#money').val())-parseFloat(module.data.outProjectInformationDetail.ladderPrice)).toFixed(2)):document.getElementById('money').value -= 1
  987. }
  988. moneyChange = function(){
  989. if (module.data.outProjectInformationDetail.biddingDirect == '反向竞价'){
  990. if(module.data.outProjectInformationDetail.price<$('#money').val()){
  991. $('#money').val(module.data.outProjectInformationDetail.price-1);
  992. }
  993. }
  994. }
  995. //登陆跳转
  996. goLogin = function(){
  997. tools.initDialog('登陆提示', '登陆后可参与竞价,是否登录?', function () {
  998. tools.skip('../login/login.html')
  999. }, '登录', function () { }, "取消")
  1000. }
  1001. return module;
  1002. });