exponent.ejs 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  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" style="display: none!important;">-->
  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" class="text-center">信息价</th><th colspan="2" class="text-center">价格指数</th></tr>
  54. <tr class="text-center"><th>本期金额</th><th>截止本期金额</th>
  55. <th>本期金额
  56. <a href="javascript:void(0);" id="ex_expr" data-toggle="tooltip" data-placement="bottom" title="本期价差:<%- material.ex_expr ? material.ex_expr : '' %>"><i class="fa fa-question-circle-o"></i></a></th>
  57. <th>截止本期金额</th></tr>
  58. <tr id="tp_set"><td>材料价差费用</td>
  59. <td class="text-center"><%= material.m_tp !== null ? ctx.helper.round(material.m_tp, 2) : null %></td>
  60. <td class="text-center"><%= material.m_tp !== null || material.pre_tp !== null ? ctx.helper.round(ctx.helper.add(material.pre_tp, material.m_tp), 2) : null %></td>
  61. <td class="text-center"><%= material.ex_tp !== null ? ctx.helper.round(material.ex_tp, 2) : null %></td>
  62. <td class="text-center"><%= 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>
  63. </tr>
  64. <tr id="rate_set"><td>材料价差费用(含税)</td>
  65. <td class="text-center"><%= material.m_tp !== null ? ctx.helper.round(ctx.helper.mul(material.m_tp, 1+material.rate/100), 2) : null %></td>
  66. <td class="text-center"><%= 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>
  67. <td class="text-center"><%= material.ex_tp !== null ? ctx.helper.round(ctx.helper.mul(material.ex_tp, 1+material.rate/100), 2) : null %></td>
  68. <td class="text-center"><%= 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>
  69. </tr>
  70. </table>
  71. </div>
  72. </div>
  73. </div>
  74. </div>
  75. <div id="right-view" class="c-body" style="display:none;width: 33%">
  76. <div class="resize-x" id="right-spr" r-Type="width" div1="#left-view" div2="#right-view" title="调整大小" a-type="percent"><!--调整左右高度条--></div>
  77. <div class="tab-content" style="width: 100%">
  78. <div id="tiaochaje" class="tab-pane active">
  79. <div class="sjs-sh-1">
  80. <table class="table table-bordered">
  81. <thead>
  82. <tr><th>需调整的价差</th><th>金额</th><th>选择</th></tr>
  83. </thead>
  84. <tbody id="calc_basic_select">
  85. <% for (const bq of ex_calc) { %>
  86. <tr>
  87. <td><%- materialType.ex_basic_text[bq.code] %></td><td><%- bq.value %></td>
  88. <td><input type="checkbox" value="<%- bq.code %>" <% if (material.readOnly) { %>disabled<% } %> class="calc_select" <% if (bq.select) { %>checked<% } %>></td>
  89. </tr>
  90. <% } %>
  91. </tbody>
  92. </table>
  93. </div>
  94. </div>
  95. </div>
  96. </div>
  97. </div>
  98. <div class="side-menu">
  99. <!--右侧菜单-->
  100. <ul class="nav flex-column right-nav">
  101. <li class="nav-item">
  102. <a class="nav-link" content="#base-tab" href="javascript: void(0);">调差基数</a>
  103. </li>
  104. </ul>
  105. </div>
  106. </div>
  107. </div>
  108. <div style="display: none">
  109. <img src="/public/images/ellipsis_horizontal.png" id="ellipsis-icon" />
  110. <img src="/public/images/icon-ok.png" id="icon-ok" />
  111. </div>
  112. <script>
  113. const readOnly = <%- material.readOnly %>;
  114. const materialID = <%- material.id %>;
  115. const materialOrder = <%- material.order %>;
  116. let m_tp = <%= material.m_tp !== null ? material.m_tp : 0 %>;
  117. let ex_tp = <%= material.ex_tp !== null ? material.ex_tp : 0 %>;
  118. const pre_tp = <%= material.pre_tp !== null ? material.pre_tp : 0 %>;
  119. const ex_pre_tp = <%= material.ex_pre_tp !== null ? material.ex_pre_tp : 0 %>;
  120. const pre_tp_hs = <%= pre_tp_hs !== null ? pre_tp_hs : 0 %>;
  121. const ex_pre_tp_hs = <%= ex_pre_tp_hs !== null ? ex_pre_tp_hs : 0 %>;
  122. const materialType = JSON.parse('<%- JSON.stringify(materialType) %>');
  123. const ex_calc = JSON.parse('<%- JSON.stringify(ex_calc) %>');
  124. let ex_expr = '<%- material.ex_expr %>';
  125. let materialExponentData = JSON.parse(unescape('<%- escape(JSON.stringify(materialExponentData)) %>'));
  126. </script>