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
29ff5831
Commit
29ff5831
authored
Apr 16, 2025
by
liuyingkang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
编辑权限调整
parent
bf41f245
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
137 additions
and
64 deletions
+137
-64
app/Admin/Controllers/LawyerCostController.php
+60
-30
app/Admin/Controllers/LawyerCostListController.php
+72
-33
app/Models/CovenantReceivePayment.php
+5
-1
No files found.
app/Admin/Controllers/LawyerCostController.php
View file @
29ff5831
...
@@ -113,7 +113,7 @@ public static function getSocial($number, $year)
...
@@ -113,7 +113,7 @@ public static function getSocial($number, $year)
{
{
$social_person_fee
=
ModelLawyerCost
::
where
([
'number'
=>
$number
,
'year'
=>
$year
])
->
sum
(
'social_person_fee'
);
$social_person_fee
=
ModelLawyerCost
::
where
([
'number'
=>
$number
,
'year'
=>
$year
])
->
sum
(
'social_person_fee'
);
$social_company_fee
=
ModelLawyerCost
::
where
([
'number'
=>
$number
,
'year'
=>
$year
])
->
sum
(
'social_company_fee'
);
$social_company_fee
=
ModelLawyerCost
::
where
([
'number'
=>
$number
,
'year'
=>
$year
])
->
sum
(
'social_company_fee'
);
$result
=
round
(
$social_person_fee
+
$social_company_fee
,
2
);
$result
=
round
(
$social_person_fee
+
$social_company_fee
,
precision
:
2
);
return
number_format
(
$result
,
2
);
return
number_format
(
$result
,
2
);
}
}
...
@@ -212,7 +212,50 @@ protected function form()
...
@@ -212,7 +212,50 @@ 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'
);
if
(
Admin
::
user
()
->
can
(
'lawyer_cost_list_edit'
))
{
// if (Admin::user()->can('lawyer_cost_list_edit')) {
// $form->text('year')->default(date('Y'));
// $form->select('month')->options(ModelLawyerCost::MONTH)->required();
// //$form->text('number')->required();
// $form->select('number', '律师姓名')->options('/get-lawyer-list')->required();
// //$form->text('lname')->required();
// $form->text('basic_salary')->required();
// $form->text('special_additional')->required();
// $form->text('social_person_fee')->required();
// $form->text('social_company_fee')->required();
// $form->text('social', '社保')->readOnly();
// $form->text('accumulation_fund_person_fee')->required();
// $form->text('accumulation_fund_company_fee')->required();
// $form->text('accumulation_fund', '公积金')->readOnly();
// $form->text('annual_inspection_fee')->required();
// $form->text('annuity');
// $form->text('assistant_fee');
// $form->text('office_rental_fee');
// $form->text('noticket_cost')->readOnly();
// $form->text('advance_fee');
// $form->text('personal_income_tax')->required();
// } else {
// $form->text('year')->default(date('Y'))->readOnly();
// $form->select('month')->options(ModelLawyerCost::MONTH)->readOnly();
// //$form->text('number')->readOnly();
// //$form->text('lname')->readOnly();
// $form->select('number', '律师姓名')->options('/get-lawyer-list')->readOnly();
// $form->text('basic_salary')->readOnly();
// $form->text('special_additional')->readOnly();
// $form->text('social_person_fee')->readOnly();
// $form->text('social_company_fee')->readOnly();
// $form->text('social', '社保')->readOnly();
// $form->text('accumulation_fund_person_fee')->readOnly();
// $form->text('accumulation_fund_company_fee')->readOnly();
// $form->text('accumulation_fund', '公积金')->readOnly();
// $form->text('annual_inspection_fee')->readOnly();
// $form->text('annuity')->required();
// $form->text('assistant_fee')->required();
// $form->text('office_rental_fee')->required();
// $form->text('noticket_cost')->readOnly();
// $form->text('advance_fee');
// $form->text('personal_income_tax')->readOnly();
// }
$form
->
text
(
'year'
)
->
default
(
date
(
'Y'
));
$form
->
text
(
'year'
)
->
default
(
date
(
'Y'
));
$form
->
select
(
'month'
)
->
options
(
ModelLawyerCost
::
MONTH
)
->
required
();
$form
->
select
(
'month'
)
->
options
(
ModelLawyerCost
::
MONTH
)
->
required
();
//$form->text('number')->required();
//$form->text('number')->required();
...
@@ -227,34 +270,12 @@ protected function form()
...
@@ -227,34 +270,12 @@ protected function form()
$form
->
text
(
'accumulation_fund_company_fee'
)
->
required
();
$form
->
text
(
'accumulation_fund_company_fee'
)
->
required
();
$form
->
text
(
'accumulation_fund'
,
'公积金'
)
->
readOnly
();
$form
->
text
(
'accumulation_fund'
,
'公积金'
)
->
readOnly
();
$form
->
text
(
'annual_inspection_fee'
)
->
required
();
$form
->
text
(
'annual_inspection_fee'
)
->
required
();
$form
->
text
(
'annuity'
)
->
readOnly
();
$form
->
text
(
'annuity'
);
$form
->
text
(
'assistant_fee'
)
->
readOnly
();
$form
->
text
(
'assistant_fee'
);
$form
->
text
(
'office_rental_fee'
)
->
readOnly
();
$form
->
text
(
'office_rental_fee'
);
$form
->
text
(
'noticket_cost'
)
->
readOnly
();
$form
->
text
(
'advance_fee'
)
->
readOnly
();
$form
->
text
(
'personal_income_tax'
)
->
required
();
}
else
{
$form
->
text
(
'year'
)
->
default
(
date
(
'Y'
))
->
readOnly
();
$form
->
select
(
'month'
)
->
options
(
ModelLawyerCost
::
MONTH
)
->
readOnly
();
//$form->text('number')->readOnly();
//$form->text('lname')->readOnly();
$form
->
select
(
'number'
,
'律师姓名'
)
->
options
(
'/get-lawyer-list'
)
->
readOnly
();
$form
->
text
(
'basic_salary'
)
->
readOnly
();
$form
->
text
(
'special_additional'
)
->
readOnly
();
$form
->
text
(
'social_person_fee'
)
->
readOnly
();
$form
->
text
(
'social_company_fee'
)
->
readOnly
();
$form
->
text
(
'social'
,
'社保'
)
->
readOnly
();
$form
->
text
(
'accumulation_fund_person_fee'
)
->
readOnly
();
$form
->
text
(
'accumulation_fund_company_fee'
)
->
readOnly
();
$form
->
text
(
'accumulation_fund'
,
'公积金'
)
->
readOnly
();
$form
->
text
(
'annual_inspection_fee'
)
->
readOnly
();
$form
->
text
(
'annuity'
)
->
required
();
$form
->
text
(
'assistant_fee'
)
->
required
();
$form
->
text
(
'office_rental_fee'
)
->
required
();
$form
->
text
(
'noticket_cost'
)
->
readOnly
();
$form
->
text
(
'noticket_cost'
)
->
readOnly
();
$form
->
text
(
'advance_fee'
);
$form
->
text
(
'advance_fee'
);
$form
->
text
(
'personal_income_tax'
)
->
readOnly
();
$form
->
text
(
'personal_income_tax'
)
->
required
();
}
$form
->
disableCreatingCheck
();
$form
->
disableCreatingCheck
();
$form
->
disableEditingCheck
();
$form
->
disableEditingCheck
();
...
@@ -274,7 +295,7 @@ protected function form()
...
@@ -274,7 +295,7 @@ protected function form()
$
(
"input[name='social_person_fee'],input[name='social_company_fee']"
)
.
on
(
'blur'
,
function
()
{
$
(
"input[name='social_person_fee'],input[name='social_company_fee']"
)
.
on
(
'blur'
,
function
()
{
var
social_person_fee
=
$
(
"input[name='social_person_fee']"
)
.
val
()
.
length
>
0
?
$
(
"input[name='social_person_fee']"
)
.
val
()
:
0
;
var
social_person_fee
=
$
(
"input[name='social_person_fee']"
)
.
val
()
.
length
>
0
?
$
(
"input[name='social_person_fee']"
)
.
val
()
:
0
;
var
social_company_fee
=
$
(
"input[name='social_company_fee']"
)
.
val
()
.
length
>
0
?
$
(
"input[name='social_company_fee']"
)
.
val
()
:
0
;
var
social_company_fee
=
$
(
"input[name='social_company_fee']"
)
.
val
()
.
length
>
0
?
$
(
"input[name='social_company_fee']"
)
.
val
()
:
0
;
var
social_total
=
parseFloat
(
social_person_fee
)
+
parseFloat
(
social_company_fee
);
var
social_total
=
(
parseFloat
(
social_person_fee
)
+
parseFloat
(
social_company_fee
))
.
toFixed
(
2
);
$
(
"input[name='social']"
)
.
val
(
social_total
);
$
(
"input[name='social']"
)
.
val
(
social_total
);
});
});
...
@@ -282,7 +303,8 @@ protected function form()
...
@@ -282,7 +303,8 @@ protected function form()
$
(
"input[name='accumulation_fund_person_fee'],input[name='accumulation_fund_company_fee']"
)
.
on
(
'blur'
,
function
()
{
$
(
"input[name='accumulation_fund_person_fee'],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
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
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
);
var
accumulation_fund
=
(
parseFloat
(
person_fee
)
+
parseFloat
(
company_fee
))
.
toFixed
(
2
);
$
(
"input[name='accumulation_fund']"
)
.
val
(
accumulation_fund
);
$
(
"input[name='accumulation_fund']"
)
.
val
(
accumulation_fund
);
});
});
//无票成本
//无票成本
...
@@ -301,6 +323,8 @@ protected function form()
...
@@ -301,6 +323,8 @@ protected function form()
var
office_rental_fee
=
$
(
"input[name='office_rental_fee']"
)
.
val
()
.
length
>
0
?
$
(
"input[name='office_rental_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
);
var
cost
=
parseFloat
(
salary
)
+
parseFloat
(
additional
)
+
parseFloat
(
social_company
)
+
parseFloat
(
accumulation_fund
)
+
parseFloat
(
assistant_fee
)
+
parseFloat
(
office_rental_fee
);
cost
=
cost
.
toFixed
(
2
);
$
(
"input[name='noticket_cost']"
)
.
val
(
cost
);
$
(
"input[name='noticket_cost']"
)
.
val
(
cost
);
});
});
});
});
...
@@ -340,12 +364,18 @@ function (Form $form, $result) {
...
@@ -340,12 +364,18 @@ function (Form $form, $result) {
$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
);
$noticket_cost
=
floatval
(
$basic_salary
)
+
floatval
(
$special_additional
)
+
floatval
(
$social_company_fee
)
+
floatval
(
$accumulation_fund_company_fee
)
+
floatval
(
$assistant_fee
)
+
floatval
(
$office_rental_fee
);
$noticket_cost
=
round
(
$noticket_cost
,
2
);
//社保
//社保
$social_person_fee
=
$_POST
[
'social_person_fee'
]
??
0
;
$social_person_fee
=
$_POST
[
'social_person_fee'
]
??
0
;
$social
=
floatval
(
$social_person_fee
)
+
floatval
(
$social_company_fee
);
$social
=
floatval
(
$social_person_fee
)
+
floatval
(
$social_company_fee
);
$social
=
round
(
$social
,
2
);
//公积金
//公积金
$accumulation_fund_person_fee
=
$_POST
[
'accumulation_fund_person_fee'
]
??
0
;
$accumulation_fund_person_fee
=
$_POST
[
'accumulation_fund_person_fee'
]
??
0
;
$accumulation_fund
=
floatval
(
$accumulation_fund_person_fee
)
+
floatval
(
$accumulation_fund_company_fee
);
$accumulation_fund
=
floatval
(
$accumulation_fund_person_fee
)
+
floatval
(
$accumulation_fund_company_fee
);
$accumulation_fund
=
round
(
$accumulation_fund
,
2
);
if
(
$result
)
{
if
(
$result
)
{
DB
::
table
(
'lawyer_cost'
)
->
where
(
"id"
,
$cost_id
)
->
update
([
'lawyer_id'
=>
$lawyer_id
,
'lname'
=>
$lname
,
'social'
=>
$social
,
'accumulation_fund'
=>
$accumulation_fund
,
'noticket_cost'
=>
$noticket_cost
]);
DB
::
table
(
'lawyer_cost'
)
->
where
(
"id"
,
$cost_id
)
->
update
([
'lawyer_id'
=>
$lawyer_id
,
'lname'
=>
$lname
,
'social'
=>
$social
,
'accumulation_fund'
=>
$accumulation_fund
,
'noticket_cost'
=>
$noticket_cost
]);
}
}
...
...
app/Admin/Controllers/LawyerCostListController.php
View file @
29ff5831
...
@@ -137,29 +137,60 @@ protected function form()
...
@@ -137,29 +137,60 @@ 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'
);
if
(
Admin
::
user
()
->
can
(
'lawyer_cost_list_edit'
))
{
// if (Admin::user()->can('lawyer_cost_list_edit')) {
// $form->text('year')->default(date('Y'));
// $form->select('month')->options(ModelLawyerCost::MONTH)->required();
// //$form->text('number')->required();
// //$form->text('lname')->required();
// $form->select('number', '律师姓名')->options('/get-lawyer-list')->required();
// $form->text('basic_salary')->required();
// $form->text('special_additional')->required();
// $form->text('social_person_fee')->required();
// $form->text('social_company_fee')->required();
// $form->text('social', '社保')->readOnly();
// $form->text('accumulation_fund_person_fee')->required();
// $form->text('accumulation_fund_company_fee')->required();
// $form->text('accumulation_fund', '公积金')->readOnly();
// $form->text('annual_inspection_fee')->required();
// $form->text('annuity')->readOnly();
// $form->text('assistant_fee')->readOnly();
// $form->text('office_rental_fee')->readOnly();
// $form->text('noticket_cost')->readOnly();
// $form->text('advance_fee')->readOnly();
// $form->text('personal_income_tax')->required();
// } else {
// $form->text('year')->default(date('Y'))->readOnly();
// //$form->select('month')->options(ModelLawyerCost::MONTH)->disable();
// // $form->select('month')
// // ->options(ModelLawyerCost::MONTH)
// // ->default(function () use ($form) {
// // // 获取模型实例
// // $model = $form->model();
// // // 返回默认值,这里保留数据库中的值
// // return $model->month;
// // })
// // ->readOnly();
// $form->text('month')->readOnly();
// $form->text('number')->readOnly();
// $form->text('lname')->readOnly();
// $form->text('basic_salary')->readOnly();
// $form->text('special_additional')->readOnly();
// $form->text('social_person_fee')->readOnly();
// $form->text('social_company_fee')->readOnly();
// $form->text('social', '社保')->readOnly();
// $form->text('accumulation_fund_person_fee')->readOnly();
// $form->text('accumulation_fund_company_fee')->readOnly();
// $form->text('accumulation_fund', '公积金')->readOnly();
// $form->text('annual_inspection_fee')->readOnly();
// $form->text('annuity')->required();
// $form->text('assistant_fee')->required();
// $form->text('office_rental_fee')->required();
// $form->text('noticket_cost')->readOnly();
// $form->text('advance_fee');
// $form->text('personal_income_tax')->readOnly();
// }
$form
->
text
(
'year'
)
->
default
(
date
(
'Y'
));
$form
->
text
(
'year'
)
->
default
(
date
(
'Y'
));
$form
->
select
(
'month'
)
->
options
(
ModelLawyerCost
::
MONTH
)
->
required
();
//$form->text('number')->required();
//$form->text('lname')->required();
$form
->
select
(
'number'
,
'律师姓名'
)
->
options
(
'/get-lawyer-list'
)
->
required
();
$form
->
text
(
'basic_salary'
)
->
required
();
$form
->
text
(
'special_additional'
)
->
required
();
$form
->
text
(
'social_person_fee'
)
->
required
();
$form
->
text
(
'social_company_fee'
)
->
required
();
$form
->
text
(
'social'
,
'社保'
)
->
readOnly
();
$form
->
text
(
'accumulation_fund_person_fee'
)
->
required
();
$form
->
text
(
'accumulation_fund_company_fee'
)
->
required
();
$form
->
text
(
'accumulation_fund'
,
'公积金'
)
->
readOnly
();
$form
->
text
(
'annual_inspection_fee'
)
->
required
();
$form
->
text
(
'annuity'
)
->
readOnly
();
$form
->
text
(
'assistant_fee'
)
->
readOnly
();
$form
->
text
(
'office_rental_fee'
)
->
readOnly
();
$form
->
text
(
'noticket_cost'
)
->
readOnly
();
$form
->
text
(
'advance_fee'
)
->
readOnly
();
$form
->
text
(
'personal_income_tax'
)
->
required
();
}
else
{
$form
->
text
(
'year'
)
->
default
(
date
(
'Y'
))
->
readOnly
();
//$form->select('month')->options(ModelLawyerCost::MONTH)->disable();
//$form->select('month')->options(ModelLawyerCost::MONTH)->disable();
// $form->select('month')
// $form->select('month')
// ->options(ModelLawyerCost::MONTH)
// ->options(ModelLawyerCost::MONTH)
...
@@ -170,25 +201,26 @@ protected function form()
...
@@ -170,25 +201,26 @@ protected function form()
// return $model->month;
// return $model->month;
// })
// })
// ->readOnly();
// ->readOnly();
$form
->
text
(
'month'
)
->
readOnly
();
$form
->
select
(
'month'
)
->
options
(
ModelLawyerCost
::
MONTH
)
->
required
();
$form
->
text
(
'number'
)
->
readOnly
();
$form
->
text
(
'number'
)
->
readOnly
();
$form
->
text
(
'lname'
)
->
readOnly
();
$form
->
text
(
'lname'
)
->
readOnly
();
$form
->
text
(
'basic_salary'
)
->
readOnly
();
$form
->
text
(
'basic_salary'
)
->
required
();
$form
->
text
(
'special_additional'
)
->
readOnly
();
$form
->
text
(
'special_additional'
)
->
required
();
$form
->
text
(
'social_person_fee'
)
->
readOnly
();
$form
->
text
(
'social_person_fee'
)
->
required
();
$form
->
text
(
'social_company_fee'
)
->
readOnly
();
$form
->
text
(
'social_company_fee'
)
->
required
();
$form
->
text
(
'social'
,
'社保'
)
->
readOnly
();
$form
->
text
(
'social'
,
'社保'
)
->
readOnly
();
$form
->
text
(
'accumulation_fund_person_fee'
)
->
readOnly
();
$form
->
text
(
'accumulation_fund_person_fee'
)
->
required
();
$form
->
text
(
'accumulation_fund_company_fee'
)
->
readOnly
();
$form
->
text
(
'accumulation_fund_company_fee'
)
->
required
();
$form
->
text
(
'accumulation_fund'
,
'公积金'
)
->
readOnly
();
$form
->
text
(
'accumulation_fund'
,
'公积金'
)
->
readOnly
();
$form
->
text
(
'annual_inspection_fee'
)
->
readOnly
();
$form
->
text
(
'annual_inspection_fee'
)
->
required
();
$form
->
text
(
'annuity'
)
->
required
();
$form
->
text
(
'annuity'
)
->
required
();
$form
->
text
(
'assistant_fee'
)
->
required
();
$form
->
text
(
'assistant_fee'
)
->
required
();
$form
->
text
(
'office_rental_fee'
)
->
required
();
$form
->
text
(
'office_rental_fee'
)
->
required
();
$form
->
text
(
'noticket_cost'
)
->
readOnly
();
$form
->
text
(
'noticket_cost'
)
->
readOnly
();
$form
->
text
(
'advance_fee'
);
$form
->
text
(
'advance_fee'
);
$form
->
text
(
'personal_income_tax'
)
->
readOnly
();
$form
->
text
(
'personal_income_tax'
)
->
readOnly
();
}
$form
->
disableCreatingCheck
();
$form
->
disableCreatingCheck
();
$form
->
disableEditingCheck
();
$form
->
disableEditingCheck
();
$form
->
disableViewCheck
();
$form
->
disableViewCheck
();
...
@@ -216,7 +248,7 @@ protected function form()
...
@@ -216,7 +248,7 @@ protected function form()
$
(
"input[name='social_person_fee'],input[name='social_company_fee']"
)
.
on
(
'blur'
,
function
()
{
$
(
"input[name='social_person_fee'],input[name='social_company_fee']"
)
.
on
(
'blur'
,
function
()
{
var
social_person_fee
=
$
(
"input[name='social_person_fee']"
)
.
val
()
.
length
>
0
?
$
(
"input[name='social_person_fee']"
)
.
val
()
:
0
;
var
social_person_fee
=
$
(
"input[name='social_person_fee']"
)
.
val
()
.
length
>
0
?
$
(
"input[name='social_person_fee']"
)
.
val
()
:
0
;
var
social_company_fee
=
$
(
"input[name='social_company_fee']"
)
.
val
()
.
length
>
0
?
$
(
"input[name='social_company_fee']"
)
.
val
()
:
0
;
var
social_company_fee
=
$
(
"input[name='social_company_fee']"
)
.
val
()
.
length
>
0
?
$
(
"input[name='social_company_fee']"
)
.
val
()
:
0
;
var
social_total
=
parseFloat
(
social_person_fee
)
+
parseFloat
(
social_company_fee
);
var
social_total
=
(
parseFloat
(
social_person_fee
)
+
parseFloat
(
social_company_fee
))
.
toFixed
(
2
);
$
(
"input[name='social']"
)
.
val
(
social_total
);
$
(
"input[name='social']"
)
.
val
(
social_total
);
});
});
...
@@ -243,6 +275,8 @@ protected function form()
...
@@ -243,6 +275,8 @@ protected function form()
var
office_rental_fee
=
$
(
"input[name='office_rental_fee']"
)
.
val
()
.
length
>
0
?
$
(
"input[name='office_rental_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
);
var
cost
=
parseFloat
(
salary
)
+
parseFloat
(
additional
)
+
parseFloat
(
social_company
)
+
parseFloat
(
accumulation_fund
)
+
parseFloat
(
assistant_fee
)
+
parseFloat
(
office_rental_fee
);
cost
=
cost
.
toFixed
(
2
);
$
(
"input[name='noticket_cost']"
)
.
val
(
cost
);
$
(
"input[name='noticket_cost']"
)
.
val
(
cost
);
});
});
});
});
...
@@ -282,12 +316,17 @@ function (Form $form, $result) {
...
@@ -282,12 +316,17 @@ function (Form $form, $result) {
$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
);
$noticket_cost
=
floatval
(
$basic_salary
)
+
floatval
(
$special_additional
)
+
floatval
(
$social_company_fee
)
+
floatval
(
$accumulation_fund_company_fee
)
+
floatval
(
$assistant_fee
)
+
floatval
(
$office_rental_fee
);
$noticket_cost
=
round
(
$noticket_cost
,
2
);
//社保
//社保
$social_person_fee
=
$_POST
[
'social_person_fee'
]
??
0
;
$social_person_fee
=
$_POST
[
'social_person_fee'
]
??
0
;
$social
=
floatval
(
$social_person_fee
)
+
floatval
(
$social_company_fee
);
$social
=
round
(
floatval
(
$social_person_fee
)
+
floatval
(
$social_company_fee
),
2
);
//公积金
//公积金
$accumulation_fund_person_fee
=
$_POST
[
'accumulation_fund_person_fee'
]
??
0
;
$accumulation_fund_person_fee
=
$_POST
[
'accumulation_fund_person_fee'
]
??
0
;
$accumulation_fund
=
floatval
(
$accumulation_fund_person_fee
)
+
floatval
(
$accumulation_fund_company_fee
);
$accumulation_fund
=
floatval
(
$accumulation_fund_person_fee
)
+
floatval
(
$accumulation_fund_company_fee
);
$accumulation_fund
=
round
(
$accumulation_fund
,
2
);
if
(
$result
)
{
if
(
$result
)
{
DB
::
table
(
'lawyer_cost'
)
->
where
(
"id"
,
$cost_id
)
->
update
([
'lawyer_id'
=>
$lawyer_id
,
'lname'
=>
$lname
,
'social'
=>
$social
,
'accumulation_fund'
=>
$accumulation_fund
,
'noticket_cost'
=>
$noticket_cost
]);
DB
::
table
(
'lawyer_cost'
)
->
where
(
"id"
,
$cost_id
)
->
update
([
'lawyer_id'
=>
$lawyer_id
,
'lname'
=>
$lname
,
'social'
=>
$social
,
'accumulation_fund'
=>
$accumulation_fund
,
'noticket_cost'
=>
$noticket_cost
]);
}
}
...
...
app/Models/CovenantReceivePayment.php
View file @
29ff5831
...
@@ -25,8 +25,12 @@ class CovenantReceivePayment extends Model
...
@@ -25,8 +25,12 @@ class CovenantReceivePayment extends Model
1
=>
'微信'
,
1
=>
'微信'
,
2
=>
'支付宝'
,
2
=>
'支付宝'
,
3
=>
'银行卡'
,
3
=>
'银行卡'
,
4
=>
'转账'
,
4
=>
'
对公
转账'
,
5
=>
'云闪付'
,
5
=>
'云闪付'
,
6
=>
'微信+支付宝'
,
7
=>
'现金+微信'
,
8
=>
'现金+支付宝'
,
9
=>
'银行卡+微信'
,
];
];
/**
/**
...
...
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