info.ejs 44 KB

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