|
|
@@ -369,20 +369,20 @@ class OrderController extends BaseController
|
|
|
//默认情况开单员工和收款员工是同个人
|
|
|
$staffId = $this->shopAdminId ?? 0;
|
|
|
$staffName = $this->shopAdmin->name ?? '';
|
|
|
- if (isset($post['shopAdminId']) == false || empty($post['shopAdminId'])) {
|
|
|
+ if (empty($post['shopAdminId'])) {
|
|
|
$post['shopAdminId'] = $staffId;
|
|
|
$post['shopAdminName'] = $staffName;
|
|
|
}
|
|
|
- if (isset($post['getStaffId']) == false || empty($post['getStaffId'])) {
|
|
|
+ if (empty($post['getStaffId'])) {
|
|
|
$post['getStaffId'] = $staffId;
|
|
|
$post['getStaffName'] = $this->shopAdmin->name ?? '';
|
|
|
}
|
|
|
- $groupId = isset($post['groupId']) && !empty($post['groupId']) ? $post['groupId'] : 0;
|
|
|
+ $groupId = !empty($post['groupId']) ? $post['groupId'] : 0;
|
|
|
|
|
|
$post['fromType'] = $post['fromType'] ?? 1;
|
|
|
|
|
|
if ($post['fromType'] == dict::getDict('fromType', 'friend')) {
|
|
|
- if (isset($post['bookName']) == false || empty($post['bookName'])) {
|
|
|
+ if (empty($post['bookName'])) {
|
|
|
util::fail('请填写订花人姓名');
|
|
|
}
|
|
|
}
|
|
|
@@ -400,13 +400,13 @@ class OrderController extends BaseController
|
|
|
$post['customName'] = $customName;
|
|
|
$post['customNamePy'] = stringUtil::py($customName);
|
|
|
|
|
|
- if (isset($post['receiveMobile']) && !empty($post['receiveMobile'])) {
|
|
|
- if (stringUtil::isMobile($post['receiveMobile']) == false) {
|
|
|
+ if (!empty($post['receiveMobile'])) {
|
|
|
+ if (!stringUtil::isMobile($post['receiveMobile'])) {
|
|
|
util::fail('请填写正确的收花人手机号');
|
|
|
}
|
|
|
}
|
|
|
- if (isset($post['bookMobile']) && !empty($post['bookMobile'])) {
|
|
|
- if (stringUtil::isMobile($post['bookMobile']) == false) {
|
|
|
+ if (!empty($post['bookMobile'])) {
|
|
|
+ if (!stringUtil::isMobile($post['bookMobile'])) {
|
|
|
util::fail('请填写正确的订花人手机号');
|
|
|
}
|
|
|
}
|
|
|
@@ -425,9 +425,9 @@ class OrderController extends BaseController
|
|
|
}
|
|
|
if (empty($productList) && empty($groupId)) {
|
|
|
//商家手机上开单并生成制作单
|
|
|
- if (isset($post['unitGoodsPrice']) && !empty($post['unitGoodsPrice'])) {
|
|
|
+ if (!empty($post['unitGoodsPrice'])) {
|
|
|
$unitGoodsPrice = $post['unitGoodsPrice'];
|
|
|
- if (is_numeric($unitGoodsPrice) == false) {
|
|
|
+ if (!is_numeric($unitGoodsPrice)) {
|
|
|
util::fail('请输入正确的单价');
|
|
|
}
|
|
|
$productList = GoodsClass::orderCreateGoods($post);
|
|
|
@@ -435,9 +435,9 @@ class OrderController extends BaseController
|
|
|
}
|
|
|
|
|
|
if (empty($productList) && empty($groupId)) {
|
|
|
- if (isset($post['lsGoodsPrice']) == false || $post['lsGoodsPrice'] <= 0) {
|
|
|
+ if ($post['lsGoodsPrice'] <= 0) {
|
|
|
$lsGoodsPrice = $post['lsGoodsPrice'];
|
|
|
- if (is_numeric($lsGoodsPrice) == false) {
|
|
|
+ if (!is_numeric($lsGoodsPrice)) {
|
|
|
util::fail('请输入正确的金额');
|
|
|
}
|
|
|
util::fail('请填写金额或选商品');
|