|
@@ -1131,17 +1131,17 @@ class TPlusServerService extends Service
|
|
|
$table->string('address')->default('')->comment('送货地址');
|
|
$table->string('address')->default('')->comment('送货地址');
|
|
|
$table->string('area_hs')->default('')->comment('区域');
|
|
$table->string('area_hs')->default('')->comment('区域');
|
|
|
$table->string('delivery_mode')->default('')->comment('配送方式');
|
|
$table->string('delivery_mode')->default('')->comment('配送方式');
|
|
|
- $table->decimal('sl_fee', 10, 2)->default(0)->comment('其它费用');
|
|
|
|
|
|
|
+ $table->decimal('sl_fee', 12, 4)->default(0)->comment('上楼费');
|
|
|
// 新增的计算字段
|
|
// 新增的计算字段
|
|
|
$table->integer('xs')->default(0)->comment('箱数');
|
|
$table->integer('xs')->default(0)->comment('箱数');
|
|
|
$table->decimal('weight', 12, 3)->default(0)->comment('总重量(kg)');
|
|
$table->decimal('weight', 12, 3)->default(0)->comment('总重量(kg)');
|
|
|
$table->tinyInteger('area_range')->default(1)->comment('运价区间 (1: <5kg, 2: >=5kg)');
|
|
$table->tinyInteger('area_range')->default(1)->comment('运价区间 (1: <5kg, 2: >=5kg)');
|
|
|
$table->decimal('freight_unit_price', 10, 2)->default(0)->comment('配送费单价');
|
|
$table->decimal('freight_unit_price', 10, 2)->default(0)->comment('配送费单价');
|
|
|
- $table->decimal('freight_amount', 12, 2)->default(0)->comment('配送费金额');
|
|
|
|
|
- $table->decimal('js_single_amount', 12, 2)->default(0)->comment('结算金额');
|
|
|
|
|
|
|
+ $table->decimal('freight_amount', 12, 4)->default(0)->comment('配送费金额');
|
|
|
|
|
+ $table->decimal('js_single_amount', 12, 4)->default(0)->comment('结算金额');
|
|
|
$table->decimal('min_freight_amount', 12, 2)->default(0)->comment('地区最低运价');
|
|
$table->decimal('min_freight_amount', 12, 2)->default(0)->comment('地区最低运价');
|
|
|
- $table->decimal('customer_store_zx_fee', 12, 2)->default(0)->comment('门店卸货费');
|
|
|
|
|
- $table->decimal('dh_fee', 12, 2)->default(0)->comment('到货装卸费');
|
|
|
|
|
|
|
+ $table->decimal('customer_store_zx_fee', 12, 4)->default(0)->comment('门店卸货费');
|
|
|
|
|
+ $table->decimal('dh_fee', 12, 4)->default(0)->comment('到货装卸费');
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -1248,7 +1248,7 @@ class TPlusServerService extends Service
|
|
|
}
|
|
}
|
|
|
$dataArray[$key]['freight_unit_price'] = $freight;
|
|
$dataArray[$key]['freight_unit_price'] = $freight;
|
|
|
//配送费金额
|
|
//配送费金额
|
|
|
- $freight_amount = bcmul($weight, $freight,2);
|
|
|
|
|
|
|
+ $freight_amount = bcmul($weight, $freight,4);
|
|
|
$dataArray[$key]['freight_amount'] = $freight_amount;
|
|
$dataArray[$key]['freight_amount'] = $freight_amount;
|
|
|
//结算金额 记录的是每一条的
|
|
//结算金额 记录的是每一条的
|
|
|
$dataArray[$key]['js_single_amount'] = $freight_amount;
|
|
$dataArray[$key]['js_single_amount'] = $freight_amount;
|
|
@@ -1257,10 +1257,10 @@ class TPlusServerService extends Service
|
|
|
//门店卸货费
|
|
//门店卸货费
|
|
|
$customer_store_price = 0;
|
|
$customer_store_price = 0;
|
|
|
if(! empty($value['customer_store_price']) && is_numeric($value['customer_store_price']) && $value['customer_store_price'] > 0){
|
|
if(! empty($value['customer_store_price']) && is_numeric($value['customer_store_price']) && $value['customer_store_price'] > 0){
|
|
|
- $customer_store_price = bcmul($value['customer_store_price'], $xs,2);
|
|
|
|
|
|
|
+ $customer_store_price = bcmul($value['customer_store_price'], $xs,4);
|
|
|
}else{
|
|
}else{
|
|
|
if(! empty($value['product_store_price']) && is_numeric($value['product_store_price']) && $value['product_store_price'] > 0){
|
|
if(! empty($value['product_store_price']) && is_numeric($value['product_store_price']) && $value['product_store_price'] > 0){
|
|
|
- $customer_store_price = bcmul($value['product_store_price'], $xs,2);
|
|
|
|
|
|
|
+ $customer_store_price = bcmul($value['product_store_price'], $xs,4);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
$dataArray[$key]['customer_store_zx_fee'] = $customer_store_price;
|
|
$dataArray[$key]['customer_store_zx_fee'] = $customer_store_price;
|
|
@@ -1268,11 +1268,11 @@ class TPlusServerService extends Service
|
|
|
$product_store_price2 = 0;
|
|
$product_store_price2 = 0;
|
|
|
if(! empty($value['product_store_price2']) && is_numeric($value['product_store_price2'])) $product_store_price2 = $value['product_store_price2'];
|
|
if(! empty($value['product_store_price2']) && is_numeric($value['product_store_price2'])) $product_store_price2 = $value['product_store_price2'];
|
|
|
if(! empty($value['product_category']) && $value['product_category'] == "礼盒"){
|
|
if(! empty($value['product_category']) && $value['product_category'] == "礼盒"){
|
|
|
- $dh_fee = bcmul($xs, $product_store_price2,2);
|
|
|
|
|
|
|
+ $dh_fee = bcmul($xs, $product_store_price2,4);
|
|
|
}else{
|
|
}else{
|
|
|
- $dh_fee = bcmul($weight, $product_store_price2,2);
|
|
|
|
|
|
|
+ $dh_fee = bcmul($weight, $product_store_price2,4);
|
|
|
}
|
|
}
|
|
|
- if($value['business_type_id'] == FreightFee::businessTypeReturn) $dh_fee = bcmul($dh_fee,2,2);
|
|
|
|
|
|
|
+ if($value['business_type_id'] == FreightFee::businessTypeReturn) $dh_fee = bcmul($dh_fee,2,4);
|
|
|
$dataArray[$key]['dh_fee'] = $dh_fee;
|
|
$dataArray[$key]['dh_fee'] = $dh_fee;
|
|
|
}
|
|
}
|
|
|
|
|
|