shish 2 dagar sedan
förälder
incheckning
1f67987ab7

+ 1 - 0
app-ghs/controllers/ShMethodController.php

@@ -62,6 +62,7 @@ class ShMethodController extends BaseController
      * - id: 配置ID(可选)
      * - style: 配送类型 (0: 送货, 1: 自取, 2: 跑腿, 3: 快递, 4: 物流)
      * - name: 名称
+     * - calcType: 算运费方式 (0: 用跑腿, 1: 用自定义)
      * - status: 状态 (0: 禁用, 1: 启用)
      * - sort: 排序
      * - minAmount: 最低消费金额

+ 1 - 0
biz-ghs/order/classes/ShMethodClass.php

@@ -419,6 +419,7 @@ class ShMethodClass extends BaseClass
 
         $saveData = [
             'name' => $data['name'] ?? '',
+            'calcType' => isset($data['calcType']) ? (int)$data['calcType'] : 0, // 算运费方式 (0: 用跑腿, 1: 用自定义)
             'status' => isset($data['status']) ? (int)$data['status'] : 1,
             'sort' => isset($data['sort']) ? (int)$data['sort'] : 0,
             'minAmount' => isset($data['minAmount']) ? (float)$data['minAmount'] : 0.00,

+ 5 - 0
common/components/dict.php

@@ -13,6 +13,7 @@ class dict
             0 => [
                 'name' => '送货',
                 'originName' => '送货',
+                'calcType' => 0,
                 'status' => 1,
                 'sort' => 1,
                 'minAmount' => 0.00,
@@ -27,6 +28,7 @@ class dict
             1 => [
                 'name' => '自取',
                 'originName' => '自取',
+                'calcType' => 0,
                 'status' => 1,
                 'sort' => 2,
                 'minAmount' => 0.00,
@@ -41,6 +43,7 @@ class dict
             2 => [
                 'name' => '跑腿',
                 'originName' => '跑腿',
+                'calcType' => 0,
                 'status' => 1,
                 'sort' => 3,
                 'minAmount' => 0.00,
@@ -55,6 +58,7 @@ class dict
             4 => [
                 'name' => '快递',
                 'originName' => '快递',
+                'calcType' => 0,
                 'status' => 1,
                 'sort' => 4,
                 'minAmount' => 0.00,
@@ -69,6 +73,7 @@ class dict
             3 => [
                 'name' => '物流',
                 'originName' => '物流',
+                'calcType' => 0,
                 'status' => 1,
                 'sort' => 5,
                 'minAmount' => 0.00,