فهرست منبع

Merge branch 'master' of http://git.huaml.com/zhh/huahuibao

shish 3 سال پیش
والد
کامیت
e024d33e26

+ 5 - 5
app-ghs/controllers/ConsoleController.php

@@ -138,12 +138,12 @@ class ConsoleController extends BaseController
             ["name" => "供货商", "img" => "ghs/home/icon_ghs.png", "url" => "/pagesPurchase/supplier"],
             ["name" => "采购记录", "img" => "ghs/home/icon_caigou.png", "url" => "/pagesPurchase/order"],
             ["name" => "报损", "img" => "ghs/home/kcyjs.png", "url" => "/admin/breakage/list"],
-            ["name" => "预订单", "img" => "ghs/home/kcyjs.png", "url" => "/admin/order/statBook"],
-            ["name" => "出库", "img" => "ghs/home/dbck.png", "url" => "/admin/shop/selectShop"],
-            ["name" => "出库记录", "img" => "ghs/home/dbck.png", "url" => "/pagesStorehouse/allot/allotEx"],
-            ["name" => "入库记录", "img" => "ghs/home/dbrk.png", "url" => "/pagesStorehouse/allot/allotPut"],
+            ["name" => "预售", "img" => "ghs/home/kcyjs.png", "url" => "/admin/order/statBook"],
+            ["name" => "调拨出库", "img" => "ghs/home/dbck.png", "url" => "/pagesStorehouse/allot/allotEx"],
+            ["name" => "调拨入库", "img" => "ghs/home/dbrk.png", "url" => "/pagesStorehouse/allot/allotPut"],
             ["name" => "结账记录", "img" => "ghs/home/kcyjs.png", "url" => "/admin/clear/customList"],
-            ["name" => "支出", "img" => "ghs/home/kcyjs.png", "url" => "/admin/expend/addExpend"],
+            ["name" => "支出", "img" => "ghs/home/kcyjs.png", "url" => "/admin/expend/list"],
+            ["name" => "员工", "img" => "ghs/home/yggl.png", "url" => "/admin/staff/list"],
         ];
 
         util::success(['asset' => $this->main, 'notice' => $notice,

+ 4 - 0
app-ghs/controllers/StatController.php

@@ -15,6 +15,10 @@ class StatController extends BaseController
 
     public function actionProfit()
     {
+
+        ini_set('memory_limit', '2045M');
+        set_time_limit(0);
+
         $mainId = $this->mainId;
         $respond = StatSaleClass::profile($mainId);
         $income = $respond['income'] ?? 0;

+ 40 - 0
app-mall/controllers/OrderController.php

@@ -26,6 +26,46 @@ use common\components\util;
 class OrderController extends BaseController
 {
 
+    //计算运费 ssh 20221003
+    public function actionFreight()
+    {
+        $get = Yii::$app->request->get();
+
+        util::success(['distance' => 1, 'showDistance' => 1, 'fee' => 1]);
+
+//        $shop = $this->shop;
+//        $shopLat = isset($shop->lat) ? $shop->lat : '';
+//        $shopLong = isset($shop->long) ? $shop->long : '';
+//
+//        if (empty($shopLat) || empty($shopLong)) {
+//            util::success(['distance' => 0, 'showDistance' => 0, 'fee' => 0]);
+//        }
+//
+//        $ghsId = $get['ghsId'] ?? 0;
+//        $ghs = GhsClass::getById($ghsId, true);
+//        if (empty($ghs)) {
+//            util::success(['distance' => 0, 'showDistance' => 0, 'fee' => 0]);
+//        }
+//        $ghsShopId = $ghs->shopId ?? 0;
+//        $ghsShop = ShopClass::getById($ghsShopId, true);
+//        if (empty($ghsShop)) {
+//            util::success(['distance' => 0, 'showDistance' => 0, 'fee' => 0]);
+//        }
+//
+//        $ghsShopLat = isset($ghsShop->lat) ? $ghsShop->lat : '';
+//        $ghsShopLong = isset($ghsShop->long) ? $ghsShop->long : '';
+//        if (empty($ghsShopLat) || empty($ghsShopLong)) {
+//            util::success(['distance' => 0, 'showDistance' => 0, 'fee' => 0]);
+//        }
+//
+//        $weight = $get['weight'] ?? 0;
+//        if (empty($weight)) {
+//            util::success(['distance' => 0, 'showDistance' => 0, 'fee' => 0]);
+//        }
+//        $respond = PurchaseClass::getDistanceFee($this->shop, $ghsShop, $weight);
+//        util::success($respond);
+    }
+
     //购买花材 ssh 20220511
     public function actionBuyItem()
     {

+ 1 - 1
biz-ghs/product/classes/ProductClass.php

@@ -113,7 +113,7 @@ class ProductClass extends BaseClass
             if (!empty($shortCover)) {
                 $parse = parse_url(self::groupImg($shortCover));
                 if (empty($parse['query'])) {
-                    $cover = self::groupImg($shortCover) . "?x-oss-process=image/resize,m_fill,h_110,w_110";
+                    $cover = self::groupImg($shortCover) . "?x-oss-process=image/resize,m_fill,h_100,w_100";
                 } else {
                     $cover = self::groupImg($shortCover);
                 }

+ 1 - 1
biz-ghs/product/services/ProductService.php

@@ -49,7 +49,7 @@ class ProductService extends BaseService
         foreach ($classIds as $classVal) {
             $classId = $classVal['id'];
             $className = $classVal['name'] ?? '';
-            $cover = imgUtil::groupImg($classVal['cover'])."?x-oss-process=image/resize,m_fill,h_130,w_130";
+            $cover = imgUtil::groupImg($classVal['cover'])."?x-oss-process=image/resize,m_fill,h_90,w_90";
             if ($classId > 0) {
                 $tmp = [];
                 $tmp['classId'] = $classId;

+ 17 - 1
biz-ghs/stat/classes/StatSaleClass.php

@@ -6,6 +6,7 @@ use biz\stat\classes\StatCgClass;
 use biz\stat\classes\StatStockInClass;
 use biz\stat\classes\StatStockOutClass;
 use bizGhs\expend\classes\ExpendClass;
+use bizGhs\order\classes\PurchaseOrderClass;
 use bizGhs\staff\classes\SalaryClass;
 use bizHd\order\classes\OrderClass as HdOrderClass;
 use bizGhs\order\classes\OrderClass;
@@ -43,8 +44,23 @@ class StatSaleClass extends BaseClass
 
         //出库
         $stockOut = StatStockOutClass::getSum($where);
+
         //采购入库
-        $cg = StatCgClass::getSum($where);
+        //$cg = StatCgClass::getSum($where);
+        $cgWhere = ['mainId' => $mainId, 'status' => 4];
+        $cgWhere['addTime'] = ['between', [$currentStartTime, $currentEndTime]];
+        $cgList = PurchaseOrderClass::getAllByCondition($cgWhere, null, '*');
+        $cg = 0;
+        if (!empty($cgList)) {
+            foreach ($cgList as $cgKey => $cgItem) {
+                $actPrice = $cgItem['actPrice'] ?? 0;
+                $paidPrice = $cgItem['paidPrice'] ?? 0;
+                $total = bcadd($actPrice, $paidPrice, 2);
+                $cg = bcadd($cg, $total, 2);
+            }
+        }
+        $cg = floatval($cg);
+
         //调拨入库
         $stockIn = StatStockInClass::getSum($where);
 

+ 4 - 0
biz/sj/classes/CashClass.php

@@ -61,6 +61,10 @@ class CashClass extends BaseClass
             if ($shopId == 1212 || $shopId == 1315) {
                 return 0.003;
             }
+            //惠雅鲜花
+            if ($shopId == 1459 || $shopId == 52) {
+                return 0.003;
+            }
             return 0.0038;
         }
         return 0.006;