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

winTheBiddingDetail.js 7.1 KiB

2 лет назад
2 лет назад
2 лет назад
1 год назад
2 лет назад
1 год назад
1 год назад
1 год назад
2 лет назад
1 год назад
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  1. /**
  2. * Created by Administrator on 2021/4/5.
  3. */
  4. define(['jquery', "template", "Tools", "announApi", "paging", 'swiper'], function ($, template, Tools ) {
  5. //数据存储
  6. var module = {
  7. data: {
  8. //焦点图数据
  9. focusListTop: [],
  10. announcementInformationDetail:'',
  11. },
  12. };
  13. var tools = new Tools();
  14. module.init = function (page) {
  15. //获取焦点图信息
  16. tools.doGet(websitePicture, {picType:1,status:0,orderByColumn:'picSort',isAsc:'desc'}, module.focusNewsTop , true);
  17. //底部友情链接
  18. tools.doGet(friendsLinks, {}, module.bottomFriendsLinks, true);
  19. //鉴证公告
  20. tools.doGet(tenderWinDetail+'/'+getQueryVariable('id'), {}, module.announInformation,true);
  21. //网站配置信息(网站名称 底部联系方式 公安备案号 网站备案号)
  22. tools.getWebConfig();
  23. };
  24. //焦点图数据
  25. module.focusNewsTop = function (data) {
  26. if (data.code == 200) {
  27. let focusArray = [];
  28. if(data.data.length<1){
  29. focusArray.push({
  30. picUrl:'../../../static/images/banner1.png'
  31. },{
  32. picUrl:'../../../static/images/banner2.png'
  33. },{
  34. picUrl:'../../../static/images/banner3.png'
  35. })
  36. }else{
  37. data.data.forEach(res=>{
  38. focusArray.push({
  39. picUrl:'/api'+res.picUrl
  40. })
  41. })
  42. }
  43. module.data.focusListTop = focusArray;
  44. var bannerFocusDataTop = template('bannerFocusDataTop', module.data);
  45. $("#bannerFocusTopContent").html(bannerFocusDataTop);
  46. new Swiper('#bannerFocusWrapTop', {
  47. paginationClickable: true,
  48. autoplay : 4000,
  49. loop:true
  50. })
  51. }
  52. }
  53. //获取地址栏参数
  54. function getQueryVariable(variable){
  55. var query = window.location.search.substring(1);
  56. var vars = query.split("&");
  57. for (var i=0;i<vars.length;i++) {
  58. var pair = vars[i].split("=");
  59. if(pair[0] == variable){return pair[1];}
  60. }
  61. return(false);
  62. }
  63. //底部友情链接
  64. module.bottomFriendsLinks = function (data) {
  65. if (data.code == 200) {
  66. var content = data.data;
  67. //console.log(content)
  68. module.data.friendsLinksList = content;
  69. var friendsLinksData = template('friendsLinksData', module.data);
  70. $("#friendsLinksContent").html(friendsLinksData);
  71. }
  72. }
  73. //竞价方式
  74. module.biddingTypeDictionaries = function (data) {
  75. if (data.code == 200) {
  76. var content = data.data;
  77. if (module.data.announcementInformationDetail.biddingType){
  78. var biddingType = content[(module.data.announcementInformationDetail.biddingType-1)].dictLabel;
  79. module.data.announcementInformationDetail.biddingType = biddingType;
  80. }
  81. var announcementInformationData = template('announcementInformationData', module.data);
  82. $("#announcementInformationContent").html(announcementInformationData);
  83. }
  84. }
  85. //项目公告数据
  86. module.announInformation = function (data) {
  87. if (data.code == 200) {
  88. //console.log(data)
  89. var content = data.data;
  90. module.data.announcementInformationDetail = content;
  91. let query = {
  92. tableName: 't_transaction_tender_win',
  93. bizPath: 'transaction',
  94. tableId:content.id
  95. }
  96. tools.doGet(attachmentQuery, query, module.attachmentQuery,true);
  97. tools.doGet(tenderDetail+'/'+content.tenderId, {}, module.tenderQuery,true);
  98. }
  99. }
  100. module.tenderQuery = function (data) {
  101. if (data.code == 200) {
  102. var content = data.data;
  103. module.data.announcementInformationDetail.biddingType = content.biddingType;
  104. //竞价方式字典
  105. tools.doGet(Dictionaries+'/tenderbid_type', {}, module.biddingTypeDictionaries,true);
  106. }
  107. }
  108. module.attachmentQuery = function (data) {
  109. if (data.code == 200) {
  110. var content = data.rows;
  111. module.data.attachmentList = content;
  112. var attachmentListData = template('attachmentListData', module.data);
  113. $("#attachmentListContent").html(attachmentListData);
  114. }
  115. }
  116. //流转方向
  117. module.circulationDictionaries = function (data) {
  118. if (data.code == 200) {
  119. var content = data.data;
  120. var rollout = content[(module.data.announcementInformationDetail.rollout-1)].dictLabel;
  121. module.data.announcementInformationDetail.rollout = rollout;
  122. var announcementInformationData = template('announcementInformationData', module.data);
  123. $("#announcementInformationContent").html(announcementInformationData);
  124. }
  125. }
  126. //公司性质
  127. module.companyDictionaries = function (data) {
  128. if (data.code == 200) {
  129. var content = data.data;
  130. var companyNature = content[(module.data.announcementInformationDetail.companyNature-1)].dictLabel;
  131. module.data.announcementInformationDetail.companyNature = companyNature;
  132. var announcementInformationData = template('announcementInformationData', module.data);
  133. $("#announcementInformationContent").html(announcementInformationData);
  134. }
  135. }
  136. //交易方式
  137. module.transactionDictionaries = function (data) {
  138. if (data.code == 200) {
  139. var content = data.data;
  140. var dealType = content[(module.data.announcementInformationDetail.dealType-1)].dictLabel;
  141. module.data.announcementInformationDetail.dealType = dealType;
  142. var announcementInformationData = template('announcementInformationData', module.data);
  143. $("#announcementInformationContent").html(announcementInformationData);
  144. }
  145. }
  146. //面积单位
  147. module.areaDictionaries = function (data) {
  148. if (data.code == 200) {
  149. var content = data.data;
  150. var allCountUnit = content[(module.data.announcementInformationDetail.allCountUnit-1)].dictLabel;
  151. module.data.announcementInformationDetail.allCountUnit = allCountUnit;
  152. var announcementInformationData = template('announcementInformationData', module.data);
  153. $("#announcementInformationContent").html(announcementInformationData);
  154. }
  155. }
  156. //成交价格单位
  157. module.unitDictionaries = function (data) {
  158. if (data.code == 200) {
  159. var content = data.data;
  160. var unit = content[(module.data.announcementInformationDetail.unit-1)].dictLabel;
  161. module.data.announcementInformationDetail.unit = unit;
  162. var announcementInformationData = template('announcementInformationData', module.data);
  163. $("#announcementInformationContent").html(announcementInformationData);
  164. }
  165. }
  166. return module;
  167. });