|
|
@@ -437,19 +437,20 @@ class OrderController extends BaseController
|
|
|
util::fail('请填写订花人姓名');
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- $hdId = $post['hdId'] ?? 0;
|
|
|
+ $customId = $post['customId'] ?? 0;
|
|
|
+ $custom = CustomClass::getById($customId, true);
|
|
|
+ if (empty($custom)) {
|
|
|
+ util::fail('没有找到客户哦');
|
|
|
+ }
|
|
|
+ $hdId = $custom->hdId ?? 0;
|
|
|
$hd = HdClass::getById($hdId, true);
|
|
|
if (empty($hd)) {
|
|
|
util::fail('客户对应的花店信息缺失,编号869');
|
|
|
}
|
|
|
$hdName = $hd->name ?? '';
|
|
|
+ $post['hdId'] = $hdId;
|
|
|
$post['hdName'] = $hdName;
|
|
|
- $customId = $hd->customId ?? 0;
|
|
|
- $custom = CustomClass::getById($customId, true);
|
|
|
- if (empty($custom)) {
|
|
|
- util::fail('没有找到客户哦');
|
|
|
- }
|
|
|
+
|
|
|
$post['customId'] = $customId;
|
|
|
$customName = $custom->name ?? '';
|
|
|
$post['customName'] = $customName;
|