|
@@ -708,13 +708,22 @@ class Consult extends Base
|
|
|
if(!$vali->check($temp)) return error_show(0,$vali->getError());
|
|
|
|
|
|
|
|
|
+ $sale_cost_fee = $cost_fee;//销售工艺费默认取传值
|
|
|
if($is_gold_price==1){
|
|
|
$gold = Db::name("gold_price1")->where(["type"=>$metal_id,"is_del"=>0,"status"=>1])->order("addtime desc")
|
|
|
->find();
|
|
|
- $total_fee = $open_fee/$zxinfo['num'] + $weight* $gold["price"] + $cost_fee*
|
|
|
- $weight+$pakge_fee+$mark_fee+$cert_fee+$nake_fee;
|
|
|
- $saleprice = $open_fee/$zxinfo['num'] + $weight* $gold["price"] + $cost_fee/(1-$budget)*
|
|
|
- $weight+$pakge_fee+$mark_fee+$cert_fee+$nake_fee;
|
|
|
+
|
|
|
+ //$total_fee = $open_fee/$zxinfo['num'] + $weight* $gold["price"] + $cost_fee*$weight+$pakge_fee+$mark_fee+$cert_fee+$nake_fee;
|
|
|
+ //$total_fee(成本合计初始价格) =打样费/购买数量 + 开模费/购买数量 + 商品重量* 最新金价 + 工艺费* 商品重量+包装费+加标费+证书费+产品裸价0+运费;
|
|
|
+ $total_fee = $demo_fee / $zxinfo['num'] + $open_fee / $zxinfo['num'] + $weight * $gold["price"] + $cost_fee * $weight + $pakge_fee + $mark_fee + $cert_fee + $nake_fee + $delivery_fee;
|
|
|
+
|
|
|
+// $saleprice = $open_fee/$zxinfo['num'] + $weight* $gold["price"] + $cost_fee/(1-$budget)* $weight+$pakge_fee+$mark_fee+$cert_fee+$nake_fee;
|
|
|
+ //$saleprice(最终售价) = (开模费/购买数量 + 商品重量* 最新金价 + 工艺费* 商品重量+包装费+加标费+证书费+产品裸价)/(1-成本售价/100);
|
|
|
+ $saleprice = ($open_fee / $zxinfo['num'] + $weight * $gold["price"] + $cost_fee * $weight + $pakge_fee + $mark_fee + $cert_fee + $nake_fee) / (1 - $budget);
|
|
|
+
|
|
|
+ //销售工艺费=((开模费/购买数量 + 商品重量* 最新金价 + 工艺费* 商品重量+包装费+加标费+证书费+产品裸价)/(1-成本售价/100)-(打样费/购买数量 + 开模费/购买数量 +包装费+加标费+证书费+产品裸价0+运费) )/商品重量-最新金价
|
|
|
+ $sale_cost_fee = (($open_fee / $zxinfo['num'] + $weight * $gold["price"] + $cost_fee * $weight + $pakge_fee + $mark_fee + $cert_fee + $nake_fee) / (1 - $budget) - ($demo_fee / $zxinfo['num'] + $open_fee / $zxinfo['num'] + $pakge_fee + $mark_fee + $cert_fee + $nake_fee + $delivery_fee)) / $weight - $gold["price"];
|
|
|
+
|
|
|
}else{
|
|
|
$saleprice = $open_fee/$zxinfo['num'] +
|
|
|
$cost_fee*$weight+$pakge_fee+$mark_fee+$cert_fee+$nake_fee/(1-$budget);
|
|
@@ -762,6 +771,7 @@ class Consult extends Base
|
|
|
"supply_area"=>$supply_area,
|
|
|
"remark"=>$remark,
|
|
|
"sale_price"=>$saleprice,
|
|
|
+ "sale_cost_fee"=>$sale_cost_fee,
|
|
|
"origin_price"=>$saleprice,
|
|
|
"createrid"=>$createrid,
|
|
|
"creater"=>$creater,
|
|
@@ -1017,13 +1027,22 @@ class Consult extends Base
|
|
|
$remark = isset($this->post['remark'])&&$this->post['remark']!=""? trim($this->post['remark']):"";
|
|
|
$catinfo = Db::name("cat")->where(["id"=>$cat_id])->find();
|
|
|
$budget = isset($catinfo['order_rate']) ? $catinfo['order_rate']/100:0;
|
|
|
+
|
|
|
+ $sale_cost_fee = $bidinfo['sale_cost_fee'];
|
|
|
if($is_gold_price==1){
|
|
|
$gold = Db::name("gold_price1")->where(["type"=>$metal_id,"is_del"=>0,"status"=>1])->order("addtime desc")
|
|
|
->find();
|
|
|
- $total_fee = $open_fee/$zxinfo['num'] + $weight* $gold["price"] + $cost_fee*
|
|
|
- $weight+$pakge_fee+$mark_fee+$cert_fee+$nake_fee;
|
|
|
- $saleprice = $open_fee/$zxinfo['num'] + $weight* $gold["price"] + $cost_fee/(1-$budget)*
|
|
|
- $weight+$pakge_fee+$mark_fee+$cert_fee+$nake_fee;
|
|
|
+
|
|
|
+ //$total_fee(成本合计初始价格) =打样费/购买数量 + 开模费/购买数量 + 商品重量* 最新金价 + 工艺费* 商品重量+包装费+加标费+证书费+产品裸价0+运费;
|
|
|
+ $total_fee = $demo_fee / $zxinfo['num'] + $open_fee / $zxinfo['num'] + $weight * $gold["price"] + $cost_fee * $weight + $pakge_fee + $mark_fee + $cert_fee + $nake_fee + $delivery_fee;
|
|
|
+
|
|
|
+// $saleprice = $open_fee/$zxinfo['num'] + $weight* $gold["price"] + $cost_fee/(1-$budget)* $weight+$pakge_fee+$mark_fee+$cert_fee+$nake_fee;
|
|
|
+ //$saleprice(最终售价) = (开模费/购买数量 + 商品重量* 最新金价 + 工艺费* 商品重量+包装费+加标费+证书费+产品裸价)/(1-成本售价/100);
|
|
|
+ $saleprice = ($open_fee / $zxinfo['num'] + $weight * $gold["price"] + $cost_fee * $weight + $pakge_fee + $mark_fee + $cert_fee + $nake_fee) / (1 - $budget);
|
|
|
+
|
|
|
+ //销售工艺费=((开模费/购买数量 + 商品重量* 最新金价 + 工艺费* 商品重量+包装费+加标费+证书费+产品裸价)/(1-成本售价/100)-(打样费/购买数量 + 开模费/购买数量 +包装费+加标费+证书费+产品裸价0+运费) )/商品重量-最新金价
|
|
|
+ $sale_cost_fee = (($open_fee / $zxinfo['num'] + $weight * $gold["price"] + $cost_fee * $weight + $pakge_fee + $mark_fee + $cert_fee + $nake_fee) / (1 - $budget) - ($demo_fee / $zxinfo['num'] + $open_fee / $zxinfo['num'] + $pakge_fee + $mark_fee + $cert_fee + $nake_fee + $delivery_fee)) / $weight - $gold["price"];
|
|
|
+
|
|
|
}else{
|
|
|
$saleprice = $open_fee/$zxinfo['num'] +
|
|
|
$cost_fee*$weight+$pakge_fee+$mark_fee+$cert_fee+$nake_fee/(1-$budget);
|
|
@@ -1063,6 +1082,7 @@ class Consult extends Base
|
|
|
"mark_fee"=>$mark_fee,
|
|
|
"cert_fee"=>$cert_fee,
|
|
|
"cost_fee"=>$cost_fee,
|
|
|
+ "sale_cost_fee"=>$sale_cost_fee,
|
|
|
"total_fee"=>$total_fee,
|
|
|
"sale_price"=>$saleprice,
|
|
|
"supply_area"=>$supply_area,
|