info.ejs 46 KB

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