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
19f3ea43
Commit
19f3ea43
authored
Dec 05, 2024
by
lizhilin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新
parent
fc773c95
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
138 additions
and
40 deletions
+138
-40
app/Admin/Controllers/LawyerCostController.php
+70
-19
app/Admin/Controllers/LawyerCostListController.php
+66
-19
app/Admin/Controllers/ViewCovenantInvoicedController.php
+1
-1
app/Admin/Controllers/ViewCovenantReceivedController.php
+1
-1
No files found.
app/Admin/Controllers/LawyerCostController.php
View file @
19f3ea43
...
@@ -206,25 +206,27 @@ protected function form()
...
@@ -206,25 +206,27 @@ protected function form()
{
{
$form
=
Form
::
make
(
new
ModelLawyerCost
(),
function
(
Form
$form
)
{
$form
=
Form
::
make
(
new
ModelLawyerCost
(),
function
(
Form
$form
)
{
$form
->
display
(
'id'
);
$form
->
display
(
'id'
);
$form
->
text
(
'year'
);
$form
->
text
(
'year'
)
->
default
(
date
(
'Y'
));
$form
->
select
(
'month'
)
->
options
(
ModelLawyerCost
::
MONTH
);
$form
->
select
(
'month'
)
->
options
(
ModelLawyerCost
::
MONTH
)
->
required
();
$form
->
text
(
'number'
);
$form
->
text
(
'number'
)
->
required
();
$form
->
text
(
'lname'
);
$form
->
text
(
'lname'
)
->
required
();
$form
->
text
(
'basic_salary'
);
$form
->
text
(
'basic_salary'
)
->
required
();
$form
->
text
(
'social_person_fee'
);
$form
->
text
(
'special_additional'
)
->
required
();
$form
->
text
(
'social_company_fee'
);
$form
->
text
(
'social_person_fee'
)
->
required
();
//$form->display('social', '社保')->default(100);
$form
->
text
(
'social_company_fee'
)
->
required
();
$form
->
text
(
'accumulation_fund_person_fee'
);
$form
->
text
(
'social'
,
'社保'
)
->
readOnly
();
$form
->
text
(
'accumulation_fund_company_fee'
);
$form
->
text
(
'accumulation_fund_person_fee'
)
->
required
();
$form
->
text
(
'annual_inspection_fee'
);
$form
->
text
(
'accumulation_fund_company_fee'
)
->
required
();
$form
->
text
(
'annuity'
);
$form
->
text
(
'accumulation_fund'
,
'公积金'
)
->
readOnly
();
$form
->
text
(
'office_rental_fee'
);
$form
->
text
(
'annual_inspection_fee'
)
->
required
();
//$form->text('noticket_cost');
$form
->
text
(
'annuity'
)
->
required
();
$form
->
text
(
'office_rental_fee'
)
->
required
();
$form
->
text
(
'noticket_cost'
)
->
readOnly
();
//$form->text('posting_tickets_fee');
//$form->text('posting_tickets_fee');
$form
->
text
(
'assistant_fee'
);
$form
->
text
(
'assistant_fee'
)
->
required
()
;
$form
->
text
(
'special_additional'
);
$form
->
text
(
'special_additional'
)
->
required
()
;
$form
->
text
(
'advance_fee'
);
$form
->
text
(
'advance_fee'
);
$form
->
text
(
'personal_income_tax'
);
$form
->
text
(
'personal_income_tax'
)
->
required
()
;
$form
->
disableCreatingCheck
();
$form
->
disableCreatingCheck
();
$form
->
disableEditingCheck
();
$form
->
disableEditingCheck
();
...
@@ -236,11 +238,54 @@ protected function form()
...
@@ -236,11 +238,54 @@ protected function form()
$form
->
display
(
'updated_at'
);
$form
->
display
(
'updated_at'
);
});
});
Admin
::
script
(
<<<
JS
$
(
function
()
{
//社保
$
(
"input[name='social_company_fee']"
)
.
on
(
'blur'
,
function
()
{
var
person_fee
=
$
(
"input[name='social_person_fee']"
)
.
val
()
.
length
>
0
?
$
(
"input[name='social_person_fee']"
)
.
val
()
:
0
;
var
company_fee
=
$
(
"input[name='social_company_fee']"
)
.
val
()
.
length
>
0
?
$
(
"input[name='social_company_fee']"
)
.
val
()
:
0
;
var
total
=
parseFloat
(
person_fee
)
+
parseFloat
(
company_fee
);
$
(
"input[name='social']"
)
.
val
(
total
);
});
//公积金
$
(
"input[name='accumulation_fund_company_fee']"
)
.
on
(
'blur'
,
function
()
{
var
person_fee
=
$
(
"input[name='accumulation_fund_person_fee']"
)
.
val
()
.
length
>
0
?
$
(
"input[name='accumulation_fund_person_fee']"
)
.
val
()
:
0
;
var
company_fee
=
$
(
"input[name='accumulation_fund_company_fee']"
)
.
val
()
.
length
>
0
?
$
(
"input[name='accumulation_fund_company_fee']"
)
.
val
()
:
0
;
var
accumulation_fund
=
parseFloat
(
person_fee
)
+
parseFloat
(
company_fee
);
$
(
"input[name='accumulation_fund']"
)
.
val
(
accumulation_fund
);
});
//无票成本
$
(
"input[name='office_rental_fee']"
)
.
on
(
'blur'
,
function
()
{
//基本工资
var
salary
=
$
(
"input[name='basic_salary']"
)
.
val
()
.
length
>
0
?
$
(
"input[name='basic_salary']"
)
.
val
()
:
0
;
//专项附加
var
additional
=
$
(
"input[name='special_additional']"
)
.
val
()
.
length
>
0
?
$
(
"input[name='special_additional']"
)
.
val
()
:
0
;
//社保单位部分
var
social_company
=
$
(
"input[name='social_company_fee']"
)
.
val
()
.
lenght
>
0
?
$
(
"input[name='social_company_fee']"
)
.
val
()
:
0
;
//公积金单位部分
var
accumulation_fund
=
$
(
"input[name='accumulation_fund_company_fee']"
)
.
val
()
.
length
>
0
?
$
(
"input[name='accumulation_fund_company_fee']"
)
.
val
()
:
0
;
//助理律师成本
var
assistant_fee
=
$
(
"input[name='assistant_fee']"
)
.
val
()
.
length
>
0
?
$
(
"input[name='assistant_fee']"
)
.
val
()
:
0
;
//办公室租赁成本
var
office_rental_fee
=
$
(
"input[name='office_rental_fee']"
)
.
val
()
.
length
>
0
?
$
(
"input[name='office_rental_fee']"
)
.
val
()
:
0
;
var
cost
=
parseFloat
(
salary
)
+
parseFloat
(
additional
)
+
parseFloat
(
social_company
)
+
parseFloat
(
accumulation_fund
)
+
parseFloat
(
assistant_fee
)
+
parseFloat
(
office_rental_fee
);
$
(
"input[name='noticket_cost']"
)
.
val
(
cost
);
});
});
JS
);
//副表保存规格
//副表保存规格
$form
->
saved
(
$form
->
saved
(
function
(
Form
$form
,
$result
)
{
function
(
Form
$form
,
$result
)
{
$cost_id
=
$form
->
getKey
();
$cost_id
=
$form
->
getKey
();
//律师ID
$number
=
$_POST
[
'number'
]
??
0
;
$lawyer_id
=
DB
::
table
(
'lawyer'
)
->
where
(
'number'
,
$number
)
->
value
(
'id'
);
$basic_salary
=
$_POST
[
'basic_salary'
]
??
0
;
$basic_salary
=
$_POST
[
'basic_salary'
]
??
0
;
$special_additional
=
$_POST
[
'special_additional'
]
??
0
;
$special_additional
=
$_POST
[
'special_additional'
]
??
0
;
$social_company_fee
=
$_POST
[
'social_company_fee'
]
??
0
;
$social_company_fee
=
$_POST
[
'social_company_fee'
]
??
0
;
...
@@ -248,9 +293,15 @@ function (Form $form, $result) {
...
@@ -248,9 +293,15 @@ function (Form $form, $result) {
$assistant_fee
=
$_POST
[
'assistant_fee'
]
??
0
;
$assistant_fee
=
$_POST
[
'assistant_fee'
]
??
0
;
$office_rental_fee
=
$_POST
[
'office_rental_fee'
]
??
0
;
$office_rental_fee
=
$_POST
[
'office_rental_fee'
]
??
0
;
//无票成本
//无票成本
$noticket_cost
=
floatval
(
$basic_salary
)
+
floatval
(
$special_additional
)
+
floatval
(
$social_company_fee
)
+
floatval
(
$accumulation_fund_company_fee
)
+
floatval
(
$assistant_fee
)
+
floatval
(
$office_rental_fee
);
//社保
$social_person_fee
=
$_POST
[
'social_person_fee'
]
??
0
;
$social
=
floatval
(
$social_person_fee
)
+
floatval
(
$social_company_fee
);
//公积金
$accumulation_fund_person_fee
=
$_POST
[
'accumulation_fund_person_fee'
]
??
0
;
$accumulation_fund
=
floatval
(
$accumulation_fund_person_fee
)
+
floatval
(
$accumulation_fund_company_fee
);
if
(
$result
)
{
if
(
$result
)
{
$noticket_cost
=
$basic_salary
+
$special_additional
+
$social_company_fee
+
$accumulation_fund_company_fee
+
$assistant_fee
+
$office_rental_fee
;
DB
::
table
(
'lawyer_cost'
)
->
where
(
"id"
,
$cost_id
)
->
update
([
'lawyer_id'
=>
$lawyer_id
,
'social'
=>
$social
,
'accumulation_fund'
=>
$accumulation_fund
,
'noticket_cost'
=>
$noticket_cost
]);
DB
::
table
(
'lawyer_cost'
)
->
where
(
"id"
,
$cost_id
)
->
update
([
'noticket_cost'
=>
$noticket_cost
]);
}
}
}
}
);
);
...
...
app/Admin/Controllers/LawyerCostListController.php
View file @
19f3ea43
...
@@ -133,25 +133,27 @@ protected function form()
...
@@ -133,25 +133,27 @@ protected function form()
{
{
$form
=
Form
::
make
(
new
ModelLawyerCost
(),
function
(
Form
$form
)
{
$form
=
Form
::
make
(
new
ModelLawyerCost
(),
function
(
Form
$form
)
{
$form
->
display
(
'id'
);
$form
->
display
(
'id'
);
$form
->
text
(
'year'
);
$form
->
text
(
'year'
)
->
required
()
;
$form
->
select
(
'month'
)
->
options
(
ModelLawyerCost
::
MONTH
);
$form
->
select
(
'month'
)
->
options
(
ModelLawyerCost
::
MONTH
);
$form
->
display
(
'number'
);
$form
->
display
(
'number'
);
$form
->
text
(
'lname'
);
$form
->
text
(
'lname'
)
->
required
();
$form
->
text
(
'basic_salary'
);
$form
->
text
(
'basic_salary'
)
->
required
();
$form
->
text
(
'social_person_fee'
);
$form
->
text
(
'social_person_fee'
)
->
required
();
$form
->
text
(
'social_company_fee'
);
$form
->
text
(
'social_company_fee'
)
->
required
();
//$form->display('social', '社保')->default(100);
//$social = $form->model()->social;
$form
->
text
(
'accumulation_fund_person_fee'
);
$form
->
text
(
'social'
,
'社保'
)
->
readOnly
();
$form
->
text
(
'accumulation_fund_company_fee'
);
$form
->
text
(
'accumulation_fund_person_fee'
)
->
required
();
$form
->
text
(
'annual_inspection_fee'
);
$form
->
text
(
'accumulation_fund_company_fee'
)
->
required
();
$form
->
text
(
'annuity'
);
$form
->
text
(
'accumulation_fund'
,
'公积金'
)
->
readOnly
();
$form
->
text
(
'office_rental_fee'
);
$form
->
text
(
'annual_inspection_fee'
)
->
required
();
//$form->text('noticket_cost');
$form
->
text
(
'annuity'
)
->
required
();
$form
->
text
(
'office_rental_fee'
)
->
required
();
$form
->
text
(
'noticket_cost'
)
->
readOnly
();
//$form->text('posting_tickets_fee');
//$form->text('posting_tickets_fee');
$form
->
text
(
'assistant_fee'
);
$form
->
text
(
'assistant_fee'
)
->
required
()
;
$form
->
text
(
'special_additional'
);
$form
->
text
(
'special_additional'
)
->
required
()
;
$form
->
text
(
'advance_fee'
);
$form
->
text
(
'advance_fee'
);
$form
->
text
(
'personal_income_tax'
);
$form
->
text
(
'personal_income_tax'
)
->
required
()
;
$form
->
disableCreatingCheck
();
$form
->
disableCreatingCheck
();
$form
->
disableEditingCheck
();
$form
->
disableEditingCheck
();
...
@@ -159,10 +161,49 @@ protected function form()
...
@@ -159,10 +161,49 @@ protected function form()
$form
->
disableDeleteButton
();
$form
->
disableDeleteButton
();
$form
->
disableViewButton
();
$form
->
disableViewButton
();
$form
->
display
(
'created_at'
);
//
$form->display('created_at');
$form
->
display
(
'updated_at'
);
//
$form->display('updated_at');
});
});
Admin
::
script
(
<<<
JS
$
(
function
()
{
//社保
$
(
"input[name='social_company_fee']"
)
.
on
(
'blur'
,
function
()
{
var
person_fee
=
$
(
"input[name='social_person_fee']"
)
.
val
()
.
length
>
0
?
$
(
"input[name='social_person_fee']"
)
.
val
()
:
0
;
var
company_fee
=
$
(
"input[name='social_company_fee']"
)
.
val
()
.
length
>
0
?
$
(
"input[name='social_company_fee']"
)
.
val
()
:
0
;
var
total
=
parseFloat
(
person_fee
)
+
parseFloat
(
company_fee
);
$
(
"input[name='social']"
)
.
val
(
total
);
});
//公积金
$
(
"input[name='accumulation_fund_company_fee']"
)
.
on
(
'blur'
,
function
()
{
var
person_fee
=
$
(
"input[name='accumulation_fund_person_fee']"
)
.
val
()
.
length
>
0
?
$
(
"input[name='accumulation_fund_person_fee']"
)
.
val
()
:
0
;
var
company_fee
=
$
(
"input[name='accumulation_fund_company_fee']"
)
.
val
()
.
length
>
0
?
$
(
"input[name='accumulation_fund_company_fee']"
)
.
val
()
:
0
;
var
accumulation_fund
=
parseFloat
(
person_fee
)
+
parseFloat
(
company_fee
);
$
(
"input[name='accumulation_fund']"
)
.
val
(
accumulation_fund
);
});
//无票成本
$
(
"input[name='office_rental_fee']"
)
.
on
(
'blur'
,
function
()
{
//基本工资
var
salary
=
$
(
"input[name='basic_salary']"
)
.
val
()
.
length
>
0
?
$
(
"input[name='basic_salary']"
)
.
val
()
:
0
;
//专项附加
var
additional
=
$
(
"input[name='special_additional']"
)
.
val
()
.
length
>
0
?
$
(
"input[name='special_additional']"
)
.
val
()
:
0
;
//社保单位部分
var
social_company
=
$
(
"input[name='social_company_fee']"
)
.
val
()
.
lenght
>
0
?
$
(
"input[name='social_company_fee']"
)
.
val
()
:
0
;
//公积金单位部分
var
accumulation_fund
=
$
(
"input[name='accumulation_fund_company_fee']"
)
.
val
()
.
length
>
0
?
$
(
"input[name='accumulation_fund_company_fee']"
)
.
val
()
:
0
;
//助理律师成本
var
assistant_fee
=
$
(
"input[name='assistant_fee']"
)
.
val
()
.
length
>
0
?
$
(
"input[name='assistant_fee']"
)
.
val
()
:
0
;
//办公室租赁成本
var
office_rental_fee
=
$
(
"input[name='office_rental_fee']"
)
.
val
()
.
length
>
0
?
$
(
"input[name='office_rental_fee']"
)
.
val
()
:
0
;
var
cost
=
parseFloat
(
salary
)
+
parseFloat
(
additional
)
+
parseFloat
(
social_company
)
+
parseFloat
(
accumulation_fund
)
+
parseFloat
(
assistant_fee
)
+
parseFloat
(
office_rental_fee
);
$
(
"input[name='noticket_cost']"
)
.
val
(
cost
);
});
});
JS
);
//副表保存规格
//副表保存规格
$form
->
saved
(
$form
->
saved
(
function
(
Form
$form
,
$result
)
{
function
(
Form
$form
,
$result
)
{
...
@@ -175,9 +216,15 @@ function (Form $form, $result) {
...
@@ -175,9 +216,15 @@ function (Form $form, $result) {
$assistant_fee
=
$_POST
[
'assistant_fee'
]
??
0
;
$assistant_fee
=
$_POST
[
'assistant_fee'
]
??
0
;
$office_rental_fee
=
$_POST
[
'office_rental_fee'
]
??
0
;
$office_rental_fee
=
$_POST
[
'office_rental_fee'
]
??
0
;
//无票成本
//无票成本
$noticket_cost
=
floatval
(
$basic_salary
)
+
floatval
(
$special_additional
)
+
floatval
(
$social_company_fee
)
+
floatval
(
$accumulation_fund_company_fee
)
+
floatval
(
$assistant_fee
)
+
floatval
(
$office_rental_fee
);
//社保
$social_person_fee
=
$_POST
[
'social_person_fee'
]
??
0
;
$social
=
floatval
(
$social_person_fee
)
+
floatval
(
$social_company_fee
);
//公积金
$accumulation_fund_person_fee
=
$_POST
[
'accumulation_fund_person_fee'
]
??
0
;
$accumulation_fund
=
floatval
(
$accumulation_fund_person_fee
)
+
floatval
(
$accumulation_fund_company_fee
);
if
(
$result
)
{
if
(
$result
)
{
$noticket_cost
=
$basic_salary
+
$special_additional
+
$social_company_fee
+
$accumulation_fund_company_fee
+
$assistant_fee
+
$office_rental_fee
;
DB
::
table
(
'lawyer_cost'
)
->
where
(
"id"
,
$cost_id
)
->
update
([
'social'
=>
$social
,
'accumulation_fund'
=>
$accumulation_fund
,
'noticket_cost'
=>
$noticket_cost
]);
DB
::
table
(
'lawyer_cost'
)
->
where
(
"id"
,
$cost_id
)
->
update
([
'noticket_cost'
=>
$noticket_cost
]);
}
}
}
}
);
);
...
...
app/Admin/Controllers/ViewCovenantInvoicedController.php
View file @
19f3ea43
...
@@ -45,7 +45,7 @@ protected function grid()
...
@@ -45,7 +45,7 @@ protected function grid()
->
body
(
CovenantInvoiceForm
::
make
()
->
payload
([
'cid'
=>
$cid
])));
->
body
(
CovenantInvoiceForm
::
make
()
->
payload
([
'cid'
=>
$cid
])));
});
});
}
}
$grid
->
model
()
->
where
(
'lawyer_id'
,
$lawyer_id
)
->
where
(
'rtype'
,
2
)
->
orderBy
(
"id"
,
"desc"
);
$grid
->
model
()
->
where
(
[
'rtype'
=>
2
,
'lawyer_id'
=>
$lawyer_id
,
'cid'
=>
$cid
]
)
->
orderBy
(
"id"
,
"desc"
);
//$grid->column('id')->sortable();
//$grid->column('id')->sortable();
$grid
->
column
(
'invoiced_at'
,
'开票时间'
);
$grid
->
column
(
'invoiced_at'
,
'开票时间'
);
$grid
->
column
(
'invoiced_money'
,
'开票金额'
);
$grid
->
column
(
'invoiced_money'
,
'开票金额'
);
...
...
app/Admin/Controllers/ViewCovenantReceivedController.php
View file @
19f3ea43
...
@@ -50,7 +50,7 @@ protected function grid()
...
@@ -50,7 +50,7 @@ protected function grid()
});
});
$grid
->
model
()
->
where
(
'lawyer_id'
,
$lawyer_id
)
->
where
(
'rtype'
,
1
)
->
orderBy
(
"id"
,
"desc"
);
$grid
->
model
()
->
where
(
[
'rtype'
=>
1
,
'lawyer_id'
=>
$lawyer_id
,
'cid'
=>
$cid
]
)
->
orderBy
(
"id"
,
"desc"
);
//$grid->column('id')->sortable();
//$grid->column('id')->sortable();
$grid
->
column
(
'received_type'
,
'收款账户'
)
->
display
(
function
(
$val
)
{
$grid
->
column
(
'received_type'
,
'收款账户'
)
->
display
(
function
(
$val
)
{
return
$val
==
1
?
'基本户'
:
'其它'
;
return
$val
==
1
?
'基本户'
:
'其它'
;
...
...
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