|
|
@@ -35,6 +35,23 @@ class OrderController extends BaseController
|
|
|
//修改分工 ssh 20221129
|
|
|
public function actionChangeWorker()
|
|
|
{
|
|
|
+ $post = Yii::$app->request->post();
|
|
|
+ $id = $post['id'] ?? 0;
|
|
|
+ $shopAdminId = $post['shopAdminId'] ?? 0;
|
|
|
+ $shopAdminName = $post['shopAdminName'] ?? '';
|
|
|
+ $order = OrderClass::getById($id, true);
|
|
|
+ OrderClass::valid($order, $this->shopId);
|
|
|
+
|
|
|
+ $preShopAdminId = $order->shopAdminId ?? 0;
|
|
|
+ if (!empty($preShopAdminId)) {
|
|
|
+ $shopAdmin = $this->shopAdmin;
|
|
|
+ if (isset($shopAdmin->super) == false || $shopAdmin->super != 1) {
|
|
|
+ util::fail('管理员才能操作');
|
|
|
+ }
|
|
|
+ }
|
|
|
+ $order->shopAdminId = $shopAdminId;
|
|
|
+ $order->shopAdminName = $shopAdminName;
|
|
|
+ $order->save();
|
|
|
util::complete();
|
|
|
}
|
|
|
|