网站
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 
 

437 řádky
23 KiB

  1. /**
  2. * Created by Administrator on 2021/4/5.
  3. */
  4. define(['jquery', "template", "Tools", "biddingApi", "itemsApi"], function ($, template, Tools ) {
  5. //数据存储
  6. var module = {
  7. data: {
  8. timeArray: {
  9. d: '',
  10. h: '',
  11. m: '',
  12. s: '',
  13. },
  14. timer:null,
  15. setimer:null,
  16. outProjectInformationDetail:{}
  17. },
  18. };
  19. var tools = new Tools();
  20. module.init = function (page) {
  21. tools.doGet(outProject + '/id/'+getQueryVariable('id'), {}, module.outProjectInformation,true);
  22. tools.doGet(webConfig, {}, module.webConfigInformation, true)
  23. $("#nowDateNYR").html(new Date().getFullYear()+'.'+(new Date().getMonth()+1)+'.'+new Date().getDate())
  24. setInterval(function () {
  25. $("#nowDateSFM").html(new Date().toLocaleTimeString());
  26. $("#nowTime").html('服务器时间:'+new Date().getFullYear()+'.'+(new Date().getMonth()+1)+'.'+new Date().getDate()+' '+new Date().toLocaleTimeString());
  27. },1000)
  28. tools.doGet(outProject + '/id/'+getQueryVariable('id'), {}, module.outProjectInformation,true);
  29. if (getQueryVariable('type') == 'Y'){
  30. setInterval(function (){
  31. tools.doGet(biddinglist, {projectId:getQueryVariable('id')}, module.biddinglistInformation,true);
  32. tools.doGet(outProject + '/id/'+getQueryVariable('id'), {}, module.outProjectInformation2,true);
  33. },5000)
  34. }
  35. };
  36. //获取地址栏参数
  37. function getQueryVariable(variable){
  38. var query = window.location.search.substring(1);
  39. var vars = query.split("&");
  40. for (var i=0;i<vars.length;i++) {
  41. var pair = vars[i].split("=");
  42. if(pair[0] == variable){return pair[1];}
  43. }
  44. return(false);
  45. }
  46. //获取地址栏参数
  47. rechSelect = function (){
  48. tools.doGet(outProject + '/id/'+getQueryVariable('id'), {}, module.outProjectInformation,true);
  49. }
  50. //项目基本信息
  51. module.outProjectInformation = function (data) {
  52. if (data.code == 200) {
  53. var content = data.data;
  54. module.data.outProjectInformationDetail = content;
  55. // var outProjectInformationData = template('outProjectInformationData', module.data);
  56. // $("#outProjectInformationContent").html(outProjectInformationData);
  57. //挂牌价格字典
  58. tools.doGet(Dictionaries+'/price_unit', {}, (data)=>{
  59. if (data.code == 200) {
  60. var unit = eval(data.data).filter(function (e) { return e.dictValue == content.unit;})[0].dictLabel;
  61. module.data.outProjectInformationDetail.unit = unit;
  62. var outProjectInformationData = template('outProjectInformationData', module.data);
  63. $("#outProjectInformationContent").html(outProjectInformationData);
  64. var outProjectInformationData2 = template('outProjectInformationData2', module.data);
  65. $("#outProjectInformationContent2").html(outProjectInformationData2);
  66. }
  67. },true);
  68. //竞价方式字典
  69. tools.doGet(Dictionaries+'/bidding_type', {}, (data)=>{
  70. if (data.code == 200) {
  71. var biddingType = eval(data.data).filter(function (e) { return e.dictValue == content.biddingType;})[0].dictLabel;
  72. module.data.outProjectInformationDetail.biddingType = biddingType;
  73. var outProjectInformationData = template('outProjectInformationData', module.data);
  74. $("#outProjectInformationContent").html(outProjectInformationData);
  75. var outProjectInformationData2 = template('outProjectInformationData2', module.data);
  76. $("#outProjectInformationContent2").html(outProjectInformationData2);
  77. }
  78. },true);
  79. //期满处理字典
  80. tools.doGet(Dictionaries+'/bidding_direct', {}, (data)=>{
  81. if (data.code == 200) {
  82. var biddingDirect = eval(data.data).filter(function (e) { return e.dictValue == content.biddingDirect;})[0].dictLabel;
  83. module.data.outProjectInformationDetail.biddingDirect = biddingDirect;
  84. var outProjectInformationData = template('outProjectInformationData', module.data);
  85. $("#outProjectInformationContent").html(outProjectInformationData);
  86. var outProjectInformationData2 = template('outProjectInformationData2', module.data);
  87. $("#outProjectInformationContent2").html(outProjectInformationData2);
  88. }
  89. },true);
  90. //交易项目竞价记录
  91. tools.doGet(biddinglist, {projectId:getQueryVariable('id')}, module.biddinglistInformation,true);
  92. //倒计时
  93. module.data.timer = setInterval(function(){
  94. module.dataCompare(content.signupStartTime,content.signupStopTime,content.biddingStartTime,content.biddingStopSetime);
  95. },1000);
  96. }
  97. }
  98. //项目基本信息
  99. module.outProjectInformation2 = function (data) {
  100. if (data.code == 200) {
  101. var content = data.data;
  102. $("#bmrs").html(content.bidderNum);
  103. $("#cjcs").html(content.bidPriceNum);
  104. $("#jssj").html(content.biddingStopTime);
  105. }
  106. }
  107. //竞价记录
  108. module.biddinglistInformation = function (data) {
  109. if (data.code == 200) {
  110. //console.log(data)
  111. var content = data.rows;
  112. // for (var i = 0; i < content.length-1; i++) {
  113. // for (var j = 0; j < content.length - 1 - i; j++) {
  114. // // 相邻元素两两对比,元素交换,大的元素交换到后面
  115. // if (content[j].money < content[j + 1].money) {
  116. // var temp = content[j];
  117. // content[j] = content[j+1];
  118. // content[j+1] = temp;
  119. // }
  120. // }
  121. // }
  122. //console.log(content)
  123. module.data.biddinglistInformationDetail = content;
  124. var biddingInformationData = template('biddingInformationData', module.data);
  125. $("#biddingInformationContent").html(biddingInformationData);
  126. if (content.length > 0){
  127. $("#biddingPeople").html(content[0].memberId);
  128. $("#biddingMoney").html(content[0].money+module.data.outProjectInformationDetail.unit);
  129. }else{
  130. $("#biddingPeople").html('无');
  131. $("#biddingMoney").html('无');
  132. }
  133. }
  134. }
  135. module.dataCompare = function(signupStartTime,signupStopTime,biddingStartTime,biddingStopTime){
  136. var signupStartTime = signupStartTime;
  137. var signupStopTime = signupStopTime;
  138. var biddingStartTime = biddingStartTime;
  139. var biddingStopTime = biddingStopTime;
  140. var nowTime = Date.parse(new Date());
  141. var beginTimes=signupStartTime.substring(0,10).split('-');
  142. var endTimes=signupStopTime.substring(0,10).split('-');
  143. var biddingBeginTimes=biddingStartTime.substring(0,10).split('-');
  144. var biddingEndTimes=biddingStopTime.substring(0,10).split('-');
  145. signupStartTime=beginTimes[1]+'/'+beginTimes[2]+'/'+beginTimes[0]+' '+signupStartTime.substring(10,19);
  146. signupStopTime=endTimes[1]+'/'+endTimes[2]+'/'+endTimes[0]+' '+signupStopTime.substring(10,19);
  147. biddingStartTime=biddingBeginTimes[1]+'/'+biddingBeginTimes[2]+'/'+biddingBeginTimes[0]+' '+biddingStartTime.substring(10,19);
  148. biddingStopTime=biddingEndTimes[1]+'/'+biddingEndTimes[2]+'/'+biddingEndTimes[0]+' '+biddingStopTime.substring(10,19);
  149. //时间差
  150. var leftTime = Date.parse(biddingStopTime)-nowTime;
  151. //报名开始时间差
  152. var signupLeftTime = Date.parse(signupStartTime)-nowTime;
  153. //报名结束时间差
  154. var signDownLeftTime = Date.parse(signupStopTime)-nowTime;
  155. var centerTime = module.data.delayPeriod * 1000//延时周期
  156. //定义变量 d,h,m,s保存倒计时的时间
  157. var d,h,m,s;
  158. if(Date.parse(biddingStartTime)<nowTime&&nowTime<Date.parse(biddingStopTime)){
  159. //正在竞价
  160. module.data.biddingTimeType = 1;
  161. $('#d0').html(
  162. (
  163. (Math.floor(leftTime / 1000 / 60 / 60 / 24) + '').length < 2 ?
  164. '00' + Math.floor(leftTime / 1000 / 60 / 60 / 24) :
  165. (Math.floor(leftTime / 1000 / 60 / 60 / 24) + '').length < 3 ?
  166. '0' + Math.floor(leftTime / 1000 / 60 / 60 / 24) :
  167. Math.floor(leftTime / 1000 / 60 / 60 / 24) + ''
  168. )[0]
  169. );
  170. $('#d1').html(
  171. (
  172. (Math.floor(leftTime / 1000 / 60 / 60 / 24) + '').length < 2 ?
  173. '00' + Math.floor(leftTime / 1000 / 60 / 60 / 24) :
  174. (Math.floor(leftTime / 1000 / 60 / 60 / 24) + '').length < 3 ?
  175. '0' + Math.floor(leftTime / 1000 / 60 / 60 / 24) :
  176. Math.floor(leftTime / 1000 / 60 / 60 / 24) + ''
  177. )[1]
  178. );
  179. $('#d2').html(
  180. (
  181. (Math.floor(leftTime / 1000 / 60 / 60 / 24) + '').length < 2 ?
  182. '00' + Math.floor(leftTime / 1000 / 60 / 60 / 24) :
  183. (Math.floor(leftTime / 1000 / 60 / 60 / 24) + '').length < 3 ?
  184. '0' + Math.floor(leftTime / 1000 / 60 / 60 / 24) :
  185. Math.floor(leftTime / 1000 / 60 / 60 / 24) + ''
  186. )[2]
  187. );
  188. $('#h0').html(((Math.floor(leftTime / 1000 / 60 / 60 % 24) + '').length < 2 ? '0' + Math.floor(leftTime / 1000 / 60 / 60 % 24) : Math.floor(leftTime / 1000 / 60 / 60 % 24) + '')[0]);
  189. $('#h1').html(((Math.floor(leftTime / 1000 / 60 / 60 % 24) + '').length < 2 ? '0' + Math.floor(leftTime / 1000 / 60 / 60 % 24) : Math.floor(leftTime / 1000 / 60 / 60 % 24) + '')[1]);
  190. $('#m0').html(((Math.floor(leftTime / 1000 / 60 % 60) + '').length < 2 ? '0' + Math.floor(leftTime / 1000 / 60 % 60) : Math.floor(leftTime / 1000 / 60 % 60) + '')[0]);
  191. $('#m1').html(((Math.floor(leftTime / 1000 / 60 % 60) + '').length < 2 ? '0' + Math.floor(leftTime / 1000 / 60 % 60) : Math.floor(leftTime / 1000 / 60 % 60) + '')[1]);
  192. $('#s0').html(((Math.floor(leftTime / 1000 % 60) + '').length < 2 ? '0' + Math.floor(leftTime / 1000 % 60) : Math.floor(leftTime / 1000 % 60) + '')[0]);
  193. $('#s1').html(((Math.floor(leftTime / 1000 % 60) + '').length < 2 ? '0' + Math.floor(leftTime / 1000 % 60) : Math.floor(leftTime / 1000 % 60) + '')[1]);
  194. let d,h,m,s;
  195. d = Math.floor(leftTime / 1000 / 60 / 60 / 24);
  196. h = Math.floor(leftTime / 1000 / 60 / 60 % 24);
  197. m = Math.floor(leftTime / 1000 / 60 % 60);
  198. s = Math.floor(leftTime / 1000 % 60);
  199. if ( d == 0 && h == 0 && m == 0 && s < 2 ){
  200. clearInterval(module.data.timer);
  201. module.data.setimer = setInterval(()=>{
  202. module.setimeDataCompare()
  203. },1000)
  204. console.log('开始延时')
  205. }
  206. if(s%2 == 0&&centerTime!=0){
  207. tools.doGet(getBiddingStopTime+getQueryVariable('id'), {}, (data)=>{
  208. if (data.code == 200) {
  209. module.data.outProjectInformationDetail.biddingStopTime = data.data
  210. }
  211. },true);
  212. }
  213. //tools.doGet(biddinglist, {projectId:getQueryVariable('id')}, module.biddinglistInformation,true);
  214. $('#countType').html('距竞价结束还有')
  215. }else if (nowTime>Date.parse(biddingStopTime)){
  216. //竞价结束
  217. $('#d0').html('0')
  218. $('#d1').html('0')
  219. $('#d2').html('0')
  220. $('#h0').html('0')
  221. $('#h1').html('0')
  222. $('#m0').html('0')
  223. $('#m1').html('0')
  224. $('#s0').html('0')
  225. $('#s1').html('0')
  226. $('#countType').html('竞价结束')
  227. module.data.biddingTimeType = 2;
  228. }else if (nowTime<Date.parse(biddingStartTime)){
  229. //竞价暂未开始
  230. $('#d0').html('0')
  231. $('#d1').html('0')
  232. $('#d2').html('0')
  233. $('#h0').html('0')
  234. $('#h1').html('0')
  235. $('#m0').html('0')
  236. $('#m1').html('0')
  237. $('#s0').html('0')
  238. $('#s1').html('0')
  239. $('#countType').html('暂未开始')
  240. module.data.biddingTimeType = 3;
  241. }
  242. if(Date.parse(signupStartTime)<nowTime&&nowTime<Date.parse(signupStopTime)){
  243. //正在报名
  244. module.data.signupTimeType = 1;
  245. $('#d0').html(((Math.floor(signDownLeftTime / 1000 / 60 / 60 / 24) + '').length < 2 ? '0' + Math.floor(leftTime / 1000 / 60 / 60 / 24) : Math.floor(leftTime / 1000 / 60 / 60 / 24) + '')[0]);
  246. $('#d1').html(((Math.floor(signDownLeftTime / 1000 / 60 / 60 / 24) + '').length < 2 ? '0' + Math.floor(leftTime / 1000 / 60 / 60 / 24) : Math.floor(leftTime / 1000 / 60 / 60 / 24) + '')[1]);
  247. $('#d2').html(((Math.floor(signDownLeftTime / 1000 / 60 / 60 / 24) + '').length < 2 ? '0' + Math.floor(leftTime / 1000 / 60 / 60 / 24) : Math.floor(leftTime / 1000 / 60 / 60 / 24) + '')[2]);
  248. $('#h0').html(((Math.floor(signDownLeftTime / 1000 / 60 / 60 % 24) + '').length < 2 ? '0' + Math.floor(leftTime / 1000 / 60 / 60 % 24) : Math.floor(leftTime / 1000 / 60 / 60 % 24) + '')[0]);
  249. $('#h1').html(((Math.floor(signDownLeftTime / 1000 / 60 / 60 % 24) + '').length < 2 ? '0' + Math.floor(leftTime / 1000 / 60 / 60 % 24) : Math.floor(leftTime / 1000 / 60 / 60 % 24) + '')[1]);
  250. $('#m0').html(((Math.floor(signDownLeftTime / 1000 / 60 % 60) + '').length < 2 ? '0' + Math.floor(leftTime / 1000 / 60 % 60) : Math.floor(leftTime / 1000 / 60 % 60) + '')[0]);
  251. $('#m1').html(((Math.floor(signDownLeftTime / 1000 / 60 % 60) + '').length < 2 ? '0' + Math.floor(leftTime / 1000 / 60 % 60) : Math.floor(leftTime / 1000 / 60 % 60) + '')[1]);
  252. $('#s0').html(((Math.floor(signDownLeftTime / 1000 % 60) + '').length < 2 ? '0' + Math.floor(leftTime / 1000 % 60) : Math.floor(leftTime / 1000 % 60) + '')[0]);
  253. $('#s1').html(((Math.floor(signDownLeftTime / 1000 % 60) + '').length < 2 ? '0' + Math.floor(leftTime / 1000 % 60) : Math.floor(leftTime / 1000 % 60) + '')[1]);
  254. $('#countType').html('距报名结束还有')
  255. }else if (nowTime>Date.parse(signupStopTime)){
  256. //报名结束
  257. module.data.signupTimeType = 2;
  258. }else if (nowTime<Date.parse(signupStartTime)){
  259. //报名暂未开始
  260. module.data.signupTimeType = 3;
  261. $('#d0').html(((Math.floor(signupLeftTime / 1000 / 60 / 60 / 24) + '').length < 2 ? '0' + Math.floor(leftTime / 1000 / 60 / 60 / 24) : Math.floor(leftTime / 1000 / 60 / 60 / 24) + '')[0]);
  262. $('#d1').html(((Math.floor(signupLeftTime / 1000 / 60 / 60 / 24) + '').length < 2 ? '0' + Math.floor(leftTime / 1000 / 60 / 60 / 24) : Math.floor(leftTime / 1000 / 60 / 60 / 24) + '')[1]);
  263. $('#d2').html(((Math.floor(signupLeftTime / 1000 / 60 / 60 / 24) + '').length < 2 ? '0' + Math.floor(leftTime / 1000 / 60 / 60 / 24) : Math.floor(leftTime / 1000 / 60 / 60 / 24) + '')[2]);
  264. $('#h0').html(((Math.floor(signupLeftTime / 1000 / 60 / 60 % 24) + '').length < 2 ? '0' + Math.floor(leftTime / 1000 / 60 / 60 % 24) : Math.floor(leftTime / 1000 / 60 / 60 % 24) + '')[0]);
  265. $('#h1').html(((Math.floor(signupLeftTime / 1000 / 60 / 60 % 24) + '').length < 2 ? '0' + Math.floor(leftTime / 1000 / 60 / 60 % 24) : Math.floor(leftTime / 1000 / 60 / 60 % 24) + '')[1]);
  266. $('#m0').html(((Math.floor(signupLeftTime / 1000 / 60 % 60) + '').length < 2 ? '0' + Math.floor(leftTime / 1000 / 60 % 60) : Math.floor(leftTime / 1000 / 60 % 60) + '')[0]);
  267. $('#m1').html(((Math.floor(signupLeftTime / 1000 / 60 % 60) + '').length < 2 ? '0' + Math.floor(leftTime / 1000 / 60 % 60) : Math.floor(leftTime / 1000 / 60 % 60) + '')[1]);
  268. $('#s0').html(((Math.floor(signupLeftTime / 1000 % 60) + '').length < 2 ? '0' + Math.floor(leftTime / 1000 % 60) : Math.floor(leftTime / 1000 % 60) + '')[0]);
  269. $('#s1').html(((Math.floor(signupLeftTime / 1000 % 60) + '').length < 2 ? '0' + Math.floor(leftTime / 1000 % 60) : Math.floor(leftTime / 1000 % 60) + '')[1]);
  270. $('#countType').html('距报名开始还有')
  271. }
  272. // if(module.data.outProjectInformationDetail.biddingType != '拍卖' && module.data.biddingTimeType != 2){
  273. // document.getElementById('biddingTable').style.display = 'none';
  274. // document.getElementById('biddingTitle').style.display = 'block';
  275. // }
  276. }
  277. module.setimeDataCompare = function(){
  278. var biddingStartTime = module.data.outProjectInformationDetail.biddingStartTime
  279. var biddingStopTime = module.data.outProjectInformationDetail.biddingStopTime;
  280. var nowTime = Date.parse(new Date());
  281. var biddingBeginTimes=biddingStartTime.substring(0,10).split('-');
  282. var biddingEndTimes=biddingStopTime.substring(0,10).split('-');
  283. biddingStartTime=biddingBeginTimes[1]+'/'+biddingBeginTimes[2]+'/'+biddingBeginTimes[0]+' '+biddingStartTime.substring(10,19);
  284. biddingStopTime=biddingEndTimes[1]+'/'+biddingEndTimes[2]+'/'+biddingEndTimes[0]+' '+biddingStopTime.substring(10,19);
  285. //时间差
  286. var leftTime = Date.parse(biddingStopTime)-nowTime;
  287. //定义变量 d,h,m,s保存倒计时的时间
  288. var d,h,m,s;
  289. if(Date.parse(biddingStartTime)<nowTime&&nowTime<Date.parse(biddingStopTime)){
  290. //正在竞价
  291. module.data.biddingTimeType = 1;
  292. $('#d0').html(
  293. (
  294. (Math.floor(leftTime / 1000 / 60 / 60 / 24) + '').length < 2 ?
  295. '00' + Math.floor(leftTime / 1000 / 60 / 60 / 24) :
  296. (Math.floor(leftTime / 1000 / 60 / 60 / 24) + '').length < 3 ?
  297. '0' + Math.floor(leftTime / 1000 / 60 / 60 / 24) :
  298. Math.floor(leftTime / 1000 / 60 / 60 / 24) + ''
  299. )[0]
  300. );
  301. $('#d1').html(
  302. (
  303. (Math.floor(leftTime / 1000 / 60 / 60 / 24) + '').length < 2 ?
  304. '00' + Math.floor(leftTime / 1000 / 60 / 60 / 24) :
  305. (Math.floor(leftTime / 1000 / 60 / 60 / 24) + '').length < 3 ?
  306. '0' + Math.floor(leftTime / 1000 / 60 / 60 / 24) :
  307. Math.floor(leftTime / 1000 / 60 / 60 / 24) + ''
  308. )[1]
  309. );
  310. $('#d2').html(
  311. (
  312. (Math.floor(leftTime / 1000 / 60 / 60 / 24) + '').length < 2 ?
  313. '00' + Math.floor(leftTime / 1000 / 60 / 60 / 24) :
  314. (Math.floor(leftTime / 1000 / 60 / 60 / 24) + '').length < 3 ?
  315. '0' + Math.floor(leftTime / 1000 / 60 / 60 / 24) :
  316. Math.floor(leftTime / 1000 / 60 / 60 / 24) + ''
  317. )[2]
  318. );
  319. $('#h0').html(((Math.floor(leftTime / 1000 / 60 / 60 % 24) + '').length < 2 ? '0' + Math.floor(leftTime / 1000 / 60 / 60 % 24) : Math.floor(leftTime / 1000 / 60 / 60 % 24) + '')[0]);
  320. $('#h1').html(((Math.floor(leftTime / 1000 / 60 / 60 % 24) + '').length < 2 ? '0' + Math.floor(leftTime / 1000 / 60 / 60 % 24) : Math.floor(leftTime / 1000 / 60 / 60 % 24) + '')[1]);
  321. $('#m0').html(((Math.floor(leftTime / 1000 / 60 % 60) + '').length < 2 ? '0' + Math.floor(leftTime / 1000 / 60 % 60) : Math.floor(leftTime / 1000 / 60 % 60) + '')[0]);
  322. $('#m1').html(((Math.floor(leftTime / 1000 / 60 % 60) + '').length < 2 ? '0' + Math.floor(leftTime / 1000 / 60 % 60) : Math.floor(leftTime / 1000 / 60 % 60) + '')[1]);
  323. $('#s0').html(((Math.floor(leftTime / 1000 % 60) + '').length < 2 ? '0' + Math.floor(leftTime / 1000 % 60) : Math.floor(leftTime / 1000 % 60) + '')[0]);
  324. $('#s1').html(((Math.floor(leftTime / 1000 % 60) + '').length < 2 ? '0' + Math.floor(leftTime / 1000 % 60) : Math.floor(leftTime / 1000 % 60) + '')[1]);
  325. let d,h,m,s;
  326. d = Math.floor(leftTime / 1000 / 60 / 60 / 24);
  327. h = Math.floor(leftTime / 1000 / 60 / 60 % 24);
  328. m = Math.floor(leftTime / 1000 / 60 % 60);
  329. s = Math.floor(leftTime / 1000 % 60);
  330. if (d<1&&h<1&&m<1&&s<1){
  331. console.log('竞价结束')
  332. clearInterval(module.data.setimer)
  333. }
  334. //tools.doGet(biddinglist, {projectId:getQueryVariable('id')}, module.biddinglistInformation,true);
  335. $('#countType').html('距竞价结束还有')
  336. }
  337. }
  338. //网站配置信息
  339. module.webConfigInformation = function (data) {
  340. if (data.code == 200) {
  341. var content = data.data;
  342. //console.log(content)
  343. //document.getElementById('time').innerHTML = '延时周期:'+content[8].configValue+content[8].remark+'<i class="wh">?</i>'
  344. module.data.timeConfig = content[8].configValue;
  345. module.data.titleConfig = content[9].configValue;
  346. module.data.importantTitle = content[7].configName+':'+ content[7].configValue.substr(3).substr(0,(content[7].configValue.substr(3).length-4));
  347. module.data.know = content[6].configValue;
  348. $("#know").html(content[6].configValue + '<span style="margin-left: 10px;"></span>' + content[6].configValue);
  349. }
  350. }
  351. module.biddingDirectDictionaries = function (data) {
  352. if (data.code == 200 && module.data.outProjectInformationDetail.biddingDirect!='') {
  353. var content = data.data;
  354. var biddingDirect = eval(content).filter(function (e) { return e.dictValue == module.data.outProjectInformationDetail.biddingDirect;})[0].dictLabel;
  355. module.data.outProjectInformationDetail.biddingDirect = biddingDirect;
  356. }
  357. }
  358. module.unitDictionaries = function (data) {
  359. if (data.code == 200 && module.data.outProjectInformationDetail.unit!='') {
  360. var content = data.data;
  361. var unit = eval(content).filter(function (e) { return e.dictValue == module.data.outProjectInformationDetail.unit;})[0].dictLabel;
  362. module.data.outProjectInformationDetail.unit = unit;
  363. }
  364. }
  365. module.biddingTypeDictionaries = function (data) {
  366. if (data.code == 200 && module.data.outProjectInformationDetail.biddingType!='') {
  367. var content = data.data;
  368. console.log(eval(content).filter(function (e) { return e.dictValue == module.data.outProjectInformationDetail.biddingType;}))
  369. var biddingType = eval(content).filter(function (e) { return e.dictValue == module.data.outProjectInformationDetail.biddingType;})[0].dictLabel;
  370. module.data.outProjectInformationDetail.biddingType = biddingType;
  371. }
  372. }
  373. return module;
  374. });