123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194 |
- {extend name="common/common2" /}
- {block name="main"}
- <div class="ibox">
- <div class="ibox-content">
- <div class="row">
- <div class="col-xs-3" style="width: 20%!important;">
- </div>
- <div class="col-xs-9" style="text-align: right;width: 80%!important;">
- <form class="form-inline" id="form-search" action="{:url('index')}">
- <div class="input-group">
- <input type="text" id="date" readonly class="form-control" name="begin" placeholder="开始日期">
- </div>
- <div class="input-group">
- <input type="text" id="date1" readonly class="form-control" name="end" placeholder="结束日期">
- </div>
- <!--<div class="input-group">-->
- <!--<input type="text" class="form-control" name="title1" placeholder="护工名称">-->
- <!--</div>-->
- <!--<div class="input-group">-->
- <!--<select name="is_make_account" class="form-control">-->
- <!--<option value="">是否已做账</option>-->
- <!--<option value="0">未做账</option>-->
- <!--<option value="1">已做账</option>-->
- <!--</select>-->
- <!--</div>-->
- <!--<div class="input-group">-->
- <!--<select name="settlement" class="form-control">-->
- <!--<option value="">是否结算</option>-->
- <!--<option value="0">未结算</option>-->
- <!--<option value="1">已结算</option>-->
- <!--</select>-->
- <!--</div>-->
- <!--<div class="input-group">-->
- <!--<select name="completion" class="form-control">-->
- <!--<option value="">是否完工</option>-->
- <!--<option value="0">未完工</option>-->
- <!--<option value="1">已完工</option>-->
- <!--</select>-->
- <!--</div>-->
- <!--<div class="input-group">-->
- <!--<select name="status" class="form-control">-->
- <!--<option value="">订单状态</option>-->
- <!--{volist name="status" id="v"}-->
- <!--<option value="{$key}">{$v}</option>-->
- <!--{/volist}-->
- <!--</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-primary " type="button" id="search-clear"><i class="fa fa-undo"></i></button>
- </span>
- <span class="input-group-btn">
- <button data-url="{:url('export')}" 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>
- <script src="/static/layDate-v5.0.9/laydate.js"></script>
- {/block}
- {block name="script"}
- <script>
- //导出
- function excel_download(_self){
- var url = $(_self).attr('data-url');
- var param = $('#form-search').serialize();
- window.location.href = url+'?'+param;
- }
- laydate.render({
- elem: '#date',
- //设置开始日期、日期日期的 input 选择器
- //数组格式为 5.3.0 开始新增,之前版本直接配置 true 或任意分割字符即可
- trigger: 'click' ,
- theme: '#337ab7'
- });
- laydate.render({
- elem: '#date1',
- //设置开始日期、日期日期的 input 选择器
- //数组格式为 5.3.0 开始新增,之前版本直接配置 true 或任意分割字符即可
- trigger: 'click' ,
- theme: '#337ab7'
- });
- $(function () {
- $(window).bind("resize",function(){
- var width=$(".jqGrid_wrapper").width();
- $("#table").setGridWidth(width);
- });
- $.jgrid.defaults.styleUI="Bootstrap";
- $("#table").jqGrid({
- url:"{:url('index')}",
- datatype: "json",
- colModel:[
- // {label:'ID',name:'id',index:'id', width:30,sortable: false},
- {label:'订单编号',name:'sn',index:'sn',width:50,editable: false,sortable: false},
- {label:'患者姓名',name:'name',index:'name',width:30,editable: false,sortable: false},
- {label:'联系电话',name:'phone',index:'phone',width:40,editable: false,sortable: false},
- {label:'科室/部门',name:'depName',index:'depName',width:40,editable: false,sortable: false},
- {label:'陪护服务',name:'cateName',index:'cateName',width:40,editable: false,sortable: false},
- {label:'订单金额',name:'amount',index:'amount',width:30,editable: false,sortable: false},
- {label:'结算金额',name:'settlement_money',index:'settlement_money',width:30,editable: false,sortable: false},
- {label:'下单时间',name:'create_time',index:'create_time',width:70,editable: false,sortable: false},
- // {label:'是否结算',name:'settlement',index:'settlement',width:30,editable: false,sortable: false,formatter:function (a,b,c){
- // if(a == 1){
- // return '已结算';
- // } else{
- // return '未结算';
- // }
- // }},
- // {label:'是否完工',name:'completion',index:'completion',width:30,editable: false,sortable: false,formatter:function (a,b,c){
- // if(a == 0){
- // return '未完工';
- // } else{
- // return '已完工';
- // }
- // }},
- {label:'操作',width:40,sortable: false,formatter: function (a, b, c) {
- var editurl = "{:url('detail',[],'')}/id/"+c.id;
- var delurl = "{:url('del',[],'')}/id/"+c.id;
- // btn = '<a href="'+editurl+'"><span class="label label-info" title="详情">详情</span></a> ';
- var btn= '<a url="'+editurl+'" href="javascript:;" data-title="详情" onclick="layer_open(this,1)"><span class="label label-primary" title="详情">详情</span></a> ';
- // btn += '<a href="'+delurl+'" class="confirm ajax-get" data-confirm="确定要删除此记录吗?" data-table="1"><span class="label label-danger" 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:"已结算列表",
- loadComplete: function (xhr) {
- if(xhr.code==0){
- layer.msg(xhr.msg);
- return false;
- }
- var totalMoney = xhr.totalMoney;
- var zsr = xhr.zsr;
- $('#pager_left').html('<span style="color:red;font-size: 10px;">总收入金额:'+zsr+' 实际结算金额:'+totalMoney+'');
- },
- });
- });
- $('#js').click(function () {
- var b = $('#date').val();
- var e = $('#date1').val();
- $.post('/admin/Settlement/js.html',{begin:b,end:e},function (res) {
- if(res.code==0){
- updateAlert(res.msg,'alert-danger');
- setTimeout(function(){
- $('#top-alert').find('button').click();
- },1500);
- }else {
- updateAlert(res.data.msg,'alert-success');
- if(res.data.code==0){
- $("#table").trigger("reloadGrid");
- }else {
- setTimeout(function(){
- $('#top-alert').find('button').click();
- $("#table").trigger("reloadGrid");
- },1500);
- }
- }
- })
- })
- </script>
- {/block}
|