更新行政收款
This commit is contained in:
parent
df2762028d
commit
a27254e08c
@ -54,26 +54,18 @@ class AdministrativeTicketCollectionLists extends BaseAdminDataLists implements
|
||||
*/
|
||||
public function lists(): array
|
||||
{
|
||||
return AdministrativeTicketCollection::where($this->searchWhere)
|
||||
->field(['id', 'org_id', 'dept_id', 'administrative_contract_id', 'invoicing_date', 'commitor', 'invoice_type', 'invoice_sn', 'invoice_amount', 'invoice_tax_rate', 'tax', 'amount_excluding_tax', 'receipt_date', 'remark', 'annex'])
|
||||
->limit($this->limitOffset, $this->limitLength)
|
||||
->order(['id' => 'desc'])
|
||||
->select()
|
||||
->toArray();
|
||||
return Db::name('AdministrativeTicketCollection')->alias('atc')
|
||||
->where($this->searchWhere)
|
||||
->whereNull('er.delete_time')
|
||||
->leftJoin('orgs o','o.id = er.org_id')
|
||||
->leftJoin('dept d','d.id = er.dept_id')
|
||||
->leftJoin('custom ct','ct.id = er.customer_id')
|
||||
->field('er.*, d.name as dept_name, o.name as org_name, ct.name as customer_name')
|
||||
->whereNull('atc.delete_time')
|
||||
->leftJoin('orgs o','o.id = atc.org_id')
|
||||
->leftJoin('dept d','d.id = atc.dept_id')
|
||||
->leftJoin('administrative_contract ac','ac.id = er.administrative_contract_id')
|
||||
->field('atc.*, d.name as dept_name, o.name as org_name, ac.supplier_id, ac.contract_no, ac.contract_name')
|
||||
->limit($this->limitOffset, $this->limitLength)
|
||||
->order(['er.id' => 'desc'])
|
||||
->order(['atc.id' => 'desc'])
|
||||
->select()->each(function($item, $key){
|
||||
//关联数据后续添加
|
||||
$item['approve_no'] = '付款单号';
|
||||
$item['approve_step'] = '流程步骤';
|
||||
$item['approve_settle_status'] = 1;
|
||||
$item['supplier_name'] = '供应商名称';
|
||||
return $item;
|
||||
})
|
||||
->toArray();
|
||||
@ -88,7 +80,12 @@ class AdministrativeTicketCollectionLists extends BaseAdminDataLists implements
|
||||
*/
|
||||
public function count(): int
|
||||
{
|
||||
return AdministrativeTicketCollection::where($this->searchWhere)->count();
|
||||
return Db::name('AdministrativeTicketCollection')->alias('atc')
|
||||
->where($this->searchWhere)
|
||||
->whereNull('atc.delete_time')
|
||||
->leftJoin('orgs o','o.id = atc.org_id')
|
||||
->leftJoin('dept d','d.id = atc.dept_id')
|
||||
->leftJoin('administrative_contract ac','ac.id = er.administrative_contract_id')->count();
|
||||
}
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user