relation.ejs 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <% include ../tender/tender_sub_menu.ejs %>
  2. <div class="panel-content">
  3. <div class="panel-title"><!--收起详解目录添加类名 fluid -->
  4. <div class="title-main d-flex"><!--工具-->
  5. <% include ../tender/tender_sub_mini_menu.ejs %>
  6. <div>
  7. <div class="d-inline-block">
  8. <div class="btn-group btn-group-toggle group-tab">
  9. <a class="btn btn-sm btn-light" href="/tender/<%- ctx.tender.id %>/change/<%- ctx.change.cid %>/information">变更详情</a>
  10. <a class="btn btn-sm btn-light" href="/tender/<%- ctx.tender.id %>/change/<%- ctx.change.cid %>/report">输出报表</a>
  11. <a class="btn btn-sm btn-light active" href="javascript:void(0);">关联数据</a>
  12. </div>
  13. </div>
  14. </div>
  15. </div>
  16. </div>
  17. <div class="content-wrap">
  18. <div class="c-body">
  19. <div class="sjs-height-0">
  20. <table class="table table-bordered">
  21. <thead>
  22. <tr class="text-center">
  23. <th>变更类型</th>
  24. <th>编号</th>
  25. <th>变更工程名称</th>
  26. <th>操作</th>
  27. </tr>
  28. </thead>
  29. <tbody>
  30. <tbody>
  31. <% if (ctx.subProject.page_show.openChangeProject) { %>
  32. <tr id="project">
  33. <td class="text-center">变更立项</td>
  34. <td><% if (changeProjectInfo) { %><%- changeProjectInfo.code %><% } %></td>
  35. <td><% if (changeProjectInfo) { %><%- changeProjectInfo.name %><% } %></td>
  36. <td class="text-center"><% if (changeProjectInfo) { %><a target="_blank" href="/tender/<%- tender.id %>/change/project/<%- changeProjectInfo.id %>/information">查看详情</a><% } %></td>
  37. </tr>
  38. <% } %>
  39. <% if (ctx.subProject.page_show.openChangeApply) { %>
  40. <tr id="apply">
  41. <td class="text-center">变更申请</td>
  42. <td><% if (changeApplyInfo) { %><%- changeApplyInfo.code %><% } %></td>
  43. <td><% if (changeApplyInfo) { %><%- changeApplyInfo.name %><% } %></td>
  44. <td class="text-center"><% if (changeApplyInfo) { %><a target="_blank" href="/tender/<%- tender.id %>/change/apply/<%- changeApplyInfo.id %>/information">查看详情</a><% } %></td>
  45. </tr>
  46. <% } %>
  47. <% if (ctx.subProject.page_show.openChangePlan) { %>
  48. <tr id="plan">
  49. <td class="text-center">变更方案</td>
  50. <td><% if (ctx.session.sessionUser.accountId === ctx.change.uid) { %><input id="plan_code" class="form-control form-control-sm" type="text" value="<% if (changePlanInfo) { %><%- changePlanInfo.code %><% } %>" data-name="plan_code" <% if (ctx.session.sessionUser.accountId !== change.uid) { %>readonly<% } %> placeholder="自动读取,没有就为空,可编辑"><% } else { %><% if (changePlanInfo) { %><%- changePlanInfo.code %><% } %><% } %></td>
  51. <td><% if (changePlanInfo) { %><%- changePlanInfo.name %><% } %></td>
  52. <td class="text-center"><% if (changePlanInfo) { %><a target="_blank" href="/tender/<%- tender.id %>/change/plan/<%- changePlanInfo.id %>/information">查看详情</a><% } %></td>
  53. </tr>
  54. <% } %>
  55. </tbody>
  56. </table>
  57. </div>
  58. </div>
  59. </div>
  60. </div>
  61. <script>
  62. autoFlashHeight();
  63. <% if (ctx.session.sessionUser.accountId === ctx.change.uid) { %>
  64. $(function () {
  65. $('#plan input').change(function () {
  66. postData('/tender/' + window.location.pathname.split('/')[2] + '/change/' + window.location.pathname.split('/')[4] + '/information/save', { type: 'plan_code', plan_code: $(this).val() }, function (data) {
  67. if (data.projectInfo) {
  68. $('#project td').eq(1).text(data.projectInfo.code);
  69. $('#project td').eq(2).text(data.projectInfo.name);
  70. $('#project td').eq(3).html('<a target="_blank" href="/tender/' + window.location.pathname.split('/')[2] + '/change/project/' + data.projectInfo.id + '/information">查看详情</a>')
  71. } else {
  72. $('#project td').eq(1).text('');
  73. $('#project td').eq(2).text('');
  74. $('#project td').eq(3).html('');
  75. }
  76. if (data.applyInfo) {
  77. $('#apply td').eq(1).text(data.applyInfo.code);
  78. $('#apply td').eq(2).text(data.applyInfo.name);
  79. $('#apply td').eq(3).html('<a target="_blank" href="/tender/' + window.location.pathname.split('/')[2] + '/change/apply/' + data.applyInfo.id + '/information">查看详情</a>')
  80. } else {
  81. $('#apply td').eq(1).text('');
  82. $('#apply td').eq(2).text('');
  83. $('#apply td').eq(3).html('');
  84. }
  85. if (data.planInfo) {
  86. $('#plan td').eq(2).text(data.planInfo.name);
  87. $('#plan td').eq(3).html('<a target="_blank" href="/tender/' + window.location.pathname.split('/')[2] + '/change/plan/' + data.planInfo.id + '/information">查看详情</a>')
  88. } else {
  89. $('#plan td').eq(2).text('');
  90. $('#plan td').eq(3).html('');
  91. }
  92. });
  93. });
  94. });
  95. <% } %>
  96. </script>