manage.ejs 27 KB

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