Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lvsuo-pc
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lizhilin
lvsuo-pc
Commits
7ed2268a
Commit
7ed2268a
authored
Dec 24, 2024
by
lizhilin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新
parent
71524c25
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
37 additions
and
43 deletions
+37
-43
app/Admin/Controllers/CovenantController.php
+4
-4
app/Admin/Controllers/LawyerCostController.php
+2
-2
app/Admin/Controllers/LawyerCovenantIncomeController.php
+2
-2
app/Admin/Controllers/LawyerIncomeController.php
+2
-2
app/Admin/Forms/CovenantReturnForm.php
+1
-1
app/Admin/Repositories/Covenant.php
+26
-32
No files found.
app/Admin/Controllers/CovenantController.php
View file @
7ed2268a
...
...
@@ -44,10 +44,10 @@ protected function grid()
$grid
->
column
(
'is_closed'
,
'结案状态'
)
->
display
(
function
(
$val
)
{
return
$val
?
'已结案'
:
'未结案'
;
});
$grid
->
column
(
'is_return'
,
'退
还
状态'
)
->
display
(
function
(
$val
)
{
$grid
->
column
(
'is_return'
,
'退
案
状态'
)
->
display
(
function
(
$val
)
{
return
$val
?
'已退案'
:
'未退案'
;
});
$grid
->
column
(
'return_fee'
,
'退
还
结案费'
);
$grid
->
column
(
'return_fee'
,
'退
案
结案费'
);
// $grid->column('created_at');
// $grid->column('updated_at')->sortable();
...
...
@@ -75,7 +75,7 @@ protected function grid()
$row
[
'ctype'
]
=
Covenant
::
CTYPE
[
$row
[
'ctype'
]];
$row
[
'payment_method'
]
=
(
$row
[
'payment_method'
]
==
1
)
?
'开票付款'
:
'付款开票'
;
$row
[
'is_closed'
]
=
(
$row
[
'is_closed'
]
==
1
)
?
'已结案'
:
'未结案'
;
$row
[
'is_return'
]
=
(
$row
[
'is_return'
]
==
1
)
?
'已退
还'
:
'未退还
'
;
$row
[
'is_return'
]
=
(
$row
[
'is_return'
]
==
1
)
?
'已退
案'
:
'未退案
'
;
}
return
$rows
;
});
...
...
@@ -93,7 +93,7 @@ protected function grid()
if
(
Admin
::
user
()
->
can
(
'hetong-closed'
)
&&
$actions
->
row
->
is_closed
==
0
)
{
$actions
->
append
(
new
CovenantClosed
(
''
,
$actions
->
row
->
id
));
}
// 已退
还
// 已退
案
if
(
Admin
::
user
()
->
can
(
'hetong-return'
)
&&
$actions
->
row
->
is_return
==
0
)
{
$actions
->
append
(
new
CovenantReturn
(
''
,
$actions
->
row
->
id
));
}
...
...
app/Admin/Controllers/LawyerCostController.php
View file @
7ed2268a
...
...
@@ -83,12 +83,12 @@ protected function grid()
$grid
->
actions
(
function
(
Grid\Displayers\Actions
$actions
)
{
//成本汇总
if
(
Admin
::
user
()
->
can
(
'lycost-collect'
))
{
$actions
->
append
(
'<a href="/lycost-collect?no='
.
$this
->
number
.
'" alt="成本汇总"
target="_blank"
><i class="feather icon-book"> 成本汇总 </i></a>'
);
$actions
->
append
(
'<a href="/lycost-collect?no='
.
$this
->
number
.
'" alt="成本汇总" ><i class="feather icon-book"> 成本汇总 </i></a>'
);
}
// 成本明细
if
(
Admin
::
user
()
->
can
(
'lycost-list'
))
{
$actions
->
append
(
'<a href="/lycost-list?no='
.
$this
->
number
.
'" alt="成本明细"
target="_blank"
><i class="feather icon-list"> 成本明细 </i></a>'
);
$actions
->
append
(
'<a href="/lycost-list?no='
.
$this
->
number
.
'" alt="成本明细" ><i class="feather icon-list"> 成本明细 </i></a>'
);
}
});
});
...
...
app/Admin/Controllers/LawyerCovenantIncomeController.php
View file @
7ed2268a
...
...
@@ -82,11 +82,11 @@ protected function grid()
//查看收款
$cid
=
$actions
->
row
->
cid
;
if
(
Admin
::
user
()
->
can
(
'view-received'
))
{
$actions
->
append
(
'<a href="/view-covenant-received?cid='
.
$cid
.
'" alt="查看收款"
target="_blank"
>查看收款</a>'
);
$actions
->
append
(
'<a href="/view-covenant-received?cid='
.
$cid
.
'" alt="查看收款" >查看收款</a>'
);
}
//查看开票
if
(
Admin
::
user
()
->
can
(
'view-invoiced'
))
{
$actions
->
append
(
'<a href="/view-covenant-invoiced?cid='
.
$cid
.
'" alt="查看开票"
target="_blank"
>查看开票</a>'
);
$actions
->
append
(
'<a href="/view-covenant-invoiced?cid='
.
$cid
.
'" alt="查看开票" >查看开票</a>'
);
}
});
});
...
...
app/Admin/Controllers/LawyerIncomeController.php
View file @
7ed2268a
...
...
@@ -63,11 +63,11 @@ protected function grid()
$linkstr
=
''
;
//创收收款表
if
(
Admin
::
user
()
->
can
(
'lawyer-covenant-income'
))
{
$linkstr
.=
'<a href="/lawyer-covenant-income?no='
.
$id
.
'"
target="_blank"
>创收收款表</a> '
;
$linkstr
.=
'<a href="/lawyer-covenant-income?no='
.
$id
.
'" >创收收款表</a> '
;
}
//已收款/已开票汇总
if
(
Admin
::
user
()
->
can
(
'received-invoiced'
))
{
$linkstr
.=
'<a href="/receive_payment?no='
.
$id
.
'&year='
.
$year
.
'"
target="_blank"
>已收款/已开票汇总</a><br/>'
;
$linkstr
.=
'<a href="/receive_payment?no='
.
$id
.
'&year='
.
$year
.
'" >已收款/已开票汇总</a><br/>'
;
}
return
$linkstr
;
});
...
...
app/Admin/Forms/CovenantReturnForm.php
View file @
7ed2268a
...
...
@@ -48,7 +48,7 @@ public function handle(array $input)
*/
public
function
form
()
{
$this
->
text
(
'return_fee'
,
'退
还
结案费'
)
->
required
();
$this
->
text
(
'return_fee'
,
'退
案
结案费'
)
->
required
();
}
/**
...
...
app/Admin/Repositories/Covenant.php
View file @
7ed2268a
...
...
@@ -83,7 +83,7 @@ public function get(Grid\Model $model)
public
function
getList
(
array
$param
)
{
$prePage
=
$param
[
'per_page'
]
??
20
;
$start
=
$param
[
'start'
]
??
0
;
$st
epst
art
=
$param
[
'start'
]
??
0
;
$lawyer_id
=
$param
[
'search'
][
'lawyer_id'
]
??
0
;
$number
=
$param
[
'search'
][
'number'
]
??
''
;
$cname
=
$param
[
'search'
][
'cname'
]
??
''
;
...
...
@@ -92,12 +92,23 @@ public function getList(array $param)
$received_at
=
$param
[
'search'
][
'received_at'
]
??
[];
$list
=
$condition
=
[];
if
(
$lawyer_id
)
{
$condition
[
'
rp
.lawyer_id'
]
=
$lawyer_id
;
$condition
[
'
c
.lawyer_id'
]
=
$lawyer_id
;
}
if
(
$number
)
{
$condition
[
'c.number'
]
=
$number
;
}
if
(
$principal
)
{
$condition
[
'c.principal'
]
=
$principal
;
}
if
(
$cname
)
{
$condition
[
'c.cname'
]
=
$cname
;
}
DB
::
enableQueryLog
();
$note_monitor
=
DB
::
table
(
'covenant_receive_payment AS rp'
)
->
select
([
'rp.*'
,
'c.cname'
,
'c.ctype'
,
'c.number'
])
->
leftJoin
(
'covenant as c'
,
'rp.cid'
,
'='
,
'c.id'
);
$note_monitor
=
DB
::
table
(
'covenant as c'
)
->
select
([
'rp.*'
,
'c.id as cid'
,
'c.cname'
,
'c.ctype'
,
'c.number'
,
'c.lawyer_id'
,
'c.principal'
])
->
leftJoin
(
'covenant_receive_payment AS rp'
,
'rp.cid'
,
'='
,
'c.id'
)
->
where
(
$condition
);
if
(
$invoiced_at
[
'start'
]
&&
$received_at
[
'start'
])
{
$in_start
=
$invoiced_at
[
'start'
]
??
''
;
$in_end
=
$invoiced_at
[
'end'
]
??
''
;
...
...
@@ -106,21 +117,17 @@ public function getList(array $param)
if
(
$in_start
&&
$re_start
)
{
if
(
$in_end
&&
$re_end
)
{
$note_monitor
=
$note_monitor
->
whereBetween
(
'rp.received_at'
,
[
$re_start
,
$re_end
])
->
whereBetween
(
'rp.invoiced_at'
,
[
$in_start
,
$in_end
])
->
where
(
$condition
);
->
whereBetween
(
'rp.invoiced_at'
,
[
$in_start
,
$in_end
]);
}
else
{
if
(
$in_end
)
{
$note_monitor
=
$note_monitor
->
whereDate
(
'rp.received_at'
,
'>'
,
$re_start
)
->
whereBetween
(
'rp.invoiced_at'
,
[
$in_start
,
$in_end
])
->
where
(
$condition
);
->
whereBetween
(
'rp.invoiced_at'
,
[
$in_start
,
$in_end
]);
}
elseif
(
$re_end
)
{
$note_monitor
=
$note_monitor
->
whereDate
(
'rp.invoiced_at'
,
'>'
,
$in_start
)
->
whereBetween
(
'rp.received_at'
,
[
$re_start
,
$re_end
])
->
where
(
$condition
);
->
whereBetween
(
'rp.received_at'
,
[
$re_start
,
$re_end
]);
}
else
{
$note_monitor
=
$note_monitor
->
whereDate
(
'rp.invoiced_at'
,
'>'
,
$in_start
)
->
whereDate
(
'rp.received_at'
,
'>'
,
$re_start
)
->
where
(
$condition
);
->
whereDate
(
'rp.received_at'
,
'>'
,
$re_start
);
}
}
}
...
...
@@ -130,11 +137,9 @@ public function getList(array $param)
if
(
$start
)
{
if
(
$end
)
{
$note_monitor
=
$note_monitor
->
whereBetween
(
'rp.received_at'
,
[
$start
,
$end
])
->
where
(
$condition
);
$note_monitor
=
$note_monitor
->
whereBetween
(
'rp.received_at'
,
[
$start
,
$end
]);
}
else
{
$note_monitor
=
$note_monitor
->
whereDate
(
'rp.received_at'
,
'>'
,
$start
)
->
where
(
$condition
);
$note_monitor
=
$note_monitor
->
whereDate
(
'rp.received_at'
,
'>'
,
$start
);
}
}
//
...
...
@@ -144,33 +149,22 @@ public function getList(array $param)
if
(
$start
)
{
if
(
$end
)
{
$note_monitor
=
$note_monitor
->
whereBetween
(
'rp.received_at'
,
[
$start
,
$end
])
->
where
(
$condition
);
$note_monitor
=
$note_monitor
->
whereBetween
(
'rp.received_at'
,
[
$start
,
$end
]);
}
else
{
$note_monitor
=
$note_monitor
->
whereDate
(
'rp.received_at'
,
'>'
,
$start
)
->
where
(
$condition
);
$note_monitor
=
$note_monitor
->
whereDate
(
'rp.received_at'
,
'>'
,
$start
);
}
}
}
if
(
$number
)
{
$note_monitor
=
$note_monitor
->
having
(
"number"
,
$number
);
}
if
(
$principal
)
{
$note_monitor
=
$note_monitor
->
having
(
"principal"
,
$principal
);
}
if
(
$cname
)
{
$note_monitor
=
$note_monitor
->
having
(
"cname"
,
$cname
);
}
// 计算列表总数
$count
=
0
;
//$note_monitor->count();
$cObj
=
$note_monitor
->
groupBy
(
'
rp.c
id'
)
->
get
();
$cObj
=
$note_monitor
->
groupBy
(
'
c.
id'
)
->
get
();
if
(
$cObj
->
toArray
())
{
$count
=
count
(
$cObj
->
toArray
());
}
// 获取列表
$data
=
[];
$list
=
$note_monitor
->
limit
(
$prePage
)
->
offset
(
$st
art
)
->
orderBy
(
'rp.c
id'
,
'desc'
)
->
get
()
->
toArray
();
$list
=
$note_monitor
->
limit
(
$prePage
)
->
offset
(
$st
epstart
)
->
orderBy
(
'c.
id'
,
'desc'
)
->
get
()
->
toArray
();
$queries
=
DB
::
getQueryLog
();
// echo "<pre>";
// print_r($queries);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment