123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206 |
- {extend name="common/common2" /}
- {block name="main"}
- <div class="ibox">
- <div class="ibox-content">
- <div class="row">
- <div class="col-xs-1">
- {if $mode!=15 && in_array($mode,$auths)}
- <a href="javascript:;" url="{:url('dispatchAdd',[],'')}/mode/{$mode}" data-title="创建{$m_name}订单" onclick="layer_open(this,1)" class="btn btn-sm btn-primary">创建{$m_name}订单</a>
- {/if}
-
- </div>
- <div class="col-xs-11" style="text-align: right;">
- <form class="form-inline" id="form-search" action="{:url('index')}?mode={$mode}">
- <div class="input-group">
- <input type="text" class="form-control" name="sn" placeholder="订单编号">
- </div>
- <div class="input-group">
- <input type="text" class="form-control" name="content" placeholder="内容">
- </div>
- <div class="input-group">
- <input class="form-control" id="start" readonly placeholder="开始时间" name="start" >
- </div>
- <div class="input-group">
- <input class="form-control" id="end" readonly placeholder="结束时间" name="end" >
- </div>
- <div class="input-group">
- <select name="dep_id" class="form-control">
- <option value="">所在科室/部门</option>
- {foreach $dep_list as $k=>$v}
- <option value="{$v['id']}">{$v['title']}</option>
- {/foreach}
- </select>
- </div>
- <div class="input-group">
- <select name="type" class="form-control">
- <option value="">选择类型</option>
- {foreach $order_type_list as $k=>$v}
- <option value="{$v['id']}">{$v['title']}</option>
- {/foreach}
- </select>
- </div>
- <div class="input-group">
- <select name="order_mode" class="form-control">
- <option value="">选择状态</option>
- {foreach $order_mode_list as $k=>$v}
- <option value="{$v['id']}">{$v['in_content']}</option>
- {/foreach}
- <option value="100">已挂起</option>
- </select>
- </div>
- <br/>
- <br/>
- <div class="input-group">
- <select name="from" class="form-control">
- <option value="">来源</option>
- <option value="1">一键呼叫</option>
- <option value="4">报修</option>
- <option value="5">保洁</option>
- <option value="6">运送</option>
- <option value="7">安保</option>
- <option value="2">隐患</option>
- <option value="3">投诉</option>
- </select>
- </div>
- <!-- <div class="input-group">-->
- <!-- <select name="dep_cate" class="form-control">-->
- <!-- <option value="">部门分类</option>-->
- <!-- {foreach $dep_cate as $k=>$v}-->
- <!-- <option value="{$v['id']}">{$v['title']}</option>-->
- <!-- {/foreach}-->
- <!-- </select>-->
- <!-- </div>-->
- <div class="input-group">
- <span class="input-group-btn">
- <button class="btn-sm btn-primary" type="button" id ="search-btn" ><i class="fa fa-search"></i></button>
- </span>
- <span class="input-group-btn">
- <button class="btn-sm btn-warning" type="button" id="search-clear"><i class="fa fa-undo"></i></button>
- </span>
-
- <span class="input-group-btn">
- <button data-url="{:url('export',[],'')}/mode/{$mode}" title="导出" class="btn-sm btn-primary" onclick="excel_download(this)" type="button" ><i class="fa fa-cloud-download"></i></button>
- </span>
- </div>
- </form>
- </div>
- </div>
- </div>
- <div class="ibox-content">
- <div class="jqGrid_wrapper">
- <table id="table" style="border-collapse: collapse"></table>
- <div id="pager"></div>
- </div>
- </div>
- </div>
- {/block}
- {block name="script"}
- <script src="/static/layDate-v5.0.9/laydate.js"></script>
- <script>
- //导出
- function excel_download(_self){
- var url = $(_self).attr('data-url');
- var param = $('#form-search').serialize();
- window.location.href = url+'?'+param;
- }
- $(function () {
- laydate.render({
- elem: '#start',
- trigger: 'click' ,
- theme: '#284a94'
- });
- laydate.render({
- elem: '#end',
- trigger: 'click' ,
- theme: '#284a94'
- });
- $(window).bind("resize",function(){
- var width=$(".jqGrid_wrapper").width();
- $("#table").setGridWidth(width);
- });
- $.jgrid.defaults.styleUI="Bootstrap";
- $("#table").jqGrid({
- url:"{:url('index')}?mode={$mode}",
- datatype: "json",
- colModel:[
- {label:'编号',name:'sn',index:'sn', width:80,sortable: false},
- {label:'申请时间',name:'create_time',index:'create_time',width:50,sortable: true},
- {label:'内容',name:'content',index:'content',width:60,sortable: true},
- {label:'所在科室/部门',name:'dep',index:'dep',width:60,sortable: true},
- // {label:'部门分类',name:'dep_cate_name',index:'dep_cate_name',width:60,sortable: true},
- {label:'报修类型',name:'order_type',index:'order_type',width:60,sortable: true},
- {label:'优先级',name:'repair_priority',index:'repair_priority',width:60,editable: false,sortable: false,formatter: function (a, b, c) {
- if(a=='紧急'){
- return "<span class='label' style='color: red'>"+a+"</span></span><img src='/admin/img/jj.png' style='width: 20px !important;height: 20px !important;' alt=''>";
- }else {
- return a;
- }
- }},
- {label:'来源',name:'source_type_text',index:'source_type_text',width:60,sortable: true},
- {label:'联系方式',name:'mobile',index:'mobile',width:60,sortable: true},
- {label:'状态',name:'order_mode_text',index:'order_mode_text',width:60,sortable: true,formatter:function (a, b, c) {
- if(c.bh_nums >0){
- return '<span style="color: '+c.order_mode_color+'">'+a+"(存在驳回)"+'</span>'
- }else{
- if(c.gq){
- return '<span style="color: '+c.order_mode_color+'">'+a+"(存在挂起)"+'</span>'
- }else {
- return '<span style="color: '+c.order_mode_color+'">'+a+'</span>'
- }
- }
- }},
- {label:'操作',width:120,sortable: false,formatter: function (a, b, c) {
- var detail_url = "{:url('detail2',[],'')}/id/"+c.id;
- var del_url = "{:url('del',[],'')}/id/"+c.id;
- var reject_url = "{:url('rejectTodoList',[],'')}/orderId/"+c.id;
- var print = "{:url('print1',[],'')}/id/"+c.id;
- var setType = "{:url('setType',[],'')}/id/"+c.id;
- //var btn = '<a href="'+detail_url+'" ><span class="label label-primary" title="详情">详情</span></a> ';
- var btn = '<a url="'+detail_url+'" href="javascript:;" data-title="详情" onclick="layer_open(this,1)"><span class="label label-primary" title="详情">详情</span></a> ';
- btn+= '<a url="'+print+'" href="javascript:;" data-title="打印" onclick="layer_open(this,1)"><span class="label label-primary" title="打印">打印</span></a> ';
- if(c.order_mode == 4 && c.bh_nums >0){
- btn += '<a url="'+reject_url+'" href="javascript:;" onclick="layer_open(this,1)" ><span class="label label-success" data-title="驳回工单">驳回工单</span></a> ';
- }
- // if(c.order_mode == 5 ||c.order_mode == 6){
- // btn += '<a {if !btnAuth(session("user_auth.id"),"Orders/del?mode=$mode")} style="display:none" {/if} href="'+del_url+'" class="confirm ajax-get" data-confirm="确定要删除吗?" data-table="1"><span class="label label-danger" title="删除">删除</span></a> ';
- // }
- btn += '<a {if !btnAuth(session("user_auth.id"),"Orders/del?mode=$mode")} style="display:none" {/if} href="'+del_url+'" class="confirm ajax-get" data-confirm="确定要删除吗?" data-table="1"><span class="label label-danger" title="删除">删除</span></a> ';
- if(c.order_mode==1 && parseInt("{$org_grab_order}")===1){
- btn+= '<a url="'+setType+'" href="javascript:;" data-title="设置报修事项" onclick="layer_open(this,1)"><span class="label label-primary" title="设置报修事项">设置报修事项</span></a> ';
- }
- return btn;
- }},
- ],
- rowNum:10,
- rowList:[10,20,30,50,100],
- pager: '#pager',
- sortname: 'id',
- viewrecords: true,
- autowidth:true,
- mtype: 'post',
- height: 'auto',
- emptyrecords: "暂无数据",
- sortorder: "desc",
- caption:"{$m_name}订单列表",
- loadComplete: function (xhr) {
- if(xhr.code==0){
- layer.msg(xhr.msg);
- return false;
- }
- },
- });
- });
- </script>
- {/block}
|