|
@@ -338,8 +338,11 @@ class Consult extends Base
|
|
|
if($zxorder==false){
|
|
|
return error_show(1004,"未找到咨询信息数据");
|
|
|
}
|
|
|
- $cat =Db::name("cat")->where(["id"=>$zxinfo['cat_id']])->find();
|
|
|
- $budget = isset($cat['order_rate']) ? $cat['order_rate']:0;
|
|
|
+// $cat =Db::name("cat")->where(["id"=>$zxinfo['cat_id']])->find();
|
|
|
+// $budget = isset($cat['order_rate']) ? $cat['order_rate']:0;
|
|
|
+
|
|
|
+ $budget = get_budget($zxinfo['cat_id'], $zxorder['companyNo'], $zxorder['platform_code']);
|
|
|
+
|
|
|
$zxinfo['can']= isset($zxinfo['cat_id']) && $zxinfo['cat_id'] !=0 ? made($zxinfo['cat_id'],[]):[];
|
|
|
$zxinfo['khname']="";
|
|
|
$zxinfo['original_price']=sprintf("%.2f",$zxinfo['budget_price']* (1 -$budget/100));
|
|
@@ -613,8 +616,7 @@ class Consult extends Base
|
|
|
}
|
|
|
|
|
|
//更新consule_order记录
|
|
|
- $op = Db::name('consult_order')->where('zxNo',$zxinfo['zxNo'])->update(['endtime'=>$endtime,
|
|
|
- 'updatetime'=>date('Y-m-d H:i:s')]);
|
|
|
+ $op = Db::name('consult_order')->where('zxNo',$zxinfo['zxNo'])->update(['endtime'=>$endtime, 'updatetime'=>date('Y-m-d H:i:s')]);
|
|
|
if($op==false){
|
|
|
Db::rollback();
|
|
|
return error_show(1004,'咨询单结束时间更新失败');
|
|
@@ -679,7 +681,7 @@ class Consult extends Base
|
|
|
"action_remark" => '',//备注
|
|
|
"action_type" => "status"//新建create,编辑edit,更改状态status
|
|
|
], "ZXD", $zxinfo['status'], $zxinfo);
|
|
|
- return app_show(0,"状态更新成功");
|
|
|
+ return app_show(0,"状态更新成功");
|
|
|
}else{
|
|
|
return error_show(1003,"状态更新失败");
|
|
|
}
|
|
@@ -763,8 +765,8 @@ class Consult extends Base
|
|
|
$relaComNo = isset($this->post['relaComNo']) && $this->post['relaComNo'] != '' ? trim($this->post['relaComNo']) : "";
|
|
|
if ($relaComNo == '') return error_show(1004, '关联公司不能为空');
|
|
|
|
|
|
- $platform_id = isset($this->post['platform_id']) && $this->post['platform_id'] != '' ? intval($this->post['platform_id']) : 0;
|
|
|
- if ($platform_id == 0) return error_show(1004, '平台id不能为空');
|
|
|
+// $platform_id = isset($this->post['platform_id']) && $this->post['platform_id'] != '' ? intval($this->post['platform_id']) : 0;
|
|
|
+// if ($platform_id == 0) return error_show(1004, '平台id不能为空');
|
|
|
|
|
|
|
|
|
// $token = isset($this->post['token'])&& $this->post['token']!='' ? trim($this->post['token']):"";
|
|
@@ -782,8 +784,7 @@ class Consult extends Base
|
|
|
// $catinfo = Db::name("cat")->where(["id"=>$cat_id])->find();
|
|
|
|
|
|
//计算毛利率
|
|
|
- $budget = get_budget($zxinfo['cat_id'],$relaComNo,$platform_id);
|
|
|
-
|
|
|
+ $budget = get_budget($zxinfo['cat_id'], $relaComNo, $zx['platform_code']);
|
|
|
// $budget = isset($catinfo['order_rate']) ? $catinfo['order_rate']/100:0;
|
|
|
|
|
|
//部分参数的大小校验
|