更新细节
This commit is contained in:
parent
8554de48db
commit
fd84b91a6a
@ -62,7 +62,8 @@ class AcceptanceBillLists extends BaseAdminDataLists implements ListsSearchInter
|
||||
->leftJoin('project p','p.id = ab.project_id')
|
||||
->leftJoin('contract c','c.id = ab.contract_id')
|
||||
->leftJoin('custom ct','ct.id = ab.customer_id')
|
||||
->field('ab.*, d.name as dept_name, o.name as org_name, p.name as project_name, c.contract_code, c.contract_name')
|
||||
->leftJoin('bank_account ba','ba.id = ab.bank_account_id')
|
||||
->field('ab.*, d.name as dept_name, o.name as org_name, ct.name as customer_name, p.name as project_name, c.contract_code, c.contract_name, ba.deposit_bank, ba.account_name, ba.account')
|
||||
->limit($this->limitOffset, $this->limitLength)
|
||||
->order(['ab.id' => 'desc'])
|
||||
->select()->each(function($item, $key){
|
||||
@ -71,6 +72,9 @@ class AcceptanceBillLists extends BaseAdminDataLists implements ListsSearchInter
|
||||
$item['approve_no'] = '付款单号';
|
||||
$item['approve_step'] = '流程步骤';
|
||||
$item['approve_settle_status'] = 1;
|
||||
$item['pay_amount'] = 1;
|
||||
$item['cash_amount'] = 2;
|
||||
$item['balance'] = 3;
|
||||
return $item;
|
||||
})
|
||||
->toArray();
|
||||
|
@ -135,6 +135,7 @@ class AcceptanceBillLogic extends BaseLogic
|
||||
$acceptanceBill->org;
|
||||
$acceptanceBill->dept;
|
||||
$acceptanceBill->contract;
|
||||
$acceptanceBill->bankAccount;
|
||||
$acceptanceBill->annex = json_decode($acceptanceBill->annex, true);
|
||||
return $acceptanceBill->toArray();
|
||||
}
|
||||
|
@ -124,9 +124,16 @@ class TransferBillLogic extends BaseLogic
|
||||
$transferBill->dept;
|
||||
$transferBill->contract;
|
||||
$transferBill->acceptance;
|
||||
$transferBill->project = $transferBill->contract->project;
|
||||
$transferBill->custom = $transferBill->project->custom;
|
||||
unset($transferBill->contract->project, $transferBill->project->custom);
|
||||
$transferBill->project = null;
|
||||
$transferBill->custom = null;
|
||||
if (!empty($transferBill->contract->project)) {
|
||||
$transferBill->project = $transferBill->contract->project;
|
||||
unset($transferBill->contract->project);
|
||||
}
|
||||
if (!empty($transferBill->project->custom)) {
|
||||
$transferBill->custom = $transferBill->project->custom;
|
||||
unset($transferBill->project->custom);
|
||||
}
|
||||
$transferBill->annex = json_decode($transferBill->annex, true);
|
||||
return $transferBill->toArray();
|
||||
}
|
||||
|
@ -80,4 +80,9 @@ class AcceptanceBill extends BaseModel
|
||||
return $this->hasOne(\app\common\model\contract\Contract::class, 'id', 'contract_id');
|
||||
}
|
||||
|
||||
public function bankAccount()
|
||||
{
|
||||
return $this->hasOne(\app\common\model\bank\BankAccount::class, 'id', 'bank_account_id');
|
||||
}
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user