Commit 50469b0a by lizhilin

更新

parent f78a2a23
...@@ -24,7 +24,7 @@ protected function grid() ...@@ -24,7 +24,7 @@ protected function grid()
{ {
return Grid::make(ModelsCovenant::with(['principal', 'lawyer']), function (Grid $grid) { return Grid::make(ModelsCovenant::with(['principal', 'lawyer']), function (Grid $grid) {
$grid->model()->orderBy('id', 'DESC'); $grid->model()->orderBy('id', 'DESC');
$grid->column('id')->sortable(); //$grid->column('id')->sortable();
$grid->column('number'); $grid->column('number');
$grid->column('cname'); $grid->column('cname');
$grid->column('ctype')->display(function ($val) { $grid->column('ctype')->display(function ($val) {
......
...@@ -29,26 +29,50 @@ protected function grid() ...@@ -29,26 +29,50 @@ protected function grid()
//已开票未收款 //已开票未收款
$invoiceNoreceipt = ModelsCovenantReceivePayment::getInvoiceNoreceipt(); $invoiceNoreceipt = ModelsCovenantReceivePayment::getInvoiceNoreceipt();
// 添加一行表头数据 // 添加一行表头数据
// $grid->header(function () use ($invoicedMoney, $receivedMoney, $receiptNoinvoice, $invoiceNoreceipt) {
// return '<div class="row" style="text-align:center;">' .
// '<div class="col-md-7" >合计</div>' .
// '<div class="col-md-1">' . $invoicedMoney . '</div>' .
// '<div class="col-md-1">' . $receivedMoney . '</div>' .
// '<div class="col-md-1">' . $receiptNoinvoice . '</div>' .
// '<div class="col-md-2">' . $invoiceNoreceipt . '</div>' .
// '</div>';
// });
$grid->header(function () use ($invoicedMoney, $receivedMoney, $receiptNoinvoice, $invoiceNoreceipt) { $grid->header(function () use ($invoicedMoney, $receivedMoney, $receiptNoinvoice, $invoiceNoreceipt) {
return '<div class="row" style="text-align:center;">' . return '<div class="table-responsive table-wrapper complex-container table-middle mt-1 table-collapse ">
'<div class="col-md-7" >合计</div>' . <table class="table custom-data-table data-table" id="grid-table" border=0>
'<div class="col-md-1">' . $invoicedMoney . '</div>' . <thead>
'<div class="col-md-1">' . $receivedMoney . '</div>' . <tr>
'<div class="col-md-1">' . $receiptNoinvoice . '</div>' . <th width="90"></th>
'<div class="col-md-2">' . $invoiceNoreceipt . '</div>' . <th width="90"></th>
'</div>'; <th width="90"></th>
<th width="90">合计</th>
<th width="90"></th>
<th width="90"></th>
<th width="90">' . $invoicedMoney . '</th>
<th width="90">' . $receivedMoney . '</th>
<th width="90">' . $receiptNoinvoice . '</th>
<th width="90">' . $invoiceNoreceipt . '</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>';
}); });
//$grid->column('id')->sortable(); //$grid->column('id')->sortable();
$grid->column('lnum', '律师编号'); $grid->column('lnum', '律师编号')->width(90);
$grid->column('lname', '律师姓名'); $grid->column('lname', '律师姓名')->width(90);
$grid->column('covenant_num', '合同编号'); $grid->column('covenant_num', '合同编号')->width(90);
$grid->column('covenant_name', '合同名称'); $grid->column('covenant_name', '合同名称')->width(90);
$grid->column('covenant_type', '合同类型'); $grid->column('covenant_type', '合同类型')->width(90);
$grid->column('principal', '委托人'); $grid->column('principal', '委托人')->width(90);
$grid->column('invoice_amount', '开票金额'); $grid->column('invoice_amount', '开票金额')->width(90);
$grid->column('receipt_money', '已收款'); $grid->column('receipt_money', '已收款')->width(90);
$grid->column('receipt_noinvoice', '已收款未开票'); $grid->column('receipt_noinvoice', '已收款未开票')->width(90);
$grid->column('invoice_noreceipt', '已开票未收款'); $grid->column('invoice_noreceipt', '已开票未收款')->width(90);
//$grid->column('updated_at')->sortable(); //$grid->column('updated_at')->sortable();
$grid->disableCreateButton(); $grid->disableCreateButton();
......
...@@ -68,7 +68,7 @@ protected function grid() ...@@ -68,7 +68,7 @@ protected function grid()
// 添加一行表头数据 // 添加一行表头数据
$grid->header(function () use ($received_amount, $commissionAmount, $received_noinvoiced, $invoiced_noreceived, $costTotal, $basicSalary, $special_additional, $social, $accumulation_fund, $posting_tickets, $advance_fee, $payable_amount) { $grid->header(function () use ($received_amount, $commissionAmount, $received_noinvoiced, $invoiced_noreceived, $costTotal, $basicSalary, $special_additional, $social, $accumulation_fund, $posting_tickets, $advance_fee, $payable_amount) {
return '<div class="table-responsive table-wrapper complex-container table-middle mt-1 table-collapse "> return '<div class="table-responsive table-wrapper complex-container table-middle mt-1 table-collapse ">
<table class="table custom-data-table data-table" id="grid-table"> <table class="table custom-data-table data-table" border=1 id="grid-table">
<thead> <thead>
<tr> <tr>
<th width="90">&nbsp;&nbsp;&nbsp;</th> <th width="90">&nbsp;&nbsp;&nbsp;</th>
......
...@@ -20,7 +20,7 @@ class LawyerController extends AdminController ...@@ -20,7 +20,7 @@ class LawyerController extends AdminController
protected function grid() protected function grid()
{ {
return Grid::make(new Lawyer(), function (Grid $grid) { return Grid::make(new Lawyer(), function (Grid $grid) {
$grid->column('id')->sortable(); //$grid->column('id')->sortable();
$grid->column('number'); $grid->column('number');
$grid->column('name'); $grid->column('name');
$grid->column('sex')->display(function ($val) { $grid->column('sex')->display(function ($val) {
...@@ -41,6 +41,7 @@ protected function grid() ...@@ -41,6 +41,7 @@ protected function grid()
// $grid->column('created_at'); // $grid->column('created_at');
// $grid->column('updated_at')->sortable(); // $grid->column('updated_at')->sortable();
$grid->disableViewButton(); $grid->disableViewButton();
$grid->disableRowSelector();
$grid->filter(function (Grid\Filter $filter) { $grid->filter(function (Grid\Filter $filter) {
// 更改为 panel 布局 // 更改为 panel 布局
......
...@@ -23,7 +23,7 @@ protected function grid() ...@@ -23,7 +23,7 @@ protected function grid()
return Grid::make(new Principal(), function (Grid $grid) { return Grid::make(new Principal(), function (Grid $grid) {
$ptype = $grid->model()->filter()->input('wtype') ?? 1; $ptype = $grid->model()->filter()->input('wtype') ?? 1;
$grid->model()->where('wtype', $ptype)->orderBy("id", "desc"); $grid->model()->where('wtype', $ptype)->orderBy("id", "desc");
$grid->column('id')->sortable(); //$grid->column('id')->sortable();
$grid->column('number'); $grid->column('number');
if ($ptype == 1) { if ($ptype == 1) {
$grid->column('company'); $grid->column('company');
...@@ -42,6 +42,7 @@ protected function grid() ...@@ -42,6 +42,7 @@ protected function grid()
// $grid->column('created_at'); // $grid->column('created_at');
// $grid->column('updated_at')->sortable(); // $grid->column('updated_at')->sortable();
$grid->disableViewButton(); $grid->disableViewButton();
$grid->disableRowSelector();
$grid->filter(function (Grid\Filter $filter) use ($ptype) { $grid->filter(function (Grid\Filter $filter) use ($ptype) {
// 更改为 panel 布局 // 更改为 panel 布局
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment