|
|
@@ -355,8 +355,8 @@ class OrderController extends BaseController
|
|
|
$post['shopAdminId'] = $this->shopAdminId ?? 0;
|
|
|
$post['shopAdminName'] = $this->shopAdmin->name ?? '';
|
|
|
$groupId = isset($post['groupId']) && !empty($post['groupId']) ? $post['groupId'] : 0;
|
|
|
- //门店
|
|
|
- $post['fromType'] = 1;
|
|
|
+ //1 门店(收银台开单)
|
|
|
+ $post['fromType'] = $post['fromType'] ?? 1;
|
|
|
//客户
|
|
|
$customId = isset($post['customId']) && $post['customId'] > 0 ? $post['customId'] : 0;
|
|
|
if (empty($customId)) {
|
|
|
@@ -382,19 +382,15 @@ class OrderController extends BaseController
|
|
|
$hasPay = $post['hasPay'] ?? dict::getDict('hasPay', 'unPay');
|
|
|
|
|
|
$productJson = $post['product'] ?? '';
|
|
|
- if (empty($productJson) && empty($groupId)) {
|
|
|
- if (isset($post['lsGoodsPrice']) == false || $post['lsGoodsPrice'] <= 0) {
|
|
|
- util::fail('请填写金额或选商品');
|
|
|
- }
|
|
|
+ $productList = [];
|
|
|
+ if (!empty($productJson)) {
|
|
|
+ $productList = json_decode($productJson, true);
|
|
|
}
|
|
|
- $productList = json_decode($productJson, true);
|
|
|
if (empty($productList) && empty($groupId)) {
|
|
|
//商家上传图片开单并要求生成制作单
|
|
|
if (isset($post['unitGoodsPrice']) && !empty($post['unitGoodsPrice'])) {
|
|
|
$productList = GoodsClass::kdWorkGoods($post);
|
|
|
- print_r($productList);
|
|
|
}
|
|
|
- echo 'aaa';die;
|
|
|
}
|
|
|
|
|
|
if (empty($productList) && empty($groupId)) {
|