| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236 |
- <!DOCTYPE html>
- <html lang="zh-CN">
- <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.min.css" rel="stylesheet" />
- <link rel="stylesheet" href="../css/iconfont.css" />
- <link rel="stylesheet" href="../css/Common.css?v=0619" />
- <script src="../js/zepto.js"></script>
- <script src="../Script/Common/huayi.http.js"></script>
- <script type="text/javascript">
- var usercode = helper.cookies.get("usercode");
- if(!usercode) {
- window.location.href = "../login.html";
- }
- </script>
- </head>
- <body>
- <div class="hy_loading" id="hy_loading">
- <img class="loading_img" src="../images/loading-0.gif" alt="加载中" />
- </div>
- <div class="mui-content mui-content mui-scroll-wrapper workList" id="pullrefresh">
- <div class="mui-scroll">
- <ul class="mui-table-view" id="OA_task_2">
- <li class="mui-table-view-cell">
- <div class="mui-input-row mui-search">
- <input type="search" class="mui-input-clear go_search" placeholder="请输入关键字" style="margin-bottom: 0;">
- </div>
- <div class="mui-btn mui-btn-primary turnGo">更多</div>
- </li>
- </ul>
- </div>
- </div>
- <script src="../Script/Common/huayi.config.js"></script>
- <script src="../js/mui.min.js"></script>
- <script type="text/javascript">
- // mui.alert('左滑列表项可以处理工单',' ',);
- var page = 1; //页数
- var pageSize = 10; //每页显示条目
- var total; //数据总条数
- var Type_ = 1;
- var keyw;
- var state = helper.request.queryString("state"); //手机号
- var name = helper.request.queryString("name"); //手机号
- var tel = helper.request.queryString("tel"); //受理编号
- var starttime = helper.request.queryString("starttime"); //受理编号
- var endtime = helper.request.queryString("endtime"); //受理编号
- var workid = helper.request.queryString("workid"); //受理编号
- var source = helper.request.queryString("source"); //受理编号
- var infotype = helper.request.queryString("infotype"); //受理编号
- mui.init({
- swipeBack: false,
- pullRefresh: {
- container: '#pullrefresh',
- up: {
- contentrefresh: "正在加载...", //可选,正在加载状态时,上拉加载控件上显示的标题内容
- contentnomore: '没有更多数据了', //可选,请求完毕若没有更多数据时显示的提醒内容;
- callback: pullupRefresh
- }
- }
- });
- //查找
- $('.go_search').on('input focus', function() {
- keyw = $(this).val();
- page = 1;
- Ajax();
- })
- Ajax();
- //下拉刷新
- function pullupRefresh() {
- setTimeout(function() {
- mui('#pullrefresh').pullRefresh().endPullupToRefresh((page++ >= Math.ceil(total / 10)));
- $.ajax({
- url: huayi.config.callcenter_url + 'WxLogin/GetList',
- data: {
- openid: helper.cookies.get("openid"), //微信openid
- key: keyw,
- page: page,
- state: state,
- name: name, ///联系人
- tel: tel, //联系电话
- starttime: starttime, //
- endtime: endtime, //
- workid: workid, //工单编号
- source: source, //工单来源
- infotype: infotype, //信息分类
- pagesize: pageSize
- },
- async: true,
- dataType: 'json',
- type: 'get', //HTTP请求类型
- success: function(data) {
- total = data.total;
- $(data.rows).each(function(i, n) {
- var States = n.State;
- var html = ''
- var Html = '';
- if(States < 1) {
- Html = '<div class = "mui-slider-right mui-disabled" >' +
- '<a class = "mui-btn mui-btn-grey" > 处理 </a></div >' +
- '<div class = "mui-slider-handle" >'
- html = '<h5 class="wait" style="text-align:right;"><span>待处理</span></h5>'
- } else {
- html = '<h5 class="success" style="text-align:right;"><span>已处理</span></h5>'
- }
- $('<li class="mui-table-view-cell order" data-index="' + n.ID + '">' +
- '' + Html + '' +
- '<div class = "mui-table-cell mui-col-xs-10" > ' +
- '<h4 class = "mui-ellipsis" > ' + n.Detail + ' </h4> ' +
- '<h5 > <span>联系人:' + n.Customer + '</span>' +
- '</h5>' +
- '</div >' +
- '</div> ' +
- '' + html + '' +
- '</li > ').appendTo('#OA_task_2 ');
- })
- //工单跳转
- $('.order').on('tap', function() {
- var index = $(this).attr('data-index');
- window.location.href = "Schedule.html?id=" + index;
- });
- },
- error: function(xhr, type, errorThrown) {
- //异常处理;
- }
- })
- }, 1000);
- }
- //获取数据
- function Ajax() {
- $(".order").remove();
- $.ajax({
- url: huayi.config.callcenter_url + 'WxLogin/GetList',
- data: {
- openid: helper.cookies.get("openid"), //微信openid ,
- key: keyw,
- page: page,
- state: state,
- name: name, ///联系人
- tel: tel, //联系电话
- starttime: starttime, //
- endtime: endtime, //
- workid: workid, //工单编号
- source: source, //工单来源
- infotype: infotype, //信息分类
- pagesize: pageSize
- },
- async: true,
- dataType: 'json',
- type: 'get', //HTTP请求类型
- success: function(data) {
- if(document.getElementById('hy_loading')){
- document.getElementById('hy_loading').style.opacity = 0;
- document.getElementById('hy_loading').remove();
- }
- total = data.total;
- $(data.rows).each(function(i, n) {
- var States = n.State;
- var html = ''
- var Html = '';
- if(States < 1) {
- Html = '<div class = "mui-slider-right mui-disabled" >' +
- '<a class = "mui-btn mui-btn-grey"> 处理 </a></div >' +
- '<div class = "mui-slider-handle">'
- html = '<h5 class="wait" style="text-align:right;"><span>待处理</span></h5>'
- } else {
- html = '<h5 class="success" style="text-align:right;"><span>已处理</span></h5>'
- }
- $('<li class="mui-table-view-cell order" data-index="' + n.ID + '">' +
- '' + Html + '' +
- '<div class = "mui-table-cell mui-col-xs-10" >' +
- '<h4 class = "mui-ellipsis" >' + n.Detail + ' </h4> ' +
- '<h5 > <span>联系人:' + n.Customer + '</span>' +
- '</h5>' +
- '</div>' +
- '</div> ' +
- '' + html + '' +
- '</li >').appendTo('#OA_task_2');
- })
- //工单跳转
- $('.order').on('tap', function() {
- var index = $(this).attr('data-index');
- window.location.href = "Schedule.html?id=" + index;
- });
- },
- error: function(xhr, type, errorThrown) {
- //异常处理;
- }
- })
- }
- (function($) {
- var btnArray = ['确认', '取消'];
- //第二个demo,向左拖拽后显示操作图标,释放后自动触发的业务逻辑
- $('#OA_task_2').on('slideleft', '.mui-table-view-cell', function(event) {
- var elem = this;
- var Workindex = elem.getAttribute("data-index");
- mui.confirm('确认要处理此工单?', '提示', btnArray, function(e) {
- if(e.index == 0) {
- window.location.href = "Workdeal.html?id=" + Workindex;
- } else {
- setTimeout(function() {
- $.swipeoutClose(elem);
- }, 0);
- }
- });
- });
- })(mui);
- $('.turnGo').on('tap', function() {
- window.location.href = "WorkSearch.html?Tye=" + Type_;
- });
- </script>
- </body>
- </html>
|