| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268 |
- <!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.min.css" rel="stylesheet" />
- <link rel="stylesheet" href="../css/iconfont.css" />
- <!-- <link rel="stylesheet" href="../css/inits.css" />-->
- <style>
- .mui-bar-popover {
- width: 30%;
- }
-
- .mui-popover.mui-bar-popover .mui-table-view {
- width: 100%;
- }
-
- .san {
- font-size: 14px;
- margin-right: 5px
- }
-
- .nav_a {
- border-right: 1px solid #ccc;
- }
-
- .time {
- text-align: right;
- }
-
- .mui-table-view .mui-media-object {
- /* line-height: 71px; */
- max-width: 80px;
- height: 80px;
- }
-
- input[type=search] {
- border: 1px solid #ccc;
- border-radius: 18px;
- background-color: rgb(255, 255, 255);
- }
-
- .Success {
- color: #4cd964;
- }
-
- .Finish {
- color: #ccc;
- }
-
- .mui-search.mui-active:before {
- font-size: 20px;
- right: auto;
- left: 5px;
- display: block;
- margin-right: 0;
- top: 25px;
- }
- .mui-icon-clear{
- right: 80px!important;
- }
- .mui-search{
- margin-right: 55px;
- }
- .success{
- color: #ccc;
- }
- .wait{
- color: #2AC845;
- }
- </style>
- </head>
- <body>
- <div class="mui-content mui-content mui-scroll-wrapper" 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="../js/zepto.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 type="text/javascript">
- var page = 1; //页数
- var pageSize = 10; //每页显示条目
- var total; //数据总条数
- 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;
- console.log();
- Ajax(keyw);
- })
- Ajax();
- // 下拉刷新
- function pullupRefresh(keyw) {
- 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
- openid: "oKOqcv31fh76rtNmJDjKc39oIsfA",
- key: keyw,
- page: page,
- state:state,
- name:name, ///联系人
- tel:tel,//联系电话
- 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;
- console.log(States);
- var html=''
- var Html = '';
- if(States < 2) {
- html='<div class="mui-table-cell mui-col-xs-2 mui-text-right">' +
- ' <span class="mui-h5 wait">待处理</span>' +
- ' </div>'
- }else{
- html='<h5 class="success" style="text-align:right;"><span>已完成</span></h5>'
- }
- $('<li class="mui-table-view-cell order" data-index="' + n.ID + '">' +
- ' <div class="mui-table">'+
- '<div class = "mui-table-cell mui-col-xs-10" > ' +
- '<h4 class = "mui-ellipsis" > ' + n.Detail + ' </h4> ' +
- '<h5 > <span>联系人:' + n.Customer + '</span>' +
- '</h5>' +
- '</div >' +
- ''+html+''+
- '</div> ' +
- '</div> ' +
- '</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(keyw) {
- $(".order").remove();
- $.ajax({
- url: huayi.config.callcenter_url + 'WxLogin/GetList',
- data: {
- // openid: helper.cookies.get("openid"), //微信openid ,
- openid: "oKOqcv31fh76rtNmJDjKc39oIsfA",
- key: keyw,
- page: page,
- state:state,
- name:name, ///联系人
- tel:tel,//联系电话
- 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;
- console.log(States);
- var html=''
- var Html = '';
- if(States < 2) {
- html='<div class="mui-table-cell mui-col-xs-2 mui-text-right">' +
- ' <span class="mui-h5 wait">待处理</span>' +
- ' </div>'
- }else{
- html='<h5 class="success" style="text-align:right;"><span>已完成</span></h5>'
- }
- $('<li class="mui-table-view-cell order" data-index="' + n.ID + '">' +
- ' <div class="mui-table">'+
- '<div class = "mui-table-cell mui-col-xs-10" > ' +
- '<h4 class = "mui-ellipsis" > ' + n.Detail + ' </h4> ' +
- '<h5 > <span>联系人:' + n.Customer + '</span>' +
- '</h5>' +
- '</div >' +
- ''+html+''+
- '</div> ' +
- '</div> ' +
- '</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) {
- //异常处理;
- }
- })
- }
- $('.turnGo').on('tap',function(){
-
- window.location.href = "WorkSearch.html?";
-
- })
- </script>
- </body>
- </html>
|