info.ejs 46 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792
  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:calc(1.4125rem + 2px);*/
  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: calc(1.4125rem + 2px);*/
  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: 12px;
  64. margin: 0;
  65. height: 34px;
  66. line-height: 34px;
  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 class="text-primary" 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. <% } %>
  132. <div class="d-inline-block">
  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. <div class="sjs-height-0 container-fluid">
  170. <!--变更信息-->
  171. <% if (auditStatus === 1 || auditStatus === 2) { %>
  172. <form action="/change/save?_csrf=<%= ctx.csrf %>" method="post" id="change_form">
  173. <div class="row">
  174. <div class="col-md-4">
  175. <div class="form-group">
  176. <label><b class="text-danger">*&nbsp;</b>申请编号</label>
  177. <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>
  178. <input class="form-control form-control-sm" name="code" value="<%- change.code %>" type="text">
  179. </div>
  180. <div class="form-group">
  181. <label><b class="text-danger">*&nbsp;</b>工程名称</label>
  182. <input class="form-control form-control-sm" name="name" value="<%- change.name %>" type="text">
  183. </div>
  184. <div class="form-group">
  185. <label>桩号</label>
  186. <input class="form-control form-control-sm" name="peg" value="<%- change.peg %>" type="text">
  187. </div>
  188. <div class="form-group">
  189. <label>原设计图名称</label>
  190. <input class="form-control form-control-sm" name="org_name" placeholder="" type="text" value="<%- change.org_name %>">
  191. </div>
  192. <div class="form-group">
  193. <label>原图号</label>
  194. <input class="form-control form-control-sm" name="org_code" placeholder="" type="text" value="<%- change.org_code %>">
  195. </div>
  196. <div class="form-group">
  197. <label>变更设计图名称</label>
  198. <input class="form-control form-control-sm" name="new_name" placeholder="" type="text" value="<%- change.new_name %>">
  199. </div>
  200. <div class="form-group">
  201. <label>变更图号</label>
  202. <input class="form-control form-control-sm" name="new_code" placeholder="" type="text" value="<%- change.new_code %>">
  203. </div>
  204. </div>
  205. <div class="col-md-4" style="z-index:999">
  206. <div class="form-group">
  207. <label><b class="text-danger">*&nbsp;</b>工程变更理由及内容</label>
  208. <textarea class="form-control form-control-sm" name="content" rows="6"><%- change.content %></textarea>
  209. </div>
  210. <div class="form-group">
  211. <label>工程变更合同依据</label>
  212. <textarea class="form-control form-control-sm" name="basis" rows="6"><%- change.basis %></textarea>
  213. </div>
  214. <div class="form-group">
  215. <label>备注</label>
  216. <textarea class="form-control form-control-sm" name="memo" rows="3"><%- change.memo %></textarea>
  217. </div>
  218. </div>
  219. <div class="col-md-4">
  220. <div class="form-group">
  221. <label>变更类型</label>
  222. <div class="checkbox">
  223. <% const changeType = change.type !== null && change.type !== '' ? change.type.split(',') : '' %>
  224. <% for (const t in changeConst.type) { %>
  225. <% const cType = changeConst.type[t] %>
  226. <label class="checkbox-inline">
  227. <input value="<%- cType.value %>" name="type[]"
  228. type="checkbox"<% if (changeType.indexOf(cType.value.toString()) !== -1) { %> checked<% } %>><%- cType.name %>
  229. </label>
  230. <% } %>
  231. </div>
  232. </div>
  233. <div class="form-group">
  234. <label>变更类别 </label>
  235. <select class="form-control form-control-sm" name="class">
  236. <% for (const c in changeConst.class) { %>
  237. <% const cClass = changeConst.class[c] %>
  238. <option value="<%- cClass.value %>"<% if (cClass.value === change.class) { %> selected<% } %>><%- cClass.name %></option>
  239. <% } %>
  240. </select>
  241. </div>
  242. <div class="form-group">
  243. <label>变更性质 </label>
  244. <select class="form-control form-control-sm" name="quality">
  245. <% for (const q in changeConst.quality) { %>
  246. <% const cQuality = changeConst.quality[q] %>
  247. <option value="<%- cQuality.value %>"<% if (cQuality.value === change.quality) { %> selected<% } %>><%- cQuality.name %></option>
  248. <% } %>
  249. </select>
  250. </div>
  251. <div class="form-group">
  252. <label>变更提出单位</label>
  253. <a href="#editcompany" style="float:right;" class="" data-toggle="modal">编辑</a>
  254. <select class="form-control form-control-sm" id="company" name="company">
  255. <% for (const company of companyList) { %>
  256. <option <% if (company.name === change.company) { %>selected<% } %>><%- company.name %></option>
  257. <% } %>
  258. </select>
  259. </div>
  260. <div class="form-group">
  261. <label>费用承担方</label>
  262. <div class="radio">
  263. <% for (const c in changeConst.charge) { %>
  264. <% const cCharge = changeConst.charge[c] %>
  265. <label class="radio-inline">
  266. <input value="<%- cCharge.value %>" name="charge" type="radio"<% if (cCharge.value === change.charge) { %> checked<% } %>> <%- cCharge.name %>
  267. </label>
  268. <% } %>
  269. </div>
  270. </div>
  271. </div>
  272. </div>
  273. <!--清单、附件、审批人上传数据-->
  274. <input type="hidden" name="changelist" id="change-list" value="<%= changeListData %>">
  275. <input type="hidden" name="changewhitelist" id="change-whitelist" value="<%= changeWhiteListData %>">
  276. <input type="hidden" name="changeaudit" id="changeaudit" value="">
  277. <input type="hidden" name="changestatus" id="changeStatus">
  278. <input type="hidden" name="cid" value="<%= change.cid %>">
  279. </form>
  280. <% } else { %>
  281. <div class="row">
  282. <div class="col-md-4">
  283. <form>
  284. <div class="form-group">
  285. <label>申请编号</label>
  286. <input class="form-control form-control-sm" value="<%- change.code %>" type="text" readonly>
  287. </div>
  288. <% if (auditStatus === 4) { %>
  289. <div class="form-group">
  290. <label>变更令号(批复编号)</label>
  291. <input class="form-control form-control-sm" value="<%- change.p_code %>" type="text" readonly>
  292. </div>
  293. <% } %>
  294. <div class="form-group">
  295. <label>工程名称</label>
  296. <input class="form-control form-control-sm" value="<%- change.name %>" type="text" readonly>
  297. </div>
  298. <div class="form-group">
  299. <label>桩号</label>
  300. <input class="form-control form-control-sm" value="<%- change.peg %>" type="text" readonly>
  301. </div>
  302. <div class="form-group">
  303. <label>原设计图名称</label>
  304. <input class="form-control form-control-sm" placeholder="" type="text" value="<%- change.org_name %>" readonly>
  305. </div>
  306. <div class="form-group">
  307. <label>原图号</label>
  308. <input class="form-control form-control-sm" placeholder="" type="text" value="<%- change.org_code %>" readonly>
  309. </div>
  310. <div class="form-group">
  311. <label>变更设计图名称</label>
  312. <input class="form-control form-control-sm" placeholder="" type="text" value="<%- change.new_name %>" readonly>
  313. </div>
  314. <div class="form-group">
  315. <label>变更图号</label>
  316. <input class="form-control form-control-sm" placeholder="" type="text" value="<%- change.new_code %>" readonly>
  317. </div>
  318. </form>
  319. </div>
  320. <div class="col-md-4" style="z-index:999">
  321. <form>
  322. <div class="form-group">
  323. <label>工程变更理由及内容</label>
  324. <textarea class="form-control form-control-sm" rows="6" readonly><%- change.content %></textarea>
  325. </div>
  326. <div class="form-group">
  327. <label>工程变更合同依据</label>
  328. <textarea class="form-control form-control-sm" rows="6" readonly><%- change.basis %></textarea>
  329. </div>
  330. <div class="form-group">
  331. <label>备注</label>
  332. <textarea class="form-control form-control-sm" rows="3" readonly><%- change.memo %></textarea>
  333. </div>
  334. </form>
  335. </div>
  336. <div class="col-md-4">
  337. <form>
  338. <div class="form-group">
  339. <label>变更类型</label>
  340. <div class="checkbox">
  341. <% const changeType = change.type !== null && change.type !== '' ? change.type.split(',') : '' %>
  342. <% for (const t in changeConst.type) { %>
  343. <% const cType = changeConst.type[t] %>
  344. <label class="checkbox-inline">
  345. <% if (changeType.indexOf(cType.value.toString()) !== -1) { %>
  346. <input value="<%- cType.value %>" type="checkbox" disabled checked><%- cType.name %>
  347. <% } %>
  348. </label>
  349. <% } %>
  350. </div>
  351. </div>
  352. <div class="form-group">
  353. <label>变更类别 </label>
  354. <select class="form-control form-control-sm" disabled>
  355. <% for (const c in changeConst.class) { %>
  356. <% const cClass = changeConst.class[c] %>
  357. <% if (cClass.value === change.class) { %>
  358. <option value="<%- cClass.value %>"><%- cClass.name %></option>
  359. <% } %>
  360. <% } %>
  361. </select>
  362. </div>
  363. <div class="form-group">
  364. <label>变更性质 </label>
  365. <select class="form-control form-control-sm" disabled>
  366. <% for (const q in changeConst.quality) { %>
  367. <% const cQuality = changeConst.quality[q] %>
  368. <% if (cQuality.value === change.quality) { %>
  369. <option value="<%- cQuality.value %>"><%- cQuality.name %></option>
  370. <% } %>
  371. <% } %>
  372. </select>
  373. </div>
  374. <div class="form-group">
  375. <label>变更提出单位</label>
  376. <select class="form-control form-control-sm" disabled>
  377. <option><%- change.company %></option>
  378. </select>
  379. </div>
  380. <div class="form-group">
  381. <label>费用承担方</label>
  382. <div class="radio">
  383. <% for (const c in changeConst.charge) { %>
  384. <% const cCharge = changeConst.charge[c] %>
  385. <label class="radio-inline">
  386. <% if (cCharge.value === change.charge) { %>
  387. <input value="<%- cCharge.value %>" type="radio" disabled checked> <%- cCharge.name %>
  388. <% } %>
  389. </label>
  390. <% } %>
  391. </div>
  392. </div>
  393. <div class="form-group">
  394. <label>批复文号</label>
  395. <input class="form-control form-control-sm" id="w_code" placeholder="" type="text" value="<%- change.w_code %>" <% if (auditStatus !== 6) { %>readonly<% } %>>
  396. </div>
  397. </form>
  398. </div>
  399. </div>
  400. <% } %>
  401. </div>
  402. </div>
  403. <div class="c-body tab-pane first-bill-pane" role="tabpanel" id="bills">
  404. <div class="sjs-height-0">
  405. <!--变更清单-->
  406. <% if (auditStatus === 1 || auditStatus === 2) { %>
  407. <table class="table table-striped table-bordered nowrap qd-table table-list" id="tablelist" cellspacing="0" style="width:100%">
  408. <thead>
  409. <tr>
  410. <th rowspan="2" class="text-center">清单编号</th>
  411. <th rowspan="2" class="text-center">名称</th>
  412. <th rowspan="2" class="text-center">变更部位</th>
  413. <th rowspan="2" class="text-center">变更详情</th>
  414. <th rowspan="2" class="text-center">单位</th>
  415. <th rowspan="2" class="text-center">单价</th>
  416. <th colspan="2" class="text-center">原设计</th>
  417. <th colspan="2" class="text-center">申报变更增(+)减(-)</th>
  418. <th rowspan="2" class="text-center">操作</th>
  419. </tr>
  420. <tr>
  421. <th class="text-center">数量</th>
  422. <th class="text-center">金额</th>
  423. <th class="text-center">数量</th>
  424. <th class="text-center">金额</th>
  425. </tr>
  426. </thead>
  427. <tbody id="list">
  428. <% let windex = 0; %>
  429. <% for (const [index,cl] of changeList.entries()) { %>
  430. <% if (cl.lid !== 0) { %>
  431. <tr class="clist clid" data-lid="<%= cl.lid %>_<%= index %>" data-index="<%= index %>">
  432. <td data-site="0"><%= cl.code %></td>
  433. <td data-site="1"><%= cl.name %></td>
  434. <td data-site="2"><%= cl.bwmx %></td>
  435. <td data-site="3"><input class="form-control form-control-sm" placeholder="变更详情" type="text" value="<%= cl.detail %>"></td>
  436. <td data-site="4"><%= cl.unit %></td>
  437. <td data-site="5"><%= ctx.helper.roundNum(cl.unit_price, upUnit) %></td>
  438. <td data-site="6"><%= ctx.helper.roundNum(cl.oamount, ctx.helper.findDecimal(cl.unit)) %></td>
  439. <td data-site="7"><%= ctx.helper.roundNum(ctx.helper.accMul(cl.unit_price, cl.oamount), tpUnit) %></td>
  440. <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>
  441. <td data-site="9"><%= ctx.helper.roundNum(ctx.helper.accMul(cl.unit_price, cl.camount), tpUnit) %></td>
  442. <td><a class="text-danger">移除</a>
  443. </td>
  444. </tr>
  445. <% } else { %>
  446. <tr class="clist" data-lid="<%= windex %>" data-index="<%= windex %>">
  447. <td data-site="0"><input class="form-control form-control-sm" placeholder="清单编号" type="text" value="<%= cl.code %>"></td>
  448. <td data-site="1"><input class="form-control form-control-sm" placeholder="名称" type="text" value="<%= cl.name %>"></td>
  449. <td data-site="2"><input class="form-control form-control-sm" placeholder="变更部位" type="text" value="<%= cl.bwmx %>"></td>
  450. <td data-site="3"><input class="form-control form-control-sm" placeholder="变更详情" type="text" value="<%= cl.detail %>"></td>
  451. <td data-site="4">
  452. <select class="form-control form-control-sm input-sm">
  453. <option></option>
  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 && audit.status === 2) { %>
  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>
  681. <div class="c-body tab-pane" role="tabpanel" id="files">
  682. <div class="sjs-height-0">
  683. <table class="table table-bordered">
  684. <thead>
  685. <tr>
  686. <th width="50">序号</th>
  687. <th>名称</th>
  688. <th width="90">大小</th>
  689. <th width="100">上传时间</th>
  690. <th width="100">操作</th>
  691. </tr>
  692. </thead>
  693. <tbody id="attList">
  694. <% if (attList !== undefined && attList !== '') { %>
  695. <% for (const [index,att] of attList.entries()) { %>
  696. <tr>
  697. <td><%- index+1 %></td>
  698. <td><a href="/change/download/file/<%- att.id %>"><%- att.filename %><%- att.fileext %></a></td>
  699. <td><%- ctx.helper.bytesToSize(att.filesize) %></td>
  700. <td><%- moment(att.in_time * 1000).format('YYYY-MM-DD') %></td>
  701. <td>
  702. <% if (att.uid === uid && (auditStatus === 1 || auditStatus === 2 || auditStatus === 6)) { %>
  703. <a class="btn btn-light btn-sm delete-file" data-attid="<%- att.id %>" title="删除附件"><span class="fa fa-trash text-danger"></span></a>
  704. <% } %>
  705. </td>
  706. </tr>
  707. <% } %>
  708. <% } %>
  709. </tbody>
  710. </table>
  711. </div>
  712. </div>
  713. </div>
  714. </div>
  715. <script>
  716. let table = '';
  717. const totalPriceUnit = '<%- tpUnit %>';
  718. const unitPriceUnit = '<%- upUnit %>';
  719. autoFlashHeight();
  720. </script>
  721. <script src="/public/js/datatable/jquery.dataTables.min.js"></script>
  722. <script src="/public/js/datatable/dataTables.bootstrap4.min.js"></script>
  723. <script src="/public/js/datatable/dataTables.fixedColumns.min.js"></script>
  724. <script src="/public/js/datatable/jlzf-change-table.js"></script>
  725. <script src="/public/js/change_calculation.js"></script>
  726. <script>
  727. const whiteList = JSON.parse('<%- JSON.stringify(whiteList) %>');
  728. </script>
  729. <% if (auditStatus === 1 || auditStatus === 2) { %>
  730. <script>
  731. const changeUnits = JSON.parse('<%- JSON.stringify(changeUnits) %>');
  732. const precision = JSON.parse('<%- JSON.stringify(precision) %>');
  733. const accountList = JSON.parse('<%- JSON.stringify(accountList) %>');
  734. const billsTable = {
  735. columnDefs: [
  736. { className: 'allwidth1', width: 100, targets: 0 },
  737. { className: 'allwidth2', width: 150, targets: [1,2,3] },
  738. { className: 'allwidth4', width: 40, targets: 10 },
  739. { className: 'allwidth5', width: 60, targets: 4 },
  740. { className: 'allwidth3',width: 80, targets: '_all' }
  741. ],
  742. fixedColumns: {
  743. leftColumns: 6
  744. }
  745. }
  746. const ledger = JSON.parse('<%- JSON.stringify(ledger) %>');
  747. const pos = JSON.parse('<%- JSON.stringify(pos) %>');
  748. const dealBillList = JSON.parse('<%- JSON.stringify(dealBillList) %>');
  749. </script>
  750. <script src="/public/js/decimal.min.js"></script>
  751. <script src="/public/js/zh_calc.js"></script>
  752. <script src="/public/js/path_tree.js"></script>
  753. <script src="/public/js/gcl_gather.js"></script>
  754. <script src="/public/js/jquery/jquery.form.min.js"></script>
  755. <script src="/public/js/change_set.js"></script>
  756. <% } else if (auditStatus === 3 || auditStatus === 4 || auditStatus === 5 || auditStatus === 7) { %>
  757. <script>
  758. const billsTable = {
  759. columnDefs: [
  760. { className: 'allwidth1', width: 100, targets: 0 },
  761. { className: 'allwidth2', width: 150, targets: [1,2,3] },
  762. { className: 'allwidth5', width: 60, targets: 4 },
  763. { className: 'allwidth3',width: 80, targets: '_all' }
  764. ],
  765. fixedColumns: {
  766. leftColumns: 6
  767. }
  768. }
  769. </script>
  770. <script src="/public/js/change_show.js"></script>
  771. <% } else if (auditStatus === 6) { %>
  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_approval.js"></script>
  786. <% } %>
  787. <script src="/public/js/change_detail.js"></script>