|
|
@@ -537,13 +537,9 @@ class OrderController extends BaseController
|
|
|
$post['staffName'] = $this->shopAdmin->name ?? '';
|
|
|
$post['flowerNum'] = isset($post['flowerNum']) && $post['flowerNum'] > 0 ? $post['flowerNum'] : 0;
|
|
|
|
|
|
- //如果需要生成制作单,要升到最新版本
|
|
|
- $needWork = $post['needWork'] ?? 0;
|
|
|
$version = $post['version'] ?? 0;
|
|
|
- if ($needWork == 1) {
|
|
|
- if ($version < 3) {
|
|
|
- util::fail('请升级版本,或用小程序');
|
|
|
- }
|
|
|
+ if ($version < 3) {
|
|
|
+ util::fail('请升级版本,或用小程序');
|
|
|
}
|
|
|
|
|
|
//默认情况开单员工和收款员工是同个人
|
|
|
@@ -762,11 +758,12 @@ class OrderController extends BaseController
|
|
|
$shop = ShopClass::getById($shopId, true);
|
|
|
WxMessageClass::gatheringIncomeInform($shop, $order);
|
|
|
|
|
|
- //需要制作单
|
|
|
- if($needWork == 1){
|
|
|
+ //如果需要生成制作单
|
|
|
+ $needWork = $post['needWork'] ?? 0;
|
|
|
+ if ($needWork == 1) {
|
|
|
$main = $this->main;
|
|
|
$shopExt = ShopExtClass::getByCondition(['shopId' => $this->shopId], true);
|
|
|
- WorkClass::toDoWork($order,$main,$shopExt);
|
|
|
+ WorkClass::toDoWork($order, $main, $shopExt);
|
|
|
}
|
|
|
|
|
|
util::success($return);
|