114 lines
3.1 KiB
PHP
114 lines
3.1 KiB
PHP
<?php
|
||
// +----------------------------------------------------------------------
|
||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||
// +----------------------------------------------------------------------
|
||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||
// | 开源版本可自由商用,可去除界面版权logo
|
||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||
// | 访问官网:https://www.likeadmin.cn
|
||
// | likeadmin团队 版权所有 拥有最终解释权
|
||
// +----------------------------------------------------------------------
|
||
// | author: likeadminTeam
|
||
// +----------------------------------------------------------------------
|
||
|
||
namespace app\adminapi\validate\expense;
|
||
|
||
|
||
use app\common\validate\BaseValidate;
|
||
|
||
|
||
/**
|
||
* ExpenseReimbursement验证器
|
||
* Class ExpenseReimbursementValidate
|
||
* @package app\adminapi\validate\expense
|
||
*/
|
||
class ExpenseReimbursementValidate extends BaseValidate
|
||
{
|
||
|
||
/**
|
||
* 设置校验规则
|
||
* @var string[]
|
||
*/
|
||
protected $rule = [
|
||
'id' => 'require',
|
||
'org_id' => 'require',
|
||
'dept_id' => 'require',
|
||
'approve_id' => 'require',
|
||
'reimburser' => 'require',
|
||
'reimbursement_date' => 'require',
|
||
'customer_id' => 'require',
|
||
'pay_type' => 'require',
|
||
'payee_name' => 'require',
|
||
'payee_bank' => 'require',
|
||
'payee_account' => 'require',
|
||
];
|
||
|
||
|
||
/**
|
||
* 参数描述
|
||
* @var string[]
|
||
*/
|
||
protected $field = [
|
||
'id' => 'id',
|
||
'org_id' => '机构id',
|
||
'dept_id' => '部门id',
|
||
'approve_id' => '审批id',
|
||
'reimburser' => '报销人',
|
||
'reimbursement_date' => '报销日期',
|
||
'customer_id' => '客户id',
|
||
'pay_type' => '付款方式',
|
||
'payee_name' => '收款人姓名',
|
||
'payee_bank' => '收款银行',
|
||
'payee_account' => '收款账号',
|
||
];
|
||
|
||
|
||
/**
|
||
* @notes 添加场景
|
||
* @return ExpenseReimbursementValidate
|
||
* @author likeadmin
|
||
* @date 2023/12/19 11:12
|
||
*/
|
||
public function sceneAdd()
|
||
{
|
||
return $this->only(['org_id','dept_id','approve_id','reimburser','reimbursement_date','customer_id','pay_type','payee_name','payee_bank','payee_account']);
|
||
}
|
||
|
||
|
||
/**
|
||
* @notes 编辑场景
|
||
* @return ExpenseReimbursementValidate
|
||
* @author likeadmin
|
||
* @date 2023/12/19 11:12
|
||
*/
|
||
public function sceneEdit()
|
||
{
|
||
return $this->only(['id','org_id','dept_id','approve_id','reimburser','reimbursement_date','customer_id','pay_type','payee_name','payee_bank','payee_account']);
|
||
}
|
||
|
||
|
||
/**
|
||
* @notes 删除场景
|
||
* @return ExpenseReimbursementValidate
|
||
* @author likeadmin
|
||
* @date 2023/12/19 11:12
|
||
*/
|
||
public function sceneDelete()
|
||
{
|
||
return $this->only(['id']);
|
||
}
|
||
|
||
|
||
/**
|
||
* @notes 详情场景
|
||
* @return ExpenseReimbursementValidate
|
||
* @author likeadmin
|
||
* @date 2023/12/19 11:12
|
||
*/
|
||
public function sceneDetail()
|
||
{
|
||
return $this->only(['id']);
|
||
}
|
||
|
||
} |