Commit c6266f91 authored by clone's avatar clone

bug

parent ba1a274f
...@@ -406,7 +406,7 @@ class OBargainModel extends Model ...@@ -406,7 +406,7 @@ class OBargainModel extends Model
} }
if ($return) { if ($return) {
if ($status == 10 && $data['audit_level'] == 1){ if ($status == 10 && $data['audit_level'] == 1) {
//审核开始 //审核开始
$update_data['status'] = 11; $update_data['status'] = 11;
} elseif ($data['audit_level'] == 3 && $status == 11) { } elseif ($data['audit_level'] == 3 && $status == 11) {
...@@ -633,6 +633,8 @@ class OBargainModel extends Model ...@@ -633,6 +633,8 @@ class OBargainModel extends Model
$where_["role"] = 3;//必须是反签方 $where_["role"] = 3;//必须是反签方
} }
$where_["status"] = array( "in", "10,11,13" );
if (isset($params["agent_id"])) { if (isset($params["agent_id"])) {
$where_["agent_id"] = $params["agent_id"]; $where_["agent_id"] = $params["agent_id"];
} }
...@@ -930,7 +932,7 @@ class OBargainModel extends Model ...@@ -930,7 +932,7 @@ class OBargainModel extends Model
if ($result == 1) { if ($result == 1) {
$this->commit(); $this->commit();
$agent_data = $m_agent->verifyUser('store_id,district_id', '', ['id'=>$agent_id]); $agent_data = $m_agent->verifyUser('store_id,district_id', '', [ 'id' => $agent_id ]);
//更新业绩统计 //更新业绩统计
$sum = new ResultsSummaryNewTask(); $sum = new ResultsSummaryNewTask();
$date = date('Y-m-d', strtotime($bargain_data['create_time'])); $date = date('Y-m-d', strtotime($bargain_data['create_time']));
...@@ -1345,9 +1347,10 @@ class OBargainModel extends Model ...@@ -1345,9 +1347,10 @@ class OBargainModel extends Model
* @param array $data * @param array $data
* @return int * @return int
*/ */
public function updateBargain(int $id = 0, array $data = []) : int { public function updateBargain(int $id = 0, array $data = []): int
{
if ($id) { if ($id) {
$result = $this->where('id',$id) $result = $this->where('id', $id)
->whereOr('father_id', $id) ->whereOr('father_id', $id)
->update($data); ->update($data);
} else { } else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment