Преглед изворни кода

Merge branch 'zhongqi-delivery' of git.huaml.com:zhh/huahuibao into zhongqi-delivery

shizhongqi пре 8 месеци
родитељ
комит
d0ea3081d5

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

@@ -167,7 +167,7 @@ class ConsoleController extends BaseController
             }
         }
 
-        //$notice[] = ['title' => '急事连打二次小石电话,手机静音能接到电话', 'action' => '', 'page' => ''];
+        //$notice[] = ['title' => '不要将小石联系电话给零售花店,给了我们直接拒绝服务,并将此花店列入黑名单。', 'action' => '', 'page' => ''];
         //$notice[] = ['title' => '快速设置:客户下单自动计算跑腿费', 'action' => '查看', 'page' => '/admin/book/detail?id=auto_calc_pt_fee'];
         //$notice[] = ['title' => '订单上如何一键呼叫跑腿', 'action' => '查看', 'page' => '/admin/book/detail?id=one_call_pt'];
 

+ 34 - 0
app-ghs/controllers/OrderController.php

@@ -2976,4 +2976,38 @@ class OrderController extends BaseController
         util::complete('打印成功');
     }
 
+	//修改地址 ssh 20251123
+    public function actionModifyAddress()
+    {
+        $post = Yii::$app->request->post();
+        $id = $post['id'] ?? 0;
+        $order = OrderClass::getById($id, true);
+        if (empty($order)) {
+            util::fail('没有找到订单');
+        }
+        if ($order->mainId != $this->mainId) {
+            util::fail('不是你的订单,不能修改地址');
+        }
+        $province = $post['province'] ?? '';
+        $city = $post['city'] ?? '';
+        $dist = $post['dist'] ?? '';
+        $address = $post['address'] ?? '';
+        $floor = $post['floor'] ?? '';
+        $fullAddress = $city . $dist . $address . $floor;
+        $lat = $post['lat'] ?? '';
+        $long = $post['long'] ?? '';
+        $showAddress = $post['showAddress'] ?? '';
+        $order->province = $province;
+        $order->city = $city;
+        $order->dist = $dist;
+        $order->address = $address;
+        $order->floor = $floor;
+        $order->showAddress = $showAddress;
+        $order->fullAddress = $fullAddress;
+        $order->lat = $lat;
+        $order->long = $long;
+        $order->save();
+        util::complete('修改成功');
+    }
+
 }

+ 3 - 2
app-ghs/controllers/TestController.php

@@ -428,6 +428,7 @@ class TestController extends BaseController
             //['name' => '晋江花多多鲜花', 'merchantNo' => '8223970599200EW', 'wx' => [825459643, 825460214], 'zfb' => '2088080677754761'],
             //['name' => '昆明源花汇鲜花', 'merchantNo' => '8227310599200VZ', 'wx' => [826321533, 826321247], 'zfb' => '2088080751421086'],
             //['name' => '厦门厦茗绿植批发', 'merchantNo' => '8223930599200GK', 'wx' => [826594015, 826593264], 'zfb' => '2088080774924483'],
+            ['name' => '珠海淘花里', 'merchantNo' => '82258505992007T', 'wx' => [831476540, 831477416], 'zfb' => '2088180135238924'],
             ['name' => '惠州美天鲜花水口店', 'merchantNo' => '8225950599200CY', 'wx' => [827536311, 827535872], 'zfb' => '2088080848565460'],
             ['name' => '深圳鼎盛皇室花卉', 'merchantNo' => '8225840599201MF', 'wx' => [807078304, 807076486], 'zfb' => '2088970117746334'],
             //['name' => '东莞惠雅鲜花(莞城店)', 'merchantNo' => '8226020599200GJ', 'wx' => [796953190, 796976959], 'zfb' => '2088770940104912'],
@@ -941,7 +942,7 @@ class TestController extends BaseController
     //交易查询 ssh 20231021
     public function actionTradeQuery()
     {
-        $shopId = 30300;
+        $shopId = 7855;
         $shop = ShopClass::getById($shopId, true);
         if (empty($shop)) {
             util::stop('没有找到门店,编号677230');
@@ -958,7 +959,7 @@ class TestController extends BaseController
         ];
         $laResource = new Lakala($params);
         $queryParams = [
-            'orderSn' => 'CG29126449',
+            'orderSn' => 'CG29746628',
             //'tradeNo' => '66221061685504',
         ];
         $response = $laResource->query($queryParams, 0);

+ 10 - 1
app-hd/controllers/GhsController.php

@@ -303,13 +303,22 @@ class GhsController extends BaseController
 
         // 弃用 buyNotice, 使用 xhShopExt 表里的 purchaseGuide
         // $info['buyNotice'] = $ghsShop->buyNotice ?? 0;
-        $shopExt = ShopExtClass::getByCondition(['shopId' => $ghsShopId], false, false, 'purchaseGuide');
+        $shopExt = ShopExtClass::getByCondition(['shopId' => $ghsShopId], false, false, 'purchaseGuide,hcFreeKm,hcMap');
         $info['buyNotice'] = $shopExt['purchaseGuide'] > 0 ? 1 : 0; //兼容原有设定:购买须知 0.没有 1.有
 
         //判断是否开启同城配送功能
         $intraCityRet = ShopClass::hasIntraCity($ghsShop);
         $openIntraCity = $intraCityRet['openIntraCity'] ?? 0;
         $info['openIntraCity'] = $openIntraCity;
+        //花材的免费配送设置
+        $hcFreeKm = $shopExt['hcFreeKm'] ?? 0;
+        $info['hcFreeKm'] = $hcFreeKm;
+        $hcMapString = $shopExt['hcMap'] ?? '';
+        $hcMap = [];
+        if (!empty($hcMapString)) {
+            $hcMap = json_decode($hcMapString, true);
+        }
+        $info['hcMap'] = $hcMap;
 
         util::success($info);
     }

+ 1 - 1
app-pt/views/main/app.php

@@ -236,7 +236,7 @@
             }
             // 这里可以根据appType跳转到对应的下载链接
             const downloadUrls = {
-                'xiaohuabao': 'https://api.shop.hzghd.com/1261.apk', // 销花宝APP下载链接
+                'xiaohuabao': 'https://api.shop.hzghd.com/1262.apk', // 销花宝APP下载链接
                 'huazhanggui': 'https://api.shop.hzghd.com/208.apk', // 花掌柜APP下载链接
                 'huazhanggui_cashier': 'https://api.shop.hzghd.com/185.apk', // 花掌柜收银下载链接
                 'xiaohuabao_cashier': 'https://api.shop.hzghd.com/147.apk' // 销花宝收银下载链接

+ 2 - 2
biz-ghs/order/classes/OrderClass.php

@@ -2942,10 +2942,10 @@ XL;
             if (empty($shortName)) {
                 util::fail('客户短名没有设置');
             }
-            $p->times = 2;
+            $p->times = 1;
             $content = '<TEXT x="420" y="130" font="12" w="4" h="4" r="90">' . $shortName . '</TEXT>';
             $content .= '<TEXT x="395" y="10" font="12" w="2" h="2" r="90">地址</TEXT>';
-            $content .= '<TEXT x="290" y="130" font="12" w="4" h="4" r="90">' . $shortMobile . '</TEXT>';
+            $content .= '<TEXT x="290" y="130" font="12" w="3" h="3" r="90">' . $customMobile . '</TEXT>';
             $content .= '<TEXT x="265" y="10" font="12" w="2" h="2" r="90">代码</TEXT>';
             $content .= '<TEXT x="170" y="130" font="12" w="4" h="4" r="90">' . $shortRemark . '</TEXT>';
             $content .= '<TEXT x="150" y="10" font="12" w="2" h="2" r="90">物流</TEXT>';

+ 14 - 0
biz-ghs/stat/classes/StatSaleClass.php

@@ -152,6 +152,9 @@ class StatSaleClass extends BaseClass
         if (!empty($ghsOrderList)) {
             foreach ($ghsOrderList as $ghsKey => $ghsOrder) {
                 $actPrice = $ghsOrder['actPrice'] ?? 0;
+                if ($actPrice <= 0) {
+                    continue;
+                }
                 $cost = $ghsOrder['remainCost'] ?? 0;
                 $profit = bcsub($actPrice, $cost, 2);
                 $orderPrice = $ghsOrder['orderPrice'] ?? 0;
@@ -159,6 +162,8 @@ class StatSaleClass extends BaseClass
                 $customId = $ghsOrder['customId'] ?? 0;
                 $status = $ghsOrder['status'] ?? 0;
                 $book = $ghsOrder['book'] ?? 0;
+                //扎数
+                $count = $ghsOrder['itemNum'] ?? 0;
                 if ($status == 1 || $status == 5) {
                     continue;
                 }
@@ -174,6 +179,7 @@ class StatSaleClass extends BaseClass
                 if (isset($arr[$customId])) {
                     $arr[$customId]['num']++;
                     $arr[$customId]['amount'] = bcadd($arr[$customId]['amount'], $actPrice, 2);
+                    $arr[$customId]['count'] = bcadd($arr[$customId]['count'], $count, 2);
                     $arr[$customId]['orderPrice'] = bcadd($arr[$customId]['orderPrice'], $orderPrice, 2);
                     $arr[$customId]['tkPrice'] = bcadd($arr[$customId]['tkPrice'], $tkPrice, 2);
                     $arr[$customId]['cost'] = bcadd($arr[$customId]['cost'], $cost, 2);
@@ -184,6 +190,7 @@ class StatSaleClass extends BaseClass
                         'customName' => $customName,
                         'py' => $py,
                         'num' => 1,
+                        'count' => $count,
                         'amount' => $actPrice,
                         'levelName' => '',
                         'orderPrice' => $orderPrice,
@@ -1422,6 +1429,9 @@ class StatSaleClass extends BaseClass
         if (!empty($ghsOrderList)) {
             foreach ($ghsOrderList as $ghsOrder) {
                 $actPrice = $ghsOrder['actPrice'] ?? 0;
+                if ($actPrice <= 0) {
+                    continue;
+                }
                 $cost = $ghsOrder['remainCost'] ?? 0;
                 $profit = bcsub($actPrice, $cost, 2);
                 $orderPrice = $ghsOrder['orderPrice'] ?? 0;
@@ -1429,6 +1439,8 @@ class StatSaleClass extends BaseClass
                 $customId = $ghsOrder['customId'] ?? 0;
                 $status = $ghsOrder['status'] ?? 0;
                 $book = $ghsOrder['book'] ?? 0;
+                //扎数
+                $count = $ghsOrder['itemNum'] ?? 0;
                 if ($status == 1 || $status == 5) {
                     continue;
                 }
@@ -1447,6 +1459,7 @@ class StatSaleClass extends BaseClass
                     $arr[$distId]['num']++;
                     $arr[$distId]['amount'] = bcadd($arr[$distId]['amount'], $actPrice, 2);
                     $arr[$distId]['orderPrice'] = bcadd($arr[$distId]['orderPrice'], $orderPrice, 2);
+                    $arr[$distId]['count'] = bcadd($arr[$distId]['count'], $count, 2);
                     $arr[$distId]['tkPrice'] = bcadd($arr[$distId]['tkPrice'], $tkPrice, 2);
                     $arr[$distId]['cost'] = bcadd($arr[$distId]['cost'], $cost, 2);
                     $arr[$distId]['profit'] = bcadd($arr[$distId]['profit'], $profit, 2);
@@ -1455,6 +1468,7 @@ class StatSaleClass extends BaseClass
                         'distId' => $distId,
                         'distName' => $distName,
                         'num' => 1,
+                        'count' => $count,
                         'amount' => $actPrice,
                         'levelName' => '',
                         'orderPrice' => $orderPrice,

+ 3 - 3
common/components/book.php

@@ -93,11 +93,11 @@ class book
             ['style' => 'miniTitle', 'value' => '门店转让,需新开收款账户,并更换管理人员的,每次50元。',],
         ],
         'chargeStandard2' => [
-            ['style' => 'info', 'value' => '软件年费2580元,年费需每年付一次,客户通过小程序下单,会扣千分之3.3手续费(即1千元扣3.3元)。',],
+            ['style' => 'info', 'value' => '软件年费2580元,年费需每年付一次,客户通过小程序下单,会扣0.33手续费,即100元扣3毛3。',],
         ],
         'chargeStandard' => [
-            ['style' => 'info', 'value' => '软件年费1580元,年费需每年付一次,客户通过小程序下单,会扣千分之3.3手续费(即1千元扣3.3元)。',],
-            ['style' => 'info', 'value' => '根据你自身门店情况,选择以下套餐。下面列出的套餐,已经过全国200家鲜花批发店磨合使用,非常成熟好用,请放心购买使用,以下套餐已含第一年年费。',],
+            ['style' => 'info', 'value' => '软件年费1580元,年费需每年付一次,客户通过小程序下单,会扣0.33手续费,即100元扣3毛3。',],
+            ['style' => 'info', 'value' => '根据你自身门店情况,选择以下套餐。下面列出的套餐,已经过全国200家鲜花批发店和11万家花店磨合使用,非常成熟好用,请放心购买使用,以下套餐已含第一年年费。',],
             ['style' => 'miniTitle', 'value' => '软件的研发成本巨大,不管是年费、费率和套餐,都已经底价,没有商量的空间,请理解。付费后不支持退货。',],
             ['style' => 'info', 'value' => '首次开通系统,另外赠送30天有效期,保证有足够时间试运营。',],
             ['style' => 'info', 'value' => '提供上门培训服务,培训时间3天,需报销差旅住宿费用,公司地址在福建厦门。',],

+ 1 - 1
common/components/bookJd.php

@@ -45,7 +45,7 @@ class bookJd
 
     public static $data = [
         'chargeStandard2'=>[
-            ['style' => 'info', 'value' => '软件年费2580元/年,客户通过小程序下单,会扣千分之3.3手续费(即1千元扣3.3元)。',],
+            ['style' => 'info', 'value' => '软件年费2580元/年,客户通过小程序下单,会扣0.33手续费,即100元扣3毛3。',],
         ],
         'what' => [
             ['style' => 'smallTitle', 'value' => '批发店销售管理工具',],