| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618 |
- <!doctype html>
- <html>
- <head>
- <meta charset="UTF-8">
- <title>工单详情</title>
- <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
- <meta name="apple-mobile-web-app-capable" content="yes">
- <meta name="apple-mobile-web-app-status-bar-style" content="black">
- <link href="../css/mui.css" rel="stylesheet" />
- <link href="../css/mui.picker.css" rel="stylesheet" />
- <link href="../css/mui.poppicker.css" rel="stylesheet" />
- <link href="../css/iconfont.css" rel="stylesheet" />
- <link href="css/details.css" rel="stylesheet" />
- </head>
- <body>
- <div class="mui-nav">
- <a class="mui-icon mui-icon-arrowleft return"></a>
- 工单详情
- </div>
- <div class="mui-content" style="margin-top: 44px;">
- <ul class="mui-table-view mui-table-view-ul">
- <li class="mui-table-view-cell mui-table-view-li">
- <div class="mui-input-row">
- <label class="label font-color5">工单类型:</label>
- <div class="mui-radio mui-right radio_box">
- <label class="font-color6" id="Work_classname"></label>
- </div>
- </div>
- </li>
- <li class="mui-table-view-cell mui-table-view-li ">
- <div class="mui-input-row">
- <label class="label font-color5">客户姓名:</label>
- <div class="mui-radio mui-right radio_box">
- <label class="font-color6" id="customer"></label>
- </div>
- </div>
- </li>
- <li class="mui-table-view-cell mui-table-view-li">
- <div class="mui-input-row">
- <label class="label font-color5">联系电话:</label>
- <div class="mui-radio mui-right radio_box">
- <label class="font-color6" id="customerTel"></label>
- </div>
- </div>
- </li>
- <li class="mui-table-view-cell mui-table-view-li">
- <div class="mui-input-row">
- <label class="label font-color5">项目地址:</label>
- <div class="mui-radio mui-right radio_box">
- <label class="font-color6" id="Work_areaname"></label>
- </div>
- </div>
- </li>
- <!--<li class="mui-table-view-cell mui-table-view-li">
- <div class="mui-input-row">
- <label class="label font-color5">项目地址:</label>
- <div class="mui-radio mui-right radio_box">
- <label class="font-color6" id="Work_areaname" data-index=""></label>
- </div>
- </div>
- </li>-->
- <li class="mui-table-view-cell mui-table-view-li">
- <div class="mui-input-row">
- <label class="label font-color5">楼号:</label>
- <div class="mui-radio mui-right radio_box">
- <label class="font-color6" id="order_tower"></label>
- </div>
- </div>
- </li>
- <li class="mui-table-view-cell mui-table-view-li">
- <div class="mui-input-row">
- <label class="label font-color5">房间号:</label>
- <div class="mui-radio mui-right radio_box">
- <label class="font-color6" id="Work_houseID"></label>
- </div>
- </div>
- </li>
- <!--业主信息-->
- <!--<li class="mui-table-view-cell mui-table-view-li">
- <div class="mui-input-row">
- <label class="label font-color5">业主信息:</label>
- <div class="mui-radio mui-right radio_box">
- <label class="font-color6">范冰冰 1566666666</label>
- </div>
- </div>
- </li>-->
- <li class="mui-table-view-cell mui-table-view-li">
- <div class="mui-input-row">
- <label class="label font-color5">房主关系:</label>
- <div class="mui-radio mui-right radio_box">
- <label class="font-color6" id="Work_ownerRelations"></label>
- </div>
- </div>
- </li>
- <li class="mui-table-view-cell mui-table-view-li" id="source">
- <div class="mui-input-row">
- <label class="label font-color5">投诉类型:</label>
- <div class="mui-radio mui-right radio_box">
- <label class="font-color6" id="Work_source"></label>
- </div>
- </div>
- </li>
- <li class="mui-table-view-cell mui-table-view-li Work_lastDealDiv">
- <div class="mui-input-row">
- <label class="label font-color5">已选受理人:</label>
- <div class="mui-radio mui-right radio_box">
- <label class="font-color6 Work_lastDealUser"></label>
- </div>
- </div>
- </li>
- <!--<li class="mui-table-view-cell mui-table-view-li">
- <div class="mui-input-row">
- <label class="label font-color5">接待人工号:</label>
- <div class="mui-radio mui-right radio_box">
- <label class="font-color6 Work_lastDealUser"></label>
- </div>
- </div>
- </li>-->
- <li class="mui-table-view-cell mui-table-view-li">
- <div class="mui-input-row">
- <label class="label font-color5">工单编号:</label>
- <div class="mui-radio mui-right radio_box">
- <label class="font-color6" id="Work_workOrderID"></label>
- </div>
- </div>
- </li>
- <!--<li class="mui-table-view-cell mui-table-view-cell-pmargin ">
- <p><span class="font-color4">补充描述:</span>预约时间改为下午六点。现在不方便</p>
- </li>-->
- <li class="mui-table-view-cell mui-table-view-cell-pmargin">
- <p id="Work_detail"></p>
- </li>
- <li class="mui-table-view-cell mui-table-view-cell-pmargin" id="Work_comment">
-
- </li>
- </ul>
- <ul class="mui-table-view mui-grid-view">
- <h4 class="mui-ellipsis size-16 mui_btn1_tit">操作按钮:</h4>
- <!--待处理-->
- <div class="mui_btn1 dispose1">
- <li class=" mui-media mui-col-xs-3">
- <button type="button" data-loading-text="提交中" class="mui-btn mui-btn-primary mui-btn-block reminder">催单</button>
- </li>
- </div>
- <!--已完成-->
- <div class="mui_btn1 dispose2">
- <li class=" mui-media mui-col-xs-3">
- <button type="button" data-loading-text="提交中" class="mui-btn mui-btn-primary mui-btn-block comment">评论</button>
- </li>
- </div>
- </ul>
- <div id="slider" class="mui-slider">
- <div id="sliderSegmentedControl" class="mui-slider-indicator mui-segmented-control mui-segmented-control-inverted">
- <a class="mui-control-item mui-active" href="#item1mobile" data-index="1">
- 工单跟踪
- </a>
- <a class="mui-control-item" href="#item2mobile" data-index="2">
- 催单记录
- </a>
- <a class="mui-control-item" href="#item3mobile" data-index="2">
- 评论记录
- </a>
- </div>
- <div class="mui-slider-group">
- <div id="item1mobile" class="mui-slider-item mui-control-content mui-active">
- <ul class="mui-table-view folowlist" id="folow"></ul>
- </div>
- <div id="item2mobile" class="mui-slider-item mui-control-content">
- <ul class="mui-table-view" id="remind"></ul>
- </div>
- <div id="item3mobile" class="mui-slider-item mui-control-content">
- <ul class="mui-table-view" id="commentlist"></ul>
- </div>
-
- </div>
- </div>
- </div>
- <div class="WordID" style="display: none;"></div>
- <!--弹框1-->
- <div class="pop_up_bj"></div>
- <div class="pop_up_div1">
- <div class="tit">请输入评论内容</div>
- <div class="contain">
- <textarea name="" rows="" cols="" class="evaluate_con"></textarea>
- </div>
- <div class="btn">
- <button type="button" data-loading-text="提交中" class="mui-btn mui-btn-royal fl">取消</button>
- <button type="button" data-loading-text="提交中" class="mui-btn mui-btn-primary fr evaluate">确定</button>
- </div>
- </div>
- <!--弹框2-->
- <div class="pop_up_div2">
- <div class="tit">请输入催单内容</div>
- <div class="contain">
- <textarea class="textcont reminder_con" ></textarea>
- </div>
- <div class="btn">
- <button type="button" data-loading-text="提交中" class="mui-btn mui-btn-royal fl">取消</button>
- <button type="button" data-loading-text="提交中" class="mui-btn mui-btn-primary fr">确定</button>
- </div>
- </div>
-
-
- <script src="../js/jquery.min.js"></script>
- <script src="js/details.js"></script>
- <script src="../Script/Common/huayi.config.js"></script>
- <script src="../Script/Common/huayi.http.js"></script>
- <script src="../js/mui.min.js?"></script>
- <script src="../js/mui.picker.js"></script>
- <script src="../js/mui.poppicker.js"></script>
- <script src="js/city.data-3.js"></script>
- <script>
- var id = helper.request.queryString("id");
- var itype = helper.request.queryString("itype");
- var openid = helper.cookies.get("openid");
- // var itype = helper.cookies.get("itype");
- // alert(itype);
- //console.log(id);
- Ajax();
- flow();
- Remind();
- Comment()
- //获取数据
- function Ajax() {
- $.ajax({
- url: huayi.config.callcenter_url + '/WxLogin/GetWorkOrder',
- data: {
- workorderid: id, //工单编号
- openid: openid, //微信openid,
- //openid: 'oXF5e1mWpX5DajW5_yjNLPKb8ThE', //微信openid ,
- },
- async: true,
- dataType: 'json',
- type: 'get', //HTTP请求类型
- success: function(data) {
- if(data.state.toLowerCase() == "success") {
- var result = data.data.data[0]
- // alert(result.Detail);
- if(result.State == 2) {
- $(".dispose2").show();
- } else {
- $(".dispose1").show();
- }
- if (result.GDLXName=="咨询") {
- $(".Work_lastDealDiv").hide(); //受理人
- $("#source").hide(); //投诉
- } else{
- $(".Work_lastDealDiv").show(); //受理人
- $("#source").hide(); //投诉
- }
- var builName
- if (result.buildingname==null) {
- builName=""
- } else{
- builName=result.buildingname
- }
- var proName
- if (result.proname==null) {
- proName=""
- } else{
- proName=result.proname
- }
- var complain
- if (result.ComplaintDepartment==null) {
- complain=""
- } else{
- complain=result.ComplaintDepartment
- }
- $(".WordID").text(result.ID);
- //alert(JSON.stringify(result.TypeClassName));
- $("#Work_classname").text(result.GDLXName); //工单类型
- $("#customer").text(result.Customer); //客户姓名
- $("#customerTel").text(result.CustomerTel); //联系电话
- $("#Work_areaname").text(result.areaname + proName + builName); //项目地址 proname buildingname
- $("#order_tower").text(result.BuildingNum); //楼号
- $("#order_unit").text(result.UnitNum); //单元号
- $("#Work_houseID").text(result.Address); //房间号
- $("#Work_ownerRelations").text(result.OwnerrelationsName); //房主关系
- $("#Work_source").text(complain); //投诉类型
- $(".Work_lastDealUser").text(result.AuditUser); //受理人
- // $(".Work_lastDealUser").text(result.LastDealUser); //接待人工号
- $("#Work_workOrderID").text(result.WorkOrderID); //工单编号
- $("#Work_detail").text("详情描述:" + result.Detail); //描述详情
- }
- },
- error: function(xhr, type, errorThrown) {
- //异常处理;
- }
- })
- }
- //跳转页面
- //修改
- $('.edit').on('tap', function() {
- window.location.href = "editWorkolder.html?id=" + id+'&itype='+itype;
- });
- // 返回列表
- $('.return').on('tap', function() {
- window.location.href = "client_index.html?Itype=" + itype;
- });
- //工单跟踪
- function flow() {
- $.ajax({
- url: huayi.config.callcenter_url + '/WxLogin/GetItemList',
- data: {
- workorderid: id, //工单编号
- type: 1,
- openid: openid, //微信openid,
- },
- async: true,
- dataType: 'json',
- type: 'get', //HTTP请求类型
- success: function(data) {
- if(data.state.toLowerCase() == "success") {
- //alert(JSON.stringify(data.rows[0].CreateTime));
- if(data.rows && data.rows.length > 0) {
- $(data.rows).each(function(i, n) {
- var str = '';
- if(n.IsLast == 0 && !n.DealTime && !n.SureUserName && !n.ToDeptName){
- str = str + n.CreateUserName + " 创建了工单。" + "<br>";
- }
- if(n.IsLast == 1) {
- str = str + n.CreateUserName + " 完结工单。";
- }
- if(n.DealTime) {
- str = str + n.CreateUserName + " 处理工单。";
- }
- if(n.SureUserName) {
- str = str + n.SureUserName + " 接单。";
- }
- if(n.ToDeptName) {
- if(n.State != 6){
- str = str + n.CreateUserName + " 指派工单给 " + n.ToDeptName + ":";
- if(n.ToUserName) {
- str = str + n.ToUserName;
- }
- }
- if(n.State === 6){
- str = str + n.ToDeptName + ":" + n.ToUserName + " 将工单退回给 " + n.CreateUserName;
- }
- str = str + "<br>";
- }
- var spandeta;
- if (n.Detail==null) {
- spandeta=""
- } else if (n.Detail==""){
- // alert("sss")
- spandeta=""
- }else if(n.IsLast == 1){
- spandeta="完结内容:"+n.Detail
- }else if(n.SureUserName) {
- spandeta="接单内容:"+n.Detail
- } else if(n.DealTime){
- spandeta="处理内容:"+n.Detail
- }else if(n.ToDeptName){
- spandeta="转派内容:"+n.Detail
- }
- //else if(row.IsStart) {str = str + row.CreateUserName + " 重新开启工单";}
- $('<li class="mui-table-view-cell mui-table-view-cell-line mui-tail-contail mui-table-view-li"><div class="mui-input-row mui-tail font-color4"><span>' + n.CreateTime +
- '</span></br><span>' + str +
- '</span></br><span>'+spandeta+
- '</span></div><div class="string"></div><div class="circular_h"></div></li>').appendTo('#folow');
- });
- var num = data.rows.length - 1;
- $("#folow li:eq(0)").children(".string").css("top", "20px");
- $("#folow li:eq(" + num + ")").children(".string").css("height", "5px");
- $("#folow li:eq(0)").children(".string").css("top", "20px");
- $("#folow li:eq(0)").children(".circular_h").css({
- "background": "#2cc6a7",
- "left": "15px",
- "top": "20px",
- "width": "12px",
- "height": "12px",
- "border-radius": "6px"
- });
- $("#folow li:eq(" + num + ")").children(".circular_h").css({
- "left": "15px",
- "width": "12px",
- "height": "12px",
- "border-radius": "6px"
- });
- }
- }
- },
- error: function(xhr, type, errorThrown) {
- //异常处理;
- }
- })
- }
- //催单记录
- function Remind() {
- $.ajax({
- url: huayi.config.callcenter_url + '/WxLogin/GetItemList',
- data: {
- workorderid: id, //工单编号
- type: 2,
- openid: openid, //微信openid,
- },
- async: true,
- dataType: 'json',
- type: 'get', //HTTP请求类型
- success: function(data) {
- if(data.state.toLowerCase() == "success") {
- if(data.rows && data.rows.length > 0) {
- $(data.rows).each(function(i, n) {
- var spandeta;
- if (n.Detail==null) {
- spandeta=""
- } else if (n.Detail==""){
- spandeta=""
- }else{
- spandeta="催办内容:"+n.Detail
- }
- var depart;
- if(n.ToDeptName==null){
- depart=""
- }else{
- depart=n.ToDeptName
- }
- var deperson;
- if(n.ToUserName==null){
- deperson=""
- }else{
- deperson=n.ToUserName
- }
- $('<li class="mui-table-view-cell mui-table-view-cell-line mui-tail-contail mui-table-view-li"><div class="mui-input-row mui-tail font-color4"><span>' + n.CreateTime +
- // '</span></br><span>被催办部门:'+depart+
- // '</span></br><span>被催办人:'+deperson+
- '</span></br><span>催办人:' + n.CreateUserName +
- '</span></br><span>'+spandeta+
- '</span></div><div class="string"></div><div class="circular_h"></div></li>').appendTo('#remind');
- });
- var num = data.rows.length - 1;
- $("#remind li:eq(0)").children(".string").css("top", "20px");
- $("#remind li:eq(" + num + ")").children(".string").css("height", "5px");
- $("#remind li:eq(0)").children(".string").css("top", "20px");
- $("#remind li:eq(0)").children(".circular_h").css({
- "background": "#2cc6a7",
- "left": "15px",
- "top": "20px",
- "width": "12px",
- "height": "12px",
- "border-radius": "6px"
- });
- $("#remind li:eq(" + num + ")").children(".circular_h").css({
- "left": "15px",
- "width": "12px",
- "height": "12px",
- "border-radius": "6px"
- });
- }
- }
- },
- error: function(xhr, type, errorThrown) {
- //异常处理;
- }
- })
- }
- //评论记录
- function Comment() {
- $.ajax({
- url: huayi.config.callcenter_url + '/WxLogin/GetItemList',
- data: {
- workorderid: id, //工单编号
- type: 3,
- openid: openid, //微信openid,
- },
- async: true,
- dataType: 'json',
- type: 'get', //HTTP请求类型
- success: function(data) {
- if(data.state.toLowerCase() == "success") {
- if(data.rows && data.rows.length > 0) {
- $(data.rows).each(function(i, n) {
- if (n.Detail==null) {
- spandeta=""
- } else if (n.Detail==""){
- // alert("sss")
- spandeta=""
- }else{
- spandeta="评论内容:"+n.Detail
- }
- $('<li class="mui-table-view-cell mui-table-view-cell-line mui-tail-contail mui-table-view-li"><div class="mui-input-row mui-tail font-color4"><span>' + n.CreateTime +
- '</span></br><span>'+spandeta+
- '</span><span class="span3">' + n.CreateUserName +
- '</span></div><div class="string"></div><div class="circular_h"></div></li>').appendTo('#commentlist');
- });
- var num = data.rows.length - 1;
- $("#commentlist li:eq(0)").children(".string").css("top", "20px");
- $("#commentlist li:eq(" + num + ")").children(".string").css("height", "5px");
- $("#commentlist li:eq(0)").children(".string").css("top", "20px");
- $("#commentlist li:eq(0)").children(".circular_h").css({
- "background": "#2cc6a7",
- "left": "15px",
- "top": "20px",
- "width": "12px",
- "height": "12px",
- "border-radius": "6px"
- });
- $("#commentlist li:eq(" + num + ")").children(".circular_h").css({
- "left": "15px",
- "width": "12px",
- "height": "12px",
- "border-radius": "6px"
- });
- }
- }
- },
- error: function(xhr, type, errorThrown) {
- //异常处理;
- }
- })
- }
- //转派
- //转派弹框
- $(".redeploy").click(function() {
- window.location.href = "redeploy.html?id=" + id+'&itype='+itype;
-
- })
- //评论工单
- $(".comment").click(function(){
- $(".pop_up_bj").fadeIn();
- $(".pop_up_div1").fadeIn();
- })
- $(".pop_up_bj" ).click(function(){
- $(".pop_up_bj").hide();
- $(".pop_up_div1").hide();
- })
- $(".pop_up_div1 .btn .fl" ).click(function(){
- $(".pop_up_bj").hide();
- $(".pop_up_div1").hide();
- })
- $(".pop_up_div1 .btn .fr" ).click(function(){
- $(".pop_up_bj").hide();
- $(".pop_up_div1").hide();
- })
- $(".evaluate").click(function(){
- if(!$(".evaluate_con").val()) {
- mui.alert("请输入评论内容");
- }else{
- $(".pop_up_bj").hide();
- $(".pop_up_div3").hide();
- $.ajax({
- type: "post",
- dataType: 'json',
- url: huayi.config.callcenter_url + '/WxLogin/CommentWorkOrder',
- async: true,
- data: {
- orderid: id, //否 strubg 工单编号
- cont: $(".evaluate_con").val(), //否 int 处理内容
- openid: openid, //微信openid,
- },
- success: function(data) {
- if(data.state == "success") {
- debugger
- mui.toast('评论成功');
- window.location.href = "details.html?id=" + id+'&itype='+itype;
- } else {
- mui.toast(data.message);
- }
- }
- });
- }
- })
- //催单
- $(".reminder").click(function(){
- $(".pop_up_bj").fadeIn();
- $(".pop_up_div2").fadeIn();
- })
- $(".pop_up_bj" ).click(function(){
- $(".pop_up_bj").hide();
- $(".pop_up_div2").hide();
- })
- $(".pop_up_div2 .btn .fl" ).click(function(){
- $(".pop_up_bj").hide();
- $(".pop_up_div2").hide();
- })
- $(".pop_up_div2 .btn .fr" ).click(function(){
- // $("#cont").text("");
- $(".pop_up_bj").hide();
- $(".pop_up_div2").hide();
- if($(".textcont").val()=="") {
- mui.alert("请输入催单内容");
- }else{
- $(".pop_up_bj").hide();
- $(".pop_up_div3").hide();
- $.ajax({
- type: "post",
- dataType: 'json',
- url: huayi.config.callcenter_url + '/WxLogin/RemindWorkOrder',
- async: true,
- data: {
- orderid: id, //否 strubg 工单编号
- cont: $(".reminder_con").val(), //否 int 处理内容
- openid: openid, //微信openid,
- //openid: 'oXF5e1mWpX5DajW5_yjNLPKb8ThE', //微信openid 测试用
- },
- success: function(data) {
- if(data.state == "success") {
- debugger
- mui.toast('催单成功');
- window.location.reload();
- } else {
- mui.toast(data.message);
- }
- }
- });
- }
-
- })
- </script>
- </body>
- </html>
|