/** * 工单处理 * */ var buttontype = ''; $(document).ready(function() { var deptId = ''; var ID = helper.request.queryString("str"); laydate.render({ elem: '#t_inqtime', theme: '#00479D', calendar: 'true', }); getDepartList($('#t_county')); //营业部 getDepartList($('#clbmname')); //部门 autosize($('textarea')); $('#t_investigator').val($.cookie("u_code")); //给调查员默认值;当前用户的账号 helper.getDropList.getlistDropByDic($('#xl_boxs'), 'ZBDW'); //获取交办单位下拉 helper.getDropList.getlistDropByDic($('#xl_box'), 'WTFL') .then(function() { if (ID) { getWorkOrderInfo(ID); //获取工单信息 } }); //信息分类 // helper.getDropList.getlistDropByDic($('#t_county'), 'JBDW') // .then(function() { // if(ID) { // getWorkOrderInfo(ID); //获取工单信息 // } // }); //点击确定 $("#clgd").click(function() { buttontype = '' dealWorkOrder(ID); }); //点击保存 $("#bcgd").click(function() { buttontype = 1 dealWorkOrder(ID); }); }) //点击显示外呼 $('.callout').click(function() { // if($("#top-search li",window.parent.document).find('i',window.parent.document).hasClass('active')){ if ($(".WH", window.parent.parent.document).hasClass("fadeOutUp")) { $(".WH", window.parent.parent.document).removeClass("fadeOutUp").addClass("fadeInDown"); } $('.WH', window.parent.parent.document).removeClass('hidens') $('.first', window.parent.parent.document).removeClass('first'); $('.WH', window.parent.parent.document).addClass('first'); $("#Result", window.parent.parent.document).val($('#cl_khdh').text()); window.parent.parent.loadWH(); // } }) //获取工单信息 function getWorkOrderInfo(oid) { $.ajax({ type: "get", url: huayi.config.callcenter_url + "WorkOrder/GetWorkOrder", async: true, dataType: 'json', data: { orderid: oid, token: $.cookie("token") }, success: function(data) { /*验证请求*/ if (data.state == "success") { var con = data; var Str = con.data.data; $('#cl_gdbh').text(Str[0].WorkOrderID); //工单编号 //$("#cl_gdlx").text(getTypeName(Str[0].Type)); //工单类型 $("#cl_khxm").val(Str[0].Customer); //姓名 $("#cl_khdh").text(Str[0].CustomerTel); //电话 $("#t_county").val(Str[0].County); //营业部 $("#t_address").val(Str[0].Address); //地址 $("#t_inqtime").val(Str[0].Inqtime && Str[0].Inqtime.split(' ')[0]); //调查时间 $("#t_inquser").val(Str[0].Inquser); //调查员 $("#t_detail").val(Str[0].Detail); //string 是 反映问题 $("#t_answer").val(Str[0].Answer); //string 否 回访反馈情况 $("#t_remarks").val(Str[0].Remark); //string 否 备注 $('#xl_box').val(Str[0].InfoTypeID); //问题分类 $(".xl_boxs").val(Str[0].Unit); //交办单位 $('#clbmname').val(Str[0].UnitID); //部门 $("#cont").val(Str[0].clcontent); deptId = Str[0].UnitID if (deptId) { getUserListByDepartment($('#clidname'), deptId, con.data.item[0].ToUser) } if (Str[0].InfoType) { getInfotypedetail($('#xq_rdwt'), Str[0].InfoType, Str[0].InfoTypeDetailID) } // $("#clidname").val(Str[0].CreateUser); //处理人 //$("#xl_box").val(Str[0].UnitID); //交办单位 //$('.Message_box').find('input[value="' + Str[0].InfoTypeID + '"]').attr('checked', true); //信息分类 var Files = data.data.data[0].File; console.log(data); $("#IMG_box").empty(); if (Files && Files.length > 0) { $(Files).each(function(i, n) { var fileType = n.F_FileType; var fileType1 = n.F_FileType.split("\/")[0]; if (fileType === '.jpg' || fileType === '.png' || fileType1 === 'image') { $('
无法预览