tender.ejs 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no">
  6. <meta http-equiv="x-ua-compatible" content="ie=edge">
  7. <title>标段概况-计量支付</title>
  8. <link rel="stylesheet" href="/public/css/bootstrap/bootstrap.min.css">
  9. <link rel="stylesheet" href="/public/css/wap/main.css">
  10. <link rel="stylesheet" href="/public/css/toast.css">
  11. <link rel="stylesheet" href="/public/css/font-awesome/font-awesome.min.css">
  12. <script src=/public/js/echarts/echarts.min.js></script>
  13. <link rel="shortcut icon" href="/public/images/favicon.ico">
  14. <style>
  15. body {
  16. padding: 0;
  17. }
  18. </style>
  19. </head>
  20. <body>
  21. <div class="container">
  22. <!--顶部-->
  23. <nav class="fixed-top bg-dark">
  24. <div class="my-2 d-flex justify-content-between">
  25. <span class="text-white ml-3"><a href="/wap/list" class="mr-2 text-white show-loading"><i class="fa fa-chevron-left"></i>标段概况</a></span>
  26. <a tabindex="0" href="javascript:void(0)" class="text-white text-truncate text-center"
  27. style="width:150px" data-toggle="popover" data-placement="top"
  28. data-content="<%- tender.name %>" data-trigger="focus"><%- tender.name %></a>
  29. <div class="mr-3">
  30. <div class="dropdown">
  31. <button class="btn btn-sm btn-light dropdown-toggle" type="button" data-toggle="dropdown">
  32. <%- ctx.session.sessionUser.name.substr(ctx.session.sessionUser.name.length > 2 ? ctx.session.sessionUser.name.length - 2 : 0) %>
  33. </button>
  34. <div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
  35. <a class="dropdown-item" href="/wap/logout">退出登录</a>
  36. </div>
  37. </div>
  38. </div>
  39. </div>
  40. </nav>
  41. <!--标段概况-->
  42. <div class="py-6">
  43. <!--标签-->
  44. <ul class="nav nav-tabs nav-fill">
  45. <li class="nav-item">
  46. <a class="nav-link active" data-toggle="tab" href="#gaikuang" role="tab">概况</a>
  47. </li>
  48. <li class="nav-item">
  49. <a class="nav-link" data-toggle="tab" href="#jlqi" role="tab">计量期</a>
  50. </li>
  51. <li class="nav-item">
  52. <a class="nav-link" data-toggle="tab" href="#shenpi" role="tab">期审批</a>
  53. </li>
  54. </ul>
  55. <div class="tab-content">
  56. <div class="tab-pane active" id="gaikuang">
  57. <!--图表-->
  58. <div class="card mb-3 mr-1 mt-3">
  59. <div class="card-body">
  60. <h5 class="card-title">期进度表</h5>
  61. <div style="overflow-x:scroll;padding-bottom: 10px">
  62. <div id="chartContainer4" style="height: 300px; width: 250%;">
  63. </div>
  64. </div>
  65. <p class="text-center text-muted m-0">左右滑动</p>
  66. </div>
  67. </div>
  68. <div class="card mb-3 mr-1">
  69. <div class="card-body">
  70. <h5 class="card-title">月进度表</h5>
  71. <div style="overflow-x:scroll;padding-bottom: 10px">
  72. <div id="chartContainer3" style="height: 300px; width: 320%;">
  73. </div>
  74. </div>
  75. <p class="text-center text-muted m-0">左右滑动</p>
  76. </div>
  77. </div>
  78. </div>
  79. <div class="tab-pane" id="jlqi">
  80. <!--期列表-->
  81. <dl class="mb-2 mt-3">
  82. <% for (const s of stages) { %>
  83. <dt class="bg-light p-2 d-flex justify-content-between"><span>第<%- s.order %>期</span>
  84. <span class="<%- auditConst.auditStringClass[s.status] %>">
  85. <% if (s.curAuditor && s.status !== auditConst.status.checked) { %>
  86. <%- s.curAuditor.name %><%if (s.curAuditor.role !== '' && s.curAuditor.role !== null) { %>-<%- s.curAuditor.role %><% } %>
  87. <% } %>
  88. <%- s.status === auditConst.status.checked ? '审批完成' : auditConst.auditProgress[s.status] %>
  89. </span>
  90. </dt>
  91. <dd>
  92. <table class="table table-hover">
  93. <tbody><tr>
  94. <td>
  95. <p class="mb-0">本期合同计量</p>
  96. <b>¥<%- s.contract_tp ? s.contract_tp : 0 %></b>
  97. </td>
  98. <td>
  99. <p class="mb-0">本期数量变更计量</p>
  100. <b>¥<%- s.qc_tp ? s.qc_tp : 0 %></b>
  101. </td>
  102. </tr>
  103. <tr>
  104. <td>
  105. <p class="mb-0">本期完成计量</p>
  106. <b>¥<%- s.tp ? s.tp : 0 %></b>
  107. </td>
  108. <td>
  109. <p class="mb-0">截止上期完成计量</p>
  110. <b>¥<%- s.pre_tp ? s.pre_tp : 0 %></b>
  111. </td>
  112. </tr>
  113. <tr>
  114. <td>
  115. <p class="mb-0">截止本期完成计量</p>
  116. <b>¥<%- s.end_tp ? s.end_tp : 0 %></b>
  117. </td>
  118. <td>
  119. <p class="mb-0">本期应付</p>
  120. <b>¥<%- s.yf_tp ? s.yf_tp : 0 %></b>
  121. </td>
  122. </tr>
  123. </tbody></table>
  124. </dd>
  125. <% } %>
  126. </dl>
  127. </div>
  128. <div class="tab-pane" id="shenpi">
  129. <!--最新期-->
  130. <% let audit = 0; %>
  131. <% if (stages.length > 0 && stage) { %>
  132. <dl class="mb-2 mt-3">
  133. <dt class="bg-light p-2 d-flex justify-content-between"><span>第<%- stage.order %>期</span>
  134. <span class="<%- auditConst.auditStringClass[stage.status] %>">
  135. <% if (stage.curAuditor && stage.status !== auditConst.status.checked) { %>
  136. <%- stage.curAuditor.name %><%if (stage.curAuditor.role !== '' && stage.curAuditor.role !== null) { %>-<%- stage.curAuditor.role %><% } %>
  137. <% } %>
  138. <%- stage.status === auditConst.status.checked ? '审批完成' : auditConst.auditProgress[stage.status] %>
  139. </span>
  140. </dt>
  141. <dd>
  142. <table class="table table-hover">
  143. <tbody><tr>
  144. <td>
  145. <p class="mb-0">本期合同计量</p>
  146. <b>¥<%- stage.contract_tp ? stage.contract_tp : 0 %></b>
  147. </td>
  148. <td>
  149. <p class="mb-0">本期数量变更计量</p>
  150. <b>¥<%- stage.qc_tp ? stage.qc_tp : 0 %></b>
  151. </td>
  152. </tr>
  153. <tr>
  154. <td>
  155. <p class="mb-0">本期完成计量</p>
  156. <b>¥<%- stage.tp ? stage.tp : 0 %></b>
  157. </td>
  158. <td>
  159. <p class="mb-0">截止上期完成计量</p>
  160. <b>¥<%- stage.pre_tp ? stage.pre_tp : 0 %></b>
  161. </td>
  162. </tr>
  163. <tr>
  164. <td>
  165. <p class="mb-0">截止本期完成计量</p>
  166. <b>¥<%- stage.end_tp ? stage.end_tp : 0 %></b>
  167. </td>
  168. <td>
  169. <p class="mb-0">本期应付</p>
  170. <b>¥<%- stage.yf_tp ? stage.yf_tp : 0 %></b>
  171. </td>
  172. </tr>
  173. </tbody></table>
  174. </dd>
  175. </dl>
  176. <!--审批流程-->
  177. <div class="card mt-3">
  178. <ul class="list-group list-group-flush">
  179. <li class="list-group-item">
  180. <% if (stage.status === auditConst.status.uncheck) { %>
  181. <span class="pull-right"> 上报中</span>
  182. <% } else { %>
  183. <span class="text-success pull-right"><small><%- stage.auditors[0].begin_time.toLocaleDateString() %></small> 上报</span>
  184. <% } %>
  185. <h5 class="card-title"><i class="fa fa-play-circle fa-rotate-90 text-success"></i> <%- stage.user.name %><small class="text-muted"><%- stage.user.role %></small></h5>
  186. </li>
  187. <% for (let iA = 0; iA < stage.auditors.length; iA++) { %>
  188. <% const auditors = stage.auditors; %>
  189. <li class="list-group-item">
  190. <% if (auditors[iA].status === auditConst.status.checked) { %>
  191. <span class="text-success pull-right"><small><%- auditors[iA].end_time.toLocaleDateString() %></small> 审批通过</span>
  192. <h5 class="card-title"><i class="<%- (iA < auditors.length - 1 ? 'fa fa-chevron-circle-down text-success' : 'fa fa-stop-circle text-success') %>"></i> <%- auditors[iA].name %> <small class="text-muted"><%- auditors[iA].role %></small></h5>
  193. <p class="card-text"><%- auditors[iA].opinion %></p>
  194. <% } else if (auditors[iA].status == auditConst.status.checking) { %>
  195. <span class="pull-right">审批中</span>
  196. <h5 class="card-title"><i class="<%- (iA < auditors.length - 1 ? 'fa fa-chevron-circle-down' : 'fa fa-stop-circle') %>"></i> <%- auditors[iA].name %> <small class="text-muted"><%- auditors[iA].role %></small></h5>
  197. <% if (auditors[iA].aid === ctx.session.sessionUser.accountId) { %>
  198. <% audit = auditors[iA]; %>
  199. <div class="form-group">
  200. <div class="text-center">
  201. <button class="btn btn-success" data-toggle="modal" data-target="#sp-done" >审批通过</button>
  202. <button class="btn btn-warning" data-toggle="modal" data-target="#sp-back" >审批退回</button>
  203. </div>
  204. </div>
  205. <% } %>
  206. <% } else if (auditors[iA].status === auditConst.status.checkNoPre) { %>
  207. <% const auditorIndex = stage.auditors2.findIndex(function (item) { return item.aid === auditors[iA].aid }) %>
  208. <span class="text-warning pull-right"><small><%- auditors[iA].end_time.toLocaleDateString() %></small>审批退回 <%- stage.auditors2[auditorIndex-1].name %></span>
  209. <h5 class="card-title"><i class="<%- (iA < auditors.length - 1 ? 'fa fa-chevron-circle-down text-warning' : 'fa fa-stop-circle text-warning') %>"></i> <%- auditors[iA].name %> <small class="text-muted"><%- auditors[iA].role %></small></h5>
  210. <p class="card-text"><%- auditors[iA].opinion %></p>
  211. <% } else if (auditors[iA].status === auditConst.status.checkNo) { %>
  212. <span class="text-warning pull-right"><small><%- auditors[iA].end_time.toLocaleDateString() %></small>审批退回</span>
  213. <h5 class="card-title"><i class="<%- (iA < auditors.length - 1 ? 'fa fa-chevron-circle-down text-warning' : 'fa fa-stop-circle text-warning') %>"></i> <%- auditors[iA].name %> <small class="text-muted"><%- auditors[iA].role %></small></h5>
  214. <p class="card-text"><%- auditors[iA].opinion %></p>
  215. <% } else if (auditors[iA].status === auditConst.status.checkAgain) { %>
  216. <span class="text-warning pull-right"><small><%- auditors[iA].end_time.toLocaleDateString() %></small>重新审批</span>
  217. <h5 class="card-title"><i class="<%- (iA < auditors.length - 1 ? 'fa fa-chevron-circle-down text-warning' : 'fa fa-stop-circle text-warning') %>"></i> <%- auditors[iA].name %> <small class="text-muted"><%- auditors[iA].role %></small></h5>
  218. <p class="card-text"><%- auditors[iA].opinion %></p>
  219. <% } else { %>
  220. <h5 class="card-title"><i class="<%- (iA < auditors.length - 1 ? 'fa fa-chevron-circle-down' : 'fa fa-stop-circle') %>"></i> <%- auditors[iA].name %> <small class="text-muted"><%- auditors[iA].role %></small></h5>
  221. <% } %>
  222. </li>
  223. <% } %>
  224. </ul>
  225. </div>
  226. <% } %>
  227. </div>
  228. </div>
  229. </div>
  230. <!--底栏菜单-->
  231. <nav class="fixed-bottom navbar-dark bg-light border-top">
  232. <ul class="nav nav-fill my-2">
  233. <li class="nav-item">
  234. <a class="nav-link text-muted show-loading" href="/wap/dashboard"><i class="fa fa-check-square-o"></i> 待审批</a>
  235. </li>
  236. <li class="nav-item">
  237. <a class="nav-link active show-loading" href="/wap/list"><i class="fa fa-list-ul"></i> 项目</a>
  238. </li>
  239. </ul>
  240. </nav>
  241. </div>
  242. <% if (audit !== 0) { %>
  243. <!--审批通过弹窗-->
  244. <div class="modal" tabindex="-1" role="dialog" id="sp-done">
  245. <div class="modal-dialog" role="document">
  246. <form class="modal-content" action="/tender/<%- stage.tid %>/measure/stage/<%- stage.order %>/audit/check" method="post" id="audit-check0">
  247. <div class="modal-header">
  248. <h5 class="modal-title">审批通过</h5>
  249. <button type="button" class="close" data-dismiss="modal" aria-label="Close">
  250. <span aria-hidden="true">&times;</span>
  251. </button>
  252. </div>
  253. <div class="modal-body">
  254. <div class="form-group">
  255. <label>审批意见</label>
  256. <textarea class="form-control" rows="8" name="opinion">同意</textarea>
  257. </div>
  258. </div>
  259. <div class="modal-footer">
  260. <button type="button" class="btn btn-secondary" data-dismiss="modal">取消</button>
  261. <input type="hidden" name="_csrf" value="<%= ctx.csrf %>" />
  262. <input type="hidden" name="checkType" value="<%= auditConst.status.checked %>" />
  263. <button type="submit" class="btn btn-success">审批通过</button>
  264. </div>
  265. </form>
  266. </div>
  267. </div>
  268. <!--审批退回弹窗-->
  269. <div class="modal" tabindex="-1" role="dialog" id="sp-back">
  270. <div class="modal-dialog" role="document">
  271. <form class="modal-content" action="/tender/<%- stage.tid %>/measure/stage/<%- stage.order %>/audit/check" method="post" id="audit-check1">
  272. <div class="modal-header">
  273. <h5 class="modal-title">审批通过</h5>
  274. <button type="button" class="close" data-dismiss="modal" aria-label="Close">
  275. <span aria-hidden="true">&times;</span>
  276. </button>
  277. </div>
  278. <div class="modal-body">
  279. <div class="form-group">
  280. <label>审批意见</label>
  281. <textarea class="form-control" rows="8" name="opinion">不同意</textarea>
  282. </div>
  283. <div class="alert alert-warning">
  284. <div class="custom-control custom-radio custom-control-inline">
  285. <input type="radio" id="customRadioInline1" name="checkType" class="custom-control-input" value="<%- auditConst.status.checkNo %>" <% if (audit.order === 1 || audit.aid === stage.auditors[0].aid) { %>checked<% } %>>
  286. <label class="custom-control-label" for="customRadioInline1">退回上报 <%- stage.user.name %></label>
  287. </div>
  288. <% if (audit.order > 1 && audit.aid !== stage.auditors[0].aid) { %>
  289. <% const auditorIndex = stage.auditors2.findIndex(function (item) { return item.aid === audit.aid }) %>
  290. <div class="custom-control custom-radio custom-control-inline">
  291. <input class="custom-control-input" type="radio" name="checkType" id="customRadioInline2" value="<%- auditConst.status.checkNoPre %>" checked>
  292. <label class="custom-control-label" for="customRadioInline2">退回上一审批人 <%- stage.auditors2[auditorIndex-1].name %></label>
  293. </div>
  294. <% } %>
  295. </div>
  296. </div>
  297. <div class="modal-footer">
  298. <button type="button" class="btn btn-secondary" data-dismiss="modal">取消</button>
  299. <input type="hidden" name="_csrf" value="<%= ctx.csrf %>" />
  300. <button type="submit" class="btn btn-warning">确认退回</button>
  301. </div>
  302. </form>
  303. </div>
  304. </div>
  305. <% } %>
  306. <!-- JS. -->
  307. <script src="/public/js/jquery/jquery-3.2.1.min.js"></script>
  308. <script src="/public/js/popper/popper.min.js"></script>
  309. <script src="/public/js/bootstrap/bootstrap.min.js"></script>
  310. <script src="/public/js/cookies.js"></script>
  311. <script src="/public/js/wap/global.js"></script>
  312. <script type="text/javascript">
  313. //4 标段期数计量进度//
  314. var myChart = echarts.init(document.getElementById('chartContainer4'));
  315. var option = {
  316. color: ['#e9af68','#57b7b6','#e4575a','#959eac','#6699FF',
  317. '#d38b70','#8fb7cf','#cd5c5c','#ffa500','#40e0d0',
  318. '#1e90ff','#ff6347','#7b68ee','#00fa9a','#ffd700',
  319. '#5c616b','#ff6666','#3cb371','#b8860b','#30e0e0'],
  320. title : {
  321. text: ''
  322. },
  323. tooltip : {
  324. trigger: 'axis'
  325. },
  326. calculable : true,
  327. legend: {
  328. data:['本期合同计量','本期数量变更计量','截止上期累计完成','本期完成计量','完成度']
  329. },
  330. dataZoom: [
  331. {show: true,start: 0, end: 100}
  332. ],
  333. xAxis : [
  334. {
  335. type : 'category',
  336. splitLine : {show : true},
  337. data : [
  338. <% for (const s of stagesEcharts) {%>
  339. '第<%- s.order %>期',
  340. <% } %>
  341. ]
  342. }
  343. ],
  344. yAxis : [
  345. {
  346. type : 'value',
  347. name : '金额',
  348. position:'left',
  349. axisLabel : {
  350. formatter: '{value} 元'
  351. },
  352. splitArea : {show : true},
  353. splitLine : {show : true},
  354. },
  355. {
  356. type : 'value',
  357. name:'完成度',
  358. axisLabel : {
  359. formatter: '{value} %'
  360. },
  361. position: 'right',
  362. splitArea : {show : false},
  363. splitLine : {show : false},
  364. }
  365. ],
  366. series : [
  367. {
  368. name:'本期合同计量',
  369. type:'bar',
  370. tooltip : {trigger: 'item',formatter: "{b} <br/>{a}:{c}元"},
  371. stack: '合同',
  372. data:[
  373. <% for (const s of stagesEcharts) {%>
  374. <%- s.contract_tp %>,
  375. <% } %>
  376. ]
  377. },
  378. {
  379. name:'本期数量变更计量',
  380. type:'bar',
  381. tooltip : {trigger: 'item',formatter: "{b} <br/>{a}:{c}元"},
  382. stack: '变更',
  383. data:[
  384. <% for (const s of stagesEcharts) {%>
  385. <%- s.qc_tp %>,
  386. <% } %>
  387. ]
  388. },
  389. {
  390. name:'截止上期累计完成',
  391. type:'bar',
  392. tooltip : {trigger: 'item',formatter: "{b} <br/>{a}:{c}元"},
  393. stack: '完成',
  394. data:[
  395. <% for (const s of stagesEcharts) {%>
  396. <%- ctx.helper.add(s.pre_contract_tp, s.pre_qc_tp) %>,
  397. <% } %>
  398. ]
  399. },
  400. {
  401. name:'本期完成计量',
  402. type:'bar',
  403. tooltip : {trigger: 'item',formatter: "{b} <br/>{a}:{c}元"},
  404. stack: '完成',
  405. data:[
  406. <% for (const s of stagesEcharts) {%>
  407. <%- ctx.helper.add(s.contract_tp, s.qc_tp) %>,
  408. <% } %>
  409. ]
  410. },
  411. {
  412. name:'完成度',
  413. type:'line',
  414. tooltip : {trigger: 'axis',formatter: "{b}占总标段<br/>{a}:{c} %"},
  415. yAxisIndex: 1,
  416. data:[
  417. <% for (const s of stagesEcharts) {%>
  418. <%- ctx.helper.mul(ctx.helper.div(ctx.helper.add(s.contract_tp, s.qc_tp), tender.sum, 2), 100) %>,
  419. <% } %>
  420. ]
  421. },
  422. ]
  423. };
  424. // 为echarts对象加载数据
  425. myChart.setOption(option);
  426. //4 标段期数计量进度//
  427. //3 标段月进度//
  428. // 基于准备好的dom,初始化echarts图表
  429. var myChart = echarts.init(document.getElementById('chartContainer3'));
  430. var option = {
  431. color:["#e9af68","#57b7b6"],
  432. title : {
  433. text: ''
  434. },
  435. tooltip : {
  436. trigger: 'axis',
  437. formatter: function (params, ticket, callback) {
  438. let sHint = '';
  439. for (const param of params) {
  440. if (sHint !== '') {
  441. sHint += '<br>';
  442. }
  443. if (sHint === '' && param.name !== '') {
  444. sHint = param.name + '<br>';
  445. }
  446. sHint += '<span style="display:inline-block;margin-right:5px;border-radius:10px;width:9px;height:9px;background-color:' + param.color +'"></span>';
  447. if (param.data) {
  448. sHint += param.seriesName + ': ' + param.data + ' %';
  449. } else {
  450. sHint += param.seriesName + ': -';
  451. }
  452. }
  453. return sHint;
  454. },
  455. },
  456. legend: {
  457. data:['截止本月完成','本月完成']
  458. },
  459. toolbox: {
  460. show : true,
  461. feature : {
  462. magicType : {show: true, type: ['line', 'bar']}
  463. }
  464. },
  465. dataZoom : {
  466. show : true,
  467. start : 50,
  468. end : 100
  469. },
  470. xAxis : [
  471. {
  472. type : 'category',
  473. boundaryGap : true,
  474. data : [
  475. <% for (const mp of monthProgress) { %>
  476. '<%- mp.month %>',
  477. <% } %>
  478. ]
  479. }
  480. ],
  481. yAxis : [
  482. {
  483. type : 'value',
  484. axisLabel : {
  485. formatter: '{value} %'
  486. },
  487. splitArea : {show : true}
  488. }
  489. ],
  490. series : [
  491. {
  492. name:'截止本月完成',
  493. type:'line',
  494. itemStyle: {
  495. normal: {
  496. lineStyle: {
  497. shadowColor : 'rgba(0,0,0,0.4)',
  498. shadowBlur: 5,
  499. shadowOffsetX: 3,
  500. shadowOffsetY: 3
  501. }
  502. }
  503. },
  504. data:[
  505. <% for (const mp of monthProgress) { %>
  506. <%- mp.end_ratio %>,
  507. <% } %>
  508. ]
  509. },
  510. {
  511. name:'本月完成',
  512. type:'line',
  513. itemStyle: {
  514. normal: {
  515. lineStyle: {
  516. shadowColor : 'rgba(0,0,0,0.4)',
  517. shadowBlur: 5,
  518. shadowOffsetX: 3,
  519. shadowOffsetY: 3
  520. }
  521. }
  522. },
  523. data:[
  524. <% for (const mp of monthProgress) { %>
  525. <%- mp.ratio %>,
  526. <% } %>
  527. ]
  528. }
  529. ]
  530. };
  531. // 为echarts对象加载数据
  532. myChart.setOption(option);
  533. //3 标段月进度//
  534. </script>
  535. <!--sjs-->
  536. <script>
  537. $(document).ready(function () {
  538. if (window.location.hash && window.location.hash === '#shenpi') {
  539. $('#gaikuang').removeClass('active');
  540. $('#jlqi').removeClass('active');
  541. $('.nav-item a[href="#gaikuang"]').removeClass('active');
  542. $('.nav-item a[href="#jlqi"]').removeClass('active');
  543. $('#shenpi').addClass('active');
  544. $('.nav-item a[href="#shenpi"]').addClass('active');
  545. }
  546. $('#audit-check0').submit(function (e) {
  547. if (auditCheck(0)) {
  548. const data = {
  549. opinion: $('[name=opinion]', this).val(),
  550. checkType: parseInt($('[name=checkType]', this).val()),
  551. };
  552. postData(this.action, data, function () {
  553. window.location.reload();
  554. });
  555. }
  556. return false;
  557. });
  558. $('#audit-check1').submit(function (e) {
  559. if (auditCheck(1)) {
  560. const data = {
  561. opinion: $('[name=opinion]', this).val(),
  562. checkType: parseInt($('[name=checkType]:checked', this).val()),
  563. };
  564. postData(this.action, data, function () {
  565. window.location.reload();
  566. });
  567. }
  568. return false;
  569. });
  570. })
  571. // texterea换行
  572. function auditCheck(i) {
  573. const opinion = $('textarea[name="opinion"]').eq(i).val().replace(/\r\n/g, '<br/>').replace(/\n/g, '<br/>').replace(/\s/g, ' ');
  574. $('textarea[name="opinion"]').eq(i).val(opinion);
  575. return true;
  576. }
  577. </script>
  578. </body>
  579. </html>