网站
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

discussionsDetail_02.js 3.0 KiB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. /**
  2. * Created by Administrator on 2021/4/5.
  3. */
  4. define(['jquery', "template", "Tools"], function ($, template, Tools) {
  5. //数据存储
  6. var module = {
  7. data: {
  8. //服务器地址
  9. serverApi:'',
  10. //焦点图数据
  11. focusList: [],
  12. communicateList: [],
  13. },
  14. };
  15. var tools = new Tools();
  16. module.init = function (page) {
  17. //新闻详情
  18. tools.doGet(contractionList, {
  19. code:getQueryVariable('id'),
  20. bookId: JSON.parse(tools.getCookie('user')).bookId,
  21. deptId: JSON.parse(tools.getCookie('user')).deptId
  22. }, module.newsDetail , true);
  23. //新闻列表
  24. tools.doGet(contractionList, {
  25. pageNum:1,
  26. pageSize:10,
  27. orderByColumn: 'buildingTime',
  28. isAsc: 'desc',
  29. bookId: JSON.parse(tools.getCookie('user')).bookId,
  30. deptId: JSON.parse(tools.getCookie('user')).deptId
  31. }, module.newsList , true);
  32. tools.doGet(webList, {}, module.webList , true);
  33. };
  34. //获取地址栏参数
  35. function getQueryVariable(variable){
  36. var query = window.location.search.substring(1);
  37. var vars = query.split("&");
  38. for (var i=0;i<vars.length;i++) {
  39. var pair = vars[i].split("=");
  40. if(pair[0] == variable){return pair[1];}
  41. }
  42. return(false);
  43. }
  44. module.webList = function (data) {
  45. if (data.code == 200) {
  46. var content = data.data;
  47. module.data.webList = content;
  48. var webData = template('webData', module.data);
  49. $("#webContent").html(webData);
  50. $('#ewm').attr('src', 'static/images/'+content.top.bz);
  51. }
  52. }
  53. module.newsDetail = function (data) {
  54. if (data.code == 200) {
  55. var content = data.rows[0];
  56. $('#name').html(content.name);
  57. $('#code').html('合同编码:' + content.code);
  58. $('#biddingType').html('合同类型:'+content.biddingType);
  59. $('#secondParty').html('合同乙方:'+content.secondParty);
  60. $('#settleType').html('结款方式:'+content.settleType);
  61. $('#totalAmount').html('合同金额:'+content.totalAmount);
  62. $('#settledAmount').html('已结款:'+content.settledAmount);
  63. $('#receivedAmount').html('下次应结:'+content.receivedAmount);
  64. $('#num').html('数量:'+content.num);
  65. $('#unit').html('单位:'+content.unit);
  66. $('#buildingTime').html('签订日期:'+content.buildingTime);
  67. $('#startTime').html('开始日期:'+content.startTime);
  68. $('#endTime').html('结束日期:'+content.endTime);
  69. }
  70. }
  71. module.newsList = function (data) {
  72. if (data.code == 200) {
  73. var content = data.rows;
  74. module.data.newList = content;
  75. var newListData = template('newListData', module.data);
  76. $("#newListContent").html(newListData);
  77. }
  78. }
  79. return module;
  80. });