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
cc4303e0
Commit
cc4303e0
authored
Dec 10, 2024
by
lizhilin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新
parent
0fd866fa
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
74 additions
and
12 deletions
+74
-12
app/Admin/Actions/CovenantReceive.php
+1
-1
app/Admin/Controllers/PrincipalController.php
+54
-5
app/Admin/Controllers/ViewCovenantReceivedController.php
+7
-5
app/Admin/Forms/CovenantReceiveForm.php
+1
-1
app/Admin/Repositories/Covenant.php
+1
-0
app/Models/Covenant.php
+1
-0
app/Models/CovenantReceivePayment.php
+9
-0
No files found.
app/Admin/Actions/CovenantReceive.php
View file @
cc4303e0
...
...
@@ -60,7 +60,7 @@ public function render()
// 这里直接创建一个modal框 model的内容由工具表单提供,这里也需要创建一个工具表单才行
return
Modal
::
make
()
->
lg
()
->
title
(
'添加收款'
.
$this
->
cid
)
->
title
(
'添加收款'
)
->
button
(
"添加收款"
)
->
body
(
CovenantReceiveForm
::
make
()
->
payload
([
'cid'
=>
$this
->
cid
]));
//->button("<button class='btn btn-sm btn-primary'>$this->title</button>"); // 这个button就是对应上面的按钮
...
...
app/Admin/Controllers/PrincipalController.php
View file @
cc4303e0
...
...
@@ -10,6 +10,7 @@
use
Dcat\Admin\Http\Controllers\AdminController
;
use
Illuminate\Http\Request
;
use
Illuminate\Support\Facades\DB
;
use
Dcat\Admin\Admin
;
class
PrincipalController
extends
AdminController
{
...
...
@@ -95,16 +96,16 @@ protected function form()
$form
->
radio
(
'wtype'
,
'类型'
)
->
when
(
1
,
function
(
Form
$form
)
{
$form
->
text
(
'company'
);
$form
->
text
(
'tax_number'
);
$form
->
text
(
'company'
)
->
setLabelClass
([
'asterisk'
])
;
$form
->
text
(
'tax_number'
)
->
setLabelClass
([
'asterisk'
])
;
$form
->
text
(
'tel'
);
$form
->
text
(
'bank_name'
);
$form
->
text
(
'bank_name'
,
'开户银行'
);
$form
->
text
(
'bank_account'
);
$form
->
text
(
'contacts'
);
})
->
when
(
2
,
function
(
Form
$form
)
{
$form
->
text
(
'name'
);
$form
->
text
(
'identity_card'
);
$form
->
text
(
'name'
)
->
setLabelClass
([
'asterisk'
])
;
$form
->
text
(
'identity_card'
)
->
setLabelClass
([
'asterisk'
])
;
})
->
options
([
1
=>
'单位'
,
...
...
@@ -133,6 +134,54 @@ protected function form()
$form
->
display
(
'updated_at'
);
});
$form
->
submitted
(
function
(
Form
$form
)
{
$wtype
=
isset
(
$_POST
[
'wtype'
])
?
$_POST
[
'wtype'
]
:
0
;
$company
=
isset
(
$_POST
[
'company'
])
?
$_POST
[
'company'
]
:
''
;
$tax_number
=
isset
(
$_POST
[
'tax_number'
])
?
$_POST
[
'tax_number'
]
:
''
;
$name
=
isset
(
$_POST
[
'name'
])
?
$_POST
[
'name'
]
:
''
;
//姓名
$identity_card
=
isset
(
$_POST
[
'identity_card'
])
?
$_POST
[
'identity_card'
]
:
''
;
if
(
$wtype
==
1
)
{
if
(
!
$company
)
{
$form
->
responseValidationMessages
(
'company'
,
"单位全称不为空"
);
}
if
(
!
$tax_number
)
{
$form
->
responseValidationMessages
(
'tax_number'
,
"税号不为空"
);
}
}
elseif
(
$wtype
==
2
)
{
if
(
!
$name
)
{
$form
->
responseValidationMessages
(
'name'
,
"姓名"
);
}
if
(
!
$identity_card
)
{
$form
->
responseValidationMessages
(
'identity_card'
,
"身份证号码不为空"
);
}
}
});
// Admin::script(
// <<<JS
// $(function () {
// //社保
// $("input[name='wtype']").on('click', function() {
// var wtype = $(this).val();
// console.log('-----'+wtype);
// if(wtype==1) {
// $("input[name='company']").attr('required',1);
// $("input[name='tax_number']").attr('required',1);
// $("input[name='name']").removeAttr('required');
// $("input[name='identity_card']").removeAttr('required');
// } else {
// $("input[name='name']").attr('required',1);
// $("input[name='identity_card']").attr('required',1);
// $("input[name='company']").removeAttr('required');
// $("input[name='tax_number']").removeAttr('required');
// }
// });
// });
// JS
// );
return
$form
;
}
...
...
app/Admin/Controllers/ViewCovenantReceivedController.php
View file @
cc4303e0
...
...
@@ -55,7 +55,9 @@ protected function grid()
$grid
->
column
(
'received_type'
,
'收款账户'
)
->
display
(
function
(
$val
)
{
return
$val
==
1
?
'基本户'
:
'其它'
;
});
$grid
->
column
(
'pay_method'
,
'支付方式'
);
$grid
->
column
(
'pay_method'
,
'支付方式'
)
->
display
(
function
(
$val
)
{
return
ModelsCovenantReceivePayment
::
PAYMENT_METHOD
[
$val
];
});
$grid
->
column
(
'received_at'
,
'收款时间'
);
$grid
->
column
(
'received_amount'
,
'收款金额'
);
$grid
->
column
(
'paymenter'
,
'付款人'
);
...
...
@@ -114,10 +116,10 @@ protected function form()
{
$form
=
Form
::
make
(
new
ModelsCovenantReceivePayment
(),
function
(
Form
$form
)
{
//$form->display('id');
$form
->
select
(
'received_type'
,
'账户类型'
)
->
options
(
ModelsCovenantReceivePayment
::
RECEIVEDTYPE
);
$form
->
text
(
'pay_method'
,
'支付方式'
);
$form
->
date
(
'received_at'
,
'收款时间'
)
->
format
(
'YYYY-MM-DD'
);
$form
->
text
(
'received_amount'
,
'收款金额'
);
$form
->
select
(
'received_type'
,
'账户类型'
)
->
options
(
ModelsCovenantReceivePayment
::
RECEIVEDTYPE
)
->
required
()
;
$form
->
select
(
'pay_method'
,
'支付方式'
)
->
options
(
ModelsCovenantReceivePayment
::
PAYMENT_METHOD
)
->
required
(
);
$form
->
date
(
'received_at'
,
'收款时间'
)
->
format
(
'YYYY-MM-DD'
)
->
required
()
;
$form
->
text
(
'received_amount'
,
'收款金额'
)
->
required
()
;
$form
->
text
(
'paymenter'
,
'付款人'
);
$form
->
disableCreatingCheck
();
...
...
app/Admin/Forms/CovenantReceiveForm.php
View file @
cc4303e0
...
...
@@ -71,7 +71,7 @@ public function handle(array $input)
public
function
form
()
{
$this
->
select
(
'received_type'
,
'收款账户'
)
->
options
([
1
=>
'基本户'
,
2
=>
'其它'
])
->
required
();
$this
->
text
(
'pay_method'
,
'支付方式'
)
->
required
();
$this
->
select
(
'pay_method'
,
'支付方式'
)
->
options
(
ModelsCovenantReceivePayment
::
PAYMENT_METHOD
)
->
required
();
$this
->
date
(
'received_at'
,
'收款时间'
)
->
format
(
'YYYY-MM-DD'
)
->
default
(
date
(
"Y-m-d"
))
->
required
();
$this
->
text
(
'received_amount'
,
'收款金额'
)
->
required
();
$this
->
text
(
'paymenter'
,
'付款人'
);
...
...
app/Admin/Repositories/Covenant.php
View file @
cc4303e0
...
...
@@ -28,6 +28,7 @@ class Covenant extends EloquentRepository
5
=>
'咨询和代写法律文书'
,
6
=>
'仲裁业务'
,
7
=>
'法律援助'
,
8
=>
'其它'
,
];
//结算方式
...
...
app/Models/Covenant.php
View file @
cc4303e0
...
...
@@ -22,6 +22,7 @@ class Covenant extends Model
5
=>
'咨询和代写法律文书'
,
6
=>
'仲裁业务'
,
7
=>
'法律援助'
,
8
=>
'其它'
,
];
//结算方式
...
...
app/Models/CovenantReceivePayment.php
View file @
cc4303e0
...
...
@@ -20,6 +20,15 @@ class CovenantReceivePayment extends Model
2
=>
'其它'
,
];
//支付方式
public
const
PAYMENT_METHOD
=
[
1
=>
'微信'
,
2
=>
'支付宝'
,
3
=>
'银行卡'
,
4
=>
'转账'
,
5
=>
'云闪付'
,
];
//已收款未开票
public
static
function
getReceiptNoinvoice
(
$lawyer_id
=
0
)
...
...
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