12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8"/>
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
- <title>隐患处理流程</title>
- <link rel="stylesheet" href="../../../assets/libs/layui/css/layui.css"/>
- <link rel="stylesheet" href="../../../assets/module/formSelects/formSelects-v4.css"/>
- <link rel="stylesheet" href="../../../assets/module/admin.css?v=312"/>
- <link rel="stylesheet" href="../../../assets/module/uParas.css?v=312"/>
- </head>
- <body>
- <style type="text/css">
- /*table th{*/
- /* color: #ffb800;*/
- /*}*/
- </style>
- <!-- 加载动画 -->
- <div class="page-loading">
- <div class="ball-loader">
- <span></span><span></span><span></span><span></span>
- </div>
- </div>
- <!-- 正文开始 -->
- <div class="layui-fluid">
- <div class="layui-card">
- <div class="layui-card-header">
- 隐患流程治理
- <div class="layui-inline pull-right">
- <button onclick="history.back()" class="layui-btn layui-btn-sm layui-btn-radius layui-btn-normal"><i class="layui-icon"></i>返回</button>
- </div>
- </div>
- <form class="layui-form" lay-filter="layuiForm">
- <div class="overflow-y-730px">
- <div class="layui-card-body ">
- <!--流程处理开始---------------------------------------------------------------------------------->
- <div class="layui-elem-quote">
- <div class="layui-card-body">
- <div class="layui-form-item layui-row">
- <fieldset class="layui-elem-field layui-field-title">
- <legend class="" id="work_flow_hint" style="color: indianred;font-size: 18px;"></legend>
- </fieldset>
- <input type="hidden" id="hdangerId" name="hdangerId" value="">
- <input type="hidden" id="status" name="status" value="">
- <input type="hidden" id="entrustType" name="entrustType" value="">
- <!--委托处理-->
- <div class="layui-inline layui-col-md10 p-top10px">
- <label class="layui-form-label">委托处理</label>
- <div class="layui-input-block text-left">
- <input type="radio" id="0" name="isEntrust" value="0" title="否" checked="" lay-filter="isEntrust">
- <input type="radio" id="1" name="isEntrust" value=1 title="是" lay-filter="isEntrust">
- </div>
- </div>
- <div class="layui-inline layui-col-md10 p-top10px isEntrust display-none">
- <label class="layui-form-label">委托部门</label>
- <div class="layui-input-block">
- <input type="text" id="hdangerEntrustGroupName" class="layui-input wthint" name="hdangerEntrustGroupName"
- value=""
- placeholder="点击选择部门"
- class="form-control" readonly >
- <input type="hidden" id="hdangerEntrustGroup" name="hdangerEntrustGroup" readonly>
- <div id="menuContentEntrust" class="menuContent">
- <ul id="threeLevelGroupEntrust" class="ztree" style="margin-top:0;"></ul>
- </div>
- </div>
- </div>
- <div class="layui-inline layui-col-md10 p-top10px isEntrust display-none" >
- <label class="layui-form-label">委托人员</label>
- <div class="layui-input-block">
- <select id="entrustUserId" name="entrustUserId" class="layui-input-block" lay-filter="layuiForm">
- <option value="">点击选择人员</option>
- </select>
- </div>
- </div>
- <!--验收-->
- <dev class="work-flow-accept display-none">
- </dev>
- <!--整改开始---------------------------------------------->
- <dev class="work-flow-retify display-none">
- <div class="layui-inline layui-col-md10 p-top10px">
- <label class="layui-form-label">整改类型</label>
- <div class="layui-input-block text-left">
- <input type="radio" name="wf_hdangerRetifyType" value="0" title="自行整改" checked="" lay-filter="wf_hdangerRetifyType">
- <input type="radio" name="wf_hdangerRetifyType" value=1 title="协助整改" lay-filter="wf_hdangerRetifyType">
- </div>
- </div>
- <div class="layui-inline layui-col-md10 p-top10px display-none wf_hdangerRetifyAssistingunit">
- <label class="layui-form-label">协助单位</label>
- <div class="layui-input-block">
- <input type="text" id="wf_hdangerRetifyAssistingunit"
- class="layui-input retifyAssistingunit-hint" name="wf_hdangerRetifyAssistingunit"
- value="" placeholder="请输入协助整改的单位名称...(最多输入64个字)" maxlength="64">
- </div>
- </div>
- <div class="layui-inline layui-col-md10 p-top10px ">
- <label class="layui-form-label">原因分析</label>
- <div class="layui-input-block">
- <textarea class="layui-textarea work-flow-retify-hint"
- maxlength="256" placeholder="请输入原因分析...(最多输入256个字)"
- name="wf_hdangerRetifyReasons"
- id="wf_hdangerRetifyReasons"></textarea>
- </div>
- </div>
- <div class="layui-inline layui-col-md10 p-top10px ">
- <label class="layui-form-label">整改措施</label>
- <div class="layui-input-block">
- <textarea class="layui-textarea work-flow-retify-hint"
- maxlength="256" placeholder="请输入整改措施...(最多输入256个字)"
- name="wf_hdangerRetifyMeasures"
- id="wf_hdangerRetifyMeasures"></textarea>
- </div>
- </div>
- <div class="layui-inline layui-col-md3 p-top10px " >
- <label class="layui-form-label">整改费用</label>
- <div class="layui-input-block">
- <input class="layui-input work-flow-retify-hint" type="number"
- id="wf_hdangerRetifyAmountspent" name="wf_hdangerRetifyAmountspent" value=""
- onkeyup= "if(!/^d*(?:.d{0,2})?$/.test(this.value));"
- placeholder="金额 < 9999999.99" max="9999999.99" min="0.00" maxlength="11" >
- </div>
- </div>
- </dev>
- <!--整改结束---------------------------------------------->
- <!--评审开始---------------------------------------------->
- <dev class="work-flow-review isReview display-none">
- <div class="layui-inline layui-col-md10 p-top10px">
- <label class="layui-form-label">隐患等级</label>
- <div class="layui-input-block">
- <select id="wf_hdangerLevel" name="wf_hdangerLevel" lay-filter="layuiForm"
- class="layui-input-block work-flow-review-hint">
- <option value="">点击选择</option>
- </select>
- </div>
- </div>
- <div class="layui-inline layui-col-md10 p-top10px">
- <label class="layui-form-label">整改部门</label>
- <div class="layui-input-block">
- <input type="text" id="wf_hdangerRetifyGroupName"
- class="layui-input work-flow-review-hint" name="wf_hdangerRetifyGroupName"
- value=""
- placeholder="点击选择部门"
- class="form-control" readonly>
- <input type="hidden" id="wf_hdangerRetifyGroup" name="wf_hdangerRetifyGroup" readonly>
- <div id="menuContentRetify" class="menuContent">
- <ul id="threeLevelGroupRetify" class="ztree" style="margin-top:0;"></ul>
- </div>
- </div>
- </div>
- <div class="layui-inline layui-col-md10 p-top10px">
- <label class="layui-form-label ">整改人员</label>
- <div class="layui-input-block">
- <select id="wf_hdangerRetifyBy" name="wf_hdangerRetifyBy" class="layui-input-block work-flow-review-hint"
- lay-filter="layuiForm">
- <option value="">点击选择人员</option>
- </select>
- </div>
- </div>
- <div class="layui-inline layui-col-md10 p-top10px">
- <label class="layui-form-label">整改期限</label>
- <div class="layui-input-block">
- <input type="text" name="wf_hdangerRetifyDeadline" id="wf_hdangerRetifyDeadline"
- placeholder="点击选择整改期限"
- lay-verify="datetime" autocomplete="off" class="layui-input work-flow-review-hint">
- </div>
- </div>
- <div class="layui-inline layui-col-md10 p-top10px">
- <label class="layui-form-label">验收部门</label>
- <div class="layui-input-block">
- <input type="text" id="wf_hdangerAcceptedGroupName"
- class="layui-input work-flow-review-hint" name="wf_hdangerAcceptedGroupName"
- value=""
- placeholder="点击选择部门"
- class="form-control" readonly>
- <input type="hidden" id="wf_hdangerAcceptedGroup" name="wf_hdangerAcceptedGroup" readonly>
- <div id="menuContentAccepted" class="menuContent">
- <ul id="threeLevelGroupAccepted" class="ztree" style="margin-top:0;"></ul>
- </div>
- </div>
- </div>
- <div class="layui-inline layui-col-md10 p-top10px">
- <label class="layui-form-label ">验收人员</label>
- <div class="layui-input-block">
- <select id="wf_hdangerAcceptedBy" name="wf_hdangerAcceptedBy" class="layui-input-block work-flow-review-hint"
- lay-filter="layuiForm">
- <option value="">点击选择人员</option>
- </select>
- </div>
- </div>
- <div class="layui-inline layui-col-md10 p-top10px">
- <label class="layui-form-label">递交整改方案</label>
- <div class="layui-input-block text-left">
- <input type="radio" checked name="programmeRetify" value="1" title="是" lay-filter="isProgramme">
- <input type="radio" name="programmeRetify" value="0" title="否" lay-filter="isProgramme">
- </div>
- </div>
- <div class="layui-inline layui-col-md10 p-top10px is-programme" >
- <label class="layui-form-label">整改方案</label>
- <div class="layui-input-block">
- <select id="programmeId" name="programmeId" class="layui-input-block programme-retify" lay-filter="programmeForm">
- <option value="">点击选择方案</option>
- </select>
- </div>
- </div>
- </dev>
- <!--评审结束---------------------------------------------------------------->
- <div class="layui-inline layui-col-md10 p-top10px wf_desc display-none">
- <label class="layui-form-label">备注信息</label>
- <div class="layui-input-block">
- <textarea class="layui-textarea" placeholder="请输入备注信息...(最多输入256个字)"
- name="wf_desc" id="wf_desc" maxlength="256"></textarea>
- </div>
- </div>
- <div class="layui-inline layui-col-md10 p-top10px isAdopt display-none">
- <label class="layui-form-label">处理结果</label>
- <div class="layui-input-block text-left">
- <input type="radio" name="isAdopt" value="1" title="通过" checked="" lay-filter="isAdopt">
- <input type="radio" name="isAdopt" value="0" title="不通过" lay-filter="isAdopt">
- </div>
- </div>
- <!--附件-->
- <div class="layui-inline layui-col-md10 p-top10px work-flow-upload-file display-none">
- <label class="layui-form-label">现场附件</label>
- <div class="layui-input-block text-left">
- <button type="button" class="layui-btn" id="uploadFile">
- <i class="layui-icon"></i>上传照片
- </button>
- <span style="color: indianred;font-size: 16px;">支持图片格式:jpg / png /gif / jpeg / bmp / tga / fpx / raw</span>
- <input type="hidden" name="attachTitle" id="attachTitle"/>
- <input type="hidden" name="attachPath" id="attachPath"/>
- <input type="hidden" name="attachExt" id="attachExt"/>
- <div id="fileDiv" style="padding-top: 10px;"></div>
- </div>
- </div>
- <div class="layui-inline layui-col-md5" style="padding-left: 40px;">
- <button onclick="save()" lay-filter="formSubmit" lay-submit
- class=" layui-btn layui-btn-radius bg-c-submit" style="height: 30px;line-height: 0px;">提 交</button>
- </div>
- </div>
- </div>
- </div>
- </div>
- <!--流程处理结束------------------------------------------------------------------------------>
- <!--隐患基本信息开始-------------------------------------------------------------------------->
- <div class="layui-tab layui-tab-brief" lay-filter="">
- <div class="layui-tab-content" style="height: auto;">
- <div class="layui-tab-item layui-show">
- <fieldset class="layui-elem-field layui-field-title">
- <legend>隐患基本信息</legend>
- </fieldset>
- <div class="layui-row" >
- <!--<script type="text/html">-->
- <div class="layui-col-xs12">
- <div class="layui-form">
- <table class="layui-table">
- <!--<colgroup>-->
- <!--<col width="150">-->
- <!--<col width="150">-->
- <!--<col width="200">-->
- <!--<col>-->
- <!--</colgroup>-->
- <thead>
- </thead>
- <tbody>
- <tr>
- <th width="150" >隐患名称</th>
- <td id="hdangerTitle"></td>
- <th width="150">隐患类型</th>
- <td id="hdangerCatTitle">
- </td>
- </tr>
- <tr>
- <th width="150">单位名称</th>
- <td id="companyName" ></td>
- <th width="150">部门名称</th>
- <td id="groupName"></td>
- </tr>
- <tr>
- <th width="150">隐患等级</th>
- <td id="hdangerLevelName"></td>
- <th width="150">隐患状态</th>
- <td id="statusStr"></td>
- </tr>
- <tr>
- <th width="150">现场描述</th>
- <td id="hdangerDesc" colspan="3"></td>
- </tr>
- <tr>
- <th width="150">风险点名称</th>
- <td id="riskPointName"></td>
- <th width="150">风险点等级</th>
- <td id="riskPointLevelName"></td>
- </tr>
- <tr>
- <th width="150">检查表名称</th>
- <td id="bizCheckDefName"></td>
- <th width="150">风险点类型</th>
- <td id="riskPointTypeName"></td>
- </tr>
- <tr>
- <th width="150">危险源 / 检查项</th>
- <td id="checkItemName" colspan="3"></td>
- </tr>
- <tr>
- <th width="150">管控措施 / 检查内容</th>
- <td id="checkContentName" colspan="3"></td>
- </tr>
- <tr>
- <th width="150">当前处理人</th>
- <td id="executor"></td>
- <th width="150">整改期限</th>
- <td id="hdangerRetifyDeadline"></td>
- </tr>
- <tr>
- <th width="150">提交人员</th>
- <td id="hdangerCreatedByName"></td>
- <th width="150">提交时间</th>
- <td id="createdTime"></td>
- </tr>
- <tr>
- <th width="150">发生时间</th>
- <td id="happenedTime"></td>
- <th width="150">闭环时间</th>
- <td id="finishedTime"></td>
- </tr>
- <tr class="getHdangerAtt" style="display: none">
- <th colspan="4" style="border-bottom: 0px">隐患现场照片</th>
- </tr>
- <tr class="getHdangerAtt" style="display: none">
- <td id="hdangerAtt" colspan="4"></td>
- </tr>
- <tr class="getHdangerVideo" style="display: none">
- <th colspan="4" style="border-bottom: 0px">隐患现场视频</th>
- </tr>
- <tr class="getHdangerVideo" style="display: none">
- <td id="hdangerVideo" colspan="4"></td>
- </tr>
- <tr style="border-left: 0px;border-right: 0px;" >
- <td style="border-left: 0px;border-right: 0px;" colspan="4">
- <fieldset class="layui-elem-field layui-field-title">
- <legend>评审信息</legend>
- </fieldset>
- </td>
- </tr>
- <tr>
- <th width="150">评审部门</th>
- <td id="hdangerReviewGroupName"></td>
- <th width="150">评审人员</th>
- <td id="hdangerReviewByName"></td>
- </tr>
- <tr class="getReviewRecord" style="display: none;">
- <th width="150">评审结果</th>
- <td id="hdangerReviewResult"></td>
- <th width="150">评审日期</th>
- <td id="hdangerReviewTime"></td>
- </tr>
- <tr class="getReviewRecord" style="display: none;">
- <th width="150">评审说明</th>
- <td colspan="3" id="hdangerReviewRemark"></td>
- </tr>
- <tr style="border-left: 0px;border-right: 0px;" >
- <td style="border-left: 0px;border-right: 0px;" colspan="4">
- <fieldset class="layui-elem-field layui-field-title">
- <legend>整改信息</legend>
- </fieldset>
- </td>
- </tr>
- <tr>
- <th width="150">整改部门</th>
- <td id="hdangerRetifyGroupName"></td>
- <th width="150">整改人员</th>
- <td id="hdangerRetifyByName"></td>
- </tr>
- <tr class="getRetifyRecord" style="display: none;">
- <th width="150">整改类型</th>
- <td id="hdangerRetifyTypeName"></td>
- <th width="150">协助单位</th>
- <td id="hdangerRetifyAssistingunit"></td>
- </tr>
- <tr class="getRetifyRecord" style="display: none;">
- <th width="150">整改费用</th>
- <td id="hdangerRetifyAmountspent"></td>
- <th width="150">整改时间</th>
- <td id="hdangerRetifycreatedTime"></td>
- </tr>
- <tr class="getRetifyRecord" style="display: none;">
- <th width="150">原因分析</th>
- <td colspan="3" id="hdangerRetifyReasons"></td>
- </tr>
- <tr class="getRetifyRecord" style="display: none;">
- <th width="150">整改措施</th>
- <td colspan="3" id="hdangerRetifyMeasures"></td>
- </tr>
- <tr class="getRetifyAtt" style="display: none">
- <th colspan="4" style="border-bottom: 0px">最近整改照片</th>
- </tr>
- <tr class="getRetifyAtt" style="display: none;border-bottom: 0px;">
- <td id="retifyAtt" colspan="4" style="border-bottom: 0px;"></td>
- </tr>
- <tr class="getRetifyVideo" style="display: none">
- <th colspan="4" style="border-bottom: 0px">最近整改视频</th>
- </tr>
- <tr class="getRetifyVideo" style="display: none">
- <td id="retifyVideo" colspan="4"></td>
- </tr>
- <tr style="border-left: 0px;border-right: 0px;" >
- <td style="border-left: 0px;border-right: 0px;" colspan="4">
- <fieldset class="layui-elem-field layui-field-title">
- <legend>验收信息</legend>
- </fieldset>
- </td>
- </tr>
- <tr>
- <th width="150">验收部门</th>
- <td id="hdangerAcceptedGroupName"></td>
- <th width="150">验收人员</th>
- <td id="hdangerAcceptedByName"></td>
- </tr>
- <tr class="getAcceptRecord" style="display: none;">
- <th width="150">验收结果</th>
- <td id="hdangerAcceptedResult"></td>
- <th width="150">验收日期</th>
- <td id="hdangerAcceptedTime"></td>
- </tr>
- <tr class="getAcceptRecord" style="display: none;">
- <th width="150">验收说明</th>
- <td colspan="3" id="hdangerAcceptedRemark"></td>
- </tr>
- <tr class="getAcceptAtt" style="display: none">
- <th colspan="4" style="border-bottom: 0px">最近验收照片</th>
- </tr>
- <tr class="getAcceptAtt" style="display: none">
- <td id="acceptAtt" colspan="4"></td>
- </tr>
- <tr class="getRetifyVideo" style="display: none">
- <th colspan="4" style="border-bottom: 0px">最近验收视频</th>
- </tr>
- <tr class="getRetifyVideo" style="display: none;border-bottom: 0px;">
- <td id="acceptVideo" colspan="4" style="border-bottom: 0px"></td>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
- <!--// </script>-->
- </div>
- </div>
- </div>
- </div>
- <!--隐患基本信息结束-------------------------------------------------------------------------->
- <div class="layui-inline layui-col-md5" style="padding-top: 150px;"></div>
- </div>
- </form>
- </div>
- </div>
- <!-- js部分 -->
- <script type="text/javascript" src="../../../assets/libs/layui/layui.js"></script>
- <script type="text/javascript" src="../../../assets/js/common.js?v=312"></script>
- <script>
- var hdangerId; //隐患ID
- var workFlowType; //流程类型:1评审;2整改;3验收;
- var hdangerStatus; //隐患状态
- var entrustType; //委托类型:委托评审 == 1;委托整改 == 2;委托验收 == 3;
- var wfIsEntrust = false; //是否委托
- var wfIsAdopt = false; //是否通过
- var $;
- var layer;
- var form;
- var util;
- var admin;
- var uParas;
- var element;
- var _threeLevelGroupEntrust;
- var _groupTree;
- layui.use(['layer', 'form', 'table','laydate', 'util','upload','zTree', 'admin', 'uParas', 'element', 'laytpl','_zTree','_groupTree'], function () {
- $ = layui.jquery;
- layer = layui.layer;
- form = layui.form;
- util = layui.util;
- admin = layui.admin;
- uParas = layui.uParas;
- element = layui.element, laytpl = layui.laytpl;
- threeLevelGroupEntrust = layui._threeLevelGroupEntrust;
- _groupTree = layui._groupTree;
- var laydate = layui.laydate;
- var upload = layui.upload,
- hdangerId = uParas.getUrlParam("hdangerId");
- workFlowType = uParas.getUrlParam("workFlowType");
- hdangerStatus = uParas.getUrlParam("hdangerStatus");
- $("#entrustType").val(workFlowType);
- /*整改期限*/
- laydate.render({
- elem: '#wf_hdangerRetifyDeadline',
- format: 'yyyy-MM-dd',
- type: 'datetime',
- min:'date',
- });
- var groupUrl = '/admin/common/findCompanyGroupLists';
- /**
- * ztree 整改部门 *******************************************
- */
- _groupTree.initgroupTreeAndUsers(groupUrl,"threeLevelGroupRetify","wf_hdangerRetifyGroupName",
- "wf_hdangerRetifyGroup","menuContentRetify","wf_hdangerRetifyBy","layuiForm");
- /**
- * ztree 验收部门 *******************************************
- */
- _groupTree.initgroupTreeAndUsers(groupUrl,"threeLevelGroupAccepted","wf_hdangerAcceptedGroupName",
- "wf_hdangerAcceptedGroup","menuContentAccepted","wf_hdangerAcceptedBy","layuiForm");
- /**
- * ztree 委托部门 *******************************************
- */
- _groupTree.initgroupTreeAndUsers(groupUrl,"threeLevelGroupEntrust","hdangerEntrustGroupName",
- "hdangerEntrustGroup","menuContentEntrust","entrustUserId","layuiForm");
- /*隐患整改方案*/
- uParas.initSimpleSelect("programmeId", "layuiForm", "/admin/common/getDhangerRetifyProgramme", "programmeName", "programmeId");
- admin.req(uParas.baseUrl + '/ent/hiddenDanger/details?hdangerId=' + hdangerId, null, function (res) {
- if (res.code == 1) {
- var hd = res.data;
- if(hd != null){
- //console.log(JSON.stringify(hd));
- if(workFlowType == 2 && (hdangerStatus == 2 || hdangerStatus == 5)){
- //示例
- var endTime = new Date(hd.hdangerRetifyDeadline).getTime() //假设为结束日期
- ,serverTime = new Date().getTime(); //假设为当前服务器时间,这里采用的是本地时间,实际使用一般是取服务端的
- util.countdown(endTime, serverTime, function(date, serverTime, timer){
- var str = '已超时('+hd.hdangerRetifyDeadline+')';
- if (date[0] > 0 || date[1] > 0 || date[2] > 0 || date[3] > 0) {
- str = '<span class="font-weight">'+ date[0] + '</span>天' +
- '<span class="font-weight">' + date[1] + '</span>小时' +
- '<span class="font-weight">' + date[2] + '</span>分钟' +
- '<span class="font-weight">' + date[3] + '</span>秒钟';
- }
- $('#work_flow_hint').html('隐患整改栏 倒计时:'+str);
- $('#hdangerRetifyDeadline').html(str);
- });
- }else{
- $("#hdangerRetifyDeadline").val(hd.hdangerRetifyDeadline);
- }
- $("#hdangerId").val(hd.hdangerId);
- $("#status").val(hd.status);
- $("#hdangerTitle").text(hd.hdangerTitle);
- $("#hdangerDesc").text(hd.hdangerDesc);
- $("#hdangerLevelName").text(hd.hdangerLevelName);
- $("#hdangerCatTitle").text(hd.hdangerCatTitle);
- $("#bizCheckDefName").text(hd.bizCheckDefName);
- $("#riskPointLevelName").text(hd.riskPointLevelName);
- $("#riskPointTypeName").text(hd.riskPointTypeName);
- $("#riskPointName").text(hd.riskPointName);
- $("#checkItemName").text(hd.checkItemName);
- $("#checkContentName").text(hd.checkContentName);
- $("#statusStr").text(hd.statusStr);
- $("#companyName").text(hd.companyName);
- $("#groupName").text(hd.groupName);
- $("#hdangerReviewGroupName").text(hd.hdangerReviewGroupName);
- $("#hdangerReviewByName").text(hd.hdangerReviewByName);
- $("#hdangerRetifyGroupName").text(hd.hdangerRetifyGroupName);
- $("#hdangerRetifyByName").text(hd.hdangerRetifyByName);
- $("#hdangerAcceptedGroupName").text(hd.hdangerAcceptedGroupName);
- $("#hdangerAcceptedByName").text(hd.hdangerAcceptedByName);
- $("#hdangerCreatedByName").text(hd.hdangerCreatedByName);
- $("#hdangerRetifyDeadline").text(hd.hdangerRetifyDeadline);
- $("#executor").text(hd.executor);
- $("#createdTime").text(hd.createdTime);
- $("#happenedTime").text(hd.happenedTime);
- $("#finishedTime").text(hd.finishedTime);
- $("#executor").text(hd.executor);
- }
- var hiddendangerAtt = res.data.attachList;
- if(hiddendangerAtt.length > 0){
- $('.getHdangerAtt').show();
- var html = '';
- for (var i = 0; i < hiddendangerAtt.length; i++) {
- var att = hiddendangerAtt[i];
- if(att.attachType == "image"){
- html += '<a onclick="showImg(\''+ att.attachPath +'\');" style="margin-right: 10px;">';
- html += '<img style="width: 60px;height: 80px;" src="'+att.attachPath+'">';
- html += '</a>';
- }
- }
- $('#hdangerAtt ').html(html);
- }
- /**
- * 隐患等级 下拉 ********************************************
- */
- uParas.initSimpleSelect("wf_hdangerLevel", "layuiForm", "/admin/common/getHdangerLevelList", "keyName", "keyValue",hd.hdangerLevel);
- }
- }, 'get');
- /*评审记录*/
- admin.req(uParas.baseUrl + '/ent/hiddenDanger/getReviewRecord?hdangerId=' + hdangerId, null, function (res) {
- if (res.code == 1) {
- var records = res.data;
- var html = "";
- if (records.length > 0) {
- $("#hdangerReviewResult").text((records[0].hdangerReviewResult) != null ? (records[0].hdangerReviewResult):'-');
- $("#hdangerReviewRemark").text((records[0].hdangerReviewRemark) != null ? (records[0].hdangerReviewRemark):'-');
- $("#hdangerReviewTime").text((records[0].hdangerReviewTime) != null ? (records[0].hdangerReviewTime):'-');
- $('.getReviewRecord').show();
- // for (var i = 0; i < records.length; i++) {
- // html += "<tr>";
- // var record = records[i];
- // html += "<td>" + (i+1) + "</td>";
- // html += "<td>" + record.hdangerReviewTime + "</td>";
- // html += "<td>" + record.groupName + "</td>";
- // html += "<td>" + record.hdangerReviewByName + "</td>";
- // html += "<td>" + record.hdangerReviewResult + "</td>";
- // html += "<td>" + record.hdangerReviewRemark + "</td>";
- // html += "</tr>";
- // }
- // $('#reviewRecord ').html(html);
- }
- }
- }, 'get');
- /*整改记录*/
- admin.req(uParas.baseUrl + '/ent/hiddenDanger/getRetifyRecord?hdangerId=' + hdangerId, null, function (res) {
- if (res.code == 1) {
- var records = res.data;
- if (records.length > 0) {
- $("#hdangerRetifyAmountspent").text((records[0].hdangerRetifyAmountspent) != null ? (records[0].hdangerRetifyAmountspent + ' 元'):'-');
- $("#hdangerRetifyTypeName").text((records[0].hdangerRetifyTypeName) != null ? (records[0].hdangerRetifyTypeName):'-');
- $("#hdangerRetifyMeasures").text((records[0].hdangerRetifyMeasures) != null ? (records[0].hdangerRetifyMeasures):'-');
- $("#hdangerRetifyReasons").text(((records[0].hdangerRetifyReasons) != null && (records[0].hdangerRetifyReasons) != '') ? (records[0].hdangerRetifyReasons):'-');
- $("#hdangerRetifycreatedTime").text((records[0].createdTime) != null ? (records[0].createdTime):'-');
- $("#hdangerRetifyAssistingunit").text((records[0].hdangerRetifyAssistingunit) != null ? (records[0].hdangerRetifyAssistingunit):'-');
- var retifyAtt = records[0].attachList;
- if(retifyAtt.length > 0){
- $('#retifyAtt ').html('');
- $('.getRetifyAtt').show();
- var atthtml = '';
- for (var i = 0; i < retifyAtt.length; i++) {
- var att = retifyAtt[i];
- if(att.attachType == "image"){
- atthtml += '<a onclick="showImg(\''+ att.attachPath +'\');" style="margin-right: 10px;">';
- atthtml += '<img style="width: 60px;height: 80px;" src="'+att.attachPath+'">';
- atthtml += '</a>';
- }
- }
- $('#retifyAtt ').html(atthtml);
- }
- $('.getRetifyRecord').show();
- // var html = "";
- // for (var i = 0; i < records.length; i++) {
- // html += "<tr>";
- // var record = records[i];
- // html += "<td>" + (i+1) + "</td>";
- // html += "<td>" + record.hdangerRetifyDeadline + "</td>";
- // html += "<td>" + record.hdangerRetifyGroupName + "</td>";
- // html += "<td>" + record.hdangerRetifyByName + "</td>";
- // html += "<td>" + record.hdangerRetifyTypeName + "</td>";
- // html += "<td>" + record.hdangerRetifyAssistingunit + "</td>";
- // html += "<td>" + record.hdangerRetifyAmountspent + "</td>";
- // html += "<td>" + record.hdangerRetifyReasons + "</td>";
- // html += "<td>" + record.hdangerRetifyMeasures + "</td>";
- // html += "</tr>";
- // }
- // $('#retifyRecord ').html(html);
- }
- }
- }, 'get');
- /*验收记录*/
- admin.req(uParas.baseUrl + '/ent/hiddenDanger/getAcceptRecord?hdangerId=' + hdangerId, null, function (res) {
- if (res.code == 1) {
- var records = res.data;
- if (records.length > 0) {
- $("#hdangerAcceptedResult").text((records[0].hdangerAcceptedResult) != null ? (records[0].hdangerAcceptedResult):'-');
- $("#hdangerAcceptedRemark").text((records[0].hdangerAcceptedRemark) != null ? (records[0].hdangerAcceptedRemark):'-');
- $("#hdangerAcceptedTime").text((records[0].hdangerAcceptedTime) != null ? (records[0].hdangerAcceptedTime):'-');
- var acceptAtt = records[0].attachList;
- if(acceptAtt.length > 0){
- $('#acceptAtt ').html('');
- $('.getAcceptAtt').show();
- var atthtml = '';
- for (var i = 0; i < acceptAtt.length; i++) {
- var att = acceptAtt[i];
- if(att.attachType == "image"){
- atthtml += '<a onclick="showImg(\''+ att.attachPath +'\');" style="margin-right: 10px;">';
- atthtml += '<img style="width: 60px;height: 80px;" src="'+att.attachPath+'">';
- atthtml += '</a>';
- }
- }
- $('#acceptAtt ').html(atthtml);
- }
- $('.getAcceptRecord').show();
- // var html = "";
- // for (var i = 0; i < records.length; i++) {
- // html += "<tr>";
- // var record = records[i];
- // html += "<td>" + (i+1) + "</td>";
- // html += "<td>" + record.hdangerAcceptedTime + "</td>";
- // html += "<td>" + record.groupName + "</td>";
- // html += "<td>" + record.hdangerAcceptedByName + "</td>";
- // html += "<td>" + record.hdangerAcceptedResult + "</td>";
- // html += "<td>" + record.hdangerAcceptedRemark + "</td>";
- // html += "</tr>";
- // }
- // $('#acceptRecord ').html(html);
- }
- }
- }, 'get');
- if(workFlowType == 1 && hdangerStatus == 1){
- $('#work_flow_hint').text("隐患评审栏");
- $('.work-flow-review').show();
- $(".wf_desc").show();
- $(".isAdopt").show();
- $(".work-flow-review-hint").attr("lay-verify", 'required');
- $(".work-flow-review-hint").attr("lay-verType", 'tips');
- $(".programme-retify").attr("lay-verify", 'required');
- $(".programme-retify").attr("lay-verType", 'tips');
- entrustType = 1;
- }else if(workFlowType == 2 && (hdangerStatus == 2 || hdangerStatus == 5)){
- $('#work_flow_hint').text("隐患整改栏");
- $('.work-flow-retify').show();
- $(".wf_desc").hide();
- $(".isAdopt").hide();
- $(".work-flow-retify-hint").attr("lay-verify", 'required');
- $(".work-flow-retify-hint").attr("lay-verType", 'tips');
- $(".work-flow-upload-file").show();
- $(".work-flow-review-hint").removeAttr("lay-verify");
- $(".work-flow-review-hint").removeAttr("lay-verType", 'tips');
- entrustType = 2;
- }else if(workFlowType == 3 && hdangerStatus == 3){
- $('#work_flow_hint').text("隐患验收栏");
- $('.work-flow-accept').show();
- $(".wf_desc").show();
- $(".isAdopt").show();
- $(".work-flow-upload-file").show();
- entrustType = 3;
- }
- //单选框监听(处理结果)
- form.on("radio(isAdopt)", function (data) {
- if (this.value == 1) {
- wfIsAdopt = true;
- }else {
- wfIsAdopt = false;
- }
- });
- //单选框监听(整改类型)
- form.on("radio(wf_hdangerRetifyType)", function (data) {
- if (this.value == 1) {
- $(".wf_hdangerRetifyAssistingunit").show();
- $(".retifyAssistingunit-hint").attr("lay-verify", 'required');
- $(".retifyAssistingunit-hint").attr("lay-verType", 'tips');
- }else{
- $(".wf_hdangerRetifyAssistingunit").hide();
- $(".retifyAssistingunit-hint").removeAttr("lay-verify");
- $(".retifyAssistingunit-hint").removeAttr("lay-verType", 'tips');
- }
- });
- //单选框监听(整改方案)
- form.on("radio(isProgramme)", function (data) {
- if (this.value == 1) {
- $(".is-programme").show();
- $(".programme-retify").attr("lay-verify", 'required');
- $(".programme-retify").attr("lay-verType", 'tips');
- }else{
- $(".is-programme").hide();
- $(".programme-retify").removeAttr("lay-verify");
- $(".programme-retify").removeAttr("lay-verType", 'tips');
- }
- });
- //单选框监听(委托处理)
- form.on("radio(isEntrust)", function (data) {
- if (this.value == 1) { //委托处理
- wfIsEntrust = true;
- $(".isEntrust").show();
- $(".wf_desc").show();
- $(".wthint").attr("lay-verify", 'required');
- $(".wthint").attr("lay-verType", 'tips');
- $(".work-flow-upload-file").hide();
- $(".work-flow-retify-hint").removeAttr("lay-verify");
- $(".work-flow-retify-hint").removeAttr("lay-verType", 'tips');
- $(".work-flow-review-hint").removeAttr("lay-verify");
- $(".work-flow-review-hint").removeAttr("lay-verType", 'tips');
- if(workFlowType == 1 && hdangerStatus == 1){
- /*评审*/
- $(".work-flow-review").hide();
- $(".isReview").hide();
- $(".isAdopt").hide();
- }else if(workFlowType == 2 && (hdangerStatus == 2 || hdangerStatus == 5)){
- /*整改*/
- $(".work-flow-retify").hide();
- $(".wf_desc").hide();
- }else if(workFlowType == 3 && hdangerStatus == 3){
- /*验收*/
- $(".isAdopt").hide();
- }
- } else { //不委托
- wfIsEntrust = false;
- $(".isEntrust").hide();
- $(".wthint").removeAttr("lay-verify");
- $(".wthint").removeAttr("lay-verType");
- $(".work-flow-upload-file").removeAttr("display");
- if(workFlowType == 1 && hdangerStatus == 1){
- /*评审*/
- $(".work-flow-review").show();
- $(".isReview").show();
- $(".isAdopt").show();
- $(".wf_desc").show();
- $(".work-flow-retify-hint").removeAttr("lay-verify", 'required');
- $(".work-flow-retify-hint").removeAttr("lay-verType", 'tips');
- }else if(workFlowType == 2 && (hdangerStatus == 2 || hdangerStatus == 5)){
- /*整改*/
- $(".work-flow-retify").show();
- $(".wf_desc").hide();
- $(".work-flow-retify-hint").attr("lay-verify", 'required');
- $(".work-flow-retify-hint").attr("lay-verType", 'tips');
- $(".work-flow-upload-file").show();
- $(".work-flow-review-hint").removeAttr("lay-verify");
- $(".work-flow-review-hint").removeAttr("lay-verType", 'tips');
- }else if(workFlowType == 3 && hdangerStatus == 3){
- /*验收*/
- $(".isAdopt").show();
- $(".wf_desc").show();
- $(".work-flow-upload-file").show();
- }
- }
- });
- // 上传实例
- var uploadFile = upload.render({
- elem: '#uploadFile', //绑定元素
- url: uParas.baseUrl+'/admin/uploadFile', //上传接口
- accept:'file',
- acceptMime: 'image/jpg,image/png,image/gif,image/jpeg,image/bmp,image/tga,image/fpx,image/raw,', //(只显示 jpg 和 png 文件)
- size:30720,//设置文件最大可允许上传的大小,单位 KB。不支持ie8/9
- done: function(response){
- //上传完毕回调
- fileHtml(response.data.ext,response.data.path,response.data.oriFileName,true);
- }
- ,error: function(){
- //请求异常回调
- }
- });
- function fileHtml(ext,path,oriFileName,isNew){
- var Str = '';
- if(isNew){
- Str = '<span style="color: #1E9FFF;">(新)</span>';
- }
- //文件图标
- var icon = '';
- if(ext === 'bmp' || ext === 'jpg' || ext === 'jpeg' || ext === 'png' || ext === 'gif'){
- icon = '<img style="width: 60px;height: 80px;" src="'+path+'" alt="">';
- }else{
- icon = '<img style="width: 60px;height: 80px;" src="'+path+'" alt="">';
- }
- //文件信息置入隐藏域
- var html = '';
- html+='<div style="padding-top: 6px;padding-right: 10px;float: left;">';
- var titleVal = $("#attachTitle").val();
- if(titleVal != ''){
- titleVal = titleVal + ',' + oriFileName;
- }else{
- titleVal = oriFileName;
- }
- $("#attachTitle").val(titleVal);
- var pathVal = $("#attachPath").val();
- if(pathVal != ''){
- pathVal = pathVal + ',' + path;
- }else{
- pathVal = path;
- }
- $("#attachPath").val(pathVal);
- var extVal = $("#attachExt").val();
- if(extVal != ''){
- extVal = extVal + ',' + ext;
- }else{
- extVal = ext;
- }
- $("#attachExt").val(extVal);
- html+=icon;
- //html+='<br><a style="color: blueviolet;margin-left: 5px;" target="_blank" href="' + path + '">' + oriFileName + '</a>';
- html+='<br>'+Str+'<a style="color: indianred;float: right;margin-right: 15px;" class="delete-upImg" onclick="deleteFile(this)">删除</a>';
- html+='</div>';
- $("#fileDiv").append(html);
- }
- });
- function save() {
- layer.load(2, { shade: [0.15, '#cccccc'] });
- var url = "";
- form.on('submit(formSubmit)', function(data) {
- layer.closeAll('loading');
- if(wfIsEntrust){
- //debugger
- /*委托*/
- url = uParas.baseUrl + "/ent/hiddenWorkFlow/saveEntrust";
- if(data.field.entrustUserId == '-1'){
- layer.msg("请选择委托人员!");
- return false;
- }
- }else{
- //debugger
- if(workFlowType == 1 && hdangerStatus == 1){
- /*评审*/
- url = uParas.baseUrl + "/ent/hiddenWorkFlow/saveReview";
- if(data.field.wf_hdangerRetifyBy == '-1'){
- layer.msg("请选择整改人员!");
- return false;
- }
- }else if(workFlowType == 2 && (hdangerStatus == 2 || hdangerStatus == 5)){
- /*整改*/
- url = uParas.baseUrl + "/ent/hiddenWorkFlow/saveRetify";
- $(".work-flow-review-hint").removeAttr("lay-verify");
- $(".work-flow-review-hint").removeAttr("lay-verType", 'tips');
- }else if(workFlowType == 3 && hdangerStatus == 3){
- /*验收*/
- url = uParas.baseUrl + "/ent/hiddenWorkFlow/saveAccept";
- }
- }
- admin.req(url, data.field, function(res) {
- layer.closeAll('loading');
- if (res.code == 1) {
- //layer.msg(res.msg);
- location.href = "./index.html?status="+hdangerStatus;
- // location.reload();
- } else {
- layer.msg(res.msg);
- return false;
- }
- },'POST');
- return false;
- });
- layer.closeAll('loading');
- }
- /**
- * 隐患整改
- */
- function saveRetify() {
- //
- // var datamap = {
- // "hdangerAcceptedResult":acceptedResult,
- // "desc":$("#wf_desc").val(),
- // "hdangerId":$("#hdangerId").val()
- // };
- layer.confirm('确认整改?', {
- skin: 'layui-layer-admin',
- shade: .1
- }, function (i) {
- layer.close(i);
- layer.load(2, { shade: [0.15, '#cccccc'] });
- var url = uParas.baseUrl + "/ent/hiddenWorkFlow/saveRetify";
- form.on('submit(formSubmit)', function(data) {
- //var selectVal = formSelects.value('catId', 'valStr');
- // $("#catIds").val(selectVal);
- // var url = uParas.baseUrl + "/ent/post/savePost";
- admin.req(url, data.field, function(res) {
- layer.closeAll('loading');
- if (res.code == 1) {
- //layer.msg(res.msg);
- // location.href = "./index.html";
- location.reload();
- } else {
- layer.msg(res.msg);
- }
- },'POST');
- return false;
- });
- // admin.req(url, datamap, function(res) {
- // layer.closeAll('loading');
- // if (res.code == 1) {
- // //layer.msg(res.msg);
- // location.reload();
- // } else {
- // layer.msg(res.msg);
- // }
- // },'POST');
- });
- }
- /**
- * 隐患验收
- * @param acceptedResult
- */
- function saveAccept(acceptedResult) {
- var hint = '';
- if(acceptedResult == 4){
- hint = '通过';
- }else{
- hint = '不通过';
- }
- // var datamap = {
- // "hdangerAcceptedResult":acceptedResult,
- // "desc":$("#wf_desc").val(),
- // "hdangerId":$("#hdangerId").val()
- // };
- // //console.log(JSON.stringify(datamap));
- layer.confirm('确认验收【' + hint + '】?', {
- skin: 'layui-layer-admin',
- shade: .1
- }, function (i) {
- layer.close(i);
- layer.load(2, { shade: [0.15, '#cccccc'] });
- var url = uParas.baseUrl + "/ent/hiddenWorkFlow/saveAccept";
- form.on('submit(formSubmit)', function(data) {
- //var selectVal = formSelects.value('catId', 'valStr');
- // $("#catIds").val(selectVal);
- // var url = uParas.baseUrl + "/ent/post/savePost";
- admin.req(url, data.field, function(res) {
- layer.closeAll('loading');
- if (res.code == 1) {
- //layer.msg(res.msg);
- // location.href = "./index.html";
- location.reload();
- } else {
- layer.msg(res.msg);
- }
- },'POST');
- return false;
- });
- // admin.req(url, datamap, function(res) {
- // layer.closeAll('loading');
- // if (res.code == 1) {
- // //layer.msg(res.msg);
- // location.reload();
- // } else {
- // layer.msg(res.msg);
- // }
- // },'POST');
- });
- }
- /**
- * 委托处理
- */
- function saveEntrust() {
- // var datamap = {
- // "entrustType":entrustType,
- // "hdangerEntrustGroup":$("#hdangerEntrustGroup").val(),
- // "entrustUserId":$("#entrustUserId").val(),
- // "desc":$("#wf_desc").val(),
- // "hdangerId":$("#hdangerId").val().toString()
- // };
- layer.confirm('确认委托处理?', {
- skin: 'layui-layer-admin',
- shade: .1
- }, function (i) {
- layer.close(i);
- layer.load(2, { shade: [0.15, '#cccccc'] });
- var url = uParas.baseUrl + "/ent/hiddenWorkFlow/saveEntrust";
- form.on('submit(formSubmit)', function(data) {
- //var selectVal = formSelects.value('catId', 'valStr');
- // $("#catIds").val(selectVal);
- // var url = uParas.baseUrl + "/ent/post/savePost";
- admin.req(url, data.field, function(res) {
- layer.closeAll('loading');
- if (res.code == 1) {
- //layer.msg(res.msg);
- // location.href = "./index.html";
- location.reload();
- } else {
- layer.msg(res.msg);
- }
- },'POST');
- return false;
- });
- // admin.req(url, datamap, function(res) {
- // layer.closeAll('loading');
- // if (res.code == 1) {
- // //layer.msg(res.msg);
- // location.reload();
- // } else {
- // layer.msg(res.msg);
- // }
- // },'POST');
- });
- }
- //删除附件
- function deleteFile(obj){
- var pDiv = $(obj).parent();
- pDiv.remove();
- }
-
- function goBack() {
- var url = 'ent/hiddenDanger/index.html?type=1';
- if(workFlowType == 1){
- url = 'ent/hiddenDanger/index.html?type=1';
- }else if(workFlowType == 2){
- url = 'ent/hiddenDanger/index.html?type=2';
- }else if(workFlowType == 3){
- url = 'ent/hiddenDanger/index.html?type=3';
- }
- location.href = url;
- }
- function showImg(src) {
- var imgHtml = "<img src='" + src + "' width='1000px' height='650'/>";
- layer.open({
- type: 1,
- shade: 0.1,
- offset: 'auto',
- area: [1000 + 'px',650+'px'], // area: [width + 'px',height+'px'] //原图显示
- shadeClose:true,
- scrollbar: false,
- title: "图片附件预览", //不显示标题
- content: imgHtml, //捕获的元素,注意:最好该指定的元素要存放在body最外层,否则可能被其它的相对元素所影响
- // cancel: function () {
- // layer.msg('捕获就是从页面已经存在的元素上,包裹layer的结构', { time: 5000, icon: 6 });
- // }
- });
- }
- </script>
- </body>
- </html>
|