|
@@ -189,6 +189,9 @@ class OrderController extends BaseController
|
|
|
//确认送达 ssh 20250902
|
|
//确认送达 ssh 20250902
|
|
|
public function actionReach()
|
|
public function actionReach()
|
|
|
{
|
|
{
|
|
|
|
|
+ //解决重复提交
|
|
|
|
|
+ util::checkRepeatCommit($this->adminId, 5);
|
|
|
|
|
+
|
|
|
$get = Yii::$app->request->get();
|
|
$get = Yii::$app->request->get();
|
|
|
$id = $get['id'] ?? 0;
|
|
$id = $get['id'] ?? 0;
|
|
|
$order = OrderClass::getById($id, true);
|
|
$order = OrderClass::getById($id, true);
|
|
@@ -208,11 +211,9 @@ class OrderController extends BaseController
|
|
|
if ($order->status == 4) {
|
|
if ($order->status == 4) {
|
|
|
util::fail('订单已经送到了');
|
|
util::fail('订单已经送到了');
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
- if ($order->sendStatus == 1 || $order->sendStatus == 2) {
|
|
|
|
|
|
|
+ if (in_array($order->sendStatus, [-1, 0, 1, 2, 4, 5])) {
|
|
|
util::fail('由跑腿送货,无需确认');
|
|
util::fail('由跑腿送货,无需确认');
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
$order->status = 4;
|
|
$order->status = 4;
|
|
|
$order->save();
|
|
$order->save();
|
|
|
util::complete('操作成功');
|
|
util::complete('操作成功');
|
|
@@ -221,6 +222,9 @@ class OrderController extends BaseController
|
|
|
//确认取货
|
|
//确认取货
|
|
|
public function actionFetch()
|
|
public function actionFetch()
|
|
|
{
|
|
{
|
|
|
|
|
+ //解决重复提交
|
|
|
|
|
+ util::checkRepeatCommit($this->adminId, 5);
|
|
|
|
|
+
|
|
|
$get = Yii::$app->request->get();
|
|
$get = Yii::$app->request->get();
|
|
|
$id = $get['id'] ?? 0;
|
|
$id = $get['id'] ?? 0;
|
|
|
$order = OrderClass::getById($id, true);
|
|
$order = OrderClass::getById($id, true);
|
|
@@ -234,9 +238,12 @@ class OrderController extends BaseController
|
|
|
if ($order->status == 1) {
|
|
if ($order->status == 1) {
|
|
|
util::fail('订单待付款');
|
|
util::fail('订单待付款');
|
|
|
}
|
|
}
|
|
|
- if ($order->status == 3 || $order->status == 4) {
|
|
|
|
|
|
|
+ if ($order->status == 4) {
|
|
|
util::fail('订单已取过了');
|
|
util::fail('订单已取过了');
|
|
|
}
|
|
}
|
|
|
|
|
+ if (in_array($order->sendStatus, [-1, 0, 1, 2, 4, 5])) {
|
|
|
|
|
+ util::fail('由跑腿送货,无需确认');
|
|
|
|
|
+ }
|
|
|
$order->status = 4;
|
|
$order->status = 4;
|
|
|
$order->save();
|
|
$order->save();
|
|
|
util::complete('操作成功');
|
|
util::complete('操作成功');
|
|
@@ -245,8 +252,11 @@ class OrderController extends BaseController
|
|
|
//确认发货
|
|
//确认发货
|
|
|
public function actionSend()
|
|
public function actionSend()
|
|
|
{
|
|
{
|
|
|
|
|
+ //解决重复提交
|
|
|
|
|
+ util::checkRepeatCommit($this->adminId, 5);
|
|
|
|
|
+
|
|
|
$get = Yii::$app->request->get();
|
|
$get = Yii::$app->request->get();
|
|
|
- $id = isset($get['id']) ? $get['id'] : 0;
|
|
|
|
|
|
|
+ $id = $get['id'] ?? 0;
|
|
|
$order = OrderClass::getById($id, true);
|
|
$order = OrderClass::getById($id, true);
|
|
|
if (empty($order)) {
|
|
if (empty($order)) {
|
|
|
util::fail('没有找到订单');
|
|
util::fail('没有找到订单');
|