info.ejs 48 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826
  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" 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="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" 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. <!--<input type="hidden" id="change-info" value="">-->
  289. <input type="hidden" id="back-change-info" value="<%= JSON.stringify(change) %>">
  290. </form>
  291. <% } else { %>
  292. <div class="row">
  293. <div class="col-md-4">
  294. <form>
  295. <div class="form-group">
  296. <label>申请编号</label>
  297. <input class="form-control form-control-sm" value="<%- change.code %>" type="text" readonly>
  298. </div>
  299. <% if (auditStatus === 4) { %>
  300. <div class="form-group">
  301. <label>变更令号(批复编号)</label>
  302. <input class="form-control form-control-sm" value="<%- change.p_code %>" type="text" readonly>
  303. </div>
  304. <% } %>
  305. <div class="form-group">
  306. <label>工程名称</label>
  307. <input class="form-control form-control-sm" value="<%- change.name %>" type="text" readonly>
  308. </div>
  309. <div class="form-group">
  310. <label>桩号</label>
  311. <input class="form-control form-control-sm" value="<%- change.peg %>" type="text" readonly>
  312. </div>
  313. <div class="form-group">
  314. <label>原设计图名称</label>
  315. <input class="form-control form-control-sm" placeholder="" type="text" value="<%- change.org_name %>" readonly>
  316. </div>
  317. <div class="form-group">
  318. <label>原图号</label>
  319. <input class="form-control form-control-sm" placeholder="" type="text" value="<%- change.org_code %>" readonly>
  320. </div>
  321. <div class="form-group">
  322. <label>变更设计图名称</label>
  323. <input class="form-control form-control-sm" placeholder="" type="text" value="<%- change.new_name %>" readonly>
  324. </div>
  325. <div class="form-group">
  326. <label>变更图号</label>
  327. <input class="form-control form-control-sm" placeholder="" type="text" value="<%- change.new_code %>" readonly>
  328. </div>
  329. </form>
  330. </div>
  331. <div class="col-md-4" style="z-index:999">
  332. <form>
  333. <div class="form-group">
  334. <label>工程变更理由及内容</label>
  335. <textarea class="form-control form-control-sm" rows="6" readonly><%- change.content %></textarea>
  336. </div>
  337. <div class="form-group">
  338. <label>工程变更合同依据</label>
  339. <textarea class="form-control form-control-sm" rows="6" readonly><%- change.basis %></textarea>
  340. </div>
  341. <div class="form-group">
  342. <label>变更工程量数量计算式</label>
  343. <textarea class="form-control form-control-sm" rows="2" readonly><%- change.expr %></textarea>
  344. </div>
  345. <div class="form-group">
  346. <label>备注</label>
  347. <textarea class="form-control form-control-sm" rows="3" readonly><%- change.memo %></textarea>
  348. </div>
  349. </form>
  350. </div>
  351. <div class="col-md-4">
  352. <form>
  353. <div class="form-group">
  354. <label>变更类型</label>
  355. <div class="checkbox">
  356. <% const changeType = change.type !== null && change.type !== '' ? change.type.split(',') : '' %>
  357. <% for (const t in changeConst.type) { %>
  358. <% const cType = changeConst.type[t] %>
  359. <label class="checkbox-inline">
  360. <% if (changeType.indexOf(cType.value.toString()) !== -1) { %>
  361. <input value="<%- cType.value %>" type="checkbox" disabled checked><%- cType.name %>
  362. <% } %>
  363. </label>
  364. <% } %>
  365. </div>
  366. </div>
  367. <div class="form-group">
  368. <label>变更类别 </label>
  369. <select class="form-control form-control-sm" disabled>
  370. <% for (const c in changeConst.class) { %>
  371. <% const cClass = changeConst.class[c] %>
  372. <% if (cClass.value === change.class) { %>
  373. <option value="<%- cClass.value %>"><%- cClass.name %></option>
  374. <% } %>
  375. <% } %>
  376. </select>
  377. </div>
  378. <div class="form-group">
  379. <label>变更性质 </label>
  380. <select class="form-control form-control-sm" disabled>
  381. <% for (const q in changeConst.quality) { %>
  382. <% const cQuality = changeConst.quality[q] %>
  383. <% if (cQuality.value === change.quality) { %>
  384. <option value="<%- cQuality.value %>"><%- cQuality.name %></option>
  385. <% } %>
  386. <% } %>
  387. </select>
  388. </div>
  389. <div class="form-group">
  390. <label>变更提出单位</label>
  391. <select class="form-control form-control-sm" disabled>
  392. <option><%- change.company %></option>
  393. </select>
  394. </div>
  395. <div class="form-group">
  396. <label>费用承担方</label>
  397. <div class="radio">
  398. <% for (const c in changeConst.charge) { %>
  399. <% const cCharge = changeConst.charge[c] %>
  400. <label class="radio-inline">
  401. <% if (cCharge.value === change.charge) { %>
  402. <input value="<%- cCharge.value %>" type="radio" disabled checked> <%- cCharge.name %>
  403. <% } %>
  404. </label>
  405. <% } %>
  406. </div>
  407. </div>
  408. <div class="form-group">
  409. <label>批复文号</label>
  410. <input class="form-control form-control-sm" id="w_code" placeholder="" type="text" value="<%- change.w_code %>" <% if (auditStatus !== 6) { %>readonly<% } %>>
  411. </div>
  412. </form>
  413. </div>
  414. </div>
  415. <% } %>
  416. </div>
  417. </div>
  418. <div class="c-body tab-pane first-bill-pane" role="tabpanel" id="bills">
  419. <div class="sjs-height-0">
  420. <!--变更清单-->
  421. <% if (auditStatus === 1 || auditStatus === 2) { %>
  422. <table class="table table-striped table-bordered nowrap qd-table table-list" id="tablelist" cellspacing="0" style="margin-top:0 !important;width:100%">
  423. <thead>
  424. <tr>
  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 rowspan="2" class="text-center">单位</th>
  430. <th rowspan="2" class="text-center">单价</th>
  431. <th colspan="2" class="text-center">原设计</th>
  432. <th colspan="2" class="text-center">申报变更增(+)减(-)</th>
  433. <th rowspan="2" class="text-center">操作</th>
  434. </tr>
  435. <tr>
  436. <th class="text-center">数量</th>
  437. <th class="text-center">金额</th>
  438. <th class="text-center">数量</th>
  439. <th class="text-center">金额</th>
  440. </tr>
  441. </thead>
  442. <tbody id="list">
  443. <% let windex = 0; %>
  444. <% for (const [index,cl] of changeList.entries()) { %>
  445. <% if (cl.lid !== '0') { %>
  446. <tr class="clist clid" data-lid="<%= cl.lid %>_<%= index %>" data-index="<%= index %>">
  447. <td data-site="0"><%= cl.code %></td>
  448. <td data-site="1"><%= cl.name %></td>
  449. <td data-site="2"><%= 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"><%= cl.unit %></td>
  452. <td data-site="5"><%= ctx.helper.roundNum(cl.unit_price, upUnit) %></td>
  453. <td data-site="6"><%= ctx.helper.roundNum(cl.oamount, ctx.helper.findDecimal(cl.unit)) %></td>
  454. <td data-site="7"><%= ctx.helper.roundNum(ctx.helper.accMul(cl.unit_price, cl.oamount), tpUnit) %></td>
  455. <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>
  456. <td data-site="9"><%= ctx.helper.roundNum(ctx.helper.accMul(cl.unit_price, cl.camount), tpUnit) %></td>
  457. <td><a class="text-danger">移除</a>
  458. </td>
  459. </tr>
  460. <% } else { %>
  461. <tr class="clist" data-lid="<%= windex %>" data-index="<%= windex %>">
  462. <td data-site="0"><input class="form-control form-control-sm" placeholder="清单编号" type="text" value="<%= cl.code %>"></td>
  463. <td data-site="1"><input class="form-control form-control-sm" placeholder="名称" type="text" value="<%= cl.name %>"></td>
  464. <td data-site="2"><input class="form-control form-control-sm" placeholder="变更部位" type="text" value="<%= cl.bwmx %>"></td>
  465. <td data-site="3"><input class="form-control form-control-sm" placeholder="变更详情" type="text" value="<%= cl.detail %>"></td>
  466. <td data-site="4">
  467. <select class="form-control form-control-sm input-sm">
  468. <option></option>
  469. <% for (const j in changeUnits) { %>
  470. <% if (changeUnits[j].unit !== undefined && changeUnits[j].unit === cl.unit) { %>
  471. <option selected="selected"><%= changeUnits[j].unit %></option>
  472. <% } else if(changeUnits[j].unit !== undefined) { %>
  473. <option><%= changeUnits[j].unit %></option>
  474. <% } %>
  475. <% } %>
  476. </select>
  477. </td>
  478. <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>
  479. <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>
  480. <td data-site="7"><%= ctx.helper.roundNum(ctx.helper.accMul(cl.unit_price, cl.oamount), tpUnit) %></td>
  481. <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>
  482. <td data-site="9"><%= ctx.helper.roundNum(ctx.helper.accMul(cl.unit_price, cl.camount), tpUnit) %></td>
  483. <td><a class="text-danger">移除</a>
  484. </td>
  485. </tr>
  486. <% windex++ %>
  487. <% } %>
  488. <% } %>
  489. </tbody>
  490. <tfoot>
  491. <tr class="info">
  492. <td>合计</td><td></td><td></td><td></td><td></td><td></td><td></td>
  493. <td class="otatalamount"><%= ctx.helper.roundNum(ototalCost, tpUnit) %></td><td></td>
  494. <td class="ctatalamount"><%= ctx.helper.roundNum(ctotalCost, tpUnit) %></td><td></td>
  495. </tr>
  496. </tfoot>
  497. </table>
  498. <% } else if (auditStatus === 3 || auditStatus === 4 || auditStatus === 5 || auditStatus === 7) { %>
  499. <table class="table table-striped table-bordered nowrap qd-table table-list" id="tablelist" cellspacing="0" style="width:100%">
  500. <thead>
  501. <tr>
  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 rowspan="2" class="text-center">单位</th>
  507. <th rowspan="2" class="text-center">单价</th>
  508. <th colspan="2" class="text-center">原设计</th>
  509. <th colspan="2" class="text-center">申报变更增(+)减(-)</th>
  510. <th colspan="2" class="text-center">审批后变更</th>
  511. </tr>
  512. <tr>
  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. <th class="text-center">数量</th>
  518. <th class="text-center">金额</th>
  519. </tr>
  520. </thead>
  521. <tbody id="list">
  522. <% for (const cl of changeList.sort()) { %>
  523. <tr>
  524. <td><%= cl.code %></td>
  525. <td><%= cl.name %></td>
  526. <td><%= cl.bwmx %></td>
  527. <td><%= cl.detail %></td>
  528. <td><%= cl.unit %></td>
  529. <td><%= ctx.helper.roundNum(cl.unit_price, upUnit) %></td>
  530. <td><%= ctx.helper.roundNum(cl.oamount, ctx.helper.findDecimal(cl.unit)) %></td>
  531. <td><%= ctx.helper.roundNum(ctx.helper.accMul(cl.unit_price, cl.oamount), tpUnit) %></td>
  532. <td><%= ctx.helper.roundNum(cl.camount, ctx.helper.findDecimal(cl.unit)) %></td>
  533. <td><%= ctx.helper.roundNum(ctx.helper.accMul(cl.unit_price, cl.camount), tpUnit) %></td>
  534. <td><%= cl.samount !== '' ? ctx.helper.roundNum(cl.samount, ctx.helper.findDecimal(cl.unit)) : '' %></td>
  535. <td><%= cl.samount !== '' ? ctx.helper.roundNum(ctx.helper.accMul(cl.unit_price, cl.samount), tpUnit) : '' %></td>
  536. </td>
  537. </tr>
  538. <% } %>
  539. </tbody>
  540. <tfoot>
  541. <tr class="info">
  542. <td>合计</td><td></td><td></td><td></td><td></td><td></td><td></td>
  543. <td><%= ctx.helper.roundNum(ototalCost, tpUnit) %></td><td></td>
  544. <td><%= ctx.helper.roundNum(ctotalCost, tpUnit) %></td><td></td>
  545. <td><%= stotalCost !== 0 ? ctx.helper.roundNum(stotalCost, tpUnit) : '' %></td>
  546. </tr>
  547. </tfoot>
  548. </table>
  549. <table class="table table-striped table-bordered nowrap qd-table table-list" id="tablelist2" cellspacing="0" style="width:100%;display: none;">
  550. <thead>
  551. <tr>
  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 rowspan="2" class="text-center">单位</th>
  557. <th rowspan="2" class="text-center">单价</th>
  558. <th colspan="2" class="text-center">原设计</th>
  559. <th colspan="2" class="text-center">申报变更增(+)减(-)</th>
  560. <% for (const audit of auditList2) { %>
  561. <% if (audit.usite !== 0) { %>
  562. <th colspan="2" class="text-center"><%= audit.name %> 审批</th>
  563. <% } %>
  564. <% } %>
  565. </tr>
  566. <tr>
  567. <th class="text-center">数量</th>
  568. <th class="text-center">金额</th>
  569. <th class="text-center">数量</th>
  570. <th class="text-center">金额</th>
  571. <% for (const audit of auditList2) { %>
  572. <% if (audit.usite !== 0) { %>
  573. <th class="text-center">数量</th>
  574. <th class="text-center">金额</th>
  575. <% } %>
  576. <% } %>
  577. </tr>
  578. </thead>
  579. <tbody id="list">
  580. <% const audittotalCost = []; %>
  581. <% for (const [cindex,cl] of changeList.sort().entries()) { %>
  582. <tr>
  583. <td><%= cl.code %></td>
  584. <td><%= cl.name %></td>
  585. <td><%= cl.bwmx %></td>
  586. <td><%= cl.detail %></td>
  587. <td><%= cl.unit %></td>
  588. <td><%= ctx.helper.roundNum(cl.unit_price, upUnit) %></td>
  589. <td><%= ctx.helper.roundNum(cl.oamount, ctx.helper.findDecimal(cl.unit)) %></td>
  590. <td><%= ctx.helper.roundNum(ctx.helper.accMul(cl.unit_price, cl.oamount), tpUnit) %></td>
  591. <td><%= ctx.helper.roundNum(cl.camount, ctx.helper.findDecimal(cl.unit)) %></td>
  592. <td><%= ctx.helper.roundNum(ctx.helper.accMul(cl.unit_price, cl.camount), tpUnit) %></td>
  593. <% for (const audit of auditList2) { %>
  594. <% if (audit.usite !== 0) { %>
  595. <td><%= audit.list_amount[cindex] !== undefined ? ctx.helper.roundNum(audit.list_amount[cindex], ctx.helper.findDecimal(cl.unit)) : '' %></td>
  596. <td><%= audit.list_amount[cindex] !== undefined ? ctx.helper.roundNum(ctx.helper.accMul(cl.unit_price, audit.list_amount[cindex]), tpUnit) : '' %></td>
  597. <% } %>
  598. <% } %>
  599. </td>
  600. </tr>
  601. <% } %>
  602. </tbody>
  603. <tfoot>
  604. <tr class="info">
  605. <td>合计</td><td></td><td></td><td></td><td></td><td></td><td></td>
  606. <td><%= ctx.helper.roundNum(ototalCost, tpUnit) %></td><td></td>
  607. <td><%= ctx.helper.roundNum(ctotalCost, tpUnit) %></td>
  608. <% for (const audit of auditList2) { %>
  609. <% if (audit.usite !== 0) { %>
  610. <td></td><td><%=audit.totalCost !== 0 ? ctx.helper.roundNum(audit.totalCost, tpUnit) : '' %></td>
  611. <% } %>
  612. <% } %>
  613. </tr>
  614. </tfoot>
  615. </table>
  616. <% } else if (auditStatus === 6) { %>
  617. <table class="table table-striped table-bordered nowrap qd-table table-list" id="tablelist" cellspacing="0" style="width:100%;">
  618. <thead>
  619. <tr>
  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 rowspan="2" class="text-center">单位</th>
  625. <th rowspan="2" class="text-center">单价</th>
  626. <th colspan="2" class="text-center">原设计</th>
  627. <th colspan="2" class="text-center">申报变更增(+)减(-)</th>
  628. <% for (const audit of auditList) { %>
  629. <% if (audit.usite !== 0) { %>
  630. <th colspan="2" class="text-center"><%= audit.name %> 审批</th>
  631. <% } %>
  632. <% } %>
  633. </tr>
  634. <tr>
  635. <th class="text-center">数量</th>
  636. <th class="text-center">金额</th>
  637. <th class="text-center">数量</th>
  638. <th class="text-center">金额</th>
  639. <% for (const audit of auditList) { %>
  640. <% if (audit.usite !== 0) { %>
  641. <th class="text-center">数量</th>
  642. <th class="text-center">金额</th>
  643. <% } %>
  644. <% } %>
  645. </tr>
  646. </thead>
  647. <tbody id="list">
  648. <% const audittotalCost = []; %>
  649. <% for (const [cindex,cl] of changeList.entries()) { %>
  650. <tr class="clist" data-lid="<%= cl.id %>">
  651. <td><%= cl.code %></td>
  652. <td><%= cl.name %></td>
  653. <td><%= cl.bwmx %></td>
  654. <td><%= cl.detail %></td>
  655. <td><%= cl.unit %></td>
  656. <td data-site="5"><%= ctx.helper.roundNum(cl.unit_price, upUnit) %></td>
  657. <td><%= ctx.helper.roundNum(cl.oamount, ctx.helper.findDecimal(cl.unit)) %></td>
  658. <td><%= ctx.helper.roundNum(ctx.helper.accMul(cl.unit_price, cl.oamount), tpUnit) %></td>
  659. <td><%= ctx.helper.roundNum(cl.camount, ctx.helper.findDecimal(cl.unit)) %></td>
  660. <td><%= ctx.helper.roundNum(ctx.helper.accMul(cl.unit_price, cl.camount), tpUnit) %></td>
  661. <% for (const audit of auditList) { %>
  662. <% if (audit.usite !== 0) { %>
  663. <% if (uid === audit.uid && audit.status === 2) { %>
  664. <td>
  665. <input class="form-control form-control-sm" style="min-width:80px" placeholder="变更数量" type="text"
  666. onkeyup="RegNum(this,event,<%= ctx.helper.findDecimal(cl.unit) %>)"
  667. value="<%= audit.list_amount[cindex] !== undefined ?
  668. ctx.helper.roundNum(audit.list_amount[cindex], ctx.helper.findDecimal(cl.unit)) : '' %>">
  669. </td>
  670. <% } else { %>
  671. <td><%= audit.list_amount[cindex] !== undefined ? ctx.helper.roundNum(audit.list_amount[cindex], ctx.helper.findDecimal(cl.unit)) : '' %></td>
  672. <% } %>
  673. <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>
  674. <% } %>
  675. <% } %>
  676. </td>
  677. </tr>
  678. <% } %>
  679. </tbody>
  680. <tfoot>
  681. <tr class="info">
  682. <td>合计</td><td></td><td></td><td></td><td></td><td></td><td></td>
  683. <td><%= ctx.helper.roundNum(ototalCost, tpUnit) %></td><td></td>
  684. <td><%= ctx.helper.roundNum(ctotalCost, tpUnit) %></td>
  685. <% for (const audit of auditList) { %>
  686. <% if (audit.usite !== 0) { %>
  687. <td></td><td <% if (uid === audit.uid) { %>class="amount_totalcost"<% } %>><%=audit.totalCost !== 0 ? ctx.helper.roundNum(audit.totalCost, tpUnit) : '' %></td>
  688. <% } %>
  689. <% } %>
  690. </tr>
  691. </tfoot>
  692. </table>
  693. <% } %>
  694. </div>
  695. </div>
  696. <div class="c-body tab-pane" role="tabpanel" id="files">
  697. <div class="sjs-height-0">
  698. <table class="table table-bordered">
  699. <thead>
  700. <tr>
  701. <th width="50">序号</th>
  702. <th>名称</th>
  703. <th width="90">大小</th>
  704. <th width="100">上传时间</th>
  705. <th width="100">操作</th>
  706. </tr>
  707. </thead>
  708. <tbody id="attList">
  709. <% if (attList !== undefined && attList !== '') { %>
  710. <% for (const [index,att] of attList.entries()) { %>
  711. <tr>
  712. <td><%- index+1 %></td>
  713. <td><a href="/change/download/file/<%- att.id %>"><%- att.filename %><%- att.fileext %></a></td>
  714. <td><%- ctx.helper.bytesToSize(att.filesize) %></td>
  715. <td><%- moment(att.in_time * 1000).format('YYYY-MM-DD') %></td>
  716. <td>
  717. <% if (att.uid === uid && (auditStatus === 1 || auditStatus === 2 || auditStatus === 6)) { %>
  718. <a class="btn btn-light btn-sm delete-file" data-attid="<%- att.id %>" title="删除附件"><span class="fa fa-trash text-danger"></span></a>
  719. <% } %>
  720. </td>
  721. </tr>
  722. <% } %>
  723. <% } %>
  724. </tbody>
  725. </table>
  726. </div>
  727. </div>
  728. </div>
  729. </div>
  730. <script>
  731. let table = '';
  732. const totalPriceUnit = '<%- tpUnit %>';
  733. const unitPriceUnit = '<%- upUnit %>';
  734. autoFlashHeight();
  735. </script>
  736. <script src="/public/js/datatable/jquery.dataTables.min.js"></script>
  737. <script src="/public/js/datatable/dataTables.bootstrap4.min.js"></script>
  738. <script src="/public/js/datatable/dataTables.fixedColumns.min.js"></script>
  739. <script src="/public/js/datatable/jlzf-change-table.js"></script>
  740. <script src="/public/js/change_calculation.js"></script>
  741. <script>
  742. const whiteList = JSON.parse('<%- JSON.stringify(whiteList) %>');
  743. </script>
  744. <% if (auditStatus === 1 || auditStatus === 2) { %>
  745. <script>
  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. let back_changeInfo = {
  765. code: '<%- change.code %>',
  766. name: '<%- change.name %>',
  767. peg: '<%- change.peg %>',
  768. org_name: '<%- change.org_name %>',
  769. org_code: '<%- change.org_code %>',
  770. new_name: '<%- change.new_name %>',
  771. new_code: '<%- change.new_code %>',
  772. content: '<%- change.content %>',
  773. basis: '<%- change.basis %>',
  774. memo: '<%- change.memo %>',
  775. type: '<%- change.type %>',
  776. class: '<%- change.class %>',
  777. quality: '<%- change.quality %>',
  778. company: '<%- change.company %>',
  779. charge: '<%- change.charge %>',
  780. };
  781. let changeInfo = Object.assign({}, back_changeInfo);
  782. </script>
  783. <script src="/public/js/decimal.min.js"></script>
  784. <script src="/public/js/zh_calc.js"></script>
  785. <script src="/public/js/path_tree.js"></script>
  786. <script src="/public/js/gcl_gather.js"></script>
  787. <script src="/public/js/jquery/jquery.form.min.js"></script>
  788. <script src="/public/js/change_set.js"></script>
  789. <% } else if (auditStatus === 3 || auditStatus === 4 || auditStatus === 5 || auditStatus === 7) { %>
  790. <script>
  791. const billsTable = {
  792. columnDefs: [
  793. { className: 'allwidth1', width: 100, targets: 0 },
  794. { className: 'allwidth2', width: 150, targets: [1,2,3] },
  795. { className: 'allwidth5', width: 60, targets: 4 },
  796. { className: 'allwidth3',width: 80, targets: '_all' }
  797. ],
  798. fixedColumns: {
  799. leftColumns: 6
  800. }
  801. }
  802. </script>
  803. <script src="/public/js/change_show.js"></script>
  804. <% } else if (auditStatus === 6) { %>
  805. <script>
  806. const billsTable = {
  807. columnDefs: [
  808. { className: 'allwidth1', width: 100, targets: 0 },
  809. { className: 'allwidth2', width: 150, targets: [1,2,3] },
  810. { className: 'allwidth5', width: 60, targets: 4 },
  811. { className: 'allwidth3',width: 80, targets: '_all' }
  812. ],
  813. fixedColumns: {
  814. leftColumns: 6
  815. }
  816. }
  817. </script>
  818. <script src="/public/js/change_approval.js"></script>
  819. <% } %>
  820. <script src="/public/js/change_detail.js"></script>