Commit c6266f91 authored by clone's avatar clone

bug

parent ba1a274f
......@@ -401,12 +401,12 @@ class OBargainModel extends Model
} else {
//第一步审核
$save_data['audit_level'] = 1;
$return = $audit->addAudit($save_data);
$save_data['audit_level'] = 1;
$return = $audit->addAudit($save_data);
}
if ($return) {
if ($status == 10 && $data['audit_level'] == 1){
if ($status == 10 && $data['audit_level'] == 1) {
//审核开始
$update_data['status'] = 11;
} elseif ($data['audit_level'] == 3 && $status == 11) {
......@@ -633,6 +633,8 @@ class OBargainModel extends Model
$where_["role"] = 3;//必须是反签方
}
$where_["status"] = array( "in", "10,11,13" );
if (isset($params["agent_id"])) {
$where_["agent_id"] = $params["agent_id"];
}
......@@ -930,9 +932,9 @@ class OBargainModel extends Model
if ($result == 1) {
$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']));
$sum->updateTotalByAgentId($agent_id, $agent_data['store_id'], $agent_data['district_id'], $date); //被修改的人
} else {
......@@ -1345,9 +1347,10 @@ class OBargainModel extends Model
* @param array $data
* @return int
*/
public function updateBargain(int $id = 0, array $data = []) : int {
public function updateBargain(int $id = 0, array $data = []): int
{
if ($id) {
$result = $this->where('id',$id)
$result = $this->where('id', $id)
->whereOr('father_id', $id)
->update($data);
} 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