소스 검색

结账单

shish 4 년 전
부모
커밋
4b00aaab38

+ 3 - 1
app-ghs/controllers/ClearController.php

@@ -42,7 +42,7 @@ class ClearController extends BaseController
         util::complete();
     }
 
-    //供应商的结帐单 ssh 20210625
+    //城市供应商向基地批发商的结账单 ssh 20220523
     public function actionList()
     {
         $get = Yii::$app->request->get();
@@ -56,6 +56,7 @@ class ClearController extends BaseController
             GhsClass::valid($ghs, $this->shopId);
             $where['ghsId'] = $ghsId;
         }
+        $where['customShopId'] = $this->shopId ?? 0;
         $list = ClearService::getClearList($where);
         util::success($list);
     }
@@ -82,6 +83,7 @@ class ClearController extends BaseController
             CustomClass::valid($custom, $this->shopId);
             $where['customId'] = $customId;
         }
+        $where['ghsShopId'] = $this->shopId ?? 0;
         $list = ClearService::getClearList($where);
         util::success($list);
     }

+ 2 - 1
app-ghs/controllers/OrderClearController.php

@@ -79,7 +79,8 @@ class OrderClearController extends BaseController
         $complete = $post['complete'] ?? 0;
         $data = [
             'customId' => $customId,
-            'ghsShopAdminId' => $this->shopAdminId,
+            'ghsShopAdminId' => $this->shopAdminId ?? 0,
+            'ghsShopId' => $this->shopId ?? 0,
             'ghsShopAdminName' => $name,
             'modifyPrice' => $modifyPrice,
             'payWay' => $payWay,

+ 2 - 1
app-ghs/controllers/PurchaseClearController.php

@@ -11,7 +11,7 @@ use Yii;
 class PurchaseClearController extends BaseController
 {
 
-    //生成结算订单 ssh 2021.1.26
+    //供应商向基地供应商结账生成订单 ssh 20220523
     public function actionCreateOrder()
     {
         $post = Yii::$app->request->post();
@@ -33,6 +33,7 @@ class PurchaseClearController extends BaseController
         $post['shopId'] = $this->shopId;
         $post['clearStyle'] = dict::getDict('clearStyle', 'gys2KmGys');
         $post['customShopAdminId'] = $this->shopAdminId;
+        $post['customShopId'] = $this->shopId ?? 0;
         $shopAdmin = $this->shopAdmin;
         $shopAdminName = $shopAdmin['name'] ?? '';
         $post['customShopAdminName'] = $shopAdminName;

+ 1 - 0
app-hd/controllers/ClearController.php

@@ -55,6 +55,7 @@ class ClearController extends BaseController
             GhsClass::valid($ghs, $this->shopId);
             $where['ghsId'] = $ghsId;
         }
+        $where['customShopId'] = $this->shopId ?? 0;
         $list = ClearService::getClearList($where);
         util::success($list);
     }

+ 3 - 1
app-hd/controllers/PurchaseClearController.php

@@ -34,10 +34,12 @@ class PurchaseClearController extends BaseController
                 }
             }
         }
+        $post['ghsShopId'] = $ghs->shopId ?? 0;
         $post['sjId'] = $this->sjId;
         $post['shopId'] = $this->shopId;
         $post['clearStyle'] = dict::getDict('clearStyle', 'hd2Gys');
-        $post['customShopAdminId'] = $this->shopAdminId;
+        $post['customShopAdminId'] = $this->shopAdminId ?? 0;
+        $post['customShopId'] = $this->shopId ?? 0;
         $shopAdmin = $this->shopAdmin;
         $shopAdminName = $shopAdmin['name'] ?? '';
         $post['customShopAdminName'] = $shopAdminName;

+ 2 - 0
biz-ghs/order/classes/OrderClearClass.php

@@ -80,6 +80,7 @@ class OrderClearClass extends BaseClass
             'ghsAvatar' => $ghs['avatar'] ?? '',
             'ghsAddress' => $ghs['address'] ?? '',
             'ghsShopAdminId' => $post['ghsShopAdminId'],
+            'ghsShopId' => $post['ghsShopId'] ?? 0,
             'ghsShopAdminName' => $post['ghsShopAdminName'],
             'sjId' => $sjId,
             'shopId' => $shopId,
@@ -89,6 +90,7 @@ class OrderClearClass extends BaseClass
             'clearStyle' => dict::getDict('clearStyle', 'gys2Hd'),
             'customId' => $customId,
             'customName' => $custom['name'] ?? '',
+            'customShopId' => $custom['shopId'] ?? 0,
             'customAvatar' => $custom['avatar'] ?? '',
             'customMobile' => $custom['mobile'] ?? '',
             'customAddress' => $custom['address'] ?? '',

+ 3 - 1
sql.sql

@@ -1034,4 +1034,6 @@ ALTER TABLE xhStatWast DROP INDEX `shop`;
 ALTER TABLE xhStatWastMonth DROP INDEX `shop`;
 ALTER TABLE xhPlantCg ADD `status` TINYINT NOT NULL DEFAULT 0 COMMENT '订单状态 0待付款 1待配送 2配送中 3已完成 4已取消' AFTER `deadline`;
 ALTER TABLE xhPlantCg ADD staffId INT NOT NULL DEFAULT 0 COMMENT '' AFTER `payWay`;
-ALTER TABLE xhPlantCg ADD staffName VARCHAR(20) NOT NULL DEFAULT '' COMMENT '员工名称' AFTER `staffId`;
+ALTER TABLE xhPlantCg ADD staffName VARCHAR(20) NOT NULL DEFAULT '' COMMENT '员工名称' AFTER `staffId`;
+ALTER TABLE xhClear ADD customShopId INT NOT NULL DEFAULT 0 COMMENT '客户门店id' AFTER `customId`;
+ALTER TABLE xhClear ADD ghsShopId INT NOT NULL DEFAULT 0 COMMENT '供货商门店id' AFTER `ghsId`;