update
This commit is contained in:
parent
fa35b0f229
commit
53d348f1dd
@ -18,6 +18,7 @@ namespace app\adminapi\lists\project_process_management;
|
||||
use app\adminapi\lists\BaseAdminDataLists;
|
||||
use app\common\model\project_process_management\ProjectChangeVisa;
|
||||
use app\common\lists\ListsSearchInterface;
|
||||
use app\common\model\project_process_management\ProjectChangeVisaContent;
|
||||
|
||||
|
||||
/**
|
||||
@ -56,9 +57,14 @@ class ProjectChangeVisaLists extends BaseAdminDataLists implements ListsSearchIn
|
||||
public function lists(): array
|
||||
{
|
||||
return ProjectChangeVisa::with(['projectInfo'])
|
||||
->append(['children'])
|
||||
->where($this->searchWhere)
|
||||
->limit($this->limitOffset, $this->limitLength)
|
||||
->order(['id' => 'desc'])
|
||||
->withAttr('children', function ($value, $data){
|
||||
$details = ProjectChangeVisaContent::where('project_change_visa_id', $data['id'])->select();
|
||||
return $details;
|
||||
})
|
||||
->select()
|
||||
->toArray();
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ namespace app\adminapi\lists\project_process_management;
|
||||
use app\adminapi\lists\BaseAdminDataLists;
|
||||
use app\common\model\project_process_management\ProjectProgressPayment;
|
||||
use app\common\lists\ListsSearchInterface;
|
||||
use app\common\model\project_process_management\ProjectProgressPaymentDetail;
|
||||
|
||||
|
||||
/**
|
||||
@ -56,8 +57,13 @@ class ProjectProgressPaymentLists extends BaseAdminDataLists implements ListsSea
|
||||
public function lists(): array
|
||||
{
|
||||
return ProjectProgressPayment::with(['projectInfo'])->where($this->searchWhere)
|
||||
->append(['children'])
|
||||
->limit($this->limitOffset, $this->limitLength)
|
||||
->order(['id' => 'desc'])
|
||||
->withAttr('children', function ($value, $data){
|
||||
$details = ProjectProgressPaymentDetail::where('project_progress_payment_id', $data['id'])->select();
|
||||
return $details;
|
||||
})
|
||||
->select()
|
||||
->each(function($item){
|
||||
$item['annex'] = json_decode($item['annex'], true);
|
||||
|
@ -53,7 +53,7 @@ class ProjectProgressPaymentLogic extends BaseLogic
|
||||
]);
|
||||
foreach ($params['project_progress_payment_detail'] as $item) {
|
||||
$item['project_progress_payment_id'] = $p->id;
|
||||
ProjectChangeVisaContentLogic::add($item);
|
||||
ProjectProgressPaymentDetailLogic::add($item);
|
||||
}
|
||||
Db::commit();
|
||||
return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user