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>
  13. </div>
  14. </div>
  15. <div class="content-wrap">
  16. <div class="sjs-height-0 row" style="background-color: #fff;overflow: hidden">
  17. <div class="col-4">
  18. <div class="c-body sjs-height-0" style="overflow: auto"></div>
  19. </div>
  20. <div class="col-8">
  21. <nav class="nav nav-tabs m-3" role="tablist">
  22. <a class="nav-item nav-link active" data-toggle="tab" href="#splc" role="tab">审批流程</a>
  23. <a class="nav-item nav-link" data-toggle="tab" href="#guest" role="tab">游客账号</a>
  24. <a class="nav-item nav-link" data-toggle="tab" href="#tzpro" role="tab">投资进度</a>
  25. <a class="nav-item nav-link" data-toggle="tab" href="#htgl" role="tab">合同管理</a>
  26. <a class="nav-item nav-link" data-toggle="tab" href="#sgrz" role="tab">施工日志</a>
  27. <a class="nav-item nav-link" data-toggle="tab" href="#zlgl" role="tab">质量管理</a>
  28. <!-- <a class="nav-item nav-link" data-toggle="tab" href="#subadmin" role="tab">标段管理员</a>-->
  29. <div class="ml-auto" id="user-set" style="display: none">
  30. <div class="row">
  31. <div class="d-inline-block mr-3">
  32. <div id="contract-tip" class="btn-group align-middle" style="display: none;">
  33. <a href="javascript:void(0)" data-toggle="dropdown" title="权限说明"><i class="fa fa-question-circle"></i></a>
  34. <div class="dropdown-menu bg-dark">
  35. <div class="dropdown-item text-light bg-dark">1、编辑节点:编辑合同管理内页树结构</div>
  36. <div class="dropdown-item text-light bg-dark">2、添加合同:允许添加合同</div>
  37. <div class="dropdown-item text-light bg-dark">3、编辑合同:编辑非自己上传的合同信息</div>
  38. <div class="dropdown-item text-light bg-dark">4、添加支付:给非自己上传的合同添加合同支付</div>
  39. <div class="dropdown-item text-light bg-dark">5、授权范围本单位:授权节点下查看本单位人员添加的所有合同</div>
  40. <div class="dropdown-item text-light bg-dark">6、授权范围本节点:授权节点下查看所有人上传的合同</div>
  41. </div>
  42. </div>
  43. </div>
  44. <div class="d-inline-block dropdown">
  45. <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">
  46. 添加用户
  47. </button>
  48. <div class="dropdown-menu" id="add_user_dropdownMenu2" aria-labelledby="add_user_dropdownMenuButton" style="width:220px">
  49. <div class="mb-2 p-2"><input class="form-control form-control-sm gr-search"
  50. placeholder="姓名/手机 检索" autocomplete="off"></div>
  51. <dl class="list-unstyled book-list">
  52. <% accountGroup.forEach((group, idx) => { %>
  53. <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>
  54. <div class="dd-content" data-toggleid="<%- idx %>">
  55. <% group.groupList.forEach(item => { %>
  56. <dd class="border-bottom p-2 mb-0 " data-id="<%- item.id %>" >
  57. <p class="mb-0 d-flex"><span class="text-primary"><%- item.name %></span><span
  58. class="ml-auto"><%- item.mobile %></span></p>
  59. <span class="text-muted"><%- item.role %></span>
  60. </dd>
  61. <% });%>
  62. </div>
  63. <% }) %>
  64. </dl>
  65. </div>
  66. </div>
  67. <div class="d-inline-block ml-3">
  68. <a href="javascript:void(0)" class="btn btn-primary btn-sm pull-right" id="set-other-tender-user-a">应用账号至其他标段</a>
  69. </div>
  70. </div>
  71. </div>
  72. </nav>
  73. <div class="tab-content m-3" style="overflow: auto">
  74. <!--审批流程 -->
  75. <div id="splc" class="tab-pane active">
  76. </div>
  77. <!--游客账号 -->
  78. <div id="guest" class="tab-pane">
  79. <div class="col-8" style="max-width: 800px">
  80. <table class="table table-hover table-bordered table-sm">
  81. <thead>
  82. <tr>
  83. <th class="text-center" width="100px">用户</th>
  84. <th class="text-center" width="120px">职位</th>
  85. <th class="text-center" width="60px">附件</th>
  86. <th class="text-center" width="60px">书签</th>
  87. <th class="text-center" >操作</th>
  88. </tr>
  89. </thead>
  90. <tbody id="tourist-users">
  91. </tbody>
  92. </table>
  93. </div>
  94. </div>
  95. <!--投资进度 -->
  96. <div id="tzpro" class="tab-pane">
  97. <div class="col-8" style="max-width: 800px">
  98. <table class="table table-hover table-bordered table-sm">
  99. <thead>
  100. <tr>
  101. <th class="text-center" width="100px">用户</th>
  102. <th class="text-center" width="120px">职位</th>
  103. <th class="text-center" width="60px">查看</th>
  104. <th class="text-center" width="60px">修改</th>
  105. <th class="text-center" >操作</th>
  106. </tr>
  107. </thead>
  108. <tbody id="schedule-users">
  109. <tr>
  110. <td>陈特</td>
  111. <td>业主</td>
  112. <td class="text-center">
  113. <div class="custom-control custom-checkbox mb-2">
  114. <input type="checkbox" id="customRadio301" name="customCheckbox" class="custom-control-input">
  115. <label class="custom-control-label" for="customRadio301"></label>
  116. </div>
  117. </td>
  118. <td class="text-center">
  119. <div class="custom-control custom-checkbox mb-2">
  120. <input type="checkbox" id="customRadio302" name="customCheckbox" class="custom-control-input">
  121. <label class="custom-control-label" for="customRadio302"></label>
  122. </div>
  123. </td>
  124. <td class="text-center">
  125. <a href="#remove-user1" data-toggle="modal" data-target="#remove-user" class="btn btn-sm btn-outline-danger">移除</a>
  126. </td>
  127. </tr>
  128. <tr>
  129. <td>仁温书</td>
  130. <td>项目经理</td>
  131. <td class="text-center">
  132. <div class="custom-control custom-checkbox mb-2">
  133. <input type="checkbox" id="customRadio311" name="customCheckbox" class="custom-control-input">
  134. <label class="custom-control-label" for="customRadio311"></label>
  135. </div>
  136. </td>
  137. <td class="text-center">
  138. <div class="custom-control custom-checkbox mb-2">
  139. <input type="checkbox" id="customRadio312" name="customCheckbox" class="custom-control-input">
  140. <label class="custom-control-label" for="customRadio312"></label>
  141. </div>
  142. </td>
  143. <td class="text-center">
  144. <a href="#remove-user1" data-toggle="modal" data-target="#remove-user" class="btn btn-sm btn-outline-danger">移除</a>
  145. </td>
  146. </tr>
  147. <tr>
  148. <td>玉安然</td>
  149. <td>集团经理</td>
  150. <td class="text-center">
  151. <div class="custom-control custom-checkbox mb-2">
  152. <input type="checkbox" id="customRadio321" name="customCheckbox" class="custom-control-input">
  153. <label class="custom-control-label" for="customRadio321"></label>
  154. </div>
  155. </td>
  156. <td class="text-center">
  157. <div class="custom-control custom-checkbox mb-2">
  158. <input type="checkbox" id="customRadio322" name="customCheckbox" class="custom-control-input">
  159. <label class="custom-control-label" for="customRadio322"></label>
  160. </div>
  161. </td>
  162. <td class="text-center">
  163. <a href="#remove-user1" data-toggle="modal" data-target="#remove-user" class="btn btn-sm btn-outline-danger">移除</a>
  164. </td>
  165. </tr>
  166. </tbody>
  167. </table>
  168. </div>
  169. </div>
  170. <!--合同管理 -->
  171. <div id="htgl" class="tab-pane">
  172. <div class="col-8" style="max-width: 800px">
  173. <table class="table table-hover table-bordered table-sm">
  174. <thead class="text-center">
  175. <tr>
  176. <th rowspan="2" class="align-middle">用户名</th>
  177. <th rowspan="2" class="align-middle">角色/职位</th>
  178. <th rowspan="2" class="align-middle">编辑节点</th>
  179. <th rowspan="2" class="align-middle">添加合同</th>
  180. <th rowspan="2" class="align-middle">编辑合同</th>
  181. <th rowspan="2" class="align-middle">添加支付</th>
  182. <th colspan="2">授权节点合同查看范围</th>
  183. <th rowspan="2" class="align-middle">操作</th>
  184. </tr>
  185. <tr>
  186. <th>本单位</th>
  187. <th>本节点</th>
  188. </tr>
  189. </thead>
  190. <tbody id="contract-users">
  191. </tbody>
  192. </table>
  193. </div>
  194. </div>
  195. <!--施工日志 -->
  196. <div id="sgrz" class="tab-pane">
  197. <div class="col-8" style="max-width: 800px">
  198. <table class="table table-hover table-bordered table-sm">
  199. <thead>
  200. <tr>
  201. <th class="text-center" width="100px">用户</th>
  202. <th class="text-center" width="120px">职位</th>
  203. <th class="text-center" width="60px">填报人</th>
  204. <th class="text-center" >操作</th>
  205. </tr>
  206. </thead>
  207. <tbody id="construction-users">
  208. <tr>
  209. <td>陈特</td>
  210. <td>业主</td>
  211. <td class="text-center">
  212. <div class="custom-control custom-checkbox mb-2">
  213. <input type="checkbox" id="customRadio301" name="customCheckbox" class="custom-control-input">
  214. <label class="custom-control-label" for="customRadio301"></label>
  215. </div>
  216. </td>
  217. <td class="text-center">
  218. <a href="#remove-user1" data-toggle="modal" data-target="#remove-user" class="btn btn-sm btn-outline-danger">移除</a>
  219. </td>
  220. </tr>
  221. </tbody>
  222. </table>
  223. </div>
  224. </div>
  225. <!--质量巡检 -->
  226. <div id="zlgl" class="tab-pane">
  227. <div class="col-8" style="max-width: 800px">
  228. <table class="table table-hover table-bordered table-sm">
  229. <thead class="text-center">
  230. <tr>
  231. <th class="align-middle" rowspan="2">成员名称</th>
  232. <th class="align-middle" rowspan="2">角色/职位</th>
  233. <% for (const pb of permissionBlock) { %>
  234. <th colspan="<%- pb.permission.filter(x => { return !x.isDefault; }).length %>"><%- pb.name %></th>
  235. <% } %>
  236. <th class="align-middle" rowspan="2">操作</th>
  237. </tr>
  238. <tr>
  239. <% for (const pb of permissionBlock) { %>
  240. <% for (const p of pb.permission) { %>
  241. <% if (p.isDefault) continue; %>
  242. <th><%- p.title %></th>
  243. <% } %>
  244. <% } %>
  245. </tr>
  246. </thead>
  247. <tbody id="quality-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>