PartsStockReload.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. namespace addons\qingdongams\validate;
  3. use think\Validate;
  4. //零件库存申请记录
  5. class PartsStockReload extends Validate
  6. {
  7. /**
  8. * 验证规则
  9. */
  10. protected $rule = [
  11. 'create_staff_id' => 'number',
  12. 'type' => 'require|number',
  13. 'odd_numbers' => 'require|max:64',
  14. 'storage_time' => 'date',
  15. 'desc' => 'max:1000',
  16. 'flow_staff_ids'=>'require|max:64'
  17. ];
  18. /**
  19. * 提示消息
  20. */
  21. protected $message = [];
  22. /**
  23. * 字段描述
  24. */
  25. protected $field = [
  26. 'create_staff_id' => '员工',
  27. 'type' => '类型',
  28. 'odd_numbers' => '单号',
  29. 'storage_time' => '时间',
  30. 'desc' => '备注',
  31. 'flow_staff_ids' => '审批人',
  32. ];
  33. /**
  34. * 验证场景
  35. */
  36. protected $scene = [
  37. 'create' => [
  38. 'create_staff_id',
  39. 'type',
  40. 'odd_numbers',
  41. 'storage_time',
  42. 'desc','flow_staff_ids'
  43. ],
  44. 'edit' => [
  45. ],
  46. ];
  47. }