添加造价项目时修改待立项项目
This commit is contained in:
parent
0ee3af092f
commit
176e9774e9
@ -26,7 +26,7 @@ use app\common\lists\ListsSearchInterface;
|
||||
* Class CostApprovedProjectLists
|
||||
* @package app\adminapi\listscost_project
|
||||
*/
|
||||
class CostApprovedProjectLists extends BaseAdminDataLists implements ListsSearchInterface,ListsExcelInterface
|
||||
class CostApprovedProjectLists extends BaseAdminDataLists implements ListsSearchInterface, ListsExcelInterface
|
||||
{
|
||||
|
||||
|
||||
@ -57,9 +57,10 @@ class CostApprovedProjectLists extends BaseAdminDataLists implements ListsSearch
|
||||
public function lists(): array
|
||||
{
|
||||
return CostApprovedProject::where($this->searchWhere)
|
||||
->where('status', 1)
|
||||
->limit($this->limitOffset, $this->limitLength)
|
||||
->order(['id' => 'desc'])
|
||||
->select()->each(function($data){
|
||||
->select()->each(function ($data) {
|
||||
$data['business_nature_text'] = $data->business_nature_text;
|
||||
$data['industry_nature_text'] = $data->industry_nature_text;
|
||||
$data['fund_sources_text'] = $data->fund_sources_text;
|
||||
@ -134,5 +135,4 @@ class CostApprovedProjectLists extends BaseAdminDataLists implements ListsSearch
|
||||
'number' => '邮寄编号',
|
||||
];
|
||||
}
|
||||
|
||||
}
|
@ -19,6 +19,7 @@ use app\common\model\ApprovalIssuanceAchievementDocuments;
|
||||
use app\common\model\cost_project\CostProject;
|
||||
use app\common\logic\BaseLogic;
|
||||
use app\common\model\auth\Admin;
|
||||
use app\common\model\cost_project\CostApprovedProject;
|
||||
use app\common\model\cost_project\CostProjectPerson;
|
||||
use app\common\model\DataReception;
|
||||
use app\common\model\dept\Dept;
|
||||
@ -88,6 +89,9 @@ class CostProjectLogic extends BaseLogic
|
||||
'remark' => $params['remark'],
|
||||
'annex' => $params['annex'] ? json_encode($params['annex']) : null,
|
||||
]);
|
||||
if($params['contract_id']>0){
|
||||
CostApprovedProject::where('id',$params['contract_id'])->update(['status',2]);
|
||||
}
|
||||
Db::commit();
|
||||
return true;
|
||||
} catch (\Exception $e) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user