exponent.ejs 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. <% include ./material_sub_menu.ejs %>
  2. <div class="panel-content">
  3. <div class="panel-title">
  4. <div class="title-main d-flex justify-content-between">
  5. <% include ./material_sub_mini_menu.ejs %>
  6. <div>
  7. <% if ((material.status === auditConst.status.uncheck || material.status === auditConst.status.checkNo) && ctx.session.sessionUser.accountId === material.user_id) { %>
  8. <div class="d-inline-block">
  9. <a href="javascript: void(0);" id="add" class="btn btn-sm btn-light text-primary" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="新增"><i class="fa fa-plus" aria-hidden="true"></i></a>
  10. <a href="javascript: void(0);" id="del" class="btn btn-sm btn-light text-primary" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="删除"><i class="fa fa-remove" aria-hidden="true"></i></a>
  11. </div>
  12. <% } %>
  13. <div class="d-inline-block ml-3">
  14. 本期调差计量期:第<span class="mx-2"><%= material.s_order.split(',').join(',') %></span>期
  15. </div>
  16. <div class="d-inline-block ml-3">
  17. 本期价差:<b id="ex_expr"><%- material.ex_expr %></b>
  18. </div>
  19. </div>
  20. <div class="ml-auto">
  21. </div>
  22. </div>
  23. </div>
  24. <div class="content-wrap pr-46">
  25. <div class="c-header p-0">
  26. </div>
  27. <div class="row w-100 sub-content">
  28. <div id="left-view" class="c-body" style="width: 100%">
  29. <!--上部分-->
  30. <div class="sjs-height-1" id="material-exponent-spread">
  31. </div>
  32. <!--下部分-->
  33. <div class="bcontent-wrap">
  34. <div class="bc-bar mb-1">
  35. <div class="input-group input-group-sm ">
  36. <div class="input-group-prepend">
  37. <span class="input-group-text" id="basic-addon1">增值税税率</span>
  38. </div>
  39. <select class="form-control form-control-sm col-1" id="changeRate">
  40. <% if (!material.readOnly) { %>
  41. <option value="9" <% if(material.rate === 9) { %>selected<% } %>>9%</option>
  42. <option value="10" <% if(material.rate === 10) { %>selected<% } %>>10%</option>
  43. <option value="11" <% if(material.rate === 11) { %>selected<% } %>>11%</option>
  44. <% } else { %>
  45. <option value="<%= material.rate %>" selected><%= material.rate %>%</option>
  46. <% } %>
  47. </select>
  48. </div>
  49. </div>
  50. <div class="sp-wrap">
  51. <div class="col-7 p-0">
  52. <table class="table table-sm table-bordered">
  53. <tr><th rowspan="2"></th><th colspan="2">信息价</th><th colspan="2">价格指数</th></tr>
  54. <tr class="text-center"><th>本期金额</th><th>截止本期金额</th><th>本期金额</th><th>截止本期金额</th></tr>
  55. <tr id="tp_set"><td>材料价差费用</td>
  56. <td><%= material.m_tp !== null ? ctx.helper.round(material.m_tp, 2) : null %></td>
  57. <td><%= material.m_tp !== null || material.pre_tp !== null ? ctx.helper.round(ctx.helper.add(material.pre_tp, material.m_tp), 2) : null %></td>
  58. <td><%= material.ex_tp !== null ? ctx.helper.round(material.ex_tp, 2) : null %></td>
  59. <td><%= material.ex_tp !== null || material.ex_pre_tp !== null ? ctx.helper.round(ctx.helper.add(material.ex_pre_tp, material.ex_tp), 2) : null %></td>
  60. </tr>
  61. <tr id="rate_set"><td>材料价差费用(含税)</td>
  62. <td><%= material.m_tp !== null ? ctx.helper.round(ctx.helper.mul(material.m_tp, 1+material.rate/100), 2) : null %></td>
  63. <td><%= material.m_tp !== null || pre_tp_hs !== null ? ctx.helper.round(ctx.helper.add(pre_tp_hs, ctx.helper.round(ctx.helper.mul(material.m_tp, 1+material.rate/100), 2)), 2) : null %></td>
  64. <td><%= material.ex_tp !== null ? ctx.helper.round(ctx.helper.mul(material.ex_tp, 1+material.rate/100), 2) : null %></td>
  65. <td><%= material.ex_tp !== null || ex_pre_tp_hs !== null ? ctx.helper.round(ctx.helper.add(ex_pre_tp_hs, ctx.helper.round(ctx.helper.mul(material.ex_tp, 1+material.rate/100), 2)), 2) : null %></td>
  66. </tr>
  67. </table>
  68. </div>
  69. </div>
  70. </div>
  71. </div>
  72. <div id="right-view" class="c-body" style="display:none;width: 33%">
  73. <div class="resize-x" id="right-spr" r-Type="width" div1="#left-view" div2="#right-view" title="调整大小" a-type="percent"><!--调整左右高度条--></div>
  74. <div class="tab-content" style="width: 100%">
  75. <div id="tiaochaje" class="tab-pane active">
  76. <div class="sjs-sh-1">
  77. <table class="table table-bordered">
  78. <thead>
  79. <tr><th>需调整的价差</th><th>金额</th><th>选择</th></tr>
  80. </thead>
  81. <tbody id="calc_basic_select">
  82. <% for (const bq of ex_calc) { %>
  83. <tr>
  84. <td><%- bq.text %></td><td><%- bq.value %></td>
  85. <td><input type="checkbox" value="<%- bq.code %>" <% if (material.readOnly) { %>disabled<% } %> class="calc_select" <% if (bq.select) { %>checked<% } %>></td>
  86. </tr>
  87. <% } %>
  88. </tbody>
  89. </table>
  90. </div>
  91. </div>
  92. </div>
  93. </div>
  94. </div>
  95. <div class="side-menu">
  96. <!--右侧菜单-->
  97. <ul class="nav flex-column right-nav">
  98. <li class="nav-item">
  99. <a class="nav-link" content="#base-tab" href="javascript: void(0);">调差基数</a>
  100. </li>
  101. </ul>
  102. </div>
  103. </div>
  104. </div>
  105. <div style="display: none">
  106. <img src="/public/images/ellipsis_horizontal.png" id="ellipsis-icon" />
  107. <img src="/public/images/icon-ok.png" id="icon-ok" />
  108. </div>
  109. <script>
  110. const readOnly = <%- material.readOnly %>;
  111. const materialID = <%- material.id %>;
  112. const materialOrder = <%- material.order %>;
  113. let m_tp = <%= material.m_tp !== null ? material.m_tp : 0 %>;
  114. let ex_tp = <%= material.ex_tp !== null ? material.ex_tp : 0 %>;
  115. const pre_tp = <%= material.pre_tp !== null ? material.pre_tp : 0 %>;
  116. const ex_pre_tp = <%= material.ex_pre_tp !== null ? material.ex_pre_tp : 0 %>;
  117. const pre_tp_hs = <%= pre_tp_hs !== null ? pre_tp_hs : 0 %>;
  118. const ex_pre_tp_hs = <%= ex_pre_tp_hs !== null ? ex_pre_tp_hs : 0 %>;
  119. const materialType = JSON.parse('<%- JSON.stringify(materialType) %>');
  120. const ex_calc = JSON.parse('<%- JSON.stringify(ex_calc) %>');
  121. let ex_expr = '<%- material.ex_expr %>';
  122. let materialExponentData = JSON.parse('<%- JSON.stringify(materialExponentData) %>');
  123. </script>