index.ejs 66 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804
  1. <div class="panel-content">
  2. <div class="panel-title fluid">
  3. <div class="title-main d-flex">
  4. <h2><%= ctx.subProject.name %></h2>
  5. <div class="ml-auto">
  6. <i class="fa fa-bell mr-1"></i><a href="#version" data-toggle="modal" data-target="#version">当前版本:<%= versionList[0].name %></a>
  7. <% if (sysMsgList.length > 0) { %>
  8. <!--系统消息通知-->
  9. <% for (const sm of sysMsgList) { %>
  10. <!--<a href="#view-msg" msg-id="<%= sm.id %>" data-toggle="modal" data-target="#view-msg" class="mr-5 mb-2 system-msg"><%- sm.title %>(<%- moment(sm.release_time*1000).format('YYYY-MM-DD') %>)</a>-->
  11. <a href="#view-msg" msg-id="<%= sm.id %>" data-toggle="modal" data-target="#view-msg" class="ml-3 system-msg">系统最新通知</a>
  12. <% } %>
  13. <% } %>
  14. </div>
  15. </div>
  16. </div>
  17. <div class="content-wrap my-3">
  18. <% if (!authMobile) { %>
  19. <div class="text-danger px-3 mb-3 mobile-height">
  20. <strong>您的账号未认证手机。</strong> 设置认证手机后,可以用于 找回密码 及 接收验证码。<a class="badge badge-danger" href="/profile/sms">点击设置</a>
  21. </div>
  22. <% } %>
  23. <% if (maintainData.status !== maintainConst.status.notset && new Date().getTime() + (86400*1000) > parseFloat(maintainData.maintain_time)) { %>
  24. <!--系统维护信息-->
  25. <div class="card mb-3 bg-danger text-white mx-3 maintain-height">
  26. <div class="card-body">
  27. <h4><i class="fa fa-wrench"></i> 系统将于 <%- moment(parseFloat(maintainData.maintain_time)).format('YYYY年MM月DD日 HH:mm') %> 开始停机维护,<%- (maintainData.duration !== maintainConst.duration.forever ? '持续'+ maintainConst.durationString[maintainData.duration] +'。' : '') %>造成不便敬请谅解。</h4>
  28. <p class="ml-4 mb-0"><%- maintainData.msg %></p>
  29. </div>
  30. </div>
  31. <% } %>
  32. <div class="dashboard-height mx-3">
  33. <div class="row agency-partheight">
  34. <div class="col-6 px-0">
  35. <div class="card ml-3">
  36. <div class="card-header card-white d-flex justify-content-between">
  37. <div class="card-big-htext"><span class="card-icon mr-2"></span>需要你处理</div>
  38. <div>
  39. <select class="form-control form-control-sm" id="select-doing-type">
  40. <option value="0">全部</option>
  41. <% if (auditAdvance.length !== 0) { %>
  42. <option value="6">预付款(<%- auditAdvance.length %>)</option>
  43. <% } %>
  44. <% if (auditTenders.length !== 0) { %>
  45. <option value="5">台账审批(<%- auditTenders.length %>)</option>
  46. <% } %>
  47. <% if (auditRevise.length !== 0) { %>
  48. <option value="4">台账修订(<%- auditRevise.length %>)</option>
  49. <% } %>
  50. <% if (auditStages.length !== 0 || auditStageAss.length !== 0) { %>
  51. <option value="2">计量审批(<%- (auditStages.length + auditStageAss.length) %>)</option>
  52. <% } %>
  53. <% if (auditChanges.length !== 0) { %>
  54. <option value="3">变更审批(<%- auditChanges.length %>)</option>
  55. <% } %>
  56. <% if (ctx.subProject.page_show.openChangeProject && auditChangeProject.length !== 0) { %>
  57. <option value="7">变更立项(<%- auditChangeProject.length %>)</option>
  58. <% } %>
  59. <% if (ctx.subProject.page_show.openChangeApply && auditChangeApply.length !== 0) { %>
  60. <option value="8">变更申请(<%- auditChangeApply.length %>)</option>
  61. <% } %>
  62. <% if (ctx.subProject.page_show.openChangePlan && auditChangePlan.length !== 0) { %>
  63. <option value="9">变更方案(<%- auditChangePlan.length %>)</option>
  64. <% } %>
  65. <% if (ctx.subProject.page_show.openMaterial && auditMaterial.length !== 0) { %>
  66. <option value="1">材料调差(<%- auditMaterial.length %>)</option>
  67. <% } %>
  68. <% if (ctx.subProject.page_show.openPayment && auditPayments.length !== 0) { %>
  69. <option value="10">支付审批(<%- auditPayments.length %>)</option>
  70. <% } %>
  71. <% if (ctx.subProject.page_show.openFinancial && auditFinancials.length !== 0) { %>
  72. <option value="11">资金支付(<%- auditFinancials.length %>)</option>
  73. <% } %>
  74. <% if (ctx.subProject.page_show.quality && auditInspections.length !== 0) { %>
  75. <option value="12">质量巡检(<%- auditInspections.length %>)</option>
  76. <% } %>
  77. </select>
  78. </div>
  79. </div>
  80. <div class="card-body p-0">
  81. <div class="contant-height-one">
  82. <% if (auditTenders.length !== 0 || auditRevise.length !== 0 || auditStages.length !== 0 || auditChanges.length !== 0 || auditMaterial.length !== 0 || auditAdvance.length !== 0 || auditChangeProject.length !== 0 || auditChangeApply.length !== 0 || auditChangePlan.length !== 0 || auditPayments.length !== 0 || auditStageAss.length !== 0 || auditFinancials.length !== 0 || auditInspections.length !== 0) { %>
  83. <style>
  84. #doing-list td {
  85. word-wrap:break-word;
  86. }
  87. </style>
  88. <table style="table-layout:fixed;" class="table table-middle">
  89. <thead class="thead-light">
  90. <tr>
  91. <th width="110" class="pl-3">类型</th>
  92. <th>名称</th>
  93. <th width="60">状态</th>
  94. <th width="125">创建时间</th>
  95. <th width="90">操作</th>
  96. </tr>
  97. </thead>
  98. <tbody id="doing-list">
  99. <% for (const t of auditTenders) { %>
  100. <% if (t.ledger_status === acLedger.status.checking) { %>
  101. <tr data-type="5">
  102. <td><span class="bg-new-ledger text-new-ledger badge text-width">台账审批</span></td>
  103. <td><a href="/tender/<%- t.id %>"><%- t.name %></a></td>
  104. <td>台账</td>
  105. <td><%- (t.begin_time ? ctx.moment(t.begin_time).format('YYYY/MM/DD HH:mm') : '') %></td>
  106. <td><a href="/tender/<%- t.id %>/ledger" class="btn btn-outline-primary btn-sm btn-table" role="button">审批</a></td>
  107. </tr>
  108. <% } else { %>
  109. <tr data-type="5">
  110. <td><span class="bg-new-ledger text-new-ledger badge text-width">台账审批</span></td>
  111. <td><a href="/tender/<%- t.id %>"><%- t.name %></a></td>
  112. <td>台账</td>
  113. <td><%- (t.end_time ? ctx.moment(t.end_time).format('YYYY/MM/DD HH:mm') : '') %></td>
  114. <td><a href="/tender/<%- t.id %>/ledger" class="btn btn-outline-warning btn-sm btn-table text-warning" role="button">重新上报</a></td>
  115. </tr>
  116. <% } %>
  117. <% } %>
  118. <% for (const revise of auditRevise) { %>
  119. <tr data-type="4">
  120. <td><span class="bg-new-revise text-new-revise badge text-width">台账修订</span></td>
  121. <td><a href="/tender/<%- revise.t_id %>"><%- revise.t_name %></a> <a href="/tender/<%- revise.t_id %>/revise/<%- revise.id %>/info">第<%- revise.corder %>次</a></td>
  122. <td>第<%- revise.corder %>次</td>
  123. <td><%- (
  124. revise.status === acRevise.status.checking
  125. ? (revise.begin_time ? ctx.moment(revise.begin_time).format('YYYY/MM/DD HH:mm') : '')
  126. : (revise.end_time ? ctx.moment(revise.end_time).format('YYYY/MM/DD HH:mm') : '')
  127. ) %></td>
  128. <td><a href="/tender/<%- revise.t_id %>/revise/<%- revise.id %>/info" class="btn btn-sm btn-table <% if (revise.status === acRevise.status.checkNo) { %>btn-outline-warning text-warning<% } else { %>btn-outline-primary<% } %>" role="button"><% if (revise.status === acRevise.status.checking) { %>审批<% } else if (revise.status === acRevise.status.checkNo) { %>重新上报<% } %></a></td>
  129. </tr>
  130. <% } %>
  131. <% for (const audit of auditStages) { %>
  132. <% if (audit.sstatus === acStage.status.checkNo) { %>
  133. <tr data-type="2">
  134. <td><span class="bg-new-stage text-new-stage badge text-width">计量审批</span></td>
  135. <td><a href="/tender/<%- audit.tid %>"><%- audit.name %></a> <a href="/tender/<%- audit.tid %>/measure/stage/<%- audit.sorder %>">第<%- audit.sorder %>期</a></td>
  136. <td>第<%- audit.sorder %>期</td>
  137. <td><%- ctx.moment(audit.end_time).format('YYYY/MM/DD HH:mm') %></td>
  138. <td><a href="/tender/<%- audit.tid %>/measure/stage/<%- audit.sorder %>" class="btn btn-outline-warning btn-sm btn-table text-warning" role="button">重新上报</a></td>
  139. </tr>
  140. <% } else if (audit.sstatus === acStage.status.uncheck) { %>
  141. <tr data-type="2">
  142. <td><span class="bg-new-stage text-new-stage badge text-width">计量审批</span></td>
  143. <td><a href="/tender/<%- audit.tid %>"><%- audit.name %></a> <a href="/tender/<%- audit.tid %>/measure/stage/<%- audit.sorder %>">第<%- audit.sorder %>期</a></td>
  144. <td>第<%- audit.sorder %>期</td>
  145. <td><%- ctx.moment(audit.begin_time).format('YYYY/MM/DD HH:mm') %></td>
  146. <td><a href="/tender/<%- audit.tid %>/measure/stage/<%- audit.sorder %>" class="btn btn-outline-primary btn-sm btn-table" role="button">上报</a></td>
  147. </tr>
  148. <% } else { %>
  149. <tr data-type="2">
  150. <td><span class="bg-new-stage text-new-stage badge text-width">计量审批</span></td>
  151. <td><a href="/tender/<%- audit.tid %>"><%- audit.name %></a> <a href="/tender/<%- audit.tid %>/measure/stage/<%- audit.sorder %>">第<%- audit.sorder %>期</a></td>
  152. <td>第<%- audit.sorder %>期</td>
  153. <td><%- ctx.moment(audit.begin_time).format('YYYY/MM/DD HH:mm') %></td>
  154. <td><a href="/tender/<%- audit.tid %>/measure/stage/<%- audit.sorder %>" class="btn btn-outline-primary btn-sm btn-table" role="button"><% if (audit.sstatus === acStage.status.checkNoPre) { %>重新<% } %>审批</a></td>
  155. </tr>
  156. <% } %>
  157. <% } %>
  158. <% for (const audit of auditStageAss) { %>
  159. <% if (audit.sstatus !== acStage.status.checkNo) { %>
  160. <tr data-type="2">
  161. <td><span class="bg-new-stage text-new-stage badge text-width">计量审批</span></td>
  162. <td><a href="/tender/<%- audit.tid %>"><%- audit.tender_name %></a> <a href="/tender/<%- audit.tid %>/measure/stage/<%- audit.sorder %>">第<%- audit.sorder %>期</a></td>
  163. <td>第<%- audit.sorder %>期</td>
  164. <td><%- ctx.moment(audit.begin_time).format('YYYY/MM/DD HH:mm') %></td>
  165. <td><a href="/tender/<%- audit.tid %>/measure/stage/<%- audit.sorder %>" class="btn btn-outline-primary btn-sm btn-table" role="button">协同审批</a></td>
  166. </tr>
  167. <% } else { %>
  168. <tr data-type="2">
  169. <td><span class="bg-new-stage text-new-stage badge text-width">计量审批</span></td>
  170. <td><a href="/tender/<%- audit.tid %>"><%- audit.tender_name %></a> <a href="/tender/<%- audit.tid %>/measure/stage/<%- audit.sorder %>">第<%- audit.sorder %>期</a></td>
  171. <td>第<%- audit.sorder %>期</td>
  172. <td><%- ctx.moment(audit.begin_time).format('YYYY/MM/DD HH:mm') %></td>
  173. <td><a href="/tender/<%- audit.tid %>/measure/stage/<%- audit.sorder %>" class="btn btn-outline-warning btn-sm btn-table text-warning" role="button">协同上报</a></td>
  174. </tr>
  175. <% } %>
  176. <% } %>
  177. <% for (const change of auditChanges) { %>
  178. <tr data-type="3">
  179. <td><span class="bg-new-change text-new-change badge text-width">变更审批</span></td>
  180. <td><a href="/tender/<%- change.tid %>"><%- change.name %></a> <a href="/tender/<%- change.tid %>/change/<%- change.cid %>/information"><%- change.ccode %></a></td>
  181. <td>变更</td>
  182. <td><%- change.begin_time ? ctx.moment(change.begin_time).format('YYYY/MM/DD HH:mm') : (change.cin_time ? ctx.moment.unix(change.cin_time).format('YYYY/MM/DD HH:mm') : '') %></td>
  183. <td><a href="/tender/<%- change.tid %>/change/<%- change.cid %>/information" class="btn btn-sm btn-table <% if (change.cstatus !== acChange.status.checking && change.cstatus !== acChange.status.checkNoPre) { %>btn-outline-warning text-warning<% } else { %>btn-outline-primary<% } %>" role="button"><% if (change.cstatus === acChange.status.checking) { %>审批<% } else if (change.cstatus === acChange.status.checkNoPre) { %>重新审批<% } else { %>重新上报<% } %></a></td>
  184. </tr>
  185. <% } %>
  186. <% for (const acp of auditChangeProject) { %>
  187. <tr data-type="7">
  188. <td><span class="bg-new-changeProject text-new-changeProject badge text-width">变更立项</span></td>
  189. <td><a href="/tender/<%- acp.tid %>"><%- acp.name %></a> <a href="/tender/<%- acp.tid %>/change/project/<%- acp.cpid %>/information"><%- acp.mcode %></a></td>
  190. <td>变更</td>
  191. <td><%- (
  192. acp.status !== acChangeProject.status.back
  193. ? (acp.begin_time ? ctx.moment(acp.begin_time).format('YYYY/MM/DD HH:mm') : '')
  194. : (acp.end_time ? ctx.moment(acp.end_time).format('YYYY/MM/DD HH:mm') : '')
  195. ) %></td>
  196. <td><a href="/tender/<%- acp.tid %>/change/project/<%- acp.cpid %>/information" class="btn btn-sm btn-table <% if (acp.mstatus === acChangeProject.status.back) { %>btn-outline-warning text-warning<% } else { %>btn-outline-primary<% } %>" role="button"><% if (acp.mstatus !== acChangeProject.status.back) { %>审批<% } else { %>重新上报<% } %></a></td>
  197. </tr>
  198. <% } %>
  199. <% for (const aca of auditChangeApply) { %>
  200. <tr data-type="8">
  201. <td><span class="bg-new-changeApply text-new-changeApply badge text-width">变更申请</span></td>
  202. <td><a href="/tender/<%- aca.tid %>"><%- aca.name %></a> <a href="/tender/<%- aca.tid %>/change/apply/<%- aca.caid %>/information"><%- aca.mcode %></a></td>
  203. <td>变更</td>
  204. <td><%- (
  205. aca.mstatus !== acChangeApply.status.checkNo
  206. ? (aca.begin_time ? ctx.moment(aca.begin_time).format('YYYY/MM/DD HH:mm') : '')
  207. : (aca.end_time ? ctx.moment(aca.end_time).format('YYYY/MM/DD HH:mm') : '')
  208. ) %></td>
  209. <td><a href="/tender/<%- aca.tid %>/change/apply/<%- aca.caid %>/information" class="btn btn-sm btn-table <% if (aca.mstatus === acChangeApply.status.checkNo) { %>btn-outline-warning text-warning<% } else { %>btn-outline-primary<% } %>" role="button"><% if (aca.mstatus !== acChangeApply.status.checkNo) { %>审批<% } else { %>重新上报<% } %></a></td>
  210. </tr>
  211. <% } %>
  212. <% for (const acp of auditChangePlan) { %>
  213. <tr data-type="9">
  214. <td><span class="bg-new-changePlan text-new-changePlan badge text-width">变更方案</span></td>
  215. <td><a href="/tender/<%- acp.tid %>"><%- acp.name %></a> <a href="/tender/<%- acp.tid %>/change/plan/<%- acp.cpid %>/information"><%- acp.mcode %></a></td>
  216. <td>变更</td>
  217. <td><%- (
  218. acp.mstatus !== acChangePlan.status.checkNo
  219. ? (acp.begin_time ? ctx.moment(acp.begin_time).format('YYYY/MM/DD HH:mm') : '')
  220. : (acp.end_time ? ctx.moment(acp.end_time).format('YYYY/MM/DD HH:mm') : '')
  221. ) %></td>
  222. <td><a href="/tender/<%- acp.tid %>/change/plan/<%- acp.cpid %>/information" class="btn btn-sm btn-table <% if (acp.mstatus === acChangePlan.status.checkNo) { %>btn-outline-warning text-warning<% } else { %>btn-outline-primary<% } %>" role="button"><% if (acp.mstatus !== acChangePlan.status.checkNo) { %>审批<% } else { %>重新上报<% } %></a></td>
  223. </tr>
  224. <% } %>
  225. <% for (const am of auditMaterial) { %>
  226. <% if (am.mstatus !== acMaterial.status.checkNo) { %>
  227. <tr data-type="1">
  228. <td><span class="bg-new-material text-new-material badge text-width">材料调差</span></td>
  229. <td><a href="/tender/<%- am.tid %>"><%- am.name %></a> <a href="/tender/<%- am.tid %>/measure/material/<%- am.morder %>">第<%- am.morder %>期</a></td>
  230. <td>第<%- am.morder %>期</td>
  231. <td><%- ctx.moment(am.begin_time).format('YYYY/MM/DD HH:mm') %></td>
  232. <td><a href="/tender/<%- am.tid %>/measure/material/<%- am.morder %>" class="btn btn-outline-primary btn-sm btn-table" role="button">审批</a></td>
  233. </tr>
  234. <% } else { %>
  235. <tr data-type="1">
  236. <td><span class="bg-new-material text-new-material badge text-width">材料调差</span></td>
  237. <td><a href="/tender/<%- am.tid %>"><%- am.name %></a> <a href="/tender/<%- am.tid %>/measure/material/<%- am.morder %>">第<%- am.morder %>期</a></td>
  238. <td>第<%- am.morder %>期</td>
  239. <td><%- ctx.moment(am.end_time).format('YYYY/MM/DD HH:mm') %></td>
  240. <td><a href="/tender/<%- am.tid %>/measure/material/<%- am.morder %>" class="btn btn-outline-warning btn-sm btn-table text-warning" role="button">重新上报</a></td>
  241. </tr>
  242. <% } %>
  243. <% } %>
  244. <% for (const am of auditAdvance) { %>
  245. <% if (am.mstatus !== acAdvance.status.checkNo) { %>
  246. <tr data-type="6">
  247. <td><span class="bg-new-advance text-new-advance badge text-width">预付款</span></td>
  248. <td><a href="/tender/<%- am.tid %>"><%- am.name %></a> <a href="/tender/<%- am.tid %>/advance/<%- am.vid %>/detail"><%- typeColMap[am.mtype].text %>第<%- am.morder %>期</a></td>
  249. <td>第<%- am.morder %>期</td>
  250. <td><%- ctx.moment(am.create_time).format('YYYY/MM/DD HH:mm') %></td>
  251. <td><a href="/tender/<%- am.tid %>/advance/<%- am.vid %>/detail" class="btn btn-outline-primary btn-sm btn-table" role="button">审批</a></td>
  252. </tr>
  253. <% } else { %>
  254. <tr data-type="6">
  255. <td><span class="bg-new-advance text-new-advance badge text-width">预付款</span></td>
  256. <td><a href="/tender/<%- am.tid %>"><%- am.name %></a> <a href="/tender/<%- am.tid %>/advance/<%- am.vid %>/detail"><%- typeColMap[am.mtype].text %>第<%- am.morder %>期</a></td>
  257. <td>第<%- am.morder %>期</td>
  258. <td><%- ctx.moment(am.end_time).format('YYYY/MM/DD HH:mm') %></td>
  259. <td><a href="/tender/<%- am.tid %>/advance/<%- am.vid %>/detail" class="btn btn-outline-warning btn-sm btn-table text-warning" role="button">重新上报</a></td>
  260. </tr>
  261. <% } %>
  262. <% } %>
  263. <% for (const audit of auditPayments) { %>
  264. <% if (audit.sstatus !== acStage.status.checkNo) { %>
  265. <tr data-type="10">
  266. <td><span class="bg-new-payment text-new-payment badge text-width">支付审批</span></td>
  267. <% if (audit.type) { %>
  268. <td><a href="/sp/<%- ctx.subProject.id %>/payment/<%- audit.tender_id %>/list/<%- audit.tr_id %>"><%- audit.name %> <%- audit.rpt_name %></a> <a href="/sp/<%- ctx.subProject.id %>/payment/<%- audit.tender_id %>/safe/<%- audit.td_id %>/bills"><%- audit.scode %></a></td>
  269. <% } else { %>
  270. <td><a href="/sp/<%- ctx.subProject.id %>/payment/<%- audit.tender_id %>/list/<%- audit.tr_id %>"><%- audit.name %> <%- audit.rpt_name %></a> <a href="/sp/<%- ctx.subProject.id %>/payment/<%- audit.tender_id %>/detail/<%- audit.td_id %>"><%- audit.scode %></a></td>
  271. <% } %>
  272. <td>第<%- audit.sorder %>期</td>
  273. <td><%- ctx.moment(audit.begin_time).format('YYYY/MM/DD HH:mm') %></td>
  274. <% if (audit.type) { %>
  275. <td><a href="/sp/<%- ctx.subProject.id %>/payment/<%- audit.tender_id %>/safe/<%- audit.td_id %>/bills" class="btn btn-outline-primary btn-sm btn-table" role="button"><% if (audit.sstatus === acStage.status.checkNoPre) { %>重新<% } %>审批</a></td>
  276. <% } else { %>
  277. <td><a href="/sp/<%- ctx.subProject.id %>/payment/<%- audit.tender_id %>/detail/<%- audit.td_id %>" class="btn btn-outline-primary btn-sm btn-table" role="button"><% if (audit.sstatus === acStage.status.checkNoPre) { %>重新<% } %>审批</a></td>
  278. <% } %>
  279. </tr>
  280. <% } else { %>
  281. <tr data-type="10">
  282. <td><span class="bg-new-payment text-new-payment badge text-width">支付审批</span></td>
  283. <% if (audit.type) { %>
  284. <td><a href="/sp/<%- ctx.subProject.id %>/payment/<%- audit.tender_id %>/list"><%- audit.name %> <%- audit.rpt_name %></a> <a href="/sp/<%- ctx.subProject.id %>/payment/<%- audit.tender_id %>/safe/<%- audit.td_id %>/bills"><%- audit.scode %></a></td>
  285. <% } else {%>
  286. <td><a href="/sp/<%- ctx.subProject.id %>/payment/<%- audit.tender_id %>/list"><%- audit.name %> <%- audit.rpt_name %></a> <a href="/sp/<%- ctx.subProject.id %>/payment/<%- audit.tender_id %>/detail/<%- audit.td_id %>"><%- audit.scode %></a></td>
  287. <% } %>
  288. <td>第<%- audit.sorder %>期</td>
  289. <td><%- ctx.moment(audit.end_time).format('YYYY/MM/DD HH:mm') %></td>
  290. <% if (audit.type) { %>
  291. <td><a href="/sp/<%- ctx.subProject.id %>/payment/<%- audit.tender_id %>/safe/<%- audit.td_id %>/bills" class="btn btn-outline-warning btn-sm btn-table text-warning" role="button">重新上报</a></td>
  292. <% } else {%>
  293. <td><a href="/sp/<%- ctx.subProject.id %>/payment/<%- audit.tender_id %>/detail/<%- audit.td_id %>" class="btn btn-outline-warning btn-sm btn-table text-warning" role="button">重新上报</a></td>
  294. <% } %>
  295. </tr>
  296. <% } %>
  297. <% } %>
  298. <% for (const af of auditFinancials) { %>
  299. <tr data-type="11">
  300. <td><span class="bg-new-financial text-new-financial badge text-width">资金支付</span></td>
  301. <td><a href="/sp/<%- af.spid %>/financial/pay/stage" class="account-page-size"><%- af.name %></a> <a href="/sp/<%- af.spid %>/financial/pay/<%- af.fpid %>/detail"><%- af.fpcode %></a></td>
  302. <td>支付</td>
  303. <td><%- (
  304. af.fpcstatus !== acFinancial.status.checkNo
  305. ? (af.begin_time ? ctx.moment(af.begin_time).format('YYYY/MM/DD HH:mm') : '')
  306. : (af.end_time ? ctx.moment(af.end_time).format('YYYY/MM/DD HH:mm') : '')
  307. ) %></td>
  308. <td><a href="/sp/<%- af.spid %>/financial/pay/<%- af.fpid %>/detail" class="btn btn-sm btn-table <% if (af.fpstatus === acFinancial.status.checkNo) { %>btn-outline-warning text-warning<% } else { %>btn-outline-primary<% } %>" role="button"><% if (af.fpstatus !== acFinancial.status.checkNo) { %>审批<% } else { %>重新上报<% } %></a></td>
  309. </tr>
  310. <% } %>
  311. <% for (const acp of auditInspections) { %>
  312. <tr data-type="9">
  313. <td><span class="bg-new-inspection text-new-inspection badge text-width">质量巡检</span></td>
  314. <td><a href="/sp/<%- acp.spid %>/quality/tender/<%- acp.tid %>/info"><%- acp.name %></a> <a href="/sp/<%- acp.spid %>/quality/tender/<%- acp.tid %>/inspection/<%- acp.qiid %>/information"><%- acp.mcode %></a></td>
  315. <td>巡检</td>
  316. <td><%- (
  317. acp.mstatus !== acInspection.status.checkNo
  318. ? (acp.begin_time ? ctx.moment(acp.begin_time).format('YYYY/MM/DD HH:mm') : '')
  319. : (acp.end_time ? ctx.moment(acp.end_time).format('YYYY/MM/DD HH:mm') : '')
  320. ) %></td>
  321. <td><a href="/sp/<%- acp.spid %>/quality/tender/<%- acp.tid %>/inspection/<%- acp.qiid %>/information" class="btn btn-sm btn-table <% if (acp.mstatus === acInspection.status.checkNo) { %>btn-outline-warning text-warning<% } else { %>btn-outline-primary<% } %>" role="button"><% if (acp.mstatus !== acInspection.status.checkNo) { %>审批<% } else { %>重新上报<% } %></a></td>
  322. </tr>
  323. <% } %>
  324. </tbody>
  325. </table>
  326. <% } else { %>
  327. <div class="p-5 text-center text-muted">
  328. <img src="/public/images/nulllogo.png" />
  329. <div class="pt-3">暂时没有需要你处理的事项</div>
  330. </div>
  331. <% } %>
  332. </div>
  333. <!--&lt;!&ndash;没有处理信息&ndash;&gt;-->
  334. <!--<p class="text-center text-muted">暂时没有需要你处理的事项。</p>-->
  335. </div>
  336. </div>
  337. </div>
  338. <div class="col-3 px-0">
  339. <div class="card ml-3">
  340. <div class="card-header card-white d-flex justify-content-between">
  341. <div class="card-big-htext"><span class="card-icon mr-2"></span>我参与的</div></div>
  342. <div class="card-body p-0">
  343. <div class="row mx-0 echart-height">
  344. <div class="col-6 px-0">
  345. <div class="canyu-width canyu-bg-blue mx-3 my-2 p-3 text-white">
  346. <div>参与审批</div>
  347. <div><span class="canyu-text mr-1"><%- total_count %></span>次</div>
  348. </div>
  349. </div>
  350. <div class="col-6 px-0">
  351. <div class="canyu-width canyu-bg-yellow my-2 mr-3 p-3 text-white">
  352. <div>距最后一次审批已过</div>
  353. <div><span class="canyu-text mr-1"><%- last_day || last_day === 0 ? last_day : '-' %></span>天</div>
  354. </div>
  355. </div>
  356. </div>
  357. <div class="contant-height-two">
  358. <div id="jechart" style="height: 90%; width: 100%;"></div>
  359. </div>
  360. </div>
  361. </div>
  362. </div>
  363. <!--项目消息通知-->
  364. <div class="col-3 pl-0">
  365. <div class="card ml-3">
  366. <div class="card-header card-white d-flex justify-content-between">
  367. <div class="card-big-htext"><span class="card-icon mr-2"></span>项目通知</div>
  368. <div class="mt-1"><a class="text-secondary" href="/sp/<%- ctx.subProject.id %>/dashboard/msg">查看全部</a></div>
  369. </div>
  370. <div class="card-body p-0">
  371. <div class="contant-height-three">
  372. <ul class="list-group list-group-flush msg-height-list">
  373. <% if (msgList.length === 0) { %>
  374. <!--没有通知-->
  375. <li class="list-group-item text-muted text-center p-5">
  376. <img src="/public/images/nulllogo.png" />
  377. <p class="pt-2 text-center mb-0">暂时没有通知</p>
  378. </li>
  379. <% } else { %>
  380. <% for (const msg of msgList) { %>
  381. <li class="list-group-item text-muted">
  382. <a href="#view-msg" msg-id="<%= msg.id %>" data-toggle="modal" data-target="#view-msg"<% if (msg.istop !== '0') { %> class="text-danger">
  383. <i class="fa fa-exclamation-triangle" ></i> <% } else { %>><% } %><%- msg.title %></a><br><%- moment(msg.release_time*1000).format('YYYY/MM/DD HH:mm') %></li>
  384. <% } %>
  385. <% } %>
  386. </ul>
  387. </div>
  388. <% if (userMsgPermission) { %>
  389. <!--发布通知-->
  390. <div class="mx-3 pb-3 addmsg-height"><a class="btn btn-outline-primary btn-block" href="/sp/<%- ctx.subProject.id %>/dashboard/msg/add/0">发布通知</a></div>
  391. <% } %>
  392. </div>
  393. </div>
  394. </div>
  395. </div>
  396. <div class="row agency-partheight">
  397. <div class="col-9 px-0">
  398. <div class="card ml-3">
  399. <div class="card-header card-white d-flex justify-content-between">
  400. <div class="card-big-htext"><span class="card-icon mr-2"></span>参与的标段动态</div>
  401. <div>
  402. <select class="form-control form-control-sm" id="select-notice-type">
  403. <option value="0">全部</option>
  404. <option value="6">预付款</option>
  405. <option value="5">台账审批</option>
  406. <option value="4">台账修订</option>
  407. <option value="2">计量审批</option>
  408. <option value="3">变更审批</option>
  409. <% if (ctx.subProject.page_show.openChangeProject) { %>
  410. <option value="7">变更立项</option>
  411. <% } %>
  412. <% if (ctx.subProject.page_show.openChangeApply) { %>
  413. <option value="8">变更申请</option>
  414. <% } %>
  415. <% if (ctx.subProject.page_show.openChangePlan) { %>
  416. <option value="9">变更方案</option>
  417. <% } %>
  418. <% if (ctx.subProject.page_show.openMaterial) { %>
  419. <option value="1">材料调差</option>
  420. <% } %>
  421. <% if (ctx.subProject.page_show.openFinancial) { %>
  422. <option value="11">资金支付</option>
  423. <% } %>
  424. <% if (ctx.subProject.page_show.quality) { %>
  425. <option value="13">质量巡检</option>
  426. <% } %>
  427. </select>
  428. </div>
  429. </div>
  430. <div class="card-body p-0">
  431. <div class="contant-height-one">
  432. <% if(noticeList.length) { %>
  433. <style>
  434. #notice-list a {
  435. word-wrap:break-word;
  436. }
  437. </style>
  438. <table style="table-layout:fixed;" class="table table-middle">
  439. <thead class="thead-light">
  440. <tr>
  441. <th width="110" class="pl-3">类型</th>
  442. <th>名称</th>
  443. <th width="150">审批人-职位</th>
  444. <th width="120">审批时间</th>
  445. <th width="60">项目</th>
  446. <th width="80">状态</th>
  447. <th>审批意见</th>
  448. </tr>
  449. </thead>
  450. <tbody id="notice-list">
  451. <!--<ul id="notice" class="list-unstyled m-0">-->
  452. <% for (const notice of noticeList) { %>
  453. <% if(notice.type === pushType.stage) { %>
  454. <tr data-type="2">
  455. <td><span class="bg-new-stage text-new-stage badge text-width">计量审批</span></td>
  456. <td><a href="/tender/<%- notice.tid %>"><%- notice.name %></a> <a href="/tender/<%- notice.tid %>/measure/stage/<%- notice.order %>">第<%- notice.order %>期</a></td>
  457. <td><%- notice.su_name %><%- (notice.su_role ? '-' + notice.su_role : '') %></td>
  458. <td><%- ctx.helper.dateTran(notice.create_time, 'YYYY/MM/DD HH:mm') %></td>
  459. <td>第<%- notice.order %>期</td>
  460. <td class="<%- acStage.statusClass[notice.status]%>"><%- acStage.statusString[notice.status]%></td>
  461. <td><%- notice.opinion ? notice.opinion : '' %></td>
  462. </tr>
  463. <% } else if(notice.type === pushType.material && ctx.subProject.page_show.openMaterial) { %>
  464. <tr data-type="1">
  465. <td><span class="bg-new-material text-new-material badge text-width">材料调差</span></td>
  466. <td><a href="/tender/<%- notice.tid %>"><%- notice.name %></a> <a href="/tender/<%- notice.tid %>/measure/material/<%- notice.order %>">第<%- notice.order %>期</a></td>
  467. <td><%- notice.su_name %><%- (notice.su_role ? '-' + notice.su_role : '') %></td>
  468. <td><%- ctx.helper.dateTran(notice.create_time, 'YYYY/MM/DD HH:mm') %></td>
  469. <td>第<%- notice.order %>期</td>
  470. <td class="<%- acMaterial.statusClass[notice.status]%>"><%- acMaterial.statusString[notice.status]%></td>
  471. <td><%- notice.opinion ? notice.opinion : '' %></td>
  472. </tr>
  473. <% } else if(notice.type === pushType.ledger) { %>
  474. <tr data-type="5">
  475. <td><span class="bg-new-ledger text-new-ledger badge text-width">台账审批</span></td>
  476. <td><a data-id="<%- notice.id %>" href="/tender/<%- notice.tid %>/ledger"><%- notice.name %></a></td>
  477. <td><%- notice.su_name %><%- (notice.su_role ? '-' + notice.su_role : '') %></td>
  478. <td><%- ctx.helper.dateTran(notice.create_time, 'YYYY/MM/DD HH:mm') %></td>
  479. <td>台账</td>
  480. <td class="<%- acLedger.statusClass[notice.status]%>"><%- acLedger.statusString[notice.status]%></td>
  481. <td><%- notice.opinion ? notice.opinion : '' %></td>
  482. </tr>
  483. <% } else if(notice.type === pushType.revise) { %>
  484. <tr data-type="4">
  485. <td><span class="bg-new-revise text-new-revise badge text-width">台账修订</span></td>
  486. <td><a href="/tender/<%- notice.tid %>/ledger"><%- notice.name %></a> <a href="/tender/<%- notice.tid %>/revise/<%- notice.rid %>/info">台账修订(第<%- notice.corder %>次)</a></td>
  487. <td><%- notice.su_name %><%- (notice.su_role ? '-' + notice.su_role : '') %></td>
  488. <td><%- ctx.helper.dateTran(notice.create_time, 'YYYY/MM/DD HH:mm') %></td>
  489. <td>第<%- notice.corder %>次</td>
  490. <td class="<%- acRevise.statusClass[notice.status]%>"><%- acRevise.statusString[notice.status]%></td>
  491. <td><%- notice.opinion ? notice.opinion : '' %></td>
  492. </tr>
  493. <% } else if(notice.type === pushType.change){ %>
  494. <tr data-type="3">
  495. <td><span class="bg-new-change text-new-change badge text-width">变更审批</span></td>
  496. <td><a href="/tender/<%- notice.tid %>"><%- notice.name %></a> <a href="/tender/<%- notice.tid %>/change/<%- notice.cid %>/information"><%- notice.c_code %></a></td>
  497. <td><%- notice.su_name %><%- (notice.su_role ? '-' + notice.su_role : '') %></td>
  498. <td><%- ctx.helper.dateTran(notice.create_time, 'YYYY/MM/DD HH:mm') %></td>
  499. <td>变更</td>
  500. <td class="<%- acChange.statusClass[notice.status]%>"><%- acChange.statusString[notice.status]%></td>
  501. <td><%- notice.opinion ? notice.opinion : '' %></td>
  502. </tr>
  503. <% } else if(notice.type === pushType.changeProject && ctx.subProject.page_show.openChangeProject) { %>
  504. <tr data-type="7">
  505. <td><span class="bg-new-changeProject text-new-changeProject badge text-width">变更立项</span></td>
  506. <td><a href="/tender/<%- notice.tid %>"><%- notice.name %></a> <a href="/tender/<%- notice.tid %>/change/project/<%- notice.cpid %>/information"><%- notice.c_code %></a></td>
  507. <td><%- notice.su_name %><%- (notice.su_role ? '-' + notice.su_role : '') %></td>
  508. <td><%- ctx.helper.dateTran(notice.create_time, 'YYYY/MM/DD HH:mm') %></td>
  509. <td>变更</td>
  510. <td class="<%- acChangeProject.statusClass[notice.status] %>"><%- acChangeProject.statusString[notice.status] %></td>
  511. <td><%- notice.opinion ? notice.opinion : '' %></td>
  512. </tr>
  513. <% } else if(notice.type === pushType.changeApply && ctx.subProject.page_show.openChangeApply) { %>
  514. <tr data-type="8">
  515. <td><span class="bg-new-changeApply text-new-changeApply badge text-width">变更申请</span></td>
  516. <td><a href="/tender/<%- notice.tid %>"><%- notice.name %></a> <a href="/tender/<%- notice.tid %>/change/apply/<%- notice.caid %>/information"><%- notice.c_code %></a></td>
  517. <td><%- notice.su_name %><%- (notice.su_role ? '-' + notice.su_role : '') %></td>
  518. <td><%- ctx.helper.dateTran(notice.create_time, 'YYYY/MM/DD HH:mm') %></td>
  519. <td>变更</td>
  520. <td class="<%- acChangeApply.statusClass[notice.status]%>"><%- acChangeApply.statusString[notice.status] %></td>
  521. <td><%- notice.opinion ? notice.opinion : '' %></td>
  522. </tr>
  523. <% } else if(notice.type === pushType.changePlan && ctx.subProject.page_show.openChangePlan) { %>
  524. <tr data-type="9">
  525. <td><span class="bg-new-changePlan text-new-changePlan badge text-width">变更方案</span></td>
  526. <td><a href="/tender/<%- notice.tid %>"><%- notice.name %></a> <a href="/tender/<%- notice.tid %>/change/plan/<%- notice.cpid %>/information"><%- notice.c_code %></a></td>
  527. <td><%- notice.su_name %><%- (notice.su_role ? '-' + notice.su_role : '') %></td>
  528. <td><%- ctx.helper.dateTran(notice.create_time, 'YYYY/MM/DD HH:mm') %></td>
  529. <td>变更</td>
  530. <td class="<%- acChangePlan.statusClass[notice.status] %>"><%- acChangePlan.statusString[notice.status] %></td>
  531. <td><%- notice.opinion ? notice.opinion : '' %></td>
  532. </tr>
  533. <% } else if(notice.type === pushType.advance) { %>
  534. <tr data-type="6">
  535. <td><span class="bg-new-advance text-new-advance badge text-width">预付款</span></td>
  536. <td><a href="/tender/<%- notice.tid %>"><%- notice.name %></a> <a href="/tender/<%- notice.tid %>/advance/<%- notice.vid %>/detail"><%- notice.ad_type ? typeColMap[notice.ad_type].text : '' %>第<%- notice.order %>期</a></td>
  537. <td><%- notice.su_name %><%- (notice.su_role ? '-' + notice.su_role : '') %></td>
  538. <td><%- ctx.helper.dateTran(notice.create_time, 'YYYY/MM/DD HH:mm') %></td>
  539. <td>第<%- notice.order %>期</td>
  540. <td class="<%- acAdvance.statusClass[notice.status]%>"><%- acAdvance.statusString[notice.status]%></td>
  541. <td><%- notice.opinion ? notice.opinion : '' %></td>
  542. </tr>
  543. <% } else if(notice.type === pushType.financial && ctx.subProject.page_show.openFinancial) { %>
  544. <tr data-type="11">
  545. <td><span class="bg-new-financial text-new-financial badge text-width">资金支付</span></td>
  546. <td><a href="/sp/<%- notice.spid %>/financial/pay/stage" class="account-page-size"><%- notice.name %></a> <a href="/sp/<%- notice.spid %>/financial/pay/<%- notice.fpid %>/detail"><%- notice.code %></a></td>
  547. <td><%- notice.su_name %><%- (notice.su_role ? '-' + notice.su_role : '') %></td>
  548. <td><%- ctx.helper.dateTran(notice.create_time, 'YYYY/MM/DD HH:mm') %></td>
  549. <td>支付</td>
  550. <td class="<%- acFinancial.statusClass[notice.status] %>"><%- acFinancial.statusString[notice.status] %></td>
  551. <td><%- notice.opinion ? notice.opinion : '' %></td>
  552. </tr>
  553. <% } else if(notice.type === pushType.inspection && ctx.subProject.page_show.quality) { %>
  554. <tr data-type="13">
  555. <td><span class="bg-new-inspection text-new-inspection badge text-width">质量巡检</span></td>
  556. <td><a href="/tender/<%- notice.tid %>"><%- notice.name %></a> <a href="/sp/<%- notice.spid %>/quality/tender/<%- notice.tid %>/inspection/<%- notice.qiid %>/information"><%- notice.c_code %></a></td>
  557. <td><%- notice.su_name %><%- (notice.su_role ? '-' + notice.su_role : '') %></td>
  558. <td><%- ctx.helper.dateTran(notice.create_time, 'YYYY/MM/DD HH:mm') %></td>
  559. <td>巡检</td>
  560. <td class="<%- acInspection.statusClass[notice.status] %>"><%- acInspection.statusString[notice.status] %></td>
  561. <td><%- notice.opinion ? notice.opinion : '' %></td>
  562. </tr>
  563. <% } %>
  564. <% } %>
  565. </tbody>
  566. </table>
  567. <% } else { %>
  568. <div class="p-5 text-center text-muted">
  569. <img src="/public/images/nulllogo.png" />
  570. <div class="pt-3">暂时没有需要你关注的事项</div>
  571. </div>
  572. <% } %>
  573. </div>
  574. </div>
  575. <!--没有关注信息-->
  576. <!--<p class="text-center text-muted">暂时没有需要你关注的事项。</p>-->
  577. </div>
  578. </div>
  579. <div class="col-3 pl-0">
  580. <div class="card ml-3">
  581. <div class="card-header card-white d-flex justify-content-between">
  582. <div class="card-big-htext"><span class="card-icon mr-2"></span>技术支持</div>
  583. </div>
  584. <div class="card-body p-0">
  585. <!--<h6 class="card-subtitle mb-2 text-muted"><%= salesmanData.username %></h6>-->
  586. <div class="contant-height-one">
  587. <div class="mx-4">
  588. <ul class="list-group list-group-flush">
  589. <li class="list-group-item" data-toggle="tooltip" data-placement="bottom" title="腾讯QQ"><i class="fa fa-qq"></i> <%=salesmanData.qq%></li>
  590. <li class="list-group-item" data-toggle="tooltip" data-placement="bottom" title="手机号码"><i class="fa fa-tablet"></i> <%=salesmanData.telephone%></li>
  591. <li class="list-group-item" data-toggle="tooltip" data-placement="bottom" title="固定电话"><i class="fa fa-phone"></i> <%=salesmanData.fixedphone%></li>
  592. <% if (projectData.qrcode_json) { %>
  593. <li class="list-group-item container-fluid">
  594. <div class="row qrcode-height">
  595. <% for (const qr of JSON.parse(projectData.qrcode_json)) { %>
  596. <div class="col-sm text-center"><img src="/<%= qr.path %>" width="100%" style="max-width: 180px"><div class="text-center"><%= qr.name %></div></div>
  597. <% } %>
  598. </div>
  599. </li>
  600. <% } else { %>
  601. <li class="list-group-item container-fluid">
  602. <div class="row qrcode-height">
  603. <div class="col-sm text-center"><img src="/public/images/erweima.jpg" width="100%" style="max-width: 180px"><div class="text-center">虾米造价</div></div>
  604. </div>
  605. </li>
  606. <% } %>
  607. </ul>
  608. </div>
  609. </div>
  610. </div>
  611. </div>
  612. </div>
  613. </div>
  614. </div>
  615. </div>
  616. </div>
  617. <script src="/public/js/moment/moment.min.js"></script>
  618. <script src="/public/js/echarts/echarts.min.js"></script>
  619. <script src="/public/js/dashboard.js"></script>
  620. <script>
  621. autoFlashHeight();
  622. const msgList = JSON.parse('<%- JSON.stringify(msgList) %>');
  623. const sysMsgList = JSON.parse('<%- JSON.stringify(sysMsgList) %>');
  624. const pushType = JSON.parse('<%- JSON.stringify(pushType) %>');
  625. const uid = '<%- uid %>';
  626. const type = 1;
  627. const userMsgPermission = <%- userMsgPermission %>;
  628. </script>
  629. <script type="text/javascript">
  630. $(function () {
  631. function setDashboardHeight() {
  632. function getObjHeight(select) {
  633. return select.length > 0 ? select.outerHeight(true) : 0;
  634. }
  635. var mobileHeight = getObjHeight($(".mobile-height"));
  636. var maintainHeight = getObjHeight($(".maintain-height"));
  637. $('.dashboard-height').height($(window).height()- mobileHeight - maintainHeight - 34 - 16);
  638. $('.agency-partheight').height($('.dashboard-height').height()/2);
  639. // $('.agency-partheight').eq(1).height($('.sjs-height-0').height() - $('.agency-partheight').eq(0).height());
  640. $('.contant-height-one').height($('.agency-partheight').height() - 52 - 20);
  641. $('.contant-height-two').height($('.agency-partheight').height() - 52 - getObjHeight($(".echart-height")) - 20);
  642. $('.contant-height-three').height($('.agency-partheight').height() - 52 - getObjHeight($(".addmsg-height")) - 20);
  643. $('.qrcode-height').height($('.contant-height-one').height() - 43 - 44 - 44 - 25);
  644. $('.qrcode-height .col-sm').css('padding-top', ($('.qrcode-height').height()/2 - ($('.qrcode-height img').height()+18)/2) + 'px');
  645. // resizeChart();
  646. }
  647. setDashboardHeight();
  648. $(window).resize(setDashboardHeight);
  649. $('#select-notice-type').change(function () {
  650. const type = parseInt($(this).val());
  651. if(type === 0) {
  652. $('#notice-list tr').show();
  653. return;
  654. } else {
  655. $('#notice-list tr').hide();
  656. $('#notice-list tr[data-type="' + type + '"]').show();
  657. }
  658. });
  659. $('#select-doing-type').change(function () {
  660. const type = parseInt($(this).val());
  661. if(type === 0) {
  662. $('#doing-list tr').show();
  663. return;
  664. } else {
  665. $('#doing-list tr').hide();
  666. $('#doing-list tr[data-type="' + type + '"]').show();
  667. }
  668. });
  669. })
  670. var transparentCount = 1;
  671. const option = {
  672. // title: {
  673. // text: '金额统计图',
  674. // left: 'center',
  675. // top:'7%'
  676. // },
  677. color: [
  678. 'rgba(241, 82, 91,'+ transparentCount +')',
  679. 'rgba(250, 140, 22,'+ transparentCount +')',
  680. 'rgba(251, 182, 45,'+ transparentCount +')',
  681. 'rgba(82, 196, 26,'+ transparentCount +')',
  682. 'rgba(22, 208, 208,'+ transparentCount +')',
  683. <% if (ctx.subProject.page_show.openChangeProject) { %>
  684. 'rgba(51, 119, 255,'+ transparentCount +')',
  685. <% } %>
  686. <% if (ctx.subProject.page_show.openChangeApply) { %>
  687. 'rgba(41, 58, 210,'+ transparentCount +')',
  688. <% } %>
  689. <% if (ctx.subProject.page_show.openChangePlan) { %>
  690. 'rgba(114, 46, 209,'+ transparentCount +')',
  691. <% } %>
  692. <% if (ctx.subProject.page_show.openMaterial) { %>
  693. 'rgba(187, 41, 210,'+ transparentCount +')',
  694. <% } %>
  695. <% if (ctx.subProject.page_show.openFinancial) { %>
  696. 'rgba(58, 88, 50,'+ transparentCount +')',
  697. <% } %>
  698. <% if (ctx.subProject.page_show.quality) { %>
  699. 'rgba(158, 58, 80,'+ transparentCount +')',
  700. <% } %>
  701. ],
  702. tooltip: {
  703. trigger: 'item'
  704. },
  705. legend: [
  706. {
  707. orient: 'vertical',
  708. left: '3%',
  709. top: 'center',
  710. itemWidth: 13,
  711. itemHeight: 13,
  712. textStyle: {
  713. fontSize: 12
  714. },
  715. data: [<% for (const sc of shenpi_count.slice(0, shenpi_count.length/2)) { %>
  716. '<%- sc.name %>',
  717. <% } %>]
  718. },
  719. {
  720. orient: 'vertical',
  721. right: '3%',
  722. top: 'center',
  723. itemWidth: 13,
  724. itemHeight: 13,
  725. textStyle: {
  726. fontSize: 12
  727. },
  728. data: [<% for (const sc of shenpi_count.slice(shenpi_count.length/2, shenpi_count.length)) { %>
  729. '<%- sc.name %>',
  730. <% } %>]
  731. }
  732. ],
  733. series: [
  734. {
  735. name: '审批次数',
  736. type: 'pie',
  737. radius: ['35%', '55%'],
  738. center: ['50%', '50%'],
  739. avoidLabelOverlap: false,
  740. data: [
  741. <% for (const sc of shenpi_count) { %>
  742. { value: <%- sc.count %>, name: '<%- sc.name %>' },
  743. <% } %>
  744. ],
  745. label: {
  746. show: false
  747. },
  748. emphasis: {
  749. itemStyle: {
  750. shadowBlur: 10,
  751. shadowOffsetX: 0,
  752. shadowColor: 'rgba(0, 0, 0, 0.5)'
  753. }
  754. }
  755. }
  756. ]
  757. };
  758. function optionRadius() {
  759. if ($(window).outerWidth() > 1366) {
  760. if ($('#jechart').outerWidth() - $('#jechart').outerHeight() < 90) {
  761. option.series[0].radius = ['35%', '55%'];
  762. } else if ($('#jechart').outerWidth() < 320) {
  763. option.series[0].radius = ['35%', '60%'];
  764. } else if ($('#jechart').outerWidth() < 330) {
  765. option.series[0].radius = ['40%', '65%'];
  766. } else if ($('#jechart').outerWidth() < 350) {
  767. option.series[0].radius = ['45%', '70%'];
  768. } else {
  769. option.series[0].radius = ['50%', '75%'];
  770. }
  771. } else {
  772. option.series[0].radius = ['50%', '75%'];
  773. }
  774. }
  775. function initChart() {
  776. const myChart1 = echarts.init(document.getElementById('jechart'));
  777. optionRadius();
  778. myChart1.setOption(option, true);
  779. window.addEventListener('resize', function () {
  780. optionRadius();
  781. myChart1.setOption(option, true);
  782. myChart1.resize();
  783. });
  784. }
  785. // initChart();
  786. setTimeout(function () {
  787. initChart();
  788. },500);
  789. // $(window).resize(resizeChart);
  790. // function resizeChart() {
  791. // myChart1.resize()
  792. // }
  793. // var myChart1 = echarts.init(document.getElementById('jechart'));
  794. // setTimeout(function () {
  795. // myChart1.setOption(option);
  796. // resizeChart();
  797. // // resizeChart();
  798. // },500);
  799. </script>