|
|
@@ -6,6 +6,7 @@ use biz\merchant\services\ExpressService;
|
|
|
use biz\merchant\services\MerchantAssetService;
|
|
|
use biz\merchant\services\MerchantExtendService;
|
|
|
use biz\merchant\services\MerchantService;
|
|
|
+use bizGhs\custom\classes\CustomClass;
|
|
|
use bizGhs\merchant\services\ShopService;
|
|
|
use biz\order\classes\OrderSendClass;
|
|
|
use bizGhs\order\classes\OrderClass;
|
|
|
@@ -27,13 +28,26 @@ class OrderController extends BaseController
|
|
|
//商城下单操作 shish 2021.1.14
|
|
|
public function actionCreateOrder()
|
|
|
{
|
|
|
-
|
|
|
+ $post = Yii::$app->request->post();
|
|
|
//供货商端口:员工开单、客户开单
|
|
|
+ $adminId = $this->adminId;
|
|
|
+ $shopId = $this->shopId;
|
|
|
+ if(!empty($shopId)){
|
|
|
+ //供货商端员工开单
|
|
|
+ $post['customId'] = $post['customId'] ?? 0;
|
|
|
+ $post['adminId'] = $adminId;
|
|
|
+ $post['userId'] = 0;
|
|
|
+ }else{
|
|
|
+ //供货商端客户开单
|
|
|
+ $post['userId'] = $adminId;
|
|
|
+ $post['adminId'] = 0;
|
|
|
+ $post['customId'] = CustomClass::addCustom();
|
|
|
+ }
|
|
|
|
|
|
//零售端口:员工采购
|
|
|
|
|
|
- $post = Yii::$app->request->post();
|
|
|
- $post['adminId'] = 0;
|
|
|
+
|
|
|
+
|
|
|
$post['payWay'] = $this->isWx == true ? 0 : 1;
|
|
|
$post['ghsId'] = $this->ghsId;
|
|
|
$post['shopId'] = 0;
|
|
|
@@ -59,8 +73,6 @@ class OrderController extends BaseController
|
|
|
];
|
|
|
//OrderGoodsService::add($data);//创建订单商品列表
|
|
|
util::success(['orderSn' => $orderSn, 'totalPrice' => $actPrice]);
|
|
|
-
|
|
|
-
|
|
|
}
|
|
|
|
|
|
//下单要用到的相关信息 shish 2019.12.6
|