网站
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

winTheBiddingDetail.js 8.8 KiB

2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
1 year ago
2 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  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. if (content.dealType && content.dealType != '2'){
  92. let query = {
  93. tableName: 't_transaction_tender_win',
  94. bizPath: 'transaction',
  95. tableId:content.id,
  96. fileType:content.dealType == '1'? '1' : content.dealType == '3'? '3' : '2'
  97. }
  98. tools.doGet(attachmentQuery, query, module.attachmentQuery,true);
  99. }
  100. tools.doGet(tenderDetail+'/'+content.tenderId, {}, module.tenderQuery,true);
  101. }
  102. }
  103. module.tenderQuery = function (data) {
  104. if (data.code == 200) {
  105. var content = data.data;
  106. module.data.announcementInformationDetail.biddingType = content.biddingType;
  107. //竞价方式字典
  108. tools.doGet(Dictionaries+'/tenderbid_type', {}, module.biddingTypeDictionaries,true);
  109. //中标情况字典
  110. tools.doGet(Dictionaries+'/tender_deal_type', {}, module.dealTypeDictionaries,true);
  111. }
  112. }
  113. //中标情况
  114. module.dealTypeDictionaries = function (data) {
  115. if (data.code == 200) {
  116. var content = data.data;
  117. if (module.data.announcementInformationDetail.dealType){
  118. var dealType = content[(module.data.announcementInformationDetail.dealType-1)].dictLabel;
  119. module.data.announcementInformationDetail.dealType = dealType;
  120. if(dealType == '未成功'){
  121. //失败原因字典
  122. tools.doGet(Dictionaries+'/deal_fail_reason', {}, module.dealFailReasonDictionaries,true);
  123. }
  124. }
  125. var announcementInformationData = template('announcementInformationData', module.data);
  126. $("#announcementInformationContent").html(announcementInformationData);
  127. }
  128. }
  129. //失败原因
  130. module.dealFailReasonDictionaries = function (data) {
  131. if (data.code == 200) {
  132. var content = data.data;
  133. if (module.data.announcementInformationDetail.dealFailReason){
  134. var dealFailReason = content[(module.data.announcementInformationDetail.dealFailReason-1)].dictLabel;
  135. module.data.announcementInformationDetail.dealFailReason = dealFailReason;
  136. var announcementInformationData = template('announcementInformationData', module.data);
  137. $("#announcementInformationContent").html(announcementInformationData);
  138. }
  139. }
  140. }
  141. module.attachmentQuery = function (data) {
  142. if (data.code == 200) {
  143. var content = data.rows;
  144. module.data.attachmentList = content;
  145. var attachmentListData = template('attachmentListData', module.data);
  146. $("#attachmentListContent").html(attachmentListData);
  147. }
  148. }
  149. //流转方向
  150. module.circulationDictionaries = function (data) {
  151. if (data.code == 200) {
  152. var content = data.data;
  153. var rollout = content[(module.data.announcementInformationDetail.rollout-1)].dictLabel;
  154. module.data.announcementInformationDetail.rollout = rollout;
  155. var announcementInformationData = template('announcementInformationData', module.data);
  156. $("#announcementInformationContent").html(announcementInformationData);
  157. }
  158. }
  159. //公司性质
  160. module.companyDictionaries = function (data) {
  161. if (data.code == 200) {
  162. var content = data.data;
  163. var companyNature = content[(module.data.announcementInformationDetail.companyNature-1)].dictLabel;
  164. module.data.announcementInformationDetail.companyNature = companyNature;
  165. var announcementInformationData = template('announcementInformationData', module.data);
  166. $("#announcementInformationContent").html(announcementInformationData);
  167. }
  168. }
  169. //交易方式
  170. module.transactionDictionaries = function (data) {
  171. if (data.code == 200) {
  172. var content = data.data;
  173. var dealType = content[(module.data.announcementInformationDetail.dealType-1)].dictLabel;
  174. module.data.announcementInformationDetail.dealType = dealType;
  175. var announcementInformationData = template('announcementInformationData', module.data);
  176. $("#announcementInformationContent").html(announcementInformationData);
  177. }
  178. }
  179. //面积单位
  180. module.areaDictionaries = function (data) {
  181. if (data.code == 200) {
  182. var content = data.data;
  183. var allCountUnit = content[(module.data.announcementInformationDetail.allCountUnit-1)].dictLabel;
  184. module.data.announcementInformationDetail.allCountUnit = allCountUnit;
  185. var announcementInformationData = template('announcementInformationData', module.data);
  186. $("#announcementInformationContent").html(announcementInformationData);
  187. }
  188. }
  189. //成交价格单位
  190. module.unitDictionaries = function (data) {
  191. if (data.code == 200) {
  192. var content = data.data;
  193. var unit = content[(module.data.announcementInformationDetail.unit-1)].dictLabel;
  194. module.data.announcementInformationDetail.unit = unit;
  195. var announcementInformationData = template('announcementInformationData', module.data);
  196. $("#announcementInformationContent").html(announcementInformationData);
  197. }
  198. }
  199. return module;
  200. });