Commit 6f8af585 authored by clone's avatar clone

新增开票编辑时候获取数据

parent f07869ea
......@@ -632,6 +632,24 @@ class Finance extends Basic
return $this->response("200", "request success", $data);
}
/**
* 编辑开票税费查询某一条记录
*
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function getTaxesById() {
if (empty($this->params['taxes_id'])) {
return $this->response(101, '查询开票税费参数错误!');
}
$m_fee = new OTaxes();
$field = 'id,bargain_id,fee,total_fee,father_id,operation_id,operation_date,agent_id,agent_name,role,scale,is_del';
$data = $m_fee->getTaxesId($this->params['taxes_id'], $field);
return $this->response("200", "request success", $data);
}
/**
* 新增开票
*
......
......@@ -109,6 +109,20 @@ class OTaxes extends BaseModel
return $result;
}
/**
* 根据id 查询详情 zw
* @param int $taxesId
* @param string $field
* @return false|\PDOStatement|string|\think\Collection
*/
public function getTaxesId(int $taxesId, string $field) {
return $this->field($field)
->where('id', $taxesId)
->where('is_del', 0)
->select();
}
/**
* 税费承担明细表
*
......
......@@ -229,6 +229,10 @@ Route::group('index', [
'carryOut' => [ 'index/Supervise/carryOut', [ 'method' => 'get' ] ],//监督执行
'toReportListOne' => ['index/Finance/toReportListOne', [ 'method' => 'POST' ] ], //回到一级审核
'checkOver' => ['index/Finance/checkOver', [ 'method' => 'POST' ] ], //财务结单
'getTaxesById' => ['index/Finance/getTaxesById', [ 'method' => 'POST|GET' ] ], //财务结单
]);
......
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