Commit 23aab49b authored by hujun's avatar hujun

删除开票税费

parent 692be23e
...@@ -1343,9 +1343,9 @@ class Finance extends Basic ...@@ -1343,9 +1343,9 @@ class Finance extends Basic
*/ */
public function delPartialCommission() public function delPartialCommission()
{ {
if (empty($this->params['partial_id'])) if (empty($this->params['partial_id']))
return $this->response(101, '参数错误'); return $this->response(101, '参数错误');
$partial_id = $this->params['partial_id']; $partial_id = $this->params['partial_id'];
$m_partial = new OBargainModel(); $m_partial = new OBargainModel();
$data['status'] = 30; $data['status'] = 30;
...@@ -1361,4 +1361,27 @@ class Finance extends Basic ...@@ -1361,4 +1361,27 @@ class Finance extends Basic
return $this->response($result['code'], $result['msg']); return $this->response($result['code'], $result['msg']);
} }
/**
* 删除开票税费
*
* @return \think\Response
*/
public function delTaxes()
{
if (empty($this->params['taxes_id']))
return $this->response(101, '参数错误');
$m_taxes = new OTaxes();
$num = $m_taxes->updateTaxesById($this->params['taxes_id'],['is_del'=>1]);
if ($num > 0) {
$result['code'] = 200;
$result['msg'] = '删除成功';
} else {
$result['code'] = 101;
$result['msg'] = '删除失败';
}
return $this->response($result['code'], $result['msg']);
}
} }
...@@ -96,6 +96,7 @@ class OTaxes extends BaseModel ...@@ -96,6 +96,7 @@ class OTaxes extends BaseModel
->join('o_bargain b', 'a.bargain_id = b.id', 'left') ->join('o_bargain b', 'a.bargain_id = b.id', 'left')
->where('bargain_id', $bargain_id) ->where('bargain_id', $bargain_id)
->where('a.father_id', 0) ->where('a.father_id', 0)
->where('a.is_del', 0)
->select(); ->select();
$result = []; $result = [];
...@@ -254,4 +255,23 @@ class OTaxes extends BaseModel ...@@ -254,4 +255,23 @@ class OTaxes extends BaseModel
return $this->where($where) return $this->where($where)
->column($field); ->column($field);
} }
/**
* 修改信息
*
* @param $id
* @param $params
* @return OTaxes
*/
public function updateTaxesById($id, $params)
{
$update_dta = [];
if (isset($params['is_del'])) {
$update_dta['is_del'] = 1;
}
$update_dta["update_time"] = date("Y-m-d H:i:s", time());
$result = $this->where('id', $id)->update($update_dta);
return $result;
}
} }
\ No newline at end of file
...@@ -233,6 +233,7 @@ Route::group('index', [ ...@@ -233,6 +233,7 @@ Route::group('index', [
'toReportListOne' => [ 'index/Finance/toReportListOne', [ 'method' => 'POST' ] ], //回到一级审核 'toReportListOne' => [ 'index/Finance/toReportListOne', [ 'method' => 'POST' ] ], //回到一级审核
'checkOver' => [ 'index/Finance/checkOver', [ 'method' => 'POST' ] ], //财务结单 'checkOver' => [ 'index/Finance/checkOver', [ 'method' => 'POST' ] ], //财务结单
'delPartialCommission' => [ 'index/Finance/delPartialCommission', [ 'method' => 'POST' ] ], //删除分佣方 'delPartialCommission' => [ 'index/Finance/delPartialCommission', [ 'method' => 'POST' ] ], //删除分佣方
'delTaxes' => [ 'index/Finance/delTaxes', [ 'method' => 'POST' ] ], //删除开票税费
'addReceiptImg' => [ 'index/Collection/addReceiptImg', [ 'method' => 'post|get' ] ],//收款图片信息保存 'addReceiptImg' => [ 'index/Collection/addReceiptImg', [ 'method' => 'post|get' ] ],//收款图片信息保存
'deleteReceiptImg' => [ 'index/Collection/deleteReceiptImg', [ 'method' => 'post|get' ] ],//删除收款图片 'deleteReceiptImg' => [ 'index/Collection/deleteReceiptImg', [ 'method' => 'post|get' ] ],//删除收款图片
'receiptImgList' => [ 'index/Collection/receiptImgList', [ 'method' => 'post|get' ] ],//收款列表-收款图片列表 'receiptImgList' => [ 'index/Collection/receiptImgList', [ '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