info.ejs 39 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699
  1. <link rel="stylesheet" type="text/css" href="/public/css/datatable/dataTables.bootstrap4.min.css">
  2. <link rel="stylesheet" type="text/css" href="/public/css/datatable/fixedColumns.bootstrap4.min.css">
  3. <style type="text/css" class="init">
  4. .qd-table .input-sm{
  5. height:30px;
  6. padding:2px;
  7. }
  8. .qd-table>tbody>tr>td, .qd-table>tbody>tr>th, .qd-table>tfoot>tr>td, .qd-table>tfoot>tr>th, .qd-table>thead>tr>td, .qd-table>thead>tr>th {
  9. padding:5px 2px
  10. }
  11. #list td input{
  12. width: 100%;
  13. font-size: 0.9rem;
  14. }
  15. #list td select{
  16. width: 100%;
  17. font-size: 0.9rem;
  18. vertical-align: middle;
  19. line-height: 30px;
  20. }
  21. #list td a {
  22. cursor: pointer;
  23. }
  24. .allwidth1{
  25. }
  26. .allwidth2{
  27. }
  28. .allwidth3{
  29. text-align:right;
  30. }
  31. .allwidth3 input{
  32. text-align:right;
  33. }
  34. .allwidth5{
  35. text-align:center;
  36. }
  37. .allwidth4{
  38. text-align:center;
  39. }
  40. div.DTFC_LeftFootWrapper table, div.DTFC_RightFootWrapper table{
  41. border-top: 1px solid #ddd;
  42. }
  43. div.dataTables_scrollFootInner table{
  44. margin-top: 1px !important;
  45. }
  46. table.dataTable{
  47. border-collapse: collapse !important;
  48. }
  49. table.table-bordered.dataTable tbody th, table.table-bordered.dataTable tbody td{
  50. border-bottom-width: 1px;
  51. }
  52. div.dataTables_scrollFootInner table{
  53. margin-top: 0 !important;
  54. }
  55. .bg-con-warp:nth-child(2) th{
  56. text-align: center !important;
  57. }
  58. .change-title {
  59. font-size: 16px;
  60. margin: 0;
  61. height: 50px;
  62. line-height: 50px;
  63. display: block;
  64. }
  65. </style>
  66. <div class="panel-sidebar">
  67. <div class="panel-title">
  68. <div class="title-bar">
  69. <h2><%- tender.name %></h2>
  70. </div>
  71. </div>
  72. <div class="scrollbar-auto">
  73. <div class="nav-box">
  74. <ul class="nav-list list-unstyled">
  75. <li class=""><a href="/tender/<%- tender.id %>/change"><i class="fa fa-chevron-left "></i> <span>返回</span></a></li>
  76. </ul>
  77. </div>
  78. <div class="nav-box">
  79. <ul class="nav nav-tab nav-list list-unstyled" role="tablist" id="tablist" style="display: block">
  80. <li style="margin-bottom: 1rem;"><a href="#info" class="active" aria-controls="info" data-toggle="tab"><span class="ml-3">变更信息</span></a></li>
  81. <li style="margin-bottom: 1rem;"><a href="#bills" aria-controls="bills" data-toggle="tab"><span class="ml-3">变更清单</span></a></li>
  82. <li><a href="#files" aria-controls="files" data-toggle="tab"><span class="ml-3">附件</span></a></li>
  83. </ul>
  84. </div>
  85. </div>
  86. </div>
  87. <div class="panel-content">
  88. <div class="panel-title">
  89. <div class="title-main d-flex justify-content-between">
  90. <h2 id="info_title" class="show_title">变更信息</h2>
  91. <div id="bills_title" class="show_title" style="display: none">
  92. <div>
  93. <% if (auditStatus === 1 || auditStatus === 2) { %>
  94. <div class="d-inline-block">
  95. <a href="#addlist" data-toggle="modal" class="btn btn-sm" id="open-list-modal" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="添加清单"><i class="fa fa-plus" aria-hidden="true"></i> 添加清单</a>
  96. </div>
  97. <% } else { %>
  98. <div class="d-inline-block">
  99. <h2 class="change-title">变更清单</h2>
  100. </div>
  101. <% } %>
  102. <div class="d-inline-block ml-3">
  103. <div class="custom-control custom-checkbox" style="line-height: normal;">
  104. <input type="checkbox" class="custom-control-input change-detail-checkbox" id="customCheck1" checked>
  105. <label class="custom-control-label" for="customCheck1">变更详情</label>
  106. </div>
  107. </div>
  108. <% if (auditStatus === 3 || auditStatus === 4 || auditStatus === 5 || auditStatus === 7) { %>
  109. <div class="d-inline-block ml-3">
  110. <div class="custom-control custom-checkbox" style="line-height: normal;">
  111. <input type="checkbox" class="custom-control-input" id="show-table-detail">
  112. <label class="custom-control-label" for="show-table-detail">审批过程</label>
  113. </div>
  114. </div>
  115. <% } %>
  116. </div>
  117. </div>
  118. <div id="files_title" class="show_title" style="display: none">
  119. <% if (auditStatus === 1 || auditStatus === 2 || auditStatus === 6) { %>
  120. <a href="#addfujian" data-toggle="modal" class="btn btn-sm" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="添加清单">
  121. <i class="fa fa-cloud-upload" aria-hidden="true"></i> 上传附件
  122. </a>
  123. <% } else { %>
  124. <h2 class="change-title">附件</h2>
  125. <% } %>
  126. </div>
  127. <input id="tenderId" value="<%= tender.id %>" type="hidden">
  128. <input id="changeId" value="<%= change.cid %>" type="hidden">
  129. <!--info状态区分-->
  130. <% if (auditStatus === 1) { %>
  131. <div>
  132. <a href="#sub-ap" data-category="save_change" data-toggle="modal" data-target="#sub-ap" class="btn btn-sm btn-success pull-right">保存修改</a>
  133. <a href="#sub-ap" data-category="up_change" data-toggle="modal" data-target="#sub-ap" class="btn btn-primary btn-sm pull-right">上报审批</a>
  134. <a href="#" class="btn btn-outline-danger btn-sm pull-right text-truncate" style="max-width: 100px;" title="删除 <%- change.code %>">删除 <%- change.code %></a>
  135. </div>
  136. <% } else if (auditStatus === 2) { %>
  137. <div>
  138. <a href="#sub-ap" data-toggle="modal" class="btn btn-sm btn-success pull-right">保存修改</a>
  139. <a href="#sub-sp" data-toggle="modal" data-target="#sub-sp" class="btn btn-primary btn-sm pull-right">重新上报</a>
  140. <a href="#" class="btn btn-outline-danger btn-sm pull-right text-truncate" style="max-width: 100px;" title="删除 <%- change.code %>">删除 <%- change.code %></a>
  141. </div>
  142. <% } else if (auditStatus === 3) { %>
  143. <div>
  144. <a href="#sp-list" data-toggle="modal" data-target="#sp-list" class="btn btn-outline-warning btn-sm pull-right text-muted">审批退回</a>
  145. </div>
  146. <% } else if (auditStatus === 4) { %>
  147. <div>
  148. <a href="#sp-list" data-toggle="modal" data-target="#sp-list" class="btn btn-outline-success btn-sm pull-right">审批完成</a>
  149. </div>
  150. <% } else if (auditStatus === 5) { %>
  151. <div>
  152. <a href="#sp-list" data-toggle="modal" data-target="#sp-list" class="btn btn-outline-danger btn-sm pull-right">审批终止</a>
  153. </div>
  154. <% } else if (auditStatus === 6) { %>
  155. <div>
  156. <a href="#sp-done" data-toggle="modal" data-target="#sp-done" class="btn btn-success btn-sm pull-right">审批通过</a>
  157. <a href="#sp-back" data-toggle="modal" data-target="#sp-back" class="btn btn-warning btn-sm pull-right">审批退回</a>
  158. <a href="#sp-end" data-toggle="modal" data-target="#sp-end" class="btn btn-danger btn-sm pull-right">审批终止</a>
  159. </div>
  160. <% } else if (auditStatus === 7) { %>
  161. <div>
  162. <a href="#sp-list" data-toggle="modal" data-target="#sp-list" class="btn btn-outline-secondary btn-sm pull-right">审批中</a>
  163. </div>
  164. <% } %>
  165. </div>
  166. </div>
  167. <div class="content-wrap tab-content">
  168. <div class="c-body tab-pane active" role="tabpanel" id="info">
  169. <!--变更信息-->
  170. <% if (auditStatus === 1 || auditStatus === 2) { %>
  171. <form action="/change/save?_csrf=<%= ctx.csrf %>" method="post" id="change_form">
  172. <div class="row">
  173. <div class="col-md-4">
  174. <div class="form-group">
  175. <label><b class="text-danger">*&nbsp;</b>申请编号</label>
  176. <a href="javascript:void(0);" class="pull-right reduction-code" data-toggle="tooltip" data-placement="bottom" title="" data-code="<%- change.code %>" data-original-title="自动编号"><i class="fa fa-repeat"></i></a>
  177. <input class="form-control" name="code" value="<%- change.code %>" type="text">
  178. </div>
  179. <div class="form-group">
  180. <label><b class="text-danger">*&nbsp;</b>工程名称</label>
  181. <input class="form-control" name="name" value="<%- change.name %>" type="text">
  182. </div>
  183. <div class="form-group">
  184. <label>桩号</label>
  185. <input class="form-control" name="peg" value="<%- change.peg %>" type="text">
  186. </div>
  187. <div class="form-group">
  188. <label>原设计图名称</label>
  189. <input class="form-control" name="org_name" placeholder="" type="text" value="<%- change.org_name %>">
  190. </div>
  191. <div class="form-group">
  192. <label>原图号</label>
  193. <input class="form-control" name="org_code" placeholder="" type="text" value="<%- change.org_code %>">
  194. </div>
  195. <div class="form-group">
  196. <label>变更设计图名称</label>
  197. <input class="form-control" name="new_name" placeholder="" type="text" value="<%- change.new_name %>">
  198. </div>
  199. <div class="form-group">
  200. <label>变更图号</label>
  201. <input class="form-control" name="new_code" placeholder="" type="text" value="<%- change.new_code %>">
  202. </div>
  203. </div>
  204. <div class="col-md-4" style="z-index:999">
  205. <div class="form-group">
  206. <label><b class="text-danger">*&nbsp;</b>工程变更理由及内容</label>
  207. <textarea class="form-control" name="content" rows="6"><%- change.content %></textarea>
  208. </div>
  209. <div class="form-group">
  210. <label>工程变更合同依据</label>
  211. <textarea class="form-control" name="basis" rows="6"><%- change.basis %></textarea>
  212. </div>
  213. <div class="form-group">
  214. <label>备注</label>
  215. <textarea class="form-control" name="memo" rows="3"><%- change.memo %></textarea>
  216. </div>
  217. </div>
  218. <div class="col-md-4">
  219. <div class="form-group">
  220. <label>变更类型</label>
  221. <div class="checkbox">
  222. <% const changeType = change.type !== null && change.type !== '' ? change.type.split(',') : '' %>
  223. <% for (const t in changeConst.type) { %>
  224. <% const cType = changeConst.type[t] %>
  225. <label class="checkbox-inline">
  226. <input value="<%- cType.value %>" name="type[]"
  227. type="checkbox"<% if (changeType.indexOf(cType.value.toString()) !== -1) { %> checked<% } %>><%- cType.name %>
  228. </label>
  229. <% } %>
  230. </div>
  231. </div>
  232. <div class="form-group">
  233. <label>变更类别 </label>
  234. <select class="form-control" name="class">
  235. <% for (const c in changeConst.class) { %>
  236. <% const cClass = changeConst.class[c] %>
  237. <option value="<%- cClass.value %>"<% if (cClass.value === change.class) { %> selected<% } %>><%- cClass.name %></option>
  238. <% } %>
  239. </select>
  240. </div>
  241. <div class="form-group">
  242. <label>变更性质 </label>
  243. <select class="form-control" name="quality">
  244. <% for (const q in changeConst.quality) { %>
  245. <% const cQuality = changeConst.quality[q] %>
  246. <option value="<%- cQuality.value %>"<% if (cQuality.value === change.quality) { %> selected<% } %>><%- cQuality.name %></option>
  247. <% } %>
  248. </select>
  249. </div>
  250. <div class="form-group">
  251. <label>变更提出单位</label>
  252. <a href="#editcompany" style="float:right;" class="" data-toggle="modal">编辑</a>
  253. <select class="form-control" id="company" name="company">
  254. <% for (const company of companyList) { %>
  255. <option <% if (company.name === change.company) { %>selected<% } %>><%- company.name %></option>
  256. <% } %>
  257. </select>
  258. </div>
  259. <div class="form-group">
  260. <label>费用承担方</label>
  261. <div class="radio">
  262. <% for (const c in changeConst.charge) { %>
  263. <% const cCharge = changeConst.charge[c] %>
  264. <label class="radio-inline">
  265. <input value="<%- cCharge.value %>" name="charge" type="radio"<% if (cCharge.value === change.charge) { %> checked<% } %>> <%- cCharge.name %>
  266. </label>
  267. <% } %>
  268. </div>
  269. </div>
  270. </div>
  271. </div>
  272. <!--清单、附件、审批人上传数据-->
  273. <input type="hidden" name="changelist" id="change-list" value="<%= changeListData %>">
  274. <input type="hidden" name="changewhitelist" id="change-whitelist" value="<%= changeWhiteListData %>">
  275. <input type="hidden" name="changeaudit" id="changeaudit" value="">
  276. <input type="hidden" name="changestatus" id="changeStatus">
  277. <input type="hidden" name="cid" value="<%= change.cid %>">
  278. </form>
  279. <% } else { %>
  280. <div class="row">
  281. <div class="col-md-4">
  282. <form>
  283. <div class="form-group">
  284. <label>申请编号</label>
  285. <a href="#" class="pull-right" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="自动编号"><i class="fa fa-repeat"></i></a>
  286. <input class="form-control" value="<%- change.code %>" type="text" readonly>
  287. </div>
  288. <% if (auditStatus === 4) { %>
  289. <div class="form-group">
  290. <label>批复编号</label>
  291. <a href="#" class="pull-right" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="自动编号"><i class="fa fa-repeat"></i></a>
  292. <input class="form-control" value="<%- change.p_code %>" type="text" readonly>
  293. </div>
  294. <% } %>
  295. <div class="form-group">
  296. <label>工程名称</label>
  297. <input class="form-control" value="<%- change.name %>" type="text" readonly>
  298. </div>
  299. <div class="form-group">
  300. <label>桩号</label>
  301. <input class="form-control" value="<%- change.peg %>" type="text" readonly>
  302. </div>
  303. <div class="form-group">
  304. <label>原设计图名称</label>
  305. <input class="form-control" placeholder="" type="text" value="<%- change.org_name %>" readonly>
  306. </div>
  307. <div class="form-group">
  308. <label>原图号</label>
  309. <input class="form-control" placeholder="" type="text" value="<%- change.org_code %>" readonly>
  310. </div>
  311. <div class="form-group">
  312. <label>变更设计图名称</label>
  313. <input class="form-control" placeholder="" type="text" value="<%- change.new_name %>" readonly>
  314. </div>
  315. <div class="form-group">
  316. <label>变更图号</label>
  317. <input class="form-control" placeholder="" type="text" value="<%- change.new_code %>" readonly>
  318. </div>
  319. </form>
  320. </div>
  321. <div class="col-md-4" style="z-index:999">
  322. <form>
  323. <div class="form-group">
  324. <label><b class="text-danger">*&nbsp;</b>工程变更理由及内容</label>
  325. <textarea class="form-control" rows="6" readonly><%- change.content %></textarea>
  326. </div>
  327. <div class="form-group">
  328. <label>工程变更合同依据</label>
  329. <textarea class="form-control" rows="6" readonly><%- change.basis %></textarea>
  330. </div>
  331. <div class="form-group">
  332. <label>备注</label>
  333. <textarea class="form-control" rows="3" readonly><%- change.memo %></textarea>
  334. </div>
  335. </form>
  336. </div>
  337. <div class="col-md-4">
  338. <form>
  339. <div class="form-group">
  340. <label>变更类型</label>
  341. <div class="checkbox">
  342. <% const changeType = change.type !== null && change.type !== '' ? change.type.split(',') : '' %>
  343. <% for (const t in changeConst.type) { %>
  344. <% const cType = changeConst.type[t] %>
  345. <label class="checkbox-inline">
  346. <% if (changeType.indexOf(cType.value.toString()) !== -1) { %>
  347. <input value="<%- cType.value %>" type="checkbox" disabled checked><%- cType.name %>
  348. <% } %>
  349. </label>
  350. <% } %>
  351. </div>
  352. </div>
  353. <div class="form-group">
  354. <label>变更类别 </label>
  355. <select class="form-control" disabled>
  356. <% for (const c in changeConst.class) { %>
  357. <% const cClass = changeConst.class[c] %>
  358. <% if (cClass.value === change.class) { %>
  359. <option value="<%- cClass.value %>"><%- cClass.name %></option>
  360. <% } %>
  361. <% } %>
  362. </select>
  363. </div>
  364. <div class="form-group">
  365. <label>变更性质 </label>
  366. <select class="form-control" disabled>
  367. <% for (const q in changeConst.quality) { %>
  368. <% const cQuality = changeConst.quality[q] %>
  369. <% if (cQuality.value === change.quality) { %>
  370. <option value="<%- cQuality.value %>"><%- cQuality.name %></option>
  371. <% } %>
  372. <% } %>
  373. </select>
  374. </div>
  375. <div class="form-group">
  376. <label>变更提出单位</label>
  377. <select class="form-control" disabled>
  378. <option><%- change.company %></option>
  379. </select>
  380. </div>
  381. <div class="form-group">
  382. <label>费用承担方</label>
  383. <div class="radio">
  384. <% for (const c in changeConst.charge) { %>
  385. <% const cCharge = changeConst.charge[c] %>
  386. <label class="radio-inline">
  387. <% if (cCharge.value === change.charge) { %>
  388. <input value="<%- cCharge.value %>" type="radio" disabled checked> <%- cCharge.name %>
  389. <% } %>
  390. </label>
  391. <% } %>
  392. </div>
  393. </div>
  394. <div class="form-group">
  395. <label><b class="text-danger">*&nbsp;</b>批复文号</label>
  396. <input class="form-control" id="w_code" placeholder="" type="text" value="<%- change.w_code %>" <% if (auditStatus !== 6) { %>readonly<% } %>>
  397. </div>
  398. </form>
  399. </div>
  400. </div>
  401. <% } %>
  402. </div>
  403. <div class="c-body tab-pane first-bill-pane" role="tabpanel" id="bills">
  404. <!--变更清单-->
  405. <% if (auditStatus === 1 || auditStatus === 2) { %>
  406. <table class="table table-striped table-bordered nowrap qd-table table-list" id="tablelist" cellspacing="0" style="width:100%">
  407. <thead>
  408. <tr>
  409. <th rowspan="2" class="text-center">清单编号</th>
  410. <th rowspan="2" class="text-center">名称</th>
  411. <th rowspan="2" class="text-center">变更详情</th>
  412. <th rowspan="2" class="text-center">单位</th>
  413. <th rowspan="2" class="text-center">单价</th>
  414. <th colspan="2" class="text-center">原设计</th>
  415. <th colspan="2" class="text-center">申报变更</th>
  416. <th rowspan="2" class="text-center">操作</th>
  417. </tr>
  418. <tr>
  419. <th class="text-center">数量</th>
  420. <th class="text-center">金额</th>
  421. <th class="text-center">数量</th>
  422. <th class="text-center">金额</th>
  423. </tr>
  424. </thead>
  425. <tbody id="list">
  426. <% let windex = 0; %>
  427. <% for (const [index,cl] of changeList.entries()) { %>
  428. <% if (cl.lid !== 0) { %>
  429. <tr class="clist clid" data-lid="<%= cl.lid %>_<%= index %>" data-index="<%= index %>">
  430. <td data-site="0"><%= cl.code %></td>
  431. <td data-site="1"><%= cl.name %></td>
  432. <td data-site="2"><input class="form-control form-control-sm" placeholder="变更详情" type="text" value="<%= cl.detail %>"></td>
  433. <td data-site="3"><%= cl.unit %></td>
  434. <td data-site="4"><%= ctx.helper.roundNum(cl.unit_price, tpUnit) %></td>
  435. <td data-site="5"><%= ctx.helper.roundNum(cl.oamount, ctx.helper.findDecimal(cl.unit)) %></td>
  436. <td data-site="6"><%= ctx.helper.roundNum(ctx.helper.accMul(cl.unit_price, cl.oamount), tpUnit) %></td>
  437. <td data-site="7"><input class="form-control form-control-sm" placeholder="变更数量" type="text" onkeyup="RegNum(this,event,<%= ctx.helper.findDecimal(cl.unit) %>)" value="<%= ctx.helper.roundNum(cl.camount, ctx.helper.findDecimal(cl.unit)) %>"></td>
  438. <td data-site="8"><%= ctx.helper.roundNum(ctx.helper.accMul(cl.unit_price, cl.camount), tpUnit) %></td>
  439. <td><a class="text-danger">移除</a>
  440. </td>
  441. </tr>
  442. <% } else { %>
  443. <tr class="clist" data-lid="<%= windex %>" data-index="<%= windex %>">
  444. <td data-site="0"><input class="form-control form-control-sm" placeholder="清单编号" type="text" value="<%= cl.code %>"></td>
  445. <td data-site="1"><input class="form-control form-control-sm" placeholder="名称" type="text" value="<%= cl.name %>"></td>
  446. <td data-site="2"><input class="form-control form-control-sm" placeholder="变更详情" type="text" value="<%= cl.detail %>"></td>
  447. <td data-site="3">
  448. <select class="form-control input-sm">
  449. <% for (const j in changeUnits) { %>
  450. <% if (changeUnits[j].unit !== undefined && changeUnits[j].unit === cl.unit) { %>
  451. <option selected="selected"><%= changeUnits[j].unit %></option>
  452. <% } else if(changeUnits[j].unit !== undefined) { %>
  453. <option><%= changeUnits[j].unit %></option>
  454. <% } %>
  455. <% } %>
  456. </select>
  457. </td>
  458. <td data-site="4"><input class="form-control form-control-sm" placeholder="单价" onkeyup="RegNum(this,event,tpUnit)" type="text" value="<%= ctx.helper.roundNum(cl.unit_price, tpUnit) %>"></td>
  459. <td data-site="5"><input class="form-control form-control-sm" placeholder="数量" onkeyup="RegNum(this,event,<%= ctx.helper.findDecimal(cl.unit) %>)" type="text" value="<%= ctx.helper.roundNum(cl.oamount, ctx.helper.findDecimal(cl.unit)) %>"></td>
  460. <td data-site="6"><%= ctx.helper.roundNum(ctx.helper.accMul(cl.unit_price, cl.oamount), tpUnit) %></td>
  461. <td data-site="7"><input class="form-control form-control-sm" placeholder="变更数量" onkeyup="RegNum(this,event,<%= ctx.helper.findDecimal(cl.unit) %>)" type="text" value="<%= ctx.helper.roundNum(cl.camount, ctx.helper.findDecimal(cl.unit)) %>"></td>
  462. <td data-site="8"><%= ctx.helper.roundNum(ctx.helper.accMul(cl.unit_price, cl.camount), tpUnit) %></td>
  463. <td><a class="text-danger">移除</a>
  464. </td>
  465. </tr>
  466. <% windex++ %>
  467. <% } %>
  468. <% } %>
  469. </tbody>
  470. <tfoot>
  471. <tr class="info">
  472. <td>合计</td><td></td><td></td><td></td><td></td><td></td>
  473. <td class="otatalamount"><%= ctx.helper.roundNum(ototalCost, tpUnit) %></td><td></td>
  474. <td class="ctatalamount"><%= ctx.helper.roundNum(ctotalCost, tpUnit) %></td><td></td>
  475. </tr>
  476. </tfoot>
  477. </table>
  478. <% } else if (auditStatus === 3 || auditStatus === 4 || auditStatus === 5 || auditStatus === 7) { %>
  479. <table class="table table-striped table-bordered nowrap qd-table table-list" id="tablelist" cellspacing="0" style="width:100%">
  480. <thead>
  481. <tr>
  482. <th rowspan="2" class="text-center">清单编号</th>
  483. <th rowspan="2" class="text-center">名称</th>
  484. <th rowspan="2" class="text-center">变更详情</th>
  485. <th rowspan="2" class="text-center">单位</th>
  486. <th rowspan="2" class="text-center">单价</th>
  487. <th colspan="2" class="text-center">原设计</th>
  488. <th colspan="2" class="text-center">申报变更</th>
  489. <th colspan="2" class="text-center">审批后变更</th>
  490. </tr>
  491. <tr>
  492. <th class="text-center">数量</th>
  493. <th class="text-center">金额</th>
  494. <th class="text-center">数量</th>
  495. <th class="text-center">金额</th>
  496. <th class="text-center">数量</th>
  497. <th class="text-center">金额</th>
  498. </tr>
  499. </thead>
  500. <tbody id="list">
  501. <% for (const cl of changeList.sort()) { %>
  502. <tr>
  503. <td><%= cl.code %></td>
  504. <td><%= cl.name %></td>
  505. <td><%= cl.detail %></td>
  506. <td><%= cl.unit %></td>
  507. <td><%= ctx.helper.roundNum(cl.unit_price, tpUnit) %></td>
  508. <td><%= ctx.helper.roundNum(cl.oamount, ctx.helper.findDecimal(cl.unit)) %></td>
  509. <td><%= ctx.helper.roundNum(ctx.helper.accMul(cl.unit_price, cl.oamount), tpUnit) %></td>
  510. <td><%= ctx.helper.roundNum(cl.camount, ctx.helper.findDecimal(cl.unit)) %></td>
  511. <td><%= ctx.helper.roundNum(ctx.helper.accMul(cl.unit_price, cl.camount), tpUnit) %></td>
  512. <td><%= cl.samount !== '' ? ctx.helper.roundNum(cl.samount, ctx.helper.findDecimal(cl.unit)) : '' %></td>
  513. <td><%= cl.samount !== '' ? ctx.helper.roundNum(ctx.helper.accMul(cl.unit_price, cl.samount), tpUnit) : '' %></td>
  514. </td>
  515. </tr>
  516. <% } %>
  517. </tbody>
  518. <tfoot>
  519. <tr class="info">
  520. <td>合计</td><td></td><td></td><td></td><td></td><td></td>
  521. <td><%= ctx.helper.roundNum(ototalCost, tpUnit) %></td><td></td>
  522. <td><%= ctx.helper.roundNum(ctotalCost, tpUnit) %></td><td></td>
  523. <td><%= stotalCost !== 0 ? ctx.helper.roundNum(stotalCost, tpUnit) : '' %></td>
  524. </tr>
  525. </tfoot>
  526. </table>
  527. <table class="table table-striped table-bordered nowrap qd-table table-list" id="tablelist2" cellspacing="0" style="width:100%;display: none;">
  528. <thead>
  529. <tr>
  530. <th rowspan="2" class="text-center">清单编号</th>
  531. <th rowspan="2" class="text-center">名称</th>
  532. <th rowspan="2" class="text-center">变更详情</th>
  533. <th rowspan="2" class="text-center">单位</th>
  534. <th rowspan="2" class="text-center">单价</th>
  535. <th colspan="2" class="text-center">原设计</th>
  536. <th colspan="2" class="text-center">申报变更</th>
  537. <% for (const audit of auditList2) { %>
  538. <% if (audit.usite !== 0) { %>
  539. <th colspan="2" class="text-center"><%= audit.name %> 审批</th>
  540. <% } %>
  541. <% } %>
  542. </tr>
  543. <tr>
  544. <th class="text-center">数量</th>
  545. <th class="text-center">金额</th>
  546. <th class="text-center">数量</th>
  547. <th class="text-center">金额</th>
  548. <% for (const audit of auditList2) { %>
  549. <% if (audit.usite !== 0) { %>
  550. <th class="text-center">数量</th>
  551. <th class="text-center">金额</th>
  552. <% } %>
  553. <% } %>
  554. </tr>
  555. </thead>
  556. <tbody id="list">
  557. <% const audittotalCost = []; %>
  558. <% for (const [cindex,cl] of changeList.sort().entries()) { %>
  559. <tr>
  560. <td><%= cl.code %></td>
  561. <td><%= cl.name %></td>
  562. <td><%= cl.detail %></td>
  563. <td><%= cl.unit %></td>
  564. <td><%= ctx.helper.roundNum(cl.unit_price, tpUnit) %></td>
  565. <td><%= ctx.helper.roundNum(cl.oamount, ctx.helper.findDecimal(cl.unit)) %></td>
  566. <td><%= ctx.helper.roundNum(ctx.helper.accMul(cl.unit_price, cl.oamount), tpUnit) %></td>
  567. <td><%= ctx.helper.roundNum(cl.camount, ctx.helper.findDecimal(cl.unit)) %></td>
  568. <td><%= ctx.helper.roundNum(ctx.helper.accMul(cl.unit_price, cl.camount), tpUnit) %></td>
  569. <% for (const audit of auditList2) { %>
  570. <% if (audit.usite !== 0) { %>
  571. <% %>
  572. <td><%= audit.list_amount[cindex] !== undefined ? ctx.helper.roundNum(audit.list_amount[cindex], ctx.helper.findDecimal(cl.unit)) : '' %></td>
  573. <td><%= audit.list_amount[cindex] !== undefined ? ctx.helper.roundNum(ctx.helper.accMul(cl.unit_price, audit.list_amount[cindex]), tpUnit) : '' %></td>
  574. <% } %>
  575. <% } %>
  576. </td>
  577. </tr>
  578. <% } %>
  579. </tbody>
  580. <tfoot>
  581. <tr class="info">
  582. <td>合计</td><td></td><td></td><td></td><td></td><td></td>
  583. <td><%= ctx.helper.roundNum(ototalCost, tpUnit) %></td><td></td>
  584. <td><%= ctx.helper.roundNum(ctotalCost, tpUnit) %></td>
  585. <% for (const audit of auditList2) { %>
  586. <% if (audit.usite !== 0) { %>
  587. <td></td><td><%=audit.totalCost !== 0 ? ctx.helper.roundNum(audit.totalCost, tpUnit) : '' %></td>
  588. <% } %>
  589. <% } %>
  590. </tr>
  591. </tfoot>
  592. </table>
  593. <% } else if (auditStatus === 6) { %>
  594. <% } %>
  595. </div>
  596. <div class="c-body tab-pane" role="tabpanel" id="files">
  597. <table class="table table-bordered">
  598. <thead>
  599. <tr>
  600. <th width="50">序号</th>
  601. <th>名称</th>
  602. <th width="90">大小</th>
  603. <th width="100">上传时间</th>
  604. <th width="100">操作</th>
  605. </tr>
  606. </thead>
  607. <tbody id="attList">
  608. <% if (attList !== undefined && attList !== '') { %>
  609. <% for (const [index,att] of attList.entries()) { %>
  610. <tr>
  611. <td><%- index+1 %></td>
  612. <td><a href="/change/download/file/<%- att.id %>"><%- att.filename %><%- att.fileext %></a></td>
  613. <td><%- ctx.helper.bytesToSize(att.filesize) %></td>
  614. <td><%- moment(att.in_time * 1000).format('YYYY-MM-DD') %></td>
  615. <td>
  616. <% if (att.uid === uid && (auditStatus === 1 || auditStatus === 2 || auditStatus === 6)) { %>
  617. <a class="btn btn-light btn-sm delete-file" data-attid="<%- att.id %>" title="删除附件"><span class="fa fa-trash text-danger"></span></a>
  618. <% } %>
  619. </td>
  620. </tr>
  621. <% } %>
  622. <% } %>
  623. </tbody>
  624. </table>
  625. </div>
  626. </div>
  627. </div>
  628. <link href="/public/css/toastr.css" rel="stylesheet">
  629. <script src="/public/js/toastr.min.js"></script>
  630. <script>
  631. $(document).ready(() => {
  632. toastr.options = {
  633. "closeButton": false,
  634. "debug": false,
  635. "newestOnTop": false,
  636. "progressBar": false,
  637. "positionClass": "toast-top-right",
  638. "preventDuplicates": false,
  639. "onclick": null,
  640. "showDuration": "300",
  641. "hideDuration": "1000",
  642. "timeOut": "5000",
  643. "extendedTimeOut": "1000",
  644. "showEasing": "swing",
  645. "hideEasing": "linear",
  646. "showMethod": "fadeIn",
  647. "hideMethod": "fadeOut"
  648. };
  649. })
  650. let table = '';
  651. </script>
  652. <script src="/public/js/datatable/jquery.dataTables.min.js"></script>
  653. <script src="/public/js/datatable/dataTables.bootstrap4.min.js"></script>
  654. <script src="/public/js/datatable/dataTables.fixedColumns.min.js"></script>
  655. <script src="/public/js/datatable/jlzf-change-table.js"></script>
  656. <script src="/public/js/change_calculation.js"></script>
  657. <% if (auditStatus === 1 || auditStatus === 2) { %>
  658. <script>
  659. const whiteList = JSON.parse('<%- JSON.stringify(whiteList) %>');
  660. const changeUnits = JSON.parse('<%- JSON.stringify(changeUnits) %>');
  661. const totalPriceUnit = '<%- tpUnit %>';
  662. const billsTable = {
  663. columnDefs: [
  664. { className: 'allwidth1', width: 100, targets: 0 },
  665. { className: 'allwidth2', width: 150, targets: [1,2] },
  666. { className: 'allwidth4', width: 40, targets: 9 },
  667. { className: 'allwidth5', width: 60, targets: 3 },
  668. { className: 'allwidth3',width: 80, targets: '_all' }
  669. ],
  670. fixedColumns: {
  671. leftColumns: 5
  672. }
  673. }
  674. </script>
  675. <script src="/public/js/change_set.js"></script>
  676. <% } else if (auditStatus === 3 || auditStatus === 4 || auditStatus === 5 || auditStatus === 7) { %>
  677. <script>
  678. const billsTable = {
  679. columnDefs: [
  680. { className: 'allwidth1', width: 100, targets: 0 },
  681. { className: 'allwidth2', width: 150, targets: [1,2] },
  682. { className: 'allwidth5', width: 60, targets: 3 },
  683. { className: 'allwidth3',width: 80, targets: '_all' }
  684. ],
  685. fixedColumns: {
  686. leftColumns: 5
  687. }
  688. }
  689. </script>
  690. <script src="/public/js/change_show.js"></script>
  691. <% } %>
  692. <script src="/public/js/change_detail.js"></script>