更新合同
This commit is contained in:
parent
31d49064d8
commit
1aaadbb107
@ -76,6 +76,12 @@ class ProcurementContractLists extends BaseAdminDataLists implements ListsSearch
|
|||||||
$item['approve_no'] = '付款单号';
|
$item['approve_no'] = '付款单号';
|
||||||
$item['approve_step'] = '流程步骤';
|
$item['approve_step'] = '流程步骤';
|
||||||
$item['approve_settle_status'] = 1;
|
$item['approve_settle_status'] = 1;
|
||||||
|
if (!empty($item['pay_plan'])) {
|
||||||
|
$otherContactsArray = json_decode($item['pay_plan'], true);
|
||||||
|
if (is_array($otherContactsArray)) {
|
||||||
|
$item['pay_plan'] = $otherContactsArray;
|
||||||
|
}
|
||||||
|
}
|
||||||
return $item;
|
return $item;
|
||||||
})
|
})
|
||||||
->toArray();
|
->toArray();
|
||||||
|
@ -19,6 +19,7 @@ use app\adminapi\lists\BaseAdminDataLists;
|
|||||||
use app\common\model\contract\SubcontractingContract;
|
use app\common\model\contract\SubcontractingContract;
|
||||||
use app\common\model\contract\ProcurementContract;
|
use app\common\model\contract\ProcurementContract;
|
||||||
use app\common\lists\ListsSearchInterface;
|
use app\common\lists\ListsSearchInterface;
|
||||||
|
use think\facade\Db;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -64,11 +65,19 @@ class SubcontractingContractLists extends BaseAdminDataLists implements ListsSea
|
|||||||
*/
|
*/
|
||||||
public function lists(): array
|
public function lists(): array
|
||||||
{
|
{
|
||||||
return ProcurementContract::where($this->searchWhere)->where($this->querySearch())
|
return Db::name('ProcurementContract')->alias('pc')
|
||||||
->field(['*'])
|
->where($this->searchWhere)->where($this->querySearch())
|
||||||
|
->leftJoin('project p','p.id = pc.project_id')
|
||||||
|
->field('pc.*, p.name as project_name')
|
||||||
->limit($this->limitOffset, $this->limitLength)
|
->limit($this->limitOffset, $this->limitLength)
|
||||||
->order(['id' => 'desc'])
|
->order(['pc.id' => 'desc'])
|
||||||
->select()->each(function($item, $key){
|
->select()->each(function($item, $key){
|
||||||
|
//关联数据 供应商后续添加
|
||||||
|
$item['supplier_name'] = '供应商名称';
|
||||||
|
$item['contract_type'] = '1';
|
||||||
|
$item['approve_no'] = '付款单号';
|
||||||
|
$item['approve_step'] = '流程步骤';
|
||||||
|
$item['approve_settle_status'] = 1;
|
||||||
if (!empty($item['pay_plan'])) {
|
if (!empty($item['pay_plan'])) {
|
||||||
$otherContactsArray = json_decode($item['pay_plan'], true);
|
$otherContactsArray = json_decode($item['pay_plan'], true);
|
||||||
if (is_array($otherContactsArray)) {
|
if (is_array($otherContactsArray)) {
|
||||||
@ -76,7 +85,8 @@ class SubcontractingContractLists extends BaseAdminDataLists implements ListsSea
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $item;
|
return $item;
|
||||||
})->toArray();
|
})
|
||||||
|
->toArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user