114 lines
3.2 KiB
PHP
114 lines
3.2 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\financial;
|
|||
|
|
|||
|
|
|||
|
use app\common\validate\BaseValidate;
|
|||
|
|
|||
|
|
|||
|
/**
|
|||
|
* 财务管理--差旅费报销单验证器
|
|||
|
* Class FinancialTravelReimbursementValidate
|
|||
|
* @package app\adminapi\validate\financial
|
|||
|
*/
|
|||
|
class FinancialTravelReimbursementValidate extends BaseValidate
|
|||
|
{
|
|||
|
|
|||
|
/**
|
|||
|
* 设置校验规则
|
|||
|
* @var string[]
|
|||
|
*/
|
|||
|
protected $rule = [
|
|||
|
'id' => 'require',
|
|||
|
'code' => 'require',
|
|||
|
'approve_dept' => 'require',
|
|||
|
'cost_type' => 'require',
|
|||
|
'pay_type' => 'require',
|
|||
|
'tax_deductible_amount' => 'require',
|
|||
|
'bill_num' => 'require',
|
|||
|
'fee_application_id' => 'require',
|
|||
|
'content' => 'require',
|
|||
|
'create_user' => 'require',
|
|||
|
'create_time' => 'require',
|
|||
|
];
|
|||
|
|
|||
|
|
|||
|
/**
|
|||
|
* 参数描述
|
|||
|
* @var string[]
|
|||
|
*/
|
|||
|
protected $field = [
|
|||
|
'id' => 'id',
|
|||
|
'code' => '单据编号',
|
|||
|
'approve_dept' => '审批部门',
|
|||
|
'cost_type' => '费用类别',
|
|||
|
'pay_type' => '支付方式',
|
|||
|
'tax_deductible_amount' => '可抵扣税额',
|
|||
|
'bill_num' => '附单据张数',
|
|||
|
'fee_application_id' => '关联费用申请',
|
|||
|
'content' => '事由',
|
|||
|
'create_user' => '申请人',
|
|||
|
'create_time' => '申请日期',
|
|||
|
];
|
|||
|
|
|||
|
|
|||
|
/**
|
|||
|
* @notes 添加场景
|
|||
|
* @return FinancialTravelReimbursementValidate
|
|||
|
* @author likeadmin
|
|||
|
* @date 2024/03/28 14:45
|
|||
|
*/
|
|||
|
public function sceneAdd()
|
|||
|
{
|
|||
|
return $this->only(['code','approve_dept','cost_type','pay_type','tax_deductible_amount','bill_num','fee_application_id','content','create_user','create_time']);
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
/**
|
|||
|
* @notes 编辑场景
|
|||
|
* @return FinancialTravelReimbursementValidate
|
|||
|
* @author likeadmin
|
|||
|
* @date 2024/03/28 14:45
|
|||
|
*/
|
|||
|
public function sceneEdit()
|
|||
|
{
|
|||
|
return $this->only(['id','code','approve_dept','cost_type','pay_type','tax_deductible_amount','bill_num','fee_application_id','content','create_user','create_time']);
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
/**
|
|||
|
* @notes 删除场景
|
|||
|
* @return FinancialTravelReimbursementValidate
|
|||
|
* @author likeadmin
|
|||
|
* @date 2024/03/28 14:45
|
|||
|
*/
|
|||
|
public function sceneDelete()
|
|||
|
{
|
|||
|
return $this->only(['id']);
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
/**
|
|||
|
* @notes 详情场景
|
|||
|
* @return FinancialTravelReimbursementValidate
|
|||
|
* @author likeadmin
|
|||
|
* @date 2024/03/28 14:45
|
|||
|
*/
|
|||
|
public function sceneDetail()
|
|||
|
{
|
|||
|
return $this->only(['id']);
|
|||
|
}
|
|||
|
|
|||
|
}
|