|
|
@@ -2421,4 +2421,36 @@ class OrderController extends BaseController
|
|
|
]);
|
|
|
}
|
|
|
|
|
|
+ //修改配送人 ssh 20240824
|
|
|
+ public function actionChangeSendStaff()
|
|
|
+ {
|
|
|
+ $staff = $this->shopAdmin;
|
|
|
+ if (isset($staff->finance) == false || $staff->finance == 0) {
|
|
|
+ util::fail('请有财务权限的人修改');
|
|
|
+ }
|
|
|
+
|
|
|
+ $get = Yii::$app->request->get();
|
|
|
+ $staffId = $get['staffId']??0;
|
|
|
+ $orderId = $get['orderId']??0;
|
|
|
+ $order = OrderClass::getById($orderId,true);
|
|
|
+ if(empty($order)){
|
|
|
+ util::fail('没有找到订单');
|
|
|
+ }
|
|
|
+ if($order->mainId != $this->mainId){
|
|
|
+ util::fail('不是你的');
|
|
|
+ }
|
|
|
+ $staff = ShopAdminClass::getById($staffId,true);
|
|
|
+ if(empty($staff)){
|
|
|
+ util::fail('没有找到员工');
|
|
|
+ }
|
|
|
+ if($staff->mainI!=$this->mainId){
|
|
|
+ util::fail('不是你的员工');
|
|
|
+ }
|
|
|
+ $staffName = $staff->name??'';
|
|
|
+ $order->sendStaffId = $staffId;
|
|
|
+ $order->sendStaffName = $staffName;
|
|
|
+ $order->save();
|
|
|
+ util::complete('修改成功');
|
|
|
+ }
|
|
|
+
|
|
|
}
|