index.ejs 57 KB

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