manage.ejs 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468
  1. <% include ../sp_setting/sub_menu.ejs %>
  2. <div class="panel-content">
  3. <div class="panel-title fluid">
  4. <div class="title-main d-flex justify-content-between">
  5. <div>
  6. <div class="d-inline-block mr-2" style="font-weight: 500">
  7. 标段设置
  8. </div>
  9. <div class="d-inline-block" id="show-level"></div>
  10. <div class="d-inline-block"><button class="btn btn-sm btn-primary" data-toggle="modal" data-target="#select-tender">关联标段</button></div>
  11. <div class="d-inline-block"><button class="btn btn-sm btn-primary" data-toggle="modal" data-target="#filter-tender">过滤标段</button></div>
  12. <div class="d-inline-block custom-control custom-checkbox ml-2">
  13. <input type="checkbox" id="filter-tender-done" name="customCheckbox" class="custom-control-input" >
  14. <label class="custom-control-label" for="filter-tender-done">过滤完工标段</label>
  15. </div>
  16. </div>
  17. </div>
  18. </div>
  19. <div class="content-wrap">
  20. <div class="sjs-height-0 row" style="background-color: #fff;overflow: hidden">
  21. <div class="col-4">
  22. <div class="c-body sjs-height-0" style="overflow: auto"></div>
  23. </div>
  24. <div class="col-8">
  25. <nav class="nav nav-tabs m-3" role="tablist">
  26. <a class="nav-item nav-link active" data-toggle="tab" href="#splc" role="tab">审批流程</a>
  27. <a class="nav-item nav-link" data-toggle="tab" href="#guest" role="tab">游客账号</a>
  28. <a class="nav-item nav-link" data-toggle="tab" href="#tzpro" role="tab">投资进度</a>
  29. <a class="nav-item nav-link" data-toggle="tab" href="#htgl" role="tab">标段合同</a>
  30. <a class="nav-item nav-link" data-toggle="tab" href="#sgrz" role="tab">施工日志</a>
  31. <a class="nav-item nav-link" data-toggle="tab" href="#quality" role="tab">质量管理</a>
  32. <a class="nav-item nav-link" data-toggle="tab" href="#inspection" role="tab">质量巡检</a>
  33. <a class="nav-item nav-link" data-toggle="tab" href="#safe_payment" role="tab">安全计量</a>
  34. <a class="nav-item nav-link" data-toggle="tab" href="#safe_inspection" role="tab">安全巡检</a>
  35. <!-- <a class="nav-item nav-link" data-toggle="tab" href="#subadmin" role="tab">标段管理员</a>-->
  36. <div class="ml-auto" id="user-set" style="display: none">
  37. <div class="row">
  38. <div class="d-inline-block mr-3">
  39. <div id="contract-tip" class="btn-group align-middle" style="display: none;">
  40. <a href="javascript:void(0)" data-toggle="dropdown" title="权限说明"><i class="fa fa-question-circle"></i></a>
  41. <div class="dropdown-menu bg-dark">
  42. <div class="dropdown-item text-light bg-dark">1、编辑节点:编辑合同管理内页树结构</div>
  43. <div class="dropdown-item text-light bg-dark">2、添加合同:允许添加合同</div>
  44. <div class="dropdown-item text-light bg-dark">3、编辑合同:编辑非自己上传的合同信息</div>
  45. <div class="dropdown-item text-light bg-dark">4、添加支付:给非自己上传的合同添加合同支付</div>
  46. <div class="dropdown-item text-light bg-dark">5、授权范围本单位:授权节点下查看本单位人员添加的所有合同</div>
  47. <div class="dropdown-item text-light bg-dark">6、授权范围本节点:授权节点下查看所有人上传的合同</div>
  48. </div>
  49. </div>
  50. </div>
  51. <div class="d-inline-block dropdown">
  52. <button class="btn btn-outline-primary btn-sm dropdown-toggle" type="button" data-type="" id="add_user_dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
  53. 添加用户
  54. </button>
  55. <div class="dropdown-menu" id="add_user_dropdownMenu2" aria-labelledby="add_user_dropdownMenuButton" style="width:220px">
  56. <div class="mb-2 p-2"><input class="form-control form-control-sm gr-search"
  57. placeholder="姓名/手机 检索" autocomplete="off"></div>
  58. <dl class="list-unstyled book-list">
  59. <% accountGroup.forEach((group, idx) => { %>
  60. <dt><a href="javascript: void(0);" class="acc-btn" data-groupid="<%- idx %>" data-type="hide"><i class="fa fa-plus-square"></i></a> <%- group.groupName %></dt>
  61. <div class="dd-content" data-toggleid="<%- idx %>">
  62. <% group.groupList.forEach(item => { %>
  63. <dd class="border-bottom p-2 mb-0 " data-id="<%- item.id %>" >
  64. <p class="mb-0 d-flex"><span class="text-primary"><%- item.name %></span><span
  65. class="ml-auto"><%- item.mobile %></span></p>
  66. <span class="text-muted"><%- item.role %></span>
  67. </dd>
  68. <% });%>
  69. </div>
  70. <% }) %>
  71. </dl>
  72. </div>
  73. </div>
  74. <div class="d-inline-block ml-3">
  75. <a href="javascript:void(0)" class="btn btn-primary btn-sm pull-right" id="set-other-tender-user-a">应用账号至其他标段</a>
  76. </div>
  77. </div>
  78. </div>
  79. </nav>
  80. <div class="tab-content m-3" style="overflow: auto">
  81. <!--审批流程 -->
  82. <div id="splc" class="tab-pane active">
  83. </div>
  84. <!--游客账号 -->
  85. <div id="guest" class="tab-pane">
  86. <div class="col-8" style="max-width: 800px">
  87. <table class="table table-hover table-bordered table-sm">
  88. <thead>
  89. <tr>
  90. <th class="text-center" width="100px">用户</th>
  91. <th class="text-center" width="120px">职位</th>
  92. <th class="text-center" width="60px">附件</th>
  93. <th class="text-center" width="60px">书签</th>
  94. <th class="text-center" >操作</th>
  95. </tr>
  96. </thead>
  97. <tbody id="tourist-users">
  98. </tbody>
  99. </table>
  100. </div>
  101. </div>
  102. <!--投资进度 -->
  103. <div id="tzpro" class="tab-pane">
  104. <div class="col-8" style="max-width: 800px">
  105. <table class="table table-hover table-bordered table-sm">
  106. <thead>
  107. <tr>
  108. <th class="text-center" width="100px">用户</th>
  109. <th class="text-center" width="120px">职位</th>
  110. <th class="text-center" width="60px">查看</th>
  111. <th class="text-center" width="60px">修改</th>
  112. <th class="text-center" >操作</th>
  113. </tr>
  114. </thead>
  115. <tbody id="schedule-users">
  116. <tr>
  117. <td>陈特</td>
  118. <td>业主</td>
  119. <td class="text-center">
  120. <div class="custom-control custom-checkbox mb-2">
  121. <input type="checkbox" id="customRadio301" name="customCheckbox" class="custom-control-input">
  122. <label class="custom-control-label" for="customRadio301"></label>
  123. </div>
  124. </td>
  125. <td class="text-center">
  126. <div class="custom-control custom-checkbox mb-2">
  127. <input type="checkbox" id="customRadio302" name="customCheckbox" class="custom-control-input">
  128. <label class="custom-control-label" for="customRadio302"></label>
  129. </div>
  130. </td>
  131. <td class="text-center">
  132. <a href="#remove-user1" data-toggle="modal" data-target="#remove-user" class="btn btn-sm btn-outline-danger">移除</a>
  133. </td>
  134. </tr>
  135. <tr>
  136. <td>仁温书</td>
  137. <td>项目经理</td>
  138. <td class="text-center">
  139. <div class="custom-control custom-checkbox mb-2">
  140. <input type="checkbox" id="customRadio311" name="customCheckbox" class="custom-control-input">
  141. <label class="custom-control-label" for="customRadio311"></label>
  142. </div>
  143. </td>
  144. <td class="text-center">
  145. <div class="custom-control custom-checkbox mb-2">
  146. <input type="checkbox" id="customRadio312" name="customCheckbox" class="custom-control-input">
  147. <label class="custom-control-label" for="customRadio312"></label>
  148. </div>
  149. </td>
  150. <td class="text-center">
  151. <a href="#remove-user1" data-toggle="modal" data-target="#remove-user" class="btn btn-sm btn-outline-danger">移除</a>
  152. </td>
  153. </tr>
  154. <tr>
  155. <td>玉安然</td>
  156. <td>集团经理</td>
  157. <td class="text-center">
  158. <div class="custom-control custom-checkbox mb-2">
  159. <input type="checkbox" id="customRadio321" name="customCheckbox" class="custom-control-input">
  160. <label class="custom-control-label" for="customRadio321"></label>
  161. </div>
  162. </td>
  163. <td class="text-center">
  164. <div class="custom-control custom-checkbox mb-2">
  165. <input type="checkbox" id="customRadio322" name="customCheckbox" class="custom-control-input">
  166. <label class="custom-control-label" for="customRadio322"></label>
  167. </div>
  168. </td>
  169. <td class="text-center">
  170. <a href="#remove-user1" data-toggle="modal" data-target="#remove-user" class="btn btn-sm btn-outline-danger">移除</a>
  171. </td>
  172. </tr>
  173. </tbody>
  174. </table>
  175. </div>
  176. </div>
  177. <!--合同管理 -->
  178. <div id="htgl" class="tab-pane">
  179. <div class="col-8" style="max-width: 800px">
  180. <table class="table table-hover table-bordered table-sm">
  181. <thead class="text-center">
  182. <tr>
  183. <th rowspan="2" class="align-middle">用户名</th>
  184. <th rowspan="2" class="align-middle">角色/职位</th>
  185. <th rowspan="2" class="align-middle">编辑节点</th>
  186. <th rowspan="2" class="align-middle">添加合同</th>
  187. <th rowspan="2" class="align-middle">编辑合同</th>
  188. <th rowspan="2" class="align-middle">添加支付</th>
  189. <th colspan="2">授权节点合同查看范围</th>
  190. <th rowspan="2" class="align-middle">操作</th>
  191. </tr>
  192. <tr>
  193. <th>本单位</th>
  194. <th>本节点</th>
  195. </tr>
  196. </thead>
  197. <tbody id="contract-users">
  198. </tbody>
  199. </table>
  200. </div>
  201. </div>
  202. <!--施工日志 -->
  203. <div id="sgrz" class="tab-pane">
  204. <div class="col-8" style="max-width: 800px">
  205. <table class="table table-hover table-bordered table-sm">
  206. <thead>
  207. <tr>
  208. <th class="text-center" width="100px">用户</th>
  209. <th class="text-center" width="120px">职位</th>
  210. <th class="text-center" width="60px">填报人</th>
  211. <th class="text-center" >操作</th>
  212. </tr>
  213. </thead>
  214. <tbody id="construction-users">
  215. <tr>
  216. <td>陈特</td>
  217. <td>业主</td>
  218. <td class="text-center">
  219. <div class="custom-control custom-checkbox mb-2">
  220. <input type="checkbox" id="customRadio301" name="customCheckbox" class="custom-control-input">
  221. <label class="custom-control-label" for="customRadio301"></label>
  222. </div>
  223. </td>
  224. <td class="text-center">
  225. <a href="#remove-user1" data-toggle="modal" data-target="#remove-user" class="btn btn-sm btn-outline-danger">移除</a>
  226. </td>
  227. </tr>
  228. </tbody>
  229. </table>
  230. </div>
  231. </div>
  232. <!--质量管理 -->
  233. <div id="quality" class="tab-pane">
  234. <div class="col-8" style="max-width: 800px">
  235. <table class="table table-hover table-bordered table-sm">
  236. <thead class="text-center">
  237. <tr>
  238. <th class="align-middle" rowspan="2">成员名称</th>
  239. <th class="align-middle" rowspan="2">角色/职位</th>
  240. <% const pb = permissionBlock.find(item => item.key === 'quality'); %>
  241. <th colspan="<%- pb.permission.filter(x => { return !x.isDefault; }).length %>"><%- pb.name %></th>
  242. <th class="align-middle" rowspan="2">操作</th>
  243. </tr>
  244. <tr>
  245. <% for (const p of pb.permission) { %>
  246. <% if (p.isDefault) continue; %>
  247. <th><%- p.title %></th>
  248. <% } %>
  249. </tr>
  250. </thead>
  251. <tbody id="quality-users">
  252. </tbody>
  253. </table>
  254. </div>
  255. </div>
  256. <!--质量巡检 -->
  257. <div id="inspection" class="tab-pane">
  258. <div class="col-8" style="max-width: 800px">
  259. <table class="table table-hover table-bordered table-sm">
  260. <thead class="text-center">
  261. <tr>
  262. <th class="align-middle" rowspan="2">成员名称</th>
  263. <th class="align-middle" rowspan="2">角色/职位</th>
  264. <% const inspectionPb = permissionBlock.find(item => item.key === 'inspection'); %>
  265. <th colspan="<%- inspectionPb.permission.filter(x => { return !x.isDefault; }).length %>"><%- inspectionPb.name %></th>
  266. <th class="align-middle" rowspan="2">操作</th>
  267. </tr>
  268. <tr>
  269. <% for (const p of inspectionPb.permission) { %>
  270. <% if (p.isDefault) continue; %>
  271. <th><%- p.title %></th>
  272. <% } %>
  273. </tr>
  274. </thead>
  275. <tbody id="inspection-users">
  276. </tbody>
  277. </table>
  278. </div>
  279. </div>
  280. <!--质量巡检 -->
  281. <div id="safe_payment" class="tab-pane">
  282. <div class="col-8" style="max-width: 800px">
  283. <table class="table table-hover table-bordered table-sm">
  284. <thead class="text-center">
  285. <tr>
  286. <th class="align-middle" rowspan="2">成员名称</th>
  287. <th class="align-middle" rowspan="2">角色/职位</th>
  288. <% const safePaymentPb = permissionBlock.find(item => item.key === 'safe_payment'); %>
  289. <th colspan="<%- safePaymentPb.permission.filter(x => { return !x.isDefault; }).length %>"><%- safePaymentPb.name %></th>
  290. <th class="align-middle" rowspan="2">操作</th>
  291. </tr>
  292. <tr>
  293. <% for (const p of safePaymentPb.permission) { %>
  294. <% if (p.isDefault) continue; %>
  295. <th><%- p.title %></th>
  296. <% } %>
  297. </tr>
  298. </thead>
  299. <tbody id="safe_payment-users">
  300. </tbody>
  301. </table>
  302. </div>
  303. </div>
  304. <!--安全巡检 -->
  305. <div id="safe_inspection" class="tab-pane">
  306. <div class="col-8" style="max-width: 800px">
  307. <table class="table table-hover table-bordered table-sm">
  308. <thead class="text-center">
  309. <tr>
  310. <th class="align-middle" rowspan="2">成员名称</th>
  311. <th class="align-middle" rowspan="2">角色/职位</th>
  312. <% const safeInspectionPb = permissionBlock.find(item => item.key === 'safe_inspection'); %>
  313. <th colspan="<%- safeInspectionPb.permission.filter(x => { return !x.isDefault; }).length %>"><%- safeInspectionPb.name %></th>
  314. <th class="align-middle" rowspan="2">操作</th>
  315. </tr>
  316. <tr>
  317. <% for (const p of safeInspectionPb.permission) { %>
  318. <% if (p.isDefault) continue; %>
  319. <th><%- p.title %></th>
  320. <% } %>
  321. </tr>
  322. </thead>
  323. <tbody id="safe_inspection-users">
  324. </tbody>
  325. </table>
  326. </div>
  327. </div>
  328. <!--标段管理员 -->
  329. <div id="subadmin" class="tab-pane">
  330. <div class="col-6">
  331. <div class="mt-3">
  332. <label class="form-text alert alert-danger">设置标段管理员,开放部分管理员权限给标段管理员。</label>
  333. </div>
  334. <table class="table table-hover table-bordered table-sm">
  335. <thead>
  336. <tr class="text-center">
  337. <th width="10%">用户</th>
  338. <th >职位</th>
  339. <th width="10%">审批流程</th>
  340. <th width="10%">游客账号</th>
  341. <th width="10%">投资进度</th>
  342. <th width="10%">施工日志</th>
  343. <th width="10%">操作</th>
  344. </tr>
  345. </thead>
  346. <tbody>
  347. <tr class="text-center">
  348. <td>陈特</td>
  349. <td>业主</td>
  350. <td class="text-center">
  351. <div class="custom-control custom-checkbox mb-2">
  352. <input type="checkbox" id="customRadio401" name="customCheckbox" class="custom-control-input">
  353. <label class="custom-control-label" for="customRadio401"></label>
  354. </div>
  355. </td>
  356. <td class="text-center">
  357. <div class="custom-control custom-checkbox mb-2">
  358. <input type="checkbox" id="customRadio402" name="customCheckbox" class="custom-control-input">
  359. <label class="custom-control-label" for="customRadio402"></label>
  360. </div>
  361. </td>
  362. <td class="text-center">
  363. <div class="custom-control custom-checkbox mb-2">
  364. <input type="checkbox" id="customRadio403" name="customCheckbox" class="custom-control-input">
  365. <label class="custom-control-label" for="customRadio403"></label>
  366. </div>
  367. </td>
  368. <td class="text-center">
  369. <div class="custom-control custom-checkbox mb-2">
  370. <input type="checkbox" id="customRadio404" name="customCheckbox" class="custom-control-input">
  371. <label class="custom-control-label" for="customRadio404"></label>
  372. </div>
  373. </td>
  374. <td class="text-center">
  375. <a href="#remove-user1" data-toggle="modal" data-target="#remove-user" class="btn btn-sm btn-outline-danger">移除</a>
  376. </td>
  377. </tr>
  378. <tr class="text-center">
  379. <td>仁温书</td>
  380. <td>项目经理</td>
  381. <td class="text-center">
  382. <div class="custom-control custom-checkbox mb-2">
  383. <input type="checkbox" id="customRadio411" name="customCheckbox" class="custom-control-input">
  384. <label class="custom-control-label" for="customRadio411"></label>
  385. </div>
  386. </td>
  387. <td class="text-center">
  388. <div class="custom-control custom-checkbox mb-2">
  389. <input type="checkbox" id="customRadio412" name="customCheckbox" class="custom-control-input">
  390. <label class="custom-control-label" for="customRadio412"></label>
  391. </div>
  392. </td>
  393. <td class="text-center">
  394. <div class="custom-control custom-checkbox mb-2">
  395. <input type="checkbox" id="customRadio413" name="customCheckbox" class="custom-control-input">
  396. <label class="custom-control-label" for="customRadio413"></label>
  397. </div>
  398. </td>
  399. <td class="text-center">
  400. <div class="custom-control custom-checkbox mb-2">
  401. <input type="checkbox" id="customRadio414" name="customCheckbox" class="custom-control-input">
  402. <label class="custom-control-label" for="customRadio414"></label>
  403. </div>
  404. </td>
  405. <td class="text-center">
  406. <a href="#remove-user1" data-toggle="modal" data-target="#remove-user" class="btn btn-sm btn-outline-danger">移除</a>
  407. </td>
  408. </tr>
  409. <tr class="text-center">
  410. <td>玉安然</td>
  411. <td>集团经理</td>
  412. <td class="text-center">
  413. <div class="custom-control custom-checkbox mb-2">
  414. <input type="checkbox" id="customRadio421" name="customCheckbox" class="custom-control-input">
  415. <label class="custom-control-label" for="customRadio421"></label>
  416. </div>
  417. </td>
  418. <td class="text-center">
  419. <div class="custom-control custom-checkbox mb-2">
  420. <input type="checkbox" id="customRadio422" name="customCheckbox" class="custom-control-input">
  421. <label class="custom-control-label" for="customRadio422"></label>
  422. </div>
  423. </td>
  424. <td class="text-center">
  425. <div class="custom-control custom-checkbox mb-2">
  426. <input type="checkbox" id="customRadio423" name="customCheckbox" class="custom-control-input">
  427. <label class="custom-control-label" for="customRadio423"></label>
  428. </div>
  429. </td>
  430. <td class="text-center">
  431. <div class="custom-control custom-checkbox mb-2">
  432. <input type="checkbox" id="customRadio424" name="customCheckbox" class="custom-control-input">
  433. <label class="custom-control-label" for="customRadio424"></label>
  434. </div>
  435. </td>
  436. <td class="text-center">
  437. <a href="#remove-user1" data-toggle="modal" data-target="#remove-user" class="btn btn-sm btn-outline-danger">移除</a>
  438. </td>
  439. </tr>
  440. </tbody>
  441. </table>
  442. </div>
  443. </div>
  444. </div>
  445. </div>
  446. </div>
  447. </div>
  448. </div>
  449. <script>
  450. const accountGroup = JSON.parse(unescape('<%- escape(JSON.stringify(accountGroup)) %>'));
  451. const accountList = JSON.parse(unescape('<%- escape(JSON.stringify(accountList)) %>'));
  452. const auditConst = JSON.parse(unescape('<%- escape(JSON.stringify(auditConst)) %>'));
  453. const tenders = JSON.parse(unescape('<%- escape(JSON.stringify(tenderList)) %>'));
  454. const categoryType = JSON.parse('<%- JSON.stringify(settingConst.cType) %>');
  455. const category = JSON.parse(unescape('<%- escape(JSON.stringify(categoryData)) %>'));
  456. const selfCategoryLevel = '<%- (selfCategoryLevel || '') %>';
  457. const measureType = JSON.parse('<%- JSON.stringify(measureType) %>');
  458. const auditType = JSON.parse(unescape('<%- escape(JSON.stringify(auditType)) %>'));
  459. const scPermission = JSON.parse(unescape('<%- escape(JSON.stringify(scPermission)) %>'));
  460. const subProjects = JSON.parse(unescape('<%- escape(JSON.stringify(subProjects)) %>'));
  461. console.log(subProjects);
  462. const uid = '<%- uid %>';
  463. const pid = '<%- pid %>';
  464. const uphlname = 'user_' + uid + '_pro_' + pid + '_tender_manage_list';
  465. let sp_lc, sp_type, sp_status, sp_status_list, cur_tenderid, cur_uid;
  466. const permissionConst = JSON.parse('<%- JSON.stringify(permissionConst) %>');
  467. const permissionBlock = JSON.parse('<%- JSON.stringify(permissionBlock) %>');
  468. </script>