index.ejs 55 KB

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