Commit de5ef022 authored by zhuwei's avatar zhuwei

收款列表记录上传图片 收款列表-删除上传图片

parent 9c5334ac
...@@ -11,6 +11,7 @@ namespace app\index\controller; ...@@ -11,6 +11,7 @@ namespace app\index\controller;
use app\index\extend\Basic; use app\index\extend\Basic;
use app\index\untils\ExportExcelUntil; use app\index\untils\ExportExcelUntil;
use app\model\OImg;
use app\model\OPayLogModel; use app\model\OPayLogModel;
class Collection extends Basic class Collection extends Basic
...@@ -135,6 +136,7 @@ class Collection extends Basic ...@@ -135,6 +136,7 @@ class Collection extends Basic
return view('getCollection'); return view('getCollection');
} }
} }
public function addRealMoney(){ public function addRealMoney(){
$params = $this->params; $params = $this->params;
/* $params = array( /* $params = array(
...@@ -158,4 +160,69 @@ class Collection extends Basic ...@@ -158,4 +160,69 @@ class Collection extends Basic
} }
} }
/**
* 收款列表记录上传图片
* 朱伟 2018-07-04
*/
public function addReceiptImg(){
$params = $this->params;
/*$params = array(
"img_id" => 1,
"img_name" => 123,
);*/
if(!isset($params["img_id"])){
return $this->response("101","请求参数错误");
}
if(!isset($params["img_name"])){
return $this->response("101","请求参数错误");
}
$time = date("Y-m-d H:i:s", time());
$save_data["img_id"] = $params["img_id"];//id根据img_type区分是收款还是进场还是其他'
$save_data["img_type"] = 2 ;//图片类型:1进场,2收款
$save_data["img_name"] = $params["img_name"];//图片名称
$save_data["img_status"] = 0 ;//删除状态 0正常 1删除
$save_data["update_time"] = $time;//更新时间
$save_data["create_time"] = $time;//创建时间
$order = new OImg();
$res = $order->addImgOnce($save_data);
if($res){
return $this->response("200","成功");
}else{
return $this->response("101","失败");
}
}
/**
* 收款列表-删除上传图片
* 朱伟 2018-07-04
*/
public function deleteReceiptImg(){
$params = $this->params;
/*$params = array(
"id" => 3,
"img_name" => 123,
);*/
if(!isset($params["id"])){
return $this->response("101","请求参数错误");
}
$time = date("Y-m-d H:i:s", time());
$save_data["id"] = $params["id"];//id根据img_type区分是收款还是进场还是其他'
$save_data["img_status"] = 1 ;//删除状态 0正常 1删除
$save_data["update_time"] = $time;//更新时间
$order = new OImg();
$res = $order->updateImgStatus($save_data);
if($res){
return $this->response("200","成功");
}else{
return $this->response("101","失败");
}
}
} }
\ No newline at end of file
...@@ -232,6 +232,10 @@ Route::group('index', [ ...@@ -232,6 +232,10 @@ Route::group('index', [
'carryOut' => [ 'index/Supervise/carryOut', [ 'method' => 'get' ] ],//监督执行 'carryOut' => [ 'index/Supervise/carryOut', [ 'method' => 'get' ] ],//监督执行
'toReportListOne' => [ 'index/Finance/toReportListOne', [ 'method' => 'POST' ] ], //回到一级审核 'toReportListOne' => [ 'index/Finance/toReportListOne', [ 'method' => 'POST' ] ], //回到一级审核
'checkOver' => [ 'index/Finance/checkOver', [ 'method' => 'POST' ] ], //财务结单 'checkOver' => [ 'index/Finance/checkOver', [ 'method' => 'POST' ] ], //财务结单
'addReceiptImg' => [ 'index/Collection/addReceiptImg', [ 'method' => 'post|get' ] ],//收款图片信息保存
'deleteReceiptImg' => [ 'index/Collection/deleteReceiptImg', [ 'method' => 'post|get' ] ],//删除收款图片
'getTaxesById' => [ 'index/Finance/getTaxesById', [ 'method' => 'POST|GET' ] ], //财务结单 'getTaxesById' => [ 'index/Finance/getTaxesById', [ 'method' => 'POST|GET' ] ], //财务结单
'financeUpdateLog' => [ 'index/Finance/financeUpdateLog', [ 'method' => 'POST|GET' ] ], //财务结单 'financeUpdateLog' => [ 'index/Finance/financeUpdateLog', [ '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