info.ejs 45 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804
  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 class="text-truncate" style="white-space:nowrap; overflow:hidden; text-overflow:ellipsis;" data-toggle="tooltip" data-placement="right" title="" data-original-title="<%- tender.name %>"><%- 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. <% if (auditStatus === 4 && ctx.session.sessionUser.accountId === change.uid) { %>
  108. <!--重新审批-->
  109. <a href="javascript: void(0);" data-toggle="modal" data-target="#sp-down-back" class="btn btn-warning btn-sm btn-block">重新审批</a>
  110. <% } %>
  111. </div>
  112. </div>
  113. </div>
  114. <div class="panel-content">
  115. <div class="panel-title">
  116. <div class="title-main d-flex justify-content-between">
  117. <h2 id="info_title" class="show_title">变更信息</h2>
  118. <div id="bills_title" class="show_title" style="display: none">
  119. <div>
  120. <% if (auditStatus === 1 || auditStatus === 2) { %>
  121. <div class="d-inline-block">
  122. <a href="#addlist" data-toggle="modal" class="btn btn-sm btn-light text-primary" id="open-list-modal" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="添加清单"><i class="fa fa-plus" aria-hidden="true"></i> 添加台帐清单</a>
  123. </div>
  124. <div class="d-inline-block">
  125. <a href="javascript:void(0);" class="btn btn-sm btn-light text-primary" id="add-white-btn" data-original-title="添加清单"><i class="fa fa-plus" aria-hidden="true"></i> 添加空白清单</a>
  126. </div>
  127. <% } else { %>
  128. <div class="d-inline-block">
  129. <h2 class="change-title">变更清单</h2>
  130. </div>
  131. <% } %>
  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 change-detail-checkbox" id="customCheck1" checked>
  135. <label class="custom-control-label" for="customCheck1">变更详情</label>
  136. </div>
  137. </div>
  138. <% if (auditStatus === 3 || auditStatus === 4 || auditStatus === 5 || auditStatus === 7) { %>
  139. <div class="d-inline-block ml-3">
  140. <div class="custom-control custom-checkbox" style="line-height: normal;">
  141. <input type="checkbox" class="custom-control-input" id="show-table-detail">
  142. <label class="custom-control-label" for="show-table-detail">审批过程</label>
  143. </div>
  144. </div>
  145. <% } %>
  146. </div>
  147. </div>
  148. <div id="files_title" class="show_title" style="display: none">
  149. <% if (auditStatus === 1 || auditStatus === 2 || auditStatus === 6) { %>
  150. <a href="#addfujian" data-toggle="modal" class="btn btn-sm" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="添加清单">
  151. <i class="fa fa-cloud-upload" aria-hidden="true"></i> 上传附件
  152. </a>
  153. <% } else { %>
  154. <h2 class="change-title">附件</h2>
  155. <% } %>
  156. </div>
  157. <input id="tenderId" value="<%= tender.id %>" type="hidden">
  158. <input id="changeId" value="<%= change.cid %>" type="hidden">
  159. <!--info状态区分-->
  160. <% if (auditStatus === 1 || auditStatus === 2) { %>
  161. <div>
  162. <button class="btn btn-sm btn-success pull-right" id="save_change"><i class="fa fa-save"></i> 保存修改</button>
  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. <input class="form-control" value="<%- change.code %>" type="text" readonly>
  286. </div>
  287. <% if (auditStatus === 4) { %>
  288. <div class="form-group">
  289. <label>变更令号(批复编号)</label>
  290. <input class="form-control" value="<%- change.p_code %>" type="text" readonly>
  291. </div>
  292. <% } %>
  293. <div class="form-group">
  294. <label>工程名称</label>
  295. <input class="form-control" value="<%- change.name %>" type="text" readonly>
  296. </div>
  297. <div class="form-group">
  298. <label>桩号</label>
  299. <input class="form-control" value="<%- change.peg %>" type="text" readonly>
  300. </div>
  301. <div class="form-group">
  302. <label>原设计图名称</label>
  303. <input class="form-control" placeholder="" type="text" value="<%- change.org_name %>" readonly>
  304. </div>
  305. <div class="form-group">
  306. <label>原图号</label>
  307. <input class="form-control" placeholder="" type="text" value="<%- change.org_code %>" readonly>
  308. </div>
  309. <div class="form-group">
  310. <label>变更设计图名称</label>
  311. <input class="form-control" placeholder="" type="text" value="<%- change.new_name %>" readonly>
  312. </div>
  313. <div class="form-group">
  314. <label>变更图号</label>
  315. <input class="form-control" placeholder="" type="text" value="<%- change.new_code %>" readonly>
  316. </div>
  317. </form>
  318. </div>
  319. <div class="col-md-4" style="z-index:999">
  320. <form>
  321. <div class="form-group">
  322. <label>工程变更理由及内容</label>
  323. <textarea class="form-control" rows="6" readonly><%- change.content %></textarea>
  324. </div>
  325. <div class="form-group">
  326. <label>工程变更合同依据</label>
  327. <textarea class="form-control" rows="6" readonly><%- change.basis %></textarea>
  328. </div>
  329. <div class="form-group">
  330. <label>备注</label>
  331. <textarea class="form-control" rows="3" readonly><%- change.memo %></textarea>
  332. </div>
  333. </form>
  334. </div>
  335. <div class="col-md-4">
  336. <form>
  337. <div class="form-group">
  338. <label>变更类型</label>
  339. <div class="checkbox">
  340. <% const changeType = change.type !== null && change.type !== '' ? change.type.split(',') : '' %>
  341. <% for (const t in changeConst.type) { %>
  342. <% const cType = changeConst.type[t] %>
  343. <label class="checkbox-inline">
  344. <% if (changeType.indexOf(cType.value.toString()) !== -1) { %>
  345. <input value="<%- cType.value %>" type="checkbox" disabled checked><%- cType.name %>
  346. <% } %>
  347. </label>
  348. <% } %>
  349. </div>
  350. </div>
  351. <div class="form-group">
  352. <label>变更类别 </label>
  353. <select class="form-control" disabled>
  354. <% for (const c in changeConst.class) { %>
  355. <% const cClass = changeConst.class[c] %>
  356. <% if (cClass.value === change.class) { %>
  357. <option value="<%- cClass.value %>"><%- cClass.name %></option>
  358. <% } %>
  359. <% } %>
  360. </select>
  361. </div>
  362. <div class="form-group">
  363. <label>变更性质 </label>
  364. <select class="form-control" disabled>
  365. <% for (const q in changeConst.quality) { %>
  366. <% const cQuality = changeConst.quality[q] %>
  367. <% if (cQuality.value === change.quality) { %>
  368. <option value="<%- cQuality.value %>"><%- cQuality.name %></option>
  369. <% } %>
  370. <% } %>
  371. </select>
  372. </div>
  373. <div class="form-group">
  374. <label>变更提出单位</label>
  375. <select class="form-control" disabled>
  376. <option><%- change.company %></option>
  377. </select>
  378. </div>
  379. <div class="form-group">
  380. <label>费用承担方</label>
  381. <div class="radio">
  382. <% for (const c in changeConst.charge) { %>
  383. <% const cCharge = changeConst.charge[c] %>
  384. <label class="radio-inline">
  385. <% if (cCharge.value === change.charge) { %>
  386. <input value="<%- cCharge.value %>" type="radio" disabled checked> <%- cCharge.name %>
  387. <% } %>
  388. </label>
  389. <% } %>
  390. </div>
  391. </div>
  392. <div class="form-group">
  393. <label>批复文号</label>
  394. <input class="form-control" id="w_code" placeholder="" type="text" value="<%- change.w_code %>" <% if (auditStatus !== 6) { %>readonly<% } %>>
  395. </div>
  396. </form>
  397. </div>
  398. </div>
  399. <% } %>
  400. </div>
  401. <div class="c-body tab-pane first-bill-pane" role="tabpanel" id="bills">
  402. <!--变更清单-->
  403. <% if (auditStatus === 1 || auditStatus === 2) { %>
  404. <table class="table table-striped table-bordered nowrap qd-table table-list" id="tablelist" cellspacing="0" style="width:100%">
  405. <thead>
  406. <tr>
  407. <th rowspan="2" class="text-center">清单编号</th>
  408. <th rowspan="2" class="text-center">名称</th>
  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 colspan="2" class="text-center">原设计</th>
  414. <th colspan="2" class="text-center">申报变更增(+)减(-)</th>
  415. <th rowspan="2" class="text-center">操作</th>
  416. </tr>
  417. <tr>
  418. <th class="text-center">数量</th>
  419. <th class="text-center">金额</th>
  420. <th class="text-center">数量</th>
  421. <th class="text-center">金额</th>
  422. </tr>
  423. </thead>
  424. <tbody id="list">
  425. <% let windex = 0; %>
  426. <% for (const [index,cl] of changeList.entries()) { %>
  427. <% if (cl.lid !== 0) { %>
  428. <tr class="clist clid" data-lid="<%= cl.lid %>_<%= index %>" data-index="<%= index %>">
  429. <td data-site="0"><%= cl.code %></td>
  430. <td data-site="1"><%= cl.name %></td>
  431. <td data-site="2"><%= cl.bwmx %></td>
  432. <td data-site="3"><input class="form-control form-control-sm" placeholder="变更详情" type="text" value="<%= cl.detail %>"></td>
  433. <td data-site="4"><%= cl.unit %></td>
  434. <td data-site="5"><%= ctx.helper.roundNum(cl.unit_price, tpUnit) %></td>
  435. <td data-site="6"><%= ctx.helper.roundNum(cl.oamount, ctx.helper.findDecimal(cl.unit)) %></td>
  436. <td data-site="7"><%= ctx.helper.roundNum(ctx.helper.accMul(cl.unit_price, cl.oamount), tpUnit) %></td>
  437. <td data-site="8"><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="9"><%= 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.bwmx %>"></td>
  447. <td data-site="3"><input class="form-control form-control-sm" placeholder="变更详情" type="text" value="<%= cl.detail %>"></td>
  448. <td data-site="4">
  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="5"><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="6"><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="7"><%= ctx.helper.roundNum(ctx.helper.accMul(cl.unit_price, cl.oamount), tpUnit) %></td>
  462. <td data-site="8"><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="9"><%= 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><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 rowspan="2" class="text-center">单价</th>
  489. <th colspan="2" class="text-center">原设计</th>
  490. <th colspan="2" class="text-center">申报变更增(+)减(-)</th>
  491. <th colspan="2" class="text-center">审批后变更</th>
  492. </tr>
  493. <tr>
  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. <th class="text-center">金额</th>
  500. </tr>
  501. </thead>
  502. <tbody id="list">
  503. <% for (const cl of changeList.sort()) { %>
  504. <tr>
  505. <td><%= cl.code %></td>
  506. <td><%= cl.name %></td>
  507. <td><%= cl.bwmx %></td>
  508. <td><%= cl.detail %></td>
  509. <td><%= cl.unit %></td>
  510. <td><%= ctx.helper.roundNum(cl.unit_price, upUnit) %></td>
  511. <td><%= ctx.helper.roundNum(cl.oamount, ctx.helper.findDecimal(cl.unit)) %></td>
  512. <td><%= ctx.helper.roundNum(ctx.helper.accMul(cl.unit_price, cl.oamount), tpUnit) %></td>
  513. <td><%= ctx.helper.roundNum(cl.camount, ctx.helper.findDecimal(cl.unit)) %></td>
  514. <td><%= ctx.helper.roundNum(ctx.helper.accMul(cl.unit_price, cl.camount), tpUnit) %></td>
  515. <td><%= cl.samount !== '' ? ctx.helper.roundNum(cl.samount, ctx.helper.findDecimal(cl.unit)) : '' %></td>
  516. <td><%= cl.samount !== '' ? ctx.helper.roundNum(ctx.helper.accMul(cl.unit_price, cl.samount), tpUnit) : '' %></td>
  517. </td>
  518. </tr>
  519. <% } %>
  520. </tbody>
  521. <tfoot>
  522. <tr class="info">
  523. <td>合计</td><td></td><td></td><td></td><td></td><td></td><td></td>
  524. <td><%= ctx.helper.roundNum(ototalCost, tpUnit) %></td><td></td>
  525. <td><%= ctx.helper.roundNum(ctotalCost, tpUnit) %></td><td></td>
  526. <td><%= stotalCost !== 0 ? ctx.helper.roundNum(stotalCost, tpUnit) : '' %></td>
  527. </tr>
  528. </tfoot>
  529. </table>
  530. <table class="table table-striped table-bordered nowrap qd-table table-list" id="tablelist2" cellspacing="0" style="width:100%;display: none;">
  531. <thead>
  532. <tr>
  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 rowspan="2" class="text-center">变更详情</th>
  537. <th rowspan="2" class="text-center">单位</th>
  538. <th rowspan="2" class="text-center">单价</th>
  539. <th colspan="2" class="text-center">原设计</th>
  540. <th colspan="2" class="text-center">申报变更增(+)减(-)</th>
  541. <% for (const audit of auditList2) { %>
  542. <% if (audit.usite !== 0) { %>
  543. <th colspan="2" class="text-center"><%= audit.name %> 审批</th>
  544. <% } %>
  545. <% } %>
  546. </tr>
  547. <tr>
  548. <th class="text-center">数量</th>
  549. <th class="text-center">金额</th>
  550. <th class="text-center">数量</th>
  551. <th class="text-center">金额</th>
  552. <% for (const audit of auditList2) { %>
  553. <% if (audit.usite !== 0) { %>
  554. <th class="text-center">数量</th>
  555. <th class="text-center">金额</th>
  556. <% } %>
  557. <% } %>
  558. </tr>
  559. </thead>
  560. <tbody id="list">
  561. <% const audittotalCost = []; %>
  562. <% for (const [cindex,cl] of changeList.sort().entries()) { %>
  563. <tr>
  564. <td><%= cl.code %></td>
  565. <td><%= cl.name %></td>
  566. <td><%= cl.bwmx %></td>
  567. <td><%= cl.detail %></td>
  568. <td><%= cl.unit %></td>
  569. <td><%= ctx.helper.roundNum(cl.unit_price, upUnit) %></td>
  570. <td><%= ctx.helper.roundNum(cl.oamount, ctx.helper.findDecimal(cl.unit)) %></td>
  571. <td><%= ctx.helper.roundNum(ctx.helper.accMul(cl.unit_price, cl.oamount), tpUnit) %></td>
  572. <td><%= ctx.helper.roundNum(cl.camount, ctx.helper.findDecimal(cl.unit)) %></td>
  573. <td><%= ctx.helper.roundNum(ctx.helper.accMul(cl.unit_price, cl.camount), tpUnit) %></td>
  574. <% for (const audit of auditList2) { %>
  575. <% if (audit.usite !== 0) { %>
  576. <td><%= audit.list_amount[cindex] !== undefined ? ctx.helper.roundNum(audit.list_amount[cindex], ctx.helper.findDecimal(cl.unit)) : '' %></td>
  577. <td><%= audit.list_amount[cindex] !== undefined ? ctx.helper.roundNum(ctx.helper.accMul(cl.unit_price, audit.list_amount[cindex]), tpUnit) : '' %></td>
  578. <% } %>
  579. <% } %>
  580. </td>
  581. </tr>
  582. <% } %>
  583. </tbody>
  584. <tfoot>
  585. <tr class="info">
  586. <td>合计</td><td></td><td></td><td></td><td></td><td></td><td></td>
  587. <td><%= ctx.helper.roundNum(ototalCost, tpUnit) %></td><td></td>
  588. <td><%= ctx.helper.roundNum(ctotalCost, tpUnit) %></td>
  589. <% for (const audit of auditList2) { %>
  590. <% if (audit.usite !== 0) { %>
  591. <td></td><td><%=audit.totalCost !== 0 ? ctx.helper.roundNum(audit.totalCost, tpUnit) : '' %></td>
  592. <% } %>
  593. <% } %>
  594. </tr>
  595. </tfoot>
  596. </table>
  597. <% } else if (auditStatus === 6) { %>
  598. <table class="table table-striped table-bordered nowrap qd-table table-list" id="tablelist" cellspacing="0" style="width:100%;">
  599. <thead>
  600. <tr>
  601. <th rowspan="2" class="text-center">清单编号</th>
  602. <th rowspan="2" class="text-center">名称</th>
  603. <th rowspan="2" class="text-center">变更部位</th>
  604. <th rowspan="2" class="text-center">变更详情</th>
  605. <th rowspan="2" class="text-center">单位</th>
  606. <th rowspan="2" class="text-center">单价</th>
  607. <th colspan="2" class="text-center">原设计</th>
  608. <th colspan="2" class="text-center">申报变更增(+)减(-)</th>
  609. <% for (const audit of auditList) { %>
  610. <% if (audit.usite !== 0) { %>
  611. <th colspan="2" class="text-center"><%= audit.name %> 审批</th>
  612. <% } %>
  613. <% } %>
  614. </tr>
  615. <tr>
  616. <th class="text-center">数量</th>
  617. <th class="text-center">金额</th>
  618. <th class="text-center">数量</th>
  619. <th class="text-center">金额</th>
  620. <% for (const audit of auditList) { %>
  621. <% if (audit.usite !== 0) { %>
  622. <th class="text-center">数量</th>
  623. <th class="text-center">金额</th>
  624. <% } %>
  625. <% } %>
  626. </tr>
  627. </thead>
  628. <tbody id="list">
  629. <% const audittotalCost = []; %>
  630. <% for (const [cindex,cl] of changeList.entries()) { %>
  631. <tr class="clist" data-lid="<%= cl.id %>">
  632. <td><%= cl.code %></td>
  633. <td><%= cl.name %></td>
  634. <td><%= cl.bwmx %></td>
  635. <td><%= cl.detail %></td>
  636. <td><%= cl.unit %></td>
  637. <td data-site="5"><%= ctx.helper.roundNum(cl.unit_price, upUnit) %></td>
  638. <td><%= ctx.helper.roundNum(cl.oamount, ctx.helper.findDecimal(cl.unit)) %></td>
  639. <td><%= ctx.helper.roundNum(ctx.helper.accMul(cl.unit_price, cl.oamount), tpUnit) %></td>
  640. <td><%= ctx.helper.roundNum(cl.camount, ctx.helper.findDecimal(cl.unit)) %></td>
  641. <td><%= ctx.helper.roundNum(ctx.helper.accMul(cl.unit_price, cl.camount), tpUnit) %></td>
  642. <% for (const audit of auditList) { %>
  643. <% if (audit.usite !== 0) { %>
  644. <% if (uid === audit.uid) { %>
  645. <td>
  646. <input class="form-control form-control-sm" style="min-width:80px" placeholder="变更数量" type="text"
  647. onkeyup="RegNum(this,event,<%= ctx.helper.findDecimal(cl.unit) %>)"
  648. value="<%= audit.list_amount[cindex] !== undefined ?
  649. ctx.helper.roundNum(audit.list_amount[cindex], ctx.helper.findDecimal(cl.unit)) : '' %>">
  650. </td>
  651. <% } else { %>
  652. <td><%= audit.list_amount[cindex] !== undefined ? ctx.helper.roundNum(audit.list_amount[cindex], ctx.helper.findDecimal(cl.unit)) : '' %></td>
  653. <% } %>
  654. <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>
  655. <% } %>
  656. <% } %>
  657. </td>
  658. </tr>
  659. <% } %>
  660. </tbody>
  661. <tfoot>
  662. <tr class="info">
  663. <td>合计</td><td></td><td></td><td></td><td></td><td></td><td></td>
  664. <td><%= ctx.helper.roundNum(ototalCost, tpUnit) %></td><td></td>
  665. <td><%= ctx.helper.roundNum(ctotalCost, tpUnit) %></td>
  666. <% for (const audit of auditList) { %>
  667. <% if (audit.usite !== 0) { %>
  668. <td></td><td <% if (uid === audit.uid) { %>class="amount_totalcost"<% } %>><%=audit.totalCost !== 0 ? ctx.helper.roundNum(audit.totalCost, tpUnit) : '' %></td>
  669. <% } %>
  670. <% } %>
  671. </tr>
  672. </tfoot>
  673. </table>
  674. <% } %>
  675. </div>
  676. <div class="c-body tab-pane" role="tabpanel" id="files">
  677. <table class="table table-bordered">
  678. <thead>
  679. <tr>
  680. <th width="50">序号</th>
  681. <th>名称</th>
  682. <th width="90">大小</th>
  683. <th width="100">上传时间</th>
  684. <th width="100">操作</th>
  685. </tr>
  686. </thead>
  687. <tbody id="attList">
  688. <% if (attList !== undefined && attList !== '') { %>
  689. <% for (const [index,att] of attList.entries()) { %>
  690. <tr>
  691. <td><%- index+1 %></td>
  692. <td><a href="/change/download/file/<%- att.id %>"><%- att.filename %><%- att.fileext %></a></td>
  693. <td><%- ctx.helper.bytesToSize(att.filesize) %></td>
  694. <td><%- moment(att.in_time * 1000).format('YYYY-MM-DD') %></td>
  695. <td>
  696. <% if (att.uid === uid && (auditStatus === 1 || auditStatus === 2 || auditStatus === 6)) { %>
  697. <a class="btn btn-light btn-sm delete-file" data-attid="<%- att.id %>" title="删除附件"><span class="fa fa-trash text-danger"></span></a>
  698. <% } %>
  699. </td>
  700. </tr>
  701. <% } %>
  702. <% } %>
  703. </tbody>
  704. </table>
  705. </div>
  706. </div>
  707. </div>
  708. <link href="/public/css/toastr.css" rel="stylesheet">
  709. <script src="/public/js/toastr.min.js"></script>
  710. <script>
  711. $(document).ready(() => {
  712. toastr.options = {
  713. "closeButton": false,
  714. "debug": false,
  715. "newestOnTop": false,
  716. "progressBar": false,
  717. "positionClass": "toast-top-right",
  718. "preventDuplicates": false,
  719. "onclick": null,
  720. "showDuration": "300",
  721. "hideDuration": "1000",
  722. "timeOut": "5000",
  723. "extendedTimeOut": "1000",
  724. "showEasing": "swing",
  725. "hideEasing": "linear",
  726. "showMethod": "fadeIn",
  727. "hideMethod": "fadeOut"
  728. };
  729. })
  730. let table = '';
  731. const totalPriceUnit = '<%- tpUnit %>';
  732. const unitPriceUnit = '<%- upUnit %>';
  733. </script>
  734. <script src="/public/js/datatable/jquery.dataTables.min.js"></script>
  735. <script src="/public/js/datatable/dataTables.bootstrap4.min.js"></script>
  736. <script src="/public/js/datatable/dataTables.fixedColumns.min.js"></script>
  737. <script src="/public/js/datatable/jlzf-change-table.js"></script>
  738. <script src="/public/js/change_calculation.js"></script>
  739. <% if (auditStatus === 1 || auditStatus === 2) { %>
  740. <script>
  741. const whiteList = JSON.parse('<%- JSON.stringify(whiteList) %>');
  742. const changeUnits = JSON.parse('<%- JSON.stringify(changeUnits) %>');
  743. const precision = JSON.parse('<%- JSON.stringify(precision) %>');
  744. const accountList = JSON.parse('<%- JSON.stringify(accountList) %>');
  745. const billsTable = {
  746. columnDefs: [
  747. { className: 'allwidth1', width: 100, targets: 0 },
  748. { className: 'allwidth2', width: 150, targets: [1,2,3] },
  749. { className: 'allwidth4', width: 40, targets: 10 },
  750. { className: 'allwidth5', width: 60, targets: 4 },
  751. { className: 'allwidth3',width: 80, targets: '_all' }
  752. ],
  753. fixedColumns: {
  754. leftColumns: 6
  755. }
  756. }
  757. const ledger = JSON.parse('<%- JSON.stringify(ledger) %>');
  758. const pos = JSON.parse('<%- JSON.stringify(pos) %>');
  759. const dealBillList = JSON.parse('<%- JSON.stringify(dealBillList) %>');
  760. </script>
  761. <script src="/public/js/decimal.min.js"></script>
  762. <script src="/public/js/zh_calc.js"></script>
  763. <script src="/public/js/path_tree.js"></script>
  764. <script src="/public/js/gcl_gather.js"></script>
  765. <script src="/public/js/jquery/jquery.form.min.js"></script>
  766. <script src="/public/js/change_set.js"></script>
  767. <% } else if (auditStatus === 3 || auditStatus === 4 || auditStatus === 5 || auditStatus === 7) { %>
  768. <script>
  769. const billsTable = {
  770. columnDefs: [
  771. { className: 'allwidth1', width: 100, targets: 0 },
  772. { className: 'allwidth2', width: 150, targets: [1,2,3] },
  773. { className: 'allwidth5', width: 60, targets: 4 },
  774. { className: 'allwidth3',width: 80, targets: '_all' }
  775. ],
  776. fixedColumns: {
  777. leftColumns: 6
  778. }
  779. }
  780. </script>
  781. <script src="/public/js/change_show.js"></script>
  782. <% } else if (auditStatus === 6) { %>
  783. <script>
  784. const billsTable = {
  785. columnDefs: [
  786. { className: 'allwidth1', width: 100, targets: 0 },
  787. { className: 'allwidth2', width: 150, targets: [1,2,3] },
  788. { className: 'allwidth5', width: 60, targets: 4 },
  789. { className: 'allwidth3',width: 80, targets: '_all' }
  790. ],
  791. fixedColumns: {
  792. leftColumns: 6
  793. }
  794. }
  795. </script>
  796. <script src="/public/js/change_approval.js"></script>
  797. <% } %>
  798. <script src="/public/js/change_detail.js"></script>