info.ejs 47 KB

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