update
This commit is contained in:
parent
2fd360b7e3
commit
4a94919d54
@ -59,6 +59,9 @@ class ProjectProgressPaymentLists extends BaseAdminDataLists implements ListsSea
|
||||
->limit($this->limitOffset, $this->limitLength)
|
||||
->order(['id' => 'desc'])
|
||||
->select()
|
||||
->each(function($item){
|
||||
$item['annex'] = json_decode($item['annex'], true);
|
||||
})
|
||||
->toArray();
|
||||
}
|
||||
|
||||
|
@ -41,7 +41,7 @@ class ProjectChangeVisaContentLogic extends BaseLogic
|
||||
Db::startTrans();
|
||||
try {
|
||||
ProjectChangeVisaContent::create([
|
||||
'project_change_visa_dataid' => $params['project_change_visa_dataid'],
|
||||
'project_progress_payment_id' => $params['project_progress_payment_id'],
|
||||
'directory' => $params['directory'],
|
||||
'unit_name' => $params['unit_name'],
|
||||
'time' => $params['time'],
|
||||
|
@ -40,7 +40,7 @@ class ProjectProgressPaymentLogic extends BaseLogic
|
||||
{
|
||||
Db::startTrans();
|
||||
try {
|
||||
ProjectProgressPayment::create([
|
||||
$p = ProjectProgressPayment::create([
|
||||
'dataid' => generate_sn(ProjectProgressPayment::class, 'dataid'),
|
||||
'num' => generate_sn(ProjectProgressPayment::class, 'num'),
|
||||
'project_id' => $params['project_id'],
|
||||
@ -49,9 +49,12 @@ class ProjectProgressPaymentLogic extends BaseLogic
|
||||
'sbhj' => $params['sbhj'],
|
||||
'shhj' => $params['shhj'],
|
||||
'ljhj' => $params['ljhj'],
|
||||
'annex' => $params['annex'],
|
||||
'annex' => json_encode($params['annex'])
|
||||
]);
|
||||
|
||||
foreach ($params['project_progress_payment_detail'] as $item) {
|
||||
$item['project_progress_payment_id'] = $p->id;
|
||||
ProjectChangeVisaContentLogic::add($item);
|
||||
}
|
||||
Db::commit();
|
||||
return true;
|
||||
} catch (\Exception $e) {
|
||||
@ -80,7 +83,7 @@ class ProjectProgressPaymentLogic extends BaseLogic
|
||||
'sbhj' => $params['sbhj'],
|
||||
'shhj' => $params['shhj'],
|
||||
'ljhj' => $params['ljhj'],
|
||||
'annex' => $params['annex'],
|
||||
'annex' => json_encode($params['annex'])
|
||||
]);
|
||||
|
||||
Db::commit();
|
||||
@ -115,6 +118,8 @@ class ProjectProgressPaymentLogic extends BaseLogic
|
||||
*/
|
||||
public static function detail($params): array
|
||||
{
|
||||
return ProjectProgressPayment::with(['projectInfo'])->findOrEmpty($params['id'])->toArray();
|
||||
$data = ProjectProgressPayment::with(['projectInfo'])->findOrEmpty($params['id'])->toArray();
|
||||
$data['annex'] = json_decode($data['annex'], true);
|
||||
return $data;
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user