|
|
@@ -201,18 +201,18 @@ class OrderController extends BaseController
|
|
|
util::fail('订单不是待发货状态');
|
|
|
}
|
|
|
|
|
|
- $workList = WorkClass::getAllByCondition(['orderId' => $id], null, '*', null, true);
|
|
|
- if (!empty($workList)) {
|
|
|
- $unComplete = false;
|
|
|
- foreach ($workList as $work) {
|
|
|
- if ($work->status != 1) {
|
|
|
- $unComplete = true;
|
|
|
- }
|
|
|
- }
|
|
|
- if ($unComplete == true) {
|
|
|
- util::fail('还有制作单没有完成');
|
|
|
- }
|
|
|
- }
|
|
|
+// $workList = WorkClass::getAllByCondition(['orderId' => $id], null, '*', null, true);
|
|
|
+// if (!empty($workList)) {
|
|
|
+// $unComplete = false;
|
|
|
+// foreach ($workList as $work) {
|
|
|
+// if ($work->status != 1) {
|
|
|
+// $unComplete = true;
|
|
|
+// }
|
|
|
+// }
|
|
|
+// if ($unComplete == true) {
|
|
|
+// util::fail('还有制作单没有完成');
|
|
|
+// }
|
|
|
+// }
|
|
|
|
|
|
$order->status = 4;
|
|
|
$order->save();
|
|
|
@@ -582,7 +582,7 @@ class OrderController extends BaseController
|
|
|
$post['product'] = $productList;
|
|
|
|
|
|
//解决重复提交
|
|
|
- util::checkRepeatCommit($this->adminId, 3);
|
|
|
+ util::checkRepeatCommit($this->adminId, 2);
|
|
|
|
|
|
$reduceStock = $post['reduceStock'] ?? 0;
|
|
|
if ($reduceStock == 1) {
|
|
|
@@ -1040,11 +1040,11 @@ class OrderController extends BaseController
|
|
|
if (!empty($status)) {
|
|
|
$where['status'] = $get['status'];
|
|
|
}
|
|
|
- $debt = $get['debt'] ?? 2;
|
|
|
- if ($debt != 2) {
|
|
|
+ $debt = $get['debt'] ?? -1;
|
|
|
+ if ($debt > -1) {
|
|
|
$where['debt'] = $debt;
|
|
|
}
|
|
|
- if (isset($get['shopAdminId']) && !empty($get['shopAdminId'])) {
|
|
|
+ if (!empty($get['shopAdminId'])) {
|
|
|
$where['shopAdminId'] = $get['shopAdminId'];
|
|
|
}
|
|
|
if (!empty($search)) {
|
|
|
@@ -1069,11 +1069,13 @@ class OrderController extends BaseController
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- $searchTime = $get['searchTime'] ?? '';
|
|
|
- if (!empty($searchTime)) {
|
|
|
+ if (isset($get['repeat']) && $get['repeat'] > -1) {
|
|
|
+ $where['repeat'] = $get['repeat'];
|
|
|
+ }
|
|
|
+ if (!empty($get['searchTime'])) {
|
|
|
$startTime = $get['startTime'] ?? '';
|
|
|
$endTime = $get['endTime'] ?? '';
|
|
|
- $period = dateUtil::formatTime($searchTime, $startTime, $endTime);
|
|
|
+ $period = dateUtil::formatTime($get['searchTime'], $startTime, $endTime);
|
|
|
$where['addTime'] = ['between', [$period['startTime'], $period['endTime']]];
|
|
|
}
|
|
|
$list = OrderService::getOrderList($where);
|