info.ejs 45 KB

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