info.ejs 44 KB

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