This commit is contained in:
xman 2025-03-10 16:00:43 +08:00
parent e5df57d162
commit 0738e34e68

View File

@ -12,6 +12,7 @@ use think\Exception;
use think\exception\DbException;
use think\exception\PDOException;
use think\exception\ValidateException;
use think\Hook;
/**
* 派单列管理
@ -176,7 +177,7 @@ class Dispatch extends Backend
}
/**
* 删除
* 取消派单
*
* @param $ids
* @return void
@ -213,6 +214,12 @@ class Dispatch extends Backend
$item->update(['status'=>OrderDispatch::STATUS_CANCEL]);
//回退订单状态
$order->update(['status'=>Order::STATUS_DISPATCHING]);
$params['order'] = $order;
$params['role'] = 1;
$params['auth'] = $this->auth;
$params['remark'] = '派单被取消[ID'.$item->id.'],订单状态回退';
Hook::listen('order_change',$params);
}
Db::commit();
} catch (PDOException|Exception $e) {