| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- <?php
- namespace app\api\validate;
- use app\common\enum\PayEnum;
- use app\common\service\ConfigService;
- use app\common\validate\BaseValidate;
- /**
- * 服务订单验证器
- * Class ServiceOrderValidate
- * @package app\api\validate
- */
- class ServiceOrderValidate extends BaseValidate
- {
- protected $rule = [
- 'sn'=>'require',
- 'address' => 'require',
- 'appointment_time' => 'require|dateFormat:Y-m-d H:i:s',
- 'pay_way' => 'require',
- 'goods_id' => 'require',
- 'contact_number' => 'require',
- 'contact_people' => 'require'
- ];
- protected $message = [
- 'sn.require' => '订单编号错误',
- 'address.require' => '请填写地址',
- 'appointment_time.require' => '请填写预约上门时间',
- 'appointment_time.dateFormat' => '预约上门时间格式错误',
- 'pay_way.require' => '请选择支付方式',
- 'goods_id.require' => '订单商品不存在',
- 'contact_number.require' => '联系电话不存在',
- 'contact_people.require' => '联系人不存在',
- ];
- public function sceneAdd()
- {
- return $this->only(['address','appointment_time','pay_way','goods_id','contact_number','contact_people']);
- }
- public function sceneDetail()
- {
- return $this->only(['sn']);
- }
- public function sceneWorker()
- {
- return $this->only(['sn']);
- }
- public function sceneCancel()
- {
- return $this->only(['sn']);
- }
- public function scenePrice()
- {
- return $this->only(['sn']);
- }
- public function sceneFinished()
- {
- return $this->only(['sn']);
- }
- public function sceneQueryEffective()
- {
- return $this->only(['sn']);
- }
- public function sceneReceiveEffective()
- {
- return $this->only(['sn','goods_id']);
- }
- public function sceneFirmOrderSave()
- {
- return $this->only(['address','appointment_time','pay_way','contact_number','contact_people']);
- }
- }
|