From d6a1fdbe1dbcc140d191cdf565d8eec5c9d98a84 Mon Sep 17 00:00:00 2001 From: dengbw Date: Thu, 20 Jan 2022 17:02:38 +0800 Subject: [PATCH] home_tranfer_120_3 --- admin/controllers/items/Transfer.php | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/admin/controllers/items/Transfer.php b/admin/controllers/items/Transfer.php index e8a9db6b..8ba4fb25 100644 --- a/admin/controllers/items/Transfer.php +++ b/admin/controllers/items/Transfer.php @@ -475,11 +475,29 @@ class Transfer extends HD_Controller if (!$info['arti_id']) { return $this->show_json(SYS_CODE_FAIL, '请选择随车物品'); } - if (!$takeCar[1]['uid'] && !$takeCar[1]['addr_id']) { - return $this->show_json(SYS_CODE_FAIL, '请选择提车人'); + if ($takeCar[1]['type'] == 2) {//提车信息员 + if (!$takeCar[1]['admin_id']) { + return $this->show_json(SYS_CODE_FAIL, '请选择提车信息员'); + } + if (!$takeCar[1]['addr_id']) { + return $this->show_json(SYS_CODE_FAIL, '请选择提车存放地'); + } + } else { + if (!$takeCar[1]['uid']) { + return $this->show_json(SYS_CODE_FAIL, '请选择提车人'); + } } - if (!$takeCar[3]['uid'] && !$takeCar[3]['addr_id']) { - return $this->show_json(SYS_CODE_FAIL, '请选择接车人'); + if ($takeCar[3]['type'] == 2) {//接车信息员 + if (!$takeCar[3]['admin_id']) { + return $this->show_json(SYS_CODE_FAIL, '请选择接车信息员'); + } + if (!$takeCar[3]['addr_id']) { + return $this->show_json(SYS_CODE_FAIL, '请选择接车存放地'); + } + } else { + if (!$takeCar[3]['uid']) { + return $this->show_json(SYS_CODE_FAIL, '请选择接车人'); + } } if ($trailer_fees) { if (!$info['fees_city']) {