info.ejs 50 KB

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