更新细节
This commit is contained in:
parent
93c12a803e
commit
3d482440ca
@ -18,7 +18,7 @@ namespace app\adminapi\lists\contract;
|
||||
use app\adminapi\lists\BaseAdminDataLists;
|
||||
use app\common\model\contract\Contract;
|
||||
use app\common\lists\ListsSearchInterface;
|
||||
|
||||
use think\facade\Db;
|
||||
|
||||
/**
|
||||
* 项目合同列表
|
||||
@ -54,11 +54,21 @@ class ContractLists extends BaseAdminDataLists implements ListsSearchInterface
|
||||
*/
|
||||
public function lists(): array
|
||||
{
|
||||
return Contract::where($this->searchWhere)
|
||||
->field(['*'])
|
||||
return Db::name('Contract')->alias('c')
|
||||
->where($this->searchWhere)
|
||||
->leftJoin('bid_buy_bidding_document bbbd','c.id = c.buy_bidding_document_id')
|
||||
->leftJoin('project p','p.id = bbbd.project_id')
|
||||
->leftJoin('custom ct','ct.id = c.customer_id')
|
||||
->field('c.*, bbbd.project_id, p.name as project_name, ct.name as custom_name')
|
||||
->limit($this->limitOffset, $this->limitLength)
|
||||
->order(['approve_id' => 'desc'])
|
||||
->select()
|
||||
->order(['c.id' => 'desc'])
|
||||
->select()->each(function($item, $key){
|
||||
//关联数据 供应商后续添加
|
||||
$item['approve_no'] = '付款单号';
|
||||
$item['approve_step'] = '流程步骤';
|
||||
$item['approve_settle_status'] = 1;
|
||||
return $item;
|
||||
})
|
||||
->toArray();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user