workFlow.html 66 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8"/>
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  6. <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  7. <title>隐患处理流程</title>
  8. <link rel="stylesheet" href="../../../assets/libs/layui/css/layui.css"/>
  9. <link rel="stylesheet" href="../../../assets/module/formSelects/formSelects-v4.css"/>
  10. <link rel="stylesheet" href="../../../assets/module/admin.css?v=312"/>
  11. <link rel="stylesheet" href="../../../assets/module/uParas.css?v=312"/>
  12. </head>
  13. <body>
  14. <style type="text/css">
  15. /*table th{*/
  16. /* color: #ffb800;*/
  17. /*}*/
  18. </style>
  19. <!-- 加载动画 -->
  20. <div class="page-loading">
  21. <div class="ball-loader">
  22. <span></span><span></span><span></span><span></span>
  23. </div>
  24. </div>
  25. <!-- 正文开始 -->
  26. <div class="layui-fluid">
  27. <div class="layui-card">
  28. <div class="layui-card-header">
  29. 隐患流程治理
  30. <div class="layui-inline pull-right">
  31. <button onclick="history.back()" class="layui-btn layui-btn-sm layui-btn-radius layui-btn-normal"><i
  32. class="layui-icon">&#xe65c;</i>返回
  33. </button>
  34. </div>
  35. </div>
  36. <form class="layui-form" lay-filter="layuiForm">
  37. <div class="overflow-y-730px">
  38. <div class="layui-card-body ">
  39. <!--流程处理开始---------------------------------------------------------------------------------->
  40. <div class="layui-elem-quote">
  41. <div class="layui-card-body">
  42. <div class="layui-form-item layui-row">
  43. <fieldset class="layui-elem-field layui-field-title">
  44. <legend class="" id="work_flow_hint"
  45. style="color: indianred;font-size: 18px;"></legend>
  46. </fieldset>
  47. <input type="hidden" id="hdangerId" name="hdangerId" value="">
  48. <input type="hidden" id="status" name="status" value="">
  49. <input type="hidden" id="entrustType" name="entrustType" value="">
  50. <!--委托处理-->
  51. <div class="layui-inline layui-col-md10 p-top10px">
  52. <label class="layui-form-label">委托处理</label>
  53. <div class="layui-input-block text-left">
  54. <input type="radio" id="0" name="isEntrust" value="0" title="否" checked=""
  55. lay-filter="isEntrust">
  56. <input type="radio" id="1" name="isEntrust" value=1 title="是"
  57. lay-filter="isEntrust">
  58. </div>
  59. </div>
  60. <div class="layui-inline layui-col-md10 p-top10px isEntrust display-none">
  61. <label class="layui-form-label">委托部门</label>
  62. <div class="layui-input-block">
  63. <input type="text" id="hdangerEntrustGroupName" class="layui-input wthint"
  64. name="hdangerEntrustGroupName"
  65. value=""
  66. placeholder="点击选择部门"
  67. class="form-control" readonly>
  68. <input type="hidden" id="hdangerEntrustGroup" name="hdangerEntrustGroup"
  69. readonly>
  70. <div id="menuContentEntrust" class="menuContent">
  71. <ul id="threeLevelGroupEntrust" class="ztree" style="margin-top:0;"></ul>
  72. </div>
  73. </div>
  74. </div>
  75. <div class="layui-inline layui-col-md10 p-top10px isEntrust display-none">
  76. <label class="layui-form-label">委托人员</label>
  77. <div class="layui-input-block">
  78. <select id="entrustUserId" name="entrustUserId" class="layui-input-block"
  79. lay-filter="layuiForm">
  80. <option value="">点击选择人员</option>
  81. </select>
  82. </div>
  83. </div>
  84. <!--验收-->
  85. <dev class="work-flow-accept display-none">
  86. </dev>
  87. <!--整改开始---------------------------------------------->
  88. <dev class="work-flow-retify display-none">
  89. <div class="layui-inline layui-col-md10 p-top10px">
  90. <label class="layui-form-label">整改类型</label>
  91. <div class="layui-input-block text-left">
  92. <input type="radio" name="wf_hdangerRetifyType" value="0" title="自行整改"
  93. checked="" lay-filter="wf_hdangerRetifyType">
  94. <input type="radio" name="wf_hdangerRetifyType" value=1 title="协助整改"
  95. lay-filter="wf_hdangerRetifyType">
  96. </div>
  97. </div>
  98. <div class="layui-inline layui-col-md10 p-top10px display-none wf_hdangerRetifyAssistingunit">
  99. <label class="layui-form-label">协助单位</label>
  100. <div class="layui-input-block">
  101. <input type="text" id="wf_hdangerRetifyAssistingunit"
  102. class="layui-input retifyAssistingunit-hint"
  103. name="wf_hdangerRetifyAssistingunit"
  104. value="" placeholder="请输入协助整改的单位名称...(最多输入64个字)" maxlength="64">
  105. </div>
  106. </div>
  107. <div class="layui-inline layui-col-md10 p-top10px ">
  108. <label class="layui-form-label">原因分析</label>
  109. <div class="layui-input-block">
  110. <textarea class="layui-textarea work-flow-retify-hint"
  111. maxlength="256" placeholder="请输入原因分析...(最多输入256个字)"
  112. name="wf_hdangerRetifyReasons"
  113. id="wf_hdangerRetifyReasons"></textarea>
  114. </div>
  115. </div>
  116. <div class="layui-inline layui-col-md10 p-top10px ">
  117. <label class="layui-form-label">整改措施</label>
  118. <div class="layui-input-block">
  119. <textarea class="layui-textarea work-flow-retify-hint"
  120. maxlength="256" placeholder="请输入整改措施...(最多输入256个字)"
  121. name="wf_hdangerRetifyMeasures"
  122. id="wf_hdangerRetifyMeasures"></textarea>
  123. </div>
  124. </div>
  125. <div class="layui-inline layui-col-md3 p-top10px ">
  126. <label class="layui-form-label">整改费用</label>
  127. <div class="layui-input-block">
  128. <input class="layui-input work-flow-retify-hint" type="number"
  129. id="wf_hdangerRetifyAmountspent" name="wf_hdangerRetifyAmountspent"
  130. value=""
  131. onkeyup="if(!/^d*(?:.d{0,2})?$/.test(this.value));"
  132. placeholder="金额 < 9999999.99" max="9999999.99" min="0.00"
  133. maxlength="11">
  134. </div>
  135. </div>
  136. </dev>
  137. <!--整改结束---------------------------------------------->
  138. <!--评审开始---------------------------------------------->
  139. <dev class="work-flow-review isReview display-none">
  140. <div class="layui-inline layui-col-md10 p-top10px">
  141. <label class="layui-form-label">隐患等级</label>
  142. <div class="layui-input-block">
  143. <select id="wf_hdangerLevel" name="wf_hdangerLevel" lay-filter="layuiForm"
  144. class="layui-input-block work-flow-review-hint">
  145. <option value="">点击选择</option>
  146. </select>
  147. </div>
  148. </div>
  149. <div class="layui-inline layui-col-md10 p-top10px">
  150. <label class="layui-form-label">整改部门</label>
  151. <div class="layui-input-block">
  152. <input type="text" id="wf_hdangerRetifyGroupName"
  153. class="layui-input work-flow-review-hint"
  154. name="wf_hdangerRetifyGroupName"
  155. value=""
  156. placeholder="点击选择部门"
  157. class="form-control" readonly>
  158. <input type="hidden" id="wf_hdangerRetifyGroup" name="wf_hdangerRetifyGroup"
  159. readonly>
  160. <div id="menuContentRetify" class="menuContent">
  161. <ul id="threeLevelGroupRetify" class="ztree" style="margin-top:0;"></ul>
  162. </div>
  163. </div>
  164. </div>
  165. <div class="layui-inline layui-col-md10 p-top10px">
  166. <label class="layui-form-label ">整改人员</label>
  167. <div class="layui-input-block">
  168. <select id="wf_hdangerRetifyBy" name="wf_hdangerRetifyBy"
  169. class="layui-input-block work-flow-review-hint"
  170. lay-filter="layuiForm">
  171. <option value="">点击选择人员</option>
  172. </select>
  173. </div>
  174. </div>
  175. <div class="layui-inline layui-col-md10 p-top10px">
  176. <label class="layui-form-label">整改期限</label>
  177. <div class="layui-input-block">
  178. <input type="text" name="wf_hdangerRetifyDeadline"
  179. id="wf_hdangerRetifyDeadline"
  180. placeholder="点击选择整改期限"
  181. lay-verify="datetime" autocomplete="off"
  182. class="layui-input work-flow-review-hint">
  183. </div>
  184. </div>
  185. <div class="layui-inline layui-col-md10 p-top10px">
  186. <label class="layui-form-label">验收部门</label>
  187. <div class="layui-input-block">
  188. <input type="text" id="wf_hdangerAcceptedGroupName"
  189. class="layui-input work-flow-review-hint"
  190. name="wf_hdangerAcceptedGroupName"
  191. value=""
  192. placeholder="点击选择部门"
  193. class="form-control" readonly>
  194. <input type="hidden" id="wf_hdangerAcceptedGroup"
  195. name="wf_hdangerAcceptedGroup" readonly>
  196. <div id="menuContentAccepted" class="menuContent">
  197. <ul id="threeLevelGroupAccepted" class="ztree"
  198. style="margin-top:0;"></ul>
  199. </div>
  200. </div>
  201. </div>
  202. <div class="layui-inline layui-col-md10 p-top10px">
  203. <label class="layui-form-label ">验收人员</label>
  204. <div class="layui-input-block">
  205. <select id="wf_hdangerAcceptedBy" name="wf_hdangerAcceptedBy"
  206. class="layui-input-block work-flow-review-hint"
  207. lay-filter="layuiForm">
  208. <option value="">点击选择人员</option>
  209. </select>
  210. </div>
  211. </div>
  212. <div class="layui-inline layui-col-md10 p-top10px">
  213. <label class="layui-form-label">递交整改方案</label>
  214. <div class="layui-input-block text-left">
  215. <input type="radio" checked name="programmeRetify" value="1" title="是"
  216. lay-filter="isProgramme">
  217. <input type="radio" name="programmeRetify" value="0" title="否"
  218. lay-filter="isProgramme">
  219. </div>
  220. </div>
  221. <div class="layui-inline layui-col-md10 p-top10px is-programme">
  222. <label class="layui-form-label">整改方案</label>
  223. <div class="layui-input-block">
  224. <select id="programmeId" name="programmeId"
  225. class="layui-input-block programme-retify"
  226. lay-filter="programmeForm">
  227. <option value="">点击选择方案</option>
  228. </select>
  229. </div>
  230. </div>
  231. </dev>
  232. <!--评审结束---------------------------------------------------------------->
  233. <div class="layui-inline layui-col-md10 p-top10px wf_desc display-none">
  234. <label class="layui-form-label">备注信息</label>
  235. <div class="layui-input-block">
  236. <textarea class="layui-textarea" placeholder="请输入备注信息...(最多输入256个字)"
  237. name="wf_desc" id="wf_desc" maxlength="256"></textarea>
  238. </div>
  239. </div>
  240. <div class="layui-inline layui-col-md10 p-top10px isAdopt display-none">
  241. <label class="layui-form-label">处理结果</label>
  242. <div class="layui-input-block text-left">
  243. <input type="radio" name="isAdopt" value="1" title="通过" checked=""
  244. lay-filter="isAdopt">
  245. <input type="radio" name="isAdopt" value="0" title="不通过" lay-filter="isAdopt">
  246. </div>
  247. </div>
  248. <!--附件-->
  249. <div class="layui-inline layui-col-md10 p-top10px work-flow-upload-file display-none">
  250. <label class="layui-form-label">现场附件</label>
  251. <div class="layui-input-block text-left">
  252. <button type="button" class="layui-btn" id="uploadFile">
  253. <i class="layui-icon">&#xe67c;</i>上传照片
  254. </button>
  255. <span style="color: indianred;font-size: 16px;">支持图片格式:jpg / png /gif / jpeg / bmp / tga / fpx / raw</span>
  256. <input type="hidden" name="attachTitle" id="attachTitle"/>
  257. <input type="hidden" name="attachPath" id="attachPath"/>
  258. <input type="hidden" name="attachExt" id="attachExt"/>
  259. <div id="fileDiv" style="padding-top: 10px;"></div>
  260. </div>
  261. </div>
  262. <div class="layui-inline layui-col-md5" style="padding-left: 40px;">
  263. <button onclick="save()" lay-filter="formSubmit" lay-submit
  264. class=" layui-btn layui-btn-radius bg-c-submit"
  265. style="height: 30px;line-height: 0px;">提&nbsp;&nbsp;&nbsp;交
  266. </button>
  267. </div>
  268. </div>
  269. </div>
  270. </div>
  271. </div>
  272. <!--流程处理结束------------------------------------------------------------------------------>
  273. <!--隐患基本信息开始-------------------------------------------------------------------------->
  274. <div class="layui-tab layui-tab-brief" lay-filter="">
  275. <div class="layui-tab-content" style="height: auto;">
  276. <div class="layui-tab-item layui-show">
  277. <fieldset class="layui-elem-field layui-field-title">
  278. <legend>隐患基本信息</legend>
  279. </fieldset>
  280. <div class="layui-row">
  281. <!--<script type="text/html">-->
  282. <div class="layui-col-xs12">
  283. <div class="layui-form">
  284. <table class="layui-table">
  285. <!--<colgroup>-->
  286. <!--<col width="150">-->
  287. <!--<col width="150">-->
  288. <!--<col width="200">-->
  289. <!--<col>-->
  290. <!--</colgroup>-->
  291. <thead>
  292. </thead>
  293. <tbody>
  294. <tr>
  295. <th width="150">隐患名称</th>
  296. <td id="hdangerTitle"></td>
  297. <th width="150">隐患类型</th>
  298. <td id="hdangerCatTitle">
  299. </td>
  300. </tr>
  301. <tr>
  302. <th width="150">单位名称</th>
  303. <td id="companyName"></td>
  304. <th width="150">部门名称</th>
  305. <td id="groupName"></td>
  306. </tr>
  307. <tr>
  308. <th width="150">隐患等级</th>
  309. <td id="hdangerLevelName"></td>
  310. <th width="150">隐患状态</th>
  311. <td id="statusStr"></td>
  312. </tr>
  313. <tr>
  314. <th width="150">现场描述</th>
  315. <td id="hdangerDesc" colspan="3"></td>
  316. </tr>
  317. <tr>
  318. <th width="150">风险点名称</th>
  319. <td id="riskPointName"></td>
  320. <th width="150">风险点等级</th>
  321. <td id="riskPointLevelName"></td>
  322. </tr>
  323. <tr>
  324. <th width="150">检查表名称</th>
  325. <td id="bizCheckDefName"></td>
  326. <th width="150">风险点类型</th>
  327. <td id="riskPointTypeName"></td>
  328. </tr>
  329. <tr>
  330. <th width="150">危险源 / 检查项</th>
  331. <td id="checkItemName" colspan="3"></td>
  332. </tr>
  333. <tr>
  334. <th width="150">管控措施 / 检查内容</th>
  335. <td id="checkContentName" colspan="3"></td>
  336. </tr>
  337. <tr>
  338. <th width="150">当前处理人</th>
  339. <td id="executor"></td>
  340. <th width="150">整改期限</th>
  341. <td id="hdangerRetifyDeadline"></td>
  342. </tr>
  343. <tr>
  344. <th width="150">提交人员</th>
  345. <td id="hdangerCreatedByName"></td>
  346. <th width="150">提交时间</th>
  347. <td id="createdTime"></td>
  348. </tr>
  349. <tr>
  350. <th width="150">发生时间</th>
  351. <td id="happenedTime"></td>
  352. <th width="150">闭环时间</th>
  353. <td id="finishedTime"></td>
  354. </tr>
  355. <tr class="getHdangerAtt" style="display: none">
  356. <th colspan="4" style="border-bottom: 0px">隐患现场照片</th>
  357. </tr>
  358. <tr class="getHdangerAtt" style="display: none">
  359. <td id="hdangerAtt" colspan="4"></td>
  360. </tr>
  361. <tr class="getHdangerVideo" style="display: none">
  362. <th colspan="4" style="border-bottom: 0px">隐患现场视频</th>
  363. </tr>
  364. <tr class="getHdangerVideo" style="display: none">
  365. <td id="hdangerVideo" colspan="4"></td>
  366. </tr>
  367. <tr style="border-left: 0px;border-right: 0px;">
  368. <td style="border-left: 0px;border-right: 0px;" colspan="4">
  369. <fieldset class="layui-elem-field layui-field-title">
  370. <legend>评审信息</legend>
  371. </fieldset>
  372. </td>
  373. </tr>
  374. <tr>
  375. <th width="150">评审部门</th>
  376. <td id="hdangerReviewGroupName"></td>
  377. <th width="150">评审人员</th>
  378. <td id="hdangerReviewByName"></td>
  379. </tr>
  380. <tr class="getReviewRecord" style="display: none;">
  381. <th width="150">评审结果</th>
  382. <td id="hdangerReviewResult"></td>
  383. <th width="150">评审日期</th>
  384. <td id="hdangerReviewTime"></td>
  385. </tr>
  386. <tr class="getReviewRecord" style="display: none;">
  387. <th width="150">评审说明</th>
  388. <td colspan="3" id="hdangerReviewRemark"></td>
  389. </tr>
  390. <tr style="border-left: 0px;border-right: 0px;">
  391. <td style="border-left: 0px;border-right: 0px;" colspan="4">
  392. <fieldset class="layui-elem-field layui-field-title">
  393. <legend>整改信息</legend>
  394. </fieldset>
  395. </td>
  396. </tr>
  397. <tr>
  398. <th width="150">整改部门</th>
  399. <td id="hdangerRetifyGroupName"></td>
  400. <th width="150">整改人员</th>
  401. <td id="hdangerRetifyByName"></td>
  402. </tr>
  403. <tr class="getRetifyRecord" style="display: none;">
  404. <th width="150">整改类型</th>
  405. <td id="hdangerRetifyTypeName"></td>
  406. <th width="150">协助单位</th>
  407. <td id="hdangerRetifyAssistingunit"></td>
  408. </tr>
  409. <tr class="getRetifyRecord" style="display: none;">
  410. <th width="150">整改费用</th>
  411. <td id="hdangerRetifyAmountspent"></td>
  412. <th width="150">整改时间</th>
  413. <td id="hdangerRetifycreatedTime"></td>
  414. </tr>
  415. <tr class="getRetifyRecord" style="display: none;">
  416. <th width="150">原因分析</th>
  417. <td colspan="3" id="hdangerRetifyReasons"></td>
  418. </tr>
  419. <tr class="getRetifyRecord" style="display: none;">
  420. <th width="150">整改措施</th>
  421. <td colspan="3" id="hdangerRetifyMeasures"></td>
  422. </tr>
  423. <tr class="getRetifyAtt" style="display: none">
  424. <th colspan="4" style="border-bottom: 0px">最近整改照片</th>
  425. </tr>
  426. <tr class="getRetifyAtt" style="display: none;border-bottom: 0px;">
  427. <td id="retifyAtt" colspan="4" style="border-bottom: 0px;"></td>
  428. </tr>
  429. <tr class="getRetifyVideo" style="display: none">
  430. <th colspan="4" style="border-bottom: 0px">最近整改视频</th>
  431. </tr>
  432. <tr class="getRetifyVideo" style="display: none">
  433. <td id="retifyVideo" colspan="4"></td>
  434. </tr>
  435. <tr style="border-left: 0px;border-right: 0px;">
  436. <td style="border-left: 0px;border-right: 0px;" colspan="4">
  437. <fieldset class="layui-elem-field layui-field-title">
  438. <legend>验收信息</legend>
  439. </fieldset>
  440. </td>
  441. </tr>
  442. <tr>
  443. <th width="150">验收部门</th>
  444. <td id="hdangerAcceptedGroupName"></td>
  445. <th width="150">验收人员</th>
  446. <td id="hdangerAcceptedByName"></td>
  447. </tr>
  448. <tr class="getAcceptRecord" style="display: none;">
  449. <th width="150">验收结果</th>
  450. <td id="hdangerAcceptedResult"></td>
  451. <th width="150">验收日期</th>
  452. <td id="hdangerAcceptedTime"></td>
  453. </tr>
  454. <tr class="getAcceptRecord" style="display: none;">
  455. <th width="150">验收说明</th>
  456. <td colspan="3" id="hdangerAcceptedRemark"></td>
  457. </tr>
  458. <tr class="getAcceptAtt" style="display: none">
  459. <th colspan="4" style="border-bottom: 0px">最近验收照片</th>
  460. </tr>
  461. <tr class="getAcceptAtt" style="display: none">
  462. <td id="acceptAtt" colspan="4"></td>
  463. </tr>
  464. <tr class="getRetifyVideo" style="display: none">
  465. <th colspan="4" style="border-bottom: 0px">最近验收视频</th>
  466. </tr>
  467. <tr class="getRetifyVideo" style="display: none;border-bottom: 0px;">
  468. <td id="acceptVideo" colspan="4" style="border-bottom: 0px"></td>
  469. </tr>
  470. </tbody>
  471. </table>
  472. </div>
  473. </div>
  474. <!--// </script>-->
  475. </div>
  476. </div>
  477. </div>
  478. </div>
  479. <!--隐患基本信息结束-------------------------------------------------------------------------->
  480. <div class="layui-inline layui-col-md5" style="padding-top: 150px;"></div>
  481. </div>
  482. </form>
  483. </div>
  484. </div>
  485. <!-- js部分 -->
  486. <script type="text/javascript" src="../../../assets/libs/layui/layui.js"></script>
  487. <script type="text/javascript" src="../../../assets/js/common.js?v=312"></script>
  488. <script>
  489. var hdangerId; //隐患ID
  490. var workFlowType; //流程类型:1评审;2整改;3验收;
  491. var hdangerStatus; //隐患状态
  492. var entrustType; //委托类型:委托评审 == 1;委托整改 == 2;委托验收 == 3;
  493. var wfIsEntrust = false; //是否委托
  494. var wfIsAdopt = false; //是否通过
  495. var $;
  496. var layer;
  497. var form;
  498. var util;
  499. var admin;
  500. var uParas;
  501. var element;
  502. var _threeLevelGroupEntrust;
  503. var _groupTree;
  504. layui.use(['layer', 'form', 'table', 'laydate', 'util', 'upload', 'zTree', 'admin', 'uParas', 'element', 'laytpl', '_zTree', '_groupTree'], function () {
  505. $ = layui.jquery;
  506. layer = layui.layer;
  507. form = layui.form;
  508. util = layui.util;
  509. admin = layui.admin;
  510. uParas = layui.uParas;
  511. element = layui.element, laytpl = layui.laytpl;
  512. threeLevelGroupEntrust = layui._threeLevelGroupEntrust;
  513. _groupTree = layui._groupTree;
  514. var laydate = layui.laydate;
  515. var upload = layui.upload,
  516. hdangerId = uParas.getUrlParam("hdangerId");
  517. workFlowType = uParas.getUrlParam("workFlowType");
  518. hdangerStatus = uParas.getUrlParam("hdangerStatus");
  519. $("#entrustType").val(workFlowType);
  520. /*整改期限*/
  521. laydate.render({
  522. elem: '#wf_hdangerRetifyDeadline',
  523. format: 'yyyy-MM-dd',
  524. type: 'datetime',
  525. min: 'date',
  526. });
  527. var groupUrl = '/admin/common/findCompanyGroupLists';
  528. /**
  529. * ztree 整改部门 *******************************************
  530. */
  531. _groupTree.initgroupTreeAndUsers(groupUrl, "threeLevelGroupRetify", "wf_hdangerRetifyGroupName",
  532. "wf_hdangerRetifyGroup", "menuContentRetify", "wf_hdangerRetifyBy", "layuiForm");
  533. /**
  534. * ztree 验收部门 *******************************************
  535. */
  536. _groupTree.initgroupTreeAndUsers(groupUrl, "threeLevelGroupAccepted", "wf_hdangerAcceptedGroupName",
  537. "wf_hdangerAcceptedGroup", "menuContentAccepted", "wf_hdangerAcceptedBy", "layuiForm");
  538. /**
  539. * ztree 委托部门 *******************************************
  540. */
  541. _groupTree.initgroupTreeAndUsers(groupUrl, "threeLevelGroupEntrust", "hdangerEntrustGroupName",
  542. "hdangerEntrustGroup", "menuContentEntrust", "entrustUserId", "layuiForm");
  543. /*隐患整改方案*/
  544. uParas.initSimpleSelect("programmeId", "layuiForm", "/admin/common/getDhangerRetifyProgramme", "programmeName", "programmeId");
  545. admin.req(uParas.baseUrl + '/ent/hiddenDanger/details?hdangerId=' + hdangerId, null, function (res) {
  546. if (res.code == 1) {
  547. var hd = res.data;
  548. if (hd != null) {
  549. //console.log(JSON.stringify(hd));
  550. if (workFlowType == 2 && (hdangerStatus == 2 || hdangerStatus == 5)) {
  551. //示例
  552. var endTime = new Date(hd.hdangerRetifyDeadline).getTime() //假设为结束日期
  553. , serverTime = new Date().getTime(); //假设为当前服务器时间,这里采用的是本地时间,实际使用一般是取服务端的
  554. util.countdown(endTime, serverTime, function (date, serverTime, timer) {
  555. var str = '已超时(' + hd.hdangerRetifyDeadline + ')';
  556. if (date[0] > 0 || date[1] > 0 || date[2] > 0 || date[3] > 0) {
  557. str = '<span class="font-weight">' + date[0] + '</span>天' +
  558. '<span class="font-weight">' + date[1] + '</span>小时' +
  559. '<span class="font-weight">' + date[2] + '</span>分钟' +
  560. '<span class="font-weight">' + date[3] + '</span>秒钟';
  561. }
  562. $('#work_flow_hint').html('隐患整改栏 &nbsp;&nbsp;&nbsp;&nbsp; 倒计时:' + str);
  563. $('#hdangerRetifyDeadline').html(str);
  564. });
  565. } else {
  566. $("#hdangerRetifyDeadline").val(hd.hdangerRetifyDeadline);
  567. }
  568. $("#hdangerId").val(hd.hdangerId);
  569. $("#status").val(hd.status);
  570. $("#hdangerTitle").text(hd.hdangerTitle);
  571. $("#hdangerDesc").text(hd.hdangerDesc);
  572. $("#hdangerLevelName").text(hd.hdangerLevelName);
  573. $("#hdangerCatTitle").text(hd.hdangerCatTitle);
  574. $("#bizCheckDefName").text(hd.bizCheckDefName);
  575. $("#riskPointLevelName").text(hd.riskPointLevelName);
  576. $("#riskPointTypeName").text(hd.riskPointTypeName);
  577. $("#riskPointName").text(hd.riskPointName);
  578. $("#checkItemName").text(hd.checkItemName);
  579. $("#checkContentName").text(hd.checkContentName);
  580. $("#statusStr").text(hd.statusStr);
  581. $("#companyName").text(hd.companyName);
  582. $("#groupName").text(hd.groupName);
  583. $("#hdangerReviewGroupName").text(hd.hdangerReviewGroupName);
  584. $("#hdangerReviewByName").text(hd.hdangerReviewByName);
  585. $("#hdangerRetifyGroupName").text(hd.hdangerRetifyGroupName);
  586. $("#hdangerRetifyByName").text(hd.hdangerRetifyByName);
  587. $("#hdangerAcceptedGroupName").text(hd.hdangerAcceptedGroupName);
  588. $("#hdangerAcceptedByName").text(hd.hdangerAcceptedByName);
  589. $("#hdangerCreatedByName").text(hd.hdangerCreatedByName);
  590. $("#hdangerRetifyDeadline").text(hd.hdangerRetifyDeadline);
  591. $("#executor").text(hd.executor);
  592. $("#createdTime").text(hd.createdTime);
  593. $("#happenedTime").text(hd.happenedTime);
  594. $("#finishedTime").text(hd.finishedTime);
  595. $("#executor").text(hd.executor);
  596. }
  597. var hiddendangerAtt = res.data.attachList;
  598. if (hiddendangerAtt.length > 0) {
  599. $('.getHdangerAtt').show();
  600. var html = '';
  601. for (var i = 0; i < hiddendangerAtt.length; i++) {
  602. var att = hiddendangerAtt[i];
  603. if (att.attachType == "image") {
  604. html += '<a onclick="showImg(\'' + att.attachPath + '\');" style="margin-right: 10px;">';
  605. html += '<img style="width: 60px;height: 80px;" src="' + att.attachPath + '">';
  606. html += '</a>';
  607. }
  608. }
  609. $('#hdangerAtt ').html(html);
  610. }
  611. /**
  612. * 隐患等级 下拉 ********************************************
  613. */
  614. uParas.initSimpleSelect("wf_hdangerLevel", "layuiForm", "/admin/common/getHdangerLevelList", "keyName", "keyValue", hd.hdangerLevel);
  615. }
  616. }, 'get');
  617. /*评审记录*/
  618. admin.req(uParas.baseUrl + '/ent/hiddenDanger/getReviewRecord?hdangerId=' + hdangerId, null, function (res) {
  619. if (res.code == 1) {
  620. var records = res.data;
  621. var html = "";
  622. if (records.length > 0) {
  623. $("#hdangerReviewResult").text((records[0].hdangerReviewResult) != null ? (records[0].hdangerReviewResult) : '-');
  624. $("#hdangerReviewRemark").text((records[0].hdangerReviewRemark) != null ? (records[0].hdangerReviewRemark) : '-');
  625. $("#hdangerReviewTime").text((records[0].hdangerReviewTime) != null ? (records[0].hdangerReviewTime) : '-');
  626. $('.getReviewRecord').show();
  627. // for (var i = 0; i < records.length; i++) {
  628. // html += "<tr>";
  629. // var record = records[i];
  630. // html += "<td>" + (i+1) + "</td>";
  631. // html += "<td>" + record.hdangerReviewTime + "</td>";
  632. // html += "<td>" + record.groupName + "</td>";
  633. // html += "<td>" + record.hdangerReviewByName + "</td>";
  634. // html += "<td>" + record.hdangerReviewResult + "</td>";
  635. // html += "<td>" + record.hdangerReviewRemark + "</td>";
  636. // html += "</tr>";
  637. // }
  638. // $('#reviewRecord ').html(html);
  639. }
  640. }
  641. }, 'get');
  642. /*整改记录*/
  643. admin.req(uParas.baseUrl + '/ent/hiddenDanger/getRetifyRecord?hdangerId=' + hdangerId, null, function (res) {
  644. if (res.code == 1) {
  645. var records = res.data;
  646. if (records.length > 0) {
  647. $("#hdangerRetifyAmountspent").text((records[0].hdangerRetifyAmountspent) != null ? (records[0].hdangerRetifyAmountspent + ' 元') : '-');
  648. $("#hdangerRetifyTypeName").text((records[0].hdangerRetifyTypeName) != null ? (records[0].hdangerRetifyTypeName) : '-');
  649. $("#hdangerRetifyMeasures").text((records[0].hdangerRetifyMeasures) != null ? (records[0].hdangerRetifyMeasures) : '-');
  650. $("#hdangerRetifyReasons").text(((records[0].hdangerRetifyReasons) != null && (records[0].hdangerRetifyReasons) != '') ? (records[0].hdangerRetifyReasons) : '-');
  651. $("#hdangerRetifycreatedTime").text((records[0].createdTime) != null ? (records[0].createdTime) : '-');
  652. $("#hdangerRetifyAssistingunit").text((records[0].hdangerRetifyAssistingunit) != null ? (records[0].hdangerRetifyAssistingunit) : '-');
  653. var retifyAtt = records[0].attachList;
  654. if (retifyAtt.length > 0) {
  655. $('#retifyAtt ').html('');
  656. $('.getRetifyAtt').show();
  657. var atthtml = '';
  658. for (var i = 0; i < retifyAtt.length; i++) {
  659. var att = retifyAtt[i];
  660. if (att.attachType == "image") {
  661. atthtml += '<a onclick="showImg(\'' + att.attachPath + '\');" style="margin-right: 10px;">';
  662. atthtml += '<img style="width: 60px;height: 80px;" src="' + att.attachPath + '">';
  663. atthtml += '</a>';
  664. }
  665. }
  666. $('#retifyAtt ').html(atthtml);
  667. }
  668. $('.getRetifyRecord').show();
  669. // var html = "";
  670. // for (var i = 0; i < records.length; i++) {
  671. // html += "<tr>";
  672. // var record = records[i];
  673. // html += "<td>" + (i+1) + "</td>";
  674. // html += "<td>" + record.hdangerRetifyDeadline + "</td>";
  675. // html += "<td>" + record.hdangerRetifyGroupName + "</td>";
  676. // html += "<td>" + record.hdangerRetifyByName + "</td>";
  677. // html += "<td>" + record.hdangerRetifyTypeName + "</td>";
  678. // html += "<td>" + record.hdangerRetifyAssistingunit + "</td>";
  679. // html += "<td>" + record.hdangerRetifyAmountspent + "</td>";
  680. // html += "<td>" + record.hdangerRetifyReasons + "</td>";
  681. // html += "<td>" + record.hdangerRetifyMeasures + "</td>";
  682. // html += "</tr>";
  683. // }
  684. // $('#retifyRecord ').html(html);
  685. }
  686. }
  687. }, 'get');
  688. /*验收记录*/
  689. admin.req(uParas.baseUrl + '/ent/hiddenDanger/getAcceptRecord?hdangerId=' + hdangerId, null, function (res) {
  690. if (res.code == 1) {
  691. var records = res.data;
  692. if (records.length > 0) {
  693. $("#hdangerAcceptedResult").text((records[0].hdangerAcceptedResult) != null ? (records[0].hdangerAcceptedResult) : '-');
  694. $("#hdangerAcceptedRemark").text((records[0].hdangerAcceptedRemark) != null ? (records[0].hdangerAcceptedRemark) : '-');
  695. $("#hdangerAcceptedTime").text((records[0].hdangerAcceptedTime) != null ? (records[0].hdangerAcceptedTime) : '-');
  696. var acceptAtt = records[0].attachList;
  697. if (acceptAtt.length > 0) {
  698. $('#acceptAtt ').html('');
  699. $('.getAcceptAtt').show();
  700. var atthtml = '';
  701. for (var i = 0; i < acceptAtt.length; i++) {
  702. var att = acceptAtt[i];
  703. if (att.attachType == "image") {
  704. atthtml += '<a onclick="showImg(\'' + att.attachPath + '\');" style="margin-right: 10px;">';
  705. atthtml += '<img style="width: 60px;height: 80px;" src="' + att.attachPath + '">';
  706. atthtml += '</a>';
  707. }
  708. }
  709. $('#acceptAtt ').html(atthtml);
  710. }
  711. $('.getAcceptRecord').show();
  712. // var html = "";
  713. // for (var i = 0; i < records.length; i++) {
  714. // html += "<tr>";
  715. // var record = records[i];
  716. // html += "<td>" + (i+1) + "</td>";
  717. // html += "<td>" + record.hdangerAcceptedTime + "</td>";
  718. // html += "<td>" + record.groupName + "</td>";
  719. // html += "<td>" + record.hdangerAcceptedByName + "</td>";
  720. // html += "<td>" + record.hdangerAcceptedResult + "</td>";
  721. // html += "<td>" + record.hdangerAcceptedRemark + "</td>";
  722. // html += "</tr>";
  723. // }
  724. // $('#acceptRecord ').html(html);
  725. }
  726. }
  727. }, 'get');
  728. if (workFlowType == 1 && hdangerStatus == 1) {
  729. $('#work_flow_hint').text("隐患评审栏");
  730. $('.work-flow-review').show();
  731. $(".wf_desc").show();
  732. $(".isAdopt").show();
  733. $(".work-flow-review-hint").attr("lay-verify", 'required');
  734. $(".work-flow-review-hint").attr("lay-verType", 'tips');
  735. $(".programme-retify").attr("lay-verify", 'required');
  736. $(".programme-retify").attr("lay-verType", 'tips');
  737. entrustType = 1;
  738. } else if (workFlowType == 2 && (hdangerStatus == 2 || hdangerStatus == 5)) {
  739. $('#work_flow_hint').text("隐患整改栏");
  740. $('.work-flow-retify').show();
  741. $(".wf_desc").hide();
  742. $(".isAdopt").hide();
  743. $(".work-flow-retify-hint").attr("lay-verify", 'required');
  744. $(".work-flow-retify-hint").attr("lay-verType", 'tips');
  745. $(".work-flow-upload-file").show();
  746. $(".work-flow-review-hint").removeAttr("lay-verify");
  747. $(".work-flow-review-hint").removeAttr("lay-verType", 'tips');
  748. entrustType = 2;
  749. } else if (workFlowType == 3 && hdangerStatus == 3) {
  750. $('#work_flow_hint').text("隐患验收栏");
  751. $('.work-flow-accept').show();
  752. $(".wf_desc").show();
  753. $(".isAdopt").show();
  754. $(".work-flow-upload-file").show();
  755. entrustType = 3;
  756. }
  757. //单选框监听(处理结果)
  758. form.on("radio(isAdopt)", function (data) {
  759. if (this.value == 1) {
  760. wfIsAdopt = true;
  761. } else {
  762. wfIsAdopt = false;
  763. }
  764. });
  765. //单选框监听(整改类型)
  766. form.on("radio(wf_hdangerRetifyType)", function (data) {
  767. if (this.value == 1) {
  768. $(".wf_hdangerRetifyAssistingunit").show();
  769. $(".retifyAssistingunit-hint").attr("lay-verify", 'required');
  770. $(".retifyAssistingunit-hint").attr("lay-verType", 'tips');
  771. } else {
  772. $(".wf_hdangerRetifyAssistingunit").hide();
  773. $(".retifyAssistingunit-hint").removeAttr("lay-verify");
  774. $(".retifyAssistingunit-hint").removeAttr("lay-verType", 'tips');
  775. }
  776. });
  777. //单选框监听(整改方案)
  778. form.on("radio(isProgramme)", function (data) {
  779. if (this.value == 1) {
  780. $(".is-programme").show();
  781. $(".programme-retify").attr("lay-verify", 'required');
  782. $(".programme-retify").attr("lay-verType", 'tips');
  783. } else {
  784. $(".is-programme").hide();
  785. $(".programme-retify").removeAttr("lay-verify");
  786. $(".programme-retify").removeAttr("lay-verType", 'tips');
  787. }
  788. });
  789. //单选框监听(委托处理)
  790. form.on("radio(isEntrust)", function (data) {
  791. if (this.value == 1) { //委托处理
  792. wfIsEntrust = true;
  793. $(".isEntrust").show();
  794. $(".wf_desc").show();
  795. $(".wthint").attr("lay-verify", 'required');
  796. $(".wthint").attr("lay-verType", 'tips');
  797. $(".work-flow-upload-file").hide();
  798. $(".work-flow-retify-hint").removeAttr("lay-verify");
  799. $(".work-flow-retify-hint").removeAttr("lay-verType", 'tips');
  800. $(".work-flow-review-hint").removeAttr("lay-verify");
  801. $(".work-flow-review-hint").removeAttr("lay-verType", 'tips');
  802. if (workFlowType == 1 && hdangerStatus == 1) {
  803. /*评审*/
  804. $(".work-flow-review").hide();
  805. $(".isReview").hide();
  806. $(".isAdopt").hide();
  807. } else if (workFlowType == 2 && (hdangerStatus == 2 || hdangerStatus == 5)) {
  808. /*整改*/
  809. $(".work-flow-retify").hide();
  810. $(".wf_desc").hide();
  811. } else if (workFlowType == 3 && hdangerStatus == 3) {
  812. /*验收*/
  813. $(".isAdopt").hide();
  814. }
  815. } else { //不委托
  816. wfIsEntrust = false;
  817. $(".isEntrust").hide();
  818. $(".wthint").removeAttr("lay-verify");
  819. $(".wthint").removeAttr("lay-verType");
  820. $(".work-flow-upload-file").removeAttr("display");
  821. if (workFlowType == 1 && hdangerStatus == 1) {
  822. /*评审*/
  823. $(".work-flow-review").show();
  824. $(".isReview").show();
  825. $(".isAdopt").show();
  826. $(".wf_desc").show();
  827. $(".work-flow-retify-hint").removeAttr("lay-verify", 'required');
  828. $(".work-flow-retify-hint").removeAttr("lay-verType", 'tips');
  829. } else if (workFlowType == 2 && (hdangerStatus == 2 || hdangerStatus == 5)) {
  830. /*整改*/
  831. $(".work-flow-retify").show();
  832. $(".wf_desc").hide();
  833. $(".work-flow-retify-hint").attr("lay-verify", 'required');
  834. $(".work-flow-retify-hint").attr("lay-verType", 'tips');
  835. $(".work-flow-upload-file").show();
  836. $(".work-flow-review-hint").removeAttr("lay-verify");
  837. $(".work-flow-review-hint").removeAttr("lay-verType", 'tips');
  838. } else if (workFlowType == 3 && hdangerStatus == 3) {
  839. /*验收*/
  840. $(".isAdopt").show();
  841. $(".wf_desc").show();
  842. $(".work-flow-upload-file").show();
  843. }
  844. }
  845. });
  846. // 上传实例
  847. var uploadFile = upload.render({
  848. elem: '#uploadFile', //绑定元素
  849. url: uParas.baseUrl + '/admin/uploadFile', //上传接口
  850. accept: 'file',
  851. acceptMime: 'image/jpg,image/png,image/gif,image/jpeg,image/bmp,image/tga,image/fpx,image/raw,', //(只显示 jpg 和 png 文件)
  852. size: 30720,//设置文件最大可允许上传的大小,单位 KB。不支持ie8/9
  853. done: function (response) {
  854. //上传完毕回调
  855. fileHtml(response.data.ext, response.data.path, response.data.oriFileName, true);
  856. }
  857. , error: function () {
  858. //请求异常回调
  859. }
  860. });
  861. function fileHtml(ext, path, oriFileName, isNew) {
  862. var Str = '';
  863. if (isNew) {
  864. Str = '<span style="color: #1E9FFF;">(新)</span>';
  865. }
  866. //文件图标
  867. var icon = '';
  868. if (ext === 'bmp' || ext === 'jpg' || ext === 'jpeg' || ext === 'png' || ext === 'gif') {
  869. icon = '<img style="width: 60px;height: 80px;" src="' + path + '" alt="">';
  870. } else {
  871. icon = '<img style="width: 60px;height: 80px;" src="' + path + '" alt="">';
  872. }
  873. //文件信息置入隐藏域
  874. var html = '';
  875. html += '<div style="padding-top: 6px;padding-right: 10px;float: left;">';
  876. var titleVal = $("#attachTitle").val();
  877. if (titleVal != '') {
  878. titleVal = titleVal + ',' + oriFileName;
  879. } else {
  880. titleVal = oriFileName;
  881. }
  882. $("#attachTitle").val(titleVal);
  883. var pathVal = $("#attachPath").val();
  884. if (pathVal != '') {
  885. pathVal = pathVal + ',' + path;
  886. } else {
  887. pathVal = path;
  888. }
  889. $("#attachPath").val(pathVal);
  890. var extVal = $("#attachExt").val();
  891. if (extVal != '') {
  892. extVal = extVal + ',' + ext;
  893. } else {
  894. extVal = ext;
  895. }
  896. $("#attachExt").val(extVal);
  897. html += icon;
  898. //html+='<br><a style="color: blueviolet;margin-left: 5px;" target="_blank" href="' + path + '">' + oriFileName + '</a>';
  899. html += '<br>' + Str + '<a style="color: indianred;float: right;margin-right: 15px;" class="delete-upImg" onclick="deleteFile(this)">删除</a>';
  900. html += '</div>';
  901. $("#fileDiv").append(html);
  902. }
  903. });
  904. function save() {
  905. layer.load(2, {shade: [0.15, '#cccccc']});
  906. var url = "";
  907. form.on('submit(formSubmit)', function (data) {
  908. layer.closeAll('loading');
  909. if (wfIsEntrust) {
  910. //debugger
  911. /*委托*/
  912. url = uParas.baseUrl + "/ent/hiddenWorkFlow/saveEntrust";
  913. if (data.field.entrustUserId == '-1') {
  914. layer.msg("请选择委托人员!");
  915. return false;
  916. }
  917. } else {
  918. //debugger
  919. if (workFlowType == 1 && hdangerStatus == 1) {
  920. /*评审*/
  921. url = uParas.baseUrl + "/ent/hiddenWorkFlow/saveReview";
  922. if (data.field.wf_hdangerRetifyBy == '-1') {
  923. layer.msg("请选择整改人员!");
  924. return false;
  925. }
  926. } else if (workFlowType == 2 && (hdangerStatus == 2 || hdangerStatus == 5)) {
  927. /*整改*/
  928. url = uParas.baseUrl + "/ent/hiddenWorkFlow/saveRetify";
  929. $(".work-flow-review-hint").removeAttr("lay-verify");
  930. $(".work-flow-review-hint").removeAttr("lay-verType", 'tips');
  931. } else if (workFlowType == 3 && hdangerStatus == 3) {
  932. /*验收*/
  933. url = uParas.baseUrl + "/ent/hiddenWorkFlow/saveAccept";
  934. }
  935. }
  936. admin.req(url, data.field, function (res) {
  937. layer.closeAll('loading');
  938. if (res.code == 1) {
  939. //layer.msg(res.msg);
  940. location.href = "./index.html?status=" + hdangerStatus;
  941. // location.reload();
  942. } else {
  943. layer.msg(res.msg);
  944. return false;
  945. }
  946. }, 'POST');
  947. return false;
  948. });
  949. layer.closeAll('loading');
  950. }
  951. /**
  952. * 隐患整改
  953. */
  954. function saveRetify() {
  955. //
  956. // var datamap = {
  957. // "hdangerAcceptedResult":acceptedResult,
  958. // "desc":$("#wf_desc").val(),
  959. // "hdangerId":$("#hdangerId").val()
  960. // };
  961. layer.confirm('确认整改?', {
  962. skin: 'layui-layer-admin',
  963. shade: .1
  964. }, function (i) {
  965. layer.close(i);
  966. layer.load(2, {shade: [0.15, '#cccccc']});
  967. var url = uParas.baseUrl + "/ent/hiddenWorkFlow/saveRetify";
  968. form.on('submit(formSubmit)', function (data) {
  969. //var selectVal = formSelects.value('catId', 'valStr');
  970. // $("#catIds").val(selectVal);
  971. // var url = uParas.baseUrl + "/ent/post/savePost";
  972. admin.req(url, data.field, function (res) {
  973. layer.closeAll('loading');
  974. if (res.code == 1) {
  975. //layer.msg(res.msg);
  976. // location.href = "./index.html";
  977. location.reload();
  978. } else {
  979. layer.msg(res.msg);
  980. }
  981. }, 'POST');
  982. return false;
  983. });
  984. // admin.req(url, datamap, function(res) {
  985. // layer.closeAll('loading');
  986. // if (res.code == 1) {
  987. // //layer.msg(res.msg);
  988. // location.reload();
  989. // } else {
  990. // layer.msg(res.msg);
  991. // }
  992. // },'POST');
  993. });
  994. }
  995. /**
  996. * 隐患验收
  997. * @param acceptedResult
  998. */
  999. function saveAccept(acceptedResult) {
  1000. var hint = '';
  1001. if (acceptedResult == 4) {
  1002. hint = '通过';
  1003. } else {
  1004. hint = '不通过';
  1005. }
  1006. // var datamap = {
  1007. // "hdangerAcceptedResult":acceptedResult,
  1008. // "desc":$("#wf_desc").val(),
  1009. // "hdangerId":$("#hdangerId").val()
  1010. // };
  1011. // //console.log(JSON.stringify(datamap));
  1012. layer.confirm('确认验收【' + hint + '】?', {
  1013. skin: 'layui-layer-admin',
  1014. shade: .1
  1015. }, function (i) {
  1016. layer.close(i);
  1017. layer.load(2, {shade: [0.15, '#cccccc']});
  1018. var url = uParas.baseUrl + "/ent/hiddenWorkFlow/saveAccept";
  1019. form.on('submit(formSubmit)', function (data) {
  1020. //var selectVal = formSelects.value('catId', 'valStr');
  1021. // $("#catIds").val(selectVal);
  1022. // var url = uParas.baseUrl + "/ent/post/savePost";
  1023. admin.req(url, data.field, function (res) {
  1024. layer.closeAll('loading');
  1025. if (res.code == 1) {
  1026. //layer.msg(res.msg);
  1027. // location.href = "./index.html";
  1028. location.reload();
  1029. } else {
  1030. layer.msg(res.msg);
  1031. }
  1032. }, 'POST');
  1033. return false;
  1034. });
  1035. // admin.req(url, datamap, function(res) {
  1036. // layer.closeAll('loading');
  1037. // if (res.code == 1) {
  1038. // //layer.msg(res.msg);
  1039. // location.reload();
  1040. // } else {
  1041. // layer.msg(res.msg);
  1042. // }
  1043. // },'POST');
  1044. });
  1045. }
  1046. /**
  1047. * 委托处理
  1048. */
  1049. function saveEntrust() {
  1050. // var datamap = {
  1051. // "entrustType":entrustType,
  1052. // "hdangerEntrustGroup":$("#hdangerEntrustGroup").val(),
  1053. // "entrustUserId":$("#entrustUserId").val(),
  1054. // "desc":$("#wf_desc").val(),
  1055. // "hdangerId":$("#hdangerId").val().toString()
  1056. // };
  1057. layer.confirm('确认委托处理?', {
  1058. skin: 'layui-layer-admin',
  1059. shade: .1
  1060. }, function (i) {
  1061. layer.close(i);
  1062. layer.load(2, {shade: [0.15, '#cccccc']});
  1063. var url = uParas.baseUrl + "/ent/hiddenWorkFlow/saveEntrust";
  1064. form.on('submit(formSubmit)', function (data) {
  1065. //var selectVal = formSelects.value('catId', 'valStr');
  1066. // $("#catIds").val(selectVal);
  1067. // var url = uParas.baseUrl + "/ent/post/savePost";
  1068. admin.req(url, data.field, function (res) {
  1069. layer.closeAll('loading');
  1070. if (res.code == 1) {
  1071. //layer.msg(res.msg);
  1072. // location.href = "./index.html";
  1073. location.reload();
  1074. } else {
  1075. layer.msg(res.msg);
  1076. }
  1077. }, 'POST');
  1078. return false;
  1079. });
  1080. // admin.req(url, datamap, function(res) {
  1081. // layer.closeAll('loading');
  1082. // if (res.code == 1) {
  1083. // //layer.msg(res.msg);
  1084. // location.reload();
  1085. // } else {
  1086. // layer.msg(res.msg);
  1087. // }
  1088. // },'POST');
  1089. });
  1090. }
  1091. //删除附件
  1092. function deleteFile(obj) {
  1093. var pDiv = $(obj).parent();
  1094. pDiv.remove();
  1095. }
  1096. function goBack() {
  1097. var url = 'ent/hiddenDanger/index.html?type=1';
  1098. if (workFlowType == 1) {
  1099. url = 'ent/hiddenDanger/index.html?type=1';
  1100. } else if (workFlowType == 2) {
  1101. url = 'ent/hiddenDanger/index.html?type=2';
  1102. } else if (workFlowType == 3) {
  1103. url = 'ent/hiddenDanger/index.html?type=3';
  1104. }
  1105. location.href = url;
  1106. }
  1107. function showImg(src) {
  1108. var imgHtml = "<img src='" + src + "' width='1000px' height='650'/>";
  1109. layer.open({
  1110. type: 1,
  1111. shade: 0.1,
  1112. offset: 'auto',
  1113. area: [1000 + 'px', 650 + 'px'], // area: [width + 'px',height+'px'] //原图显示
  1114. shadeClose: true,
  1115. scrollbar: false,
  1116. title: "图片附件预览", //不显示标题
  1117. content: imgHtml, //捕获的元素,注意:最好该指定的元素要存放在body最外层,否则可能被其它的相对元素所影响
  1118. // cancel: function () {
  1119. // layer.msg('捕获就是从页面已经存在的元素上,包裹layer的结构', { time: 5000, icon: 6 });
  1120. // }
  1121. });
  1122. }
  1123. </script>
  1124. </body>
  1125. </html>