37 lines
1.6 KiB
PHP
37 lines
1.6 KiB
PHP
<?php
|
|
|
|
namespace app\common\validate;
|
|
use think\Validate;
|
|
|
|
class BillValidate extends Validate{
|
|
|
|
protected $rule = [
|
|
'order_no|询价单号' => 'require',
|
|
'report_no|报告编号' => 'require',
|
|
'bill_cate|票据种类' => 'require',
|
|
'bill_type|票据类型' => 'require',
|
|
'invoice_type|发票类型' => 'require',
|
|
'bill_amount|金额' => 'require',
|
|
'bill_content|内容' => 'require',
|
|
'bill_title|客户名称' => 'require',
|
|
'taxpayer_no|纳税人识别号' => 'require',
|
|
'tel|联系电话' => 'require',
|
|
'bank_id|银行id' => 'require',
|
|
'bank_branch_id|分行id' => 'require',
|
|
'bank_name|公账开户行' => 'require',
|
|
'bank_account|公账帐号' => 'require',
|
|
'company_addr|公司地址' => 'require',
|
|
];
|
|
|
|
protected $message = [
|
|
|
|
];
|
|
|
|
protected $scene = [
|
|
'companyTicket' => ['order_no', 'report_no', 'bill_cate', 'bill_type', 'invoice_type', 'bill_amount', 'bill_content', 'bill_title', 'taxpayer_no', 'tel', 'bank_id', 'bank_branch_id', 'bank_name', 'bank_account', 'company_addr'], //企业专票
|
|
'companyGeneral' => ['order_no', 'report_no', 'bill_cate', 'bill_type', 'invoice_type', 'bill_amount', 'bill_content', 'bill_title', 'taxpayer_no'], //企业普票
|
|
'personGeneral' => ['order_no', 'report_no', 'bill_cate', 'bill_type', 'invoice_type', 'bill_amount','bill_content','bill_title'], //个人普票
|
|
'bill'=> ['order_no', 'report_no', 'bill_cate', 'bill_type', 'bill_amount','bill_content','bill_title'], //票据
|
|
];
|
|
|
|
} |