2026-01-07 17:23:03 +08:00
|
|
|
<?php
|
|
|
|
|
namespace app\mobile\controller;
|
|
|
|
|
|
|
|
|
|
use app\common\controller\BaseController;
|
2026-02-04 09:28:54 +08:00
|
|
|
use app\common\model\InvRequisitionItem;
|
2026-01-07 17:23:03 +08:00
|
|
|
use app\common\traits\crud\CrudControllerTrait;
|
|
|
|
|
use app\common\service\InvRequisitionReturnService;
|
|
|
|
|
|
|
|
|
|
class InvRequisitionReturnController extends BaseController
|
|
|
|
|
{
|
|
|
|
|
use CrudControllerTrait;
|
|
|
|
|
|
|
|
|
|
protected $service;
|
|
|
|
|
|
|
|
|
|
public function __construct()
|
|
|
|
|
{
|
|
|
|
|
$this->service = new InvRequisitionReturnService();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 列表页数据格式化
|
|
|
|
|
*
|
|
|
|
|
* @param array $data
|
|
|
|
|
* @return array
|
|
|
|
|
*/
|
2026-02-04 09:28:54 +08:00
|
|
|
protected function indexFormat($data)
|
|
|
|
|
{
|
|
|
|
|
if (isset($data['id'])) {
|
|
|
|
|
$data['item'] = InvRequisitionItem::where('requisition_id', $data['id'])->get();
|
|
|
|
|
}
|
|
|
|
|
if (isset($data['created_at']))
|
|
|
|
|
$data['created_at'] = date('Y-m-d H:i:s', $data['created_at']);
|
|
|
|
|
if (isset($data['updated_at']))
|
|
|
|
|
$data['updated_at'] = date('Y-m-d H:i:s', $data['updated_at']);
|
|
|
|
|
return $data;
|
|
|
|
|
}
|
2026-01-07 17:23:03 +08:00
|
|
|
}
|