Commit b330ce7c authored by hujun's avatar hujun

payee_agent_id

parent 7039a433
...@@ -47,10 +47,11 @@ class Cost extends Basic ...@@ -47,10 +47,11 @@ class Cost extends Basic
5 => '行政审核' 5 => '行政审核'
]; ];
} }
/** /**
* 费用报销列表 * 费用报销列表
* *
* @return \think\Response * @return \think\Response|\think\response\View|void
*/ */
public function getCostList() { public function getCostList() {
if (!$this->request->isAjax() && $this->params['excel'] != 1) { if (!$this->request->isAjax() && $this->params['excel'] != 1) {
...@@ -272,6 +273,11 @@ class Cost extends Basic ...@@ -272,6 +273,11 @@ class Cost extends Basic
if (isset($param['purpose'])) { if (isset($param['purpose'])) {
$where['a.purpose'] = ['like', '%'.$param['purpose'].'%']; $where['a.purpose'] = ['like', '%'.$param['purpose'].'%'];
} }
//收款人
if (isset($param['payee_agent_id'])) {
$where['a.payee_agent_id'] = $param['payee_agent_id'];
}
return $where; return $where;
} }
...@@ -382,7 +388,7 @@ class Cost extends Basic ...@@ -382,7 +388,7 @@ class Cost extends Basic
$m_store_fee = new FStoreData(); $m_store_fee = new FStoreData();
$field = 'id,count_time,source,type,create_time,agent_id,total_fee,fee_item,purpose,status,site_id,status,bank,'; $field = 'id,count_time,source,type,create_time,agent_id,total_fee,fee_item,purpose,status,site_id,status,bank,';
$field .= 'card_no,card_name,store_id,office_id'; $field .= 'card_no,card_name,store_id,office_id,payee_agent_id';
$where['id'] = $this->params['id']; $where['id'] = $this->params['id'];
$data = $this->fee_model->findByOne($field, $where); $data = $this->fee_model->findByOne($field, $where);
...@@ -473,6 +479,13 @@ class Cost extends Basic ...@@ -473,6 +479,13 @@ class Cost extends Basic
$data['status_name'] = $this->status[$data['status']]; $data['status_name'] = $this->status[$data['status']];
$data['type_name'] = $cost_service->getFeeType($data['type']); $data['type_name'] = $cost_service->getFeeType($data['type']);
$data['fee_item_name'] = $cost_service->getFeeItem($data['fee_item']); $data['fee_item_name'] = $cost_service->getFeeItem($data['fee_item']);
if ($data['payee_agent_id']) {
$payee_agent_data = $redis->getRedisCache(2, $data['payee_agent_id']);
$data['payee_agent_name'] = $payee_agent_data['name'];
} else {
$data['payee_agent_name'] = '';
}
return $this->response(200, '', $data); return $this->response(200, '', $data);
} }
} }
\ No newline at end of file
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