| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="UTF-8">
- <script src="../Script/Common/huayi.load.js"></script>
- <script src="../Script/Common/huayi.config.js"></script>
- <link href="../css/layer/need/layer.css" />
- <link rel="stylesheet" href="../css/init.css" />
- <title>办理工单</title>
- <style>
- .input {
- background-color: #FFF;
- background-image: none;
- border: 1px solid #ccc;
- border-radius: 1px;
- color: inherit;
- padding: 6px 12px
- }
- .fjnr {
- padding: 0 !important;
- border: none !important;
- }
- .Common table th {
- width: 10%;
- }
- </style>
- </head>
- <body>
- <div class="Common">
- <!--审核信息-->
- <div class="complain DCL ">
- <div style="width: 100%;padding: 10px;">
- <table class="Table" border="" cellspacing="0" cellpadding="0">
- <theard>
- <tr>
- <td class="text-center" style="min-width:100px;">次数</td>
- <td class="text-center" style="min-width:100px;">申请时间</td>
- <td class="text-center" style="min-width:100px;">申请原因</td>
- <td class="text-center" style="min-width:100px;">状态</td>
- <td class="text-center" style="min-width:100px;">审核时间</td>
- <td class="text-center" style="min-width:80px;">审核意见</td>
- </tr>
- </theard>
- <tbody class="YTHHS">
- </tbody>
- </table>
- </div>
- </div>
- <table>
- <tr>
- <th class="Importent">审核结果:</th>
- <td id="isProResultRadio" style="font-size: 12px">
- <label style="margin-right: 10px">
- <input type="radio" value="1" name="isDisposeResult" style="vertical-align: -2px;" />同意
- </label>
- <label>
- <input type="radio" value="2" name="isDisposeResult" style="vertical-align: -2px;" />拒绝
- </label>
- </td>
- </tr>
- <tr class="refuse_reason" style="height: 100px;">
- <th>拒绝理由:</th>
- <td colspan="5">
- <textarea data-adaptheight id="prosituation" name="" rows="6" cols="" ></textarea>
- </td>
- </tr>
- </table>
- <div class="btn_box">
- <button class="btns submit">保存</button>
- </div>
- </div>
- <input type="hidden" name="" id="perid" value="" />
- <script src="../css/laydate/laydate.js"></script>
- <script src="../js/adjustHeight.js"></script>
- <script>
- var wid = helper.request.queryString("wid");
- $(document).ready(function () {
- audit_information();//获取审核信息
- $('.submit').click(function () {
- submit();
- })
- $(".refuse_reason").hide(); //拒绝理由
-
- /*
- * 审核结果
- * 同意 1
- * 拒绝2
- */
- $('#isProResultRadio').find('input[type="radio"]').on('change', function() {
- isProResultJudge($(this).val())
- });
- });
- //保存
- function submit() {
- if(!$('#isProResultRadio input[name="isDisposeResult"]:checked').val()){
- layer.msg('请选择审核结果');
- return false;
- }
- if($('#isProResultRadio input[name="isDisposeResult"]:checked').val()==2 && !$('#prosituation').val()){
- layer.msg('请填写拒绝理由');
- return false;
- }
- $.post(huayi.config.callcenter_url + 'WorkOrder/DefinitionWorkOrder', {
- workorderid: wid,
- state: $('#isProResultRadio input[name="isDisposeResult"]:checked').val(), //审核结果
- reason: $("#prosituation").val(), //拒绝理由
- perid:$('#perid').val(),//履职界定id
- token: $.cookie("token")
- }, function (result) {
- result = JSON.parse(result);
- if (result.state.toLowerCase() == "success") {
- var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
- parent.layer.close(index); //再执行关闭
- parent.$('#orderlist').bootstrapTable('refresh');
- parent.layer.msg("保存成功");
- }
- })
- }
- // 拒绝理由
- function isProResultJudge (isProResultdata) {
- if(isProResultdata === '1') {
- $(".refuse_reason").hide(); //拒绝理由
- } else if (isProResultdata === '2') {
- $(".refuse_reason").show(); //拒绝理由
- }
- }
- //获取审核信息
- function audit_information(){
- $.ajax({
- type:"get",
- url:huayi.config.callcenter_url + 'WorkOrder/GetAuditInfo',
- async:true,
- data:{
- workorderid:wid,
- type:3,
- "token": $.cookie("token")
- },
- success:function(result){
- //审核信息
- var Ths = '';
- $(".YTHHS").empty();
- $($.parseJSON(result).data).each(function(i, n) {
- var a = '未审核';
- var AuditTime;
- var AuditReason;
- if(n.F_IsAudit == '1') {
- a = '同意';
- }
- if(n.F_IsAudit == '2') {
- a = '拒绝';
- }
- if(n.F_AuditTime == null) {
- AuditTime="";
- }else{
- AuditTime=n.F_AuditTime
- }
- if(n.F_AuditReason == null) {
- AuditReason = '';
- }else{
- AuditReason=n.F_AuditReason
- }
- $('#perid').val(n.F_Id);//履职界定id
- Ths += '<tr>' +
- '<td class="text-center">' + (i + 1) + '</td>' +
- '<td class="text-center">' + n.F_CreateTime + '</td>' +
- '<td class="text-center">' + n.F_Result + '</td>' +
- '<td class="text-center">' + a + '</td>' +
- '<td class="text-center">' + AuditTime + '</td>' +
- '<td class="text-center">' + AuditReason + '</td>' +
- '</tr>';
- })
- $(Ths).appendTo($(".YTHHS"));
- }
- });
- }
- </script>
- </body>
- </html>
|