Commit 346646bb authored by hujun's avatar hujun

删除分佣方

parent 33ef0b9f
......@@ -65,7 +65,7 @@ class Finance extends Basic
$pageSize = empty($this->params['pageSize']) ? 15 : $this->params['pageSize'];
$check_status = $this->params['check_status'];
$fields = 'a.id,a.create_time,a.trade_type,b.user_phone,b.user_name,d.internal_title,d.internal_address,
a.commission,a.practical_fee,a.scale_fee,a.order_no,a.order_id,content,house_number';
a.commission,a.practical_fee,a.scale_fee,a.order_no,a.order_id,content,house_number,a.is_open';
$where['a.father_id'] = 0;
// $where['c.is_del'] = 0;
$where['a.status'] = 11;
......@@ -238,7 +238,7 @@ class Finance extends Basic
}
if (empty($this->params['estimated_receipt_date'])) {
return $this->response(101,'预计收款时间为空');
return $this->response(101, '预计收款时间为空');
}
//应收总佣金
......@@ -289,7 +289,7 @@ class Finance extends Basic
if (empty($item['fee']) || empty($item['operation_date'])) {
$update_real_arr[$i]['id'] = $item['fee_id'];
$update_real_arr[$i]['is_del'] = 1;
$log_data[$i] = '[删除实收佣金:'.$item['fee'].',收佣日期'.$item['operation_date'].']'; //
$log_data[$i] = '[删除实收佣金:' . $item['fee'] . ',收佣日期' . $item['operation_date'] . ']'; //
$i++;
} elseif ($item["fee_id"] > 0) {
$update_real_arr[$i]['id'] = $item['fee_id'];
......@@ -304,7 +304,7 @@ class Finance extends Basic
$add_real_arr[$j]['operation_id'] = $this->userId;
$add_real_arr[$j]['money'] = $item['fee'];
$add_real_arr[$j]['income_time'] = $item['operation_date'];
$log_data[$j] = '[新增实收佣金:'.$item['fee'].',收佣日期'.$item['operation_date'].']';
$log_data[$j] = '[新增实收佣金:' . $item['fee'] . ',收佣日期' . $item['operation_date'] . ']';
$j++;
}
}
......@@ -1328,4 +1328,30 @@ class Finance extends Basic
$m_bargain = new OBargainLogModel();
return $m_bargain->addLog($insert_data);
}
/**
* 删除分佣方
*
* @return \think\Response
*/
public function delPartialCommission()
{
if (empty($this->params['partial_id']))
return $this->response(101, '参数错误');
$partial_id = $this->params['partial_id'];
$m_partial = new OPartialCommission();
$data['is_del'] = 1;
$num = $m_partial->editData($data, $partial_id);
if ($num > 1) {
$result['code'] = 200;
$result['msg'] = '删除成功';
} else {
$result['code'] = 101;
$result['msg'] = '删除失败';
}
return $this->response($result['code'], $result['msg']);
}
}
......@@ -184,12 +184,6 @@ class GHouses extends BaseModel
foreach ($data as $k => $v) {
$house_id[$k] = $v['id'];
$v->create_time = date('Y-m-d', strtotime($v->create_time));
$opening_date = $house_ext->where('house_id', $v['id'])->value('opening_date');
if (empty($opening_date)) {
$data[$k]['is_open'] = 0;
} else {
$data[$k]['is_open'] = 1;
}
}
$result = array();
......@@ -231,13 +225,6 @@ class GHouses extends BaseModel
} else {
$result[$k]['auth_edit_house'] = 0;
}
$opening_date = $house_ext->where('house_id', $v['id'])->value('opening_date');
if (empty($opening_date)) {
$data[$k]['is_open'] = 0;
} else {
$data[$k]['is_open'] = 1;
}
}
}
......
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