This commit is contained in:
weiz 2024-01-30 13:52:31 +08:00
parent ca33c29c43
commit 87b4600901
4 changed files with 35 additions and 9 deletions

View File

@ -132,18 +132,17 @@ class BidBiddingDecisionLists extends BaseAdminDataLists implements ListsSearchI
public function setExcelFields(): array
{
return [
'id' => '投标决策id',
'id' => 'id',
'code' => '投标决策编码',
'custom_name' => '客户名称',
'project_name' => '项目名称',
'project_estimation' => '项目估算',
'bidding_project_fund_source' => '资金来源',
'bidding_time' => '投标时间',
'bid_opening_date' => '开标日期',
'bid_type' => '招标方式',
'competitor' => '竞争对手',
'is_margin' => '是否需要保证金',
'margin_amount' => '保证金金额',
'bid_opening_date' => '开标日期',
'margin_amount_return_date' => '保证金退还时间',
'is_internal_resources' => '有无内部资源',
'project_assurance' => '项目把握度',

View File

@ -140,7 +140,7 @@ class BidBuyBiddingDocumentLists extends BaseAdminDataLists implements ListsSear
public function setExcelFields(): array
{
return [
'id' => '投标决策id',
'id' => 'id',
'bid_decision_code' => '投标决策编码',
'custom_name' => '客户名称',
'project_name' => '项目名称',

View File

@ -16,6 +16,7 @@ namespace app\adminapi\lists\bid;
use app\adminapi\lists\BaseAdminDataLists;
use app\common\lists\ListsExcelInterface;
use app\common\model\auth\Admin;
use app\common\model\bid\BidBiddingDecision;
use app\common\model\bid\BidBuyBiddingDocument;
@ -31,7 +32,7 @@ use app\common\model\project\Project;
* Class BidDocumentExaminationLists
* @package app\adminapi\listsbid
*/
class BidDocumentExaminationLists extends BaseAdminDataLists implements ListsSearchInterface
class BidDocumentExaminationLists extends BaseAdminDataLists implements ListsSearchInterface,ListsExcelInterface
{
@ -78,7 +79,7 @@ class BidDocumentExaminationLists extends BaseAdminDataLists implements ListsSea
->select()->each(function($item){
$project = Project::field('custom_id,name,project_code')->where('id',$item['project_id'])->findOrEmpty();
$custom = Custom::field('name')->where('id',$project['custom_id'])->findOrEmpty();
$bid_buy_doc = BidBuyBiddingDocument::field('bid_decision_id,bid_document_no,invite_tenders_company_name,bid_company_name,buyer,buy_date,bid_address')->where('id',$item['buy_bidding_document_id'])->findOrEmpty();
$bid_buy_doc = BidBuyBiddingDocument::field('bid_decision_id,bid_document_no,invite_tenders_company_name,bid_company_name,buyer,buy_date')->where('id',$item['buy_bidding_document_id'])->findOrEmpty();
$bid_decision = BidBiddingDecision::field('bidding_project_fund_source,bidding_time,bid_type,is_margin,margin_amount,bid_opening_date')->where('id',$bid_buy_doc['bid_decision_id'])->findOrEmpty();
$buyer = Admin::field('name')->where('id',$bid_buy_doc['buyer'])->findOrEmpty();
$item['project_name'] = $project['name'];
@ -87,7 +88,6 @@ class BidDocumentExaminationLists extends BaseAdminDataLists implements ListsSea
$item['bid_document_no'] = $bid_buy_doc['bid_document_no'];
$item['invite_tenders_company_name'] = $bid_buy_doc['invite_tenders_company_name'];
$item['bid_company_name'] = $bid_buy_doc['bid_company_name'];
$item['bid_address'] = $bid_buy_doc['bid_address'];
$item['bidding_project_fund_source'] = $bid_decision->bidding_project_fund_source_text;
$item['buyer'] = $buyer['name'];
$item['bidding_time'] = $bid_decision['bidding_time'];
@ -122,5 +122,33 @@ class BidDocumentExaminationLists extends BaseAdminDataLists implements ListsSea
}
return BidDocumentExamination::field('id')->where($this->searchWhere)->where($where)->count();
}
public function setFileName(): string
{
return '标书审查列表';
}
/**
* @notes 导出字段
* @return string[]
* @author 段誉
* @date 2022/11/24 16:17
*/
public function setExcelFields(): array
{
return [
'id' => 'id',
'code' => '审查编号',
'bid_document_no' => '标书编号',
'project_name' => '项目名称',
'invite_tenders_company_name' => '招标公司名称',
'bid_company_name' => '投标公司名称',
'bidding_project_fund_source' => '招标项目资金来源',
'is_margin' => '是否需要保证金',
'margin_amount' => '保证金金额',
'bid_opening_date' => '开标日期',
'total_amount' => '总金额',
];
}
}

View File

@ -102,7 +102,7 @@ class BidDocumentExaminationLogic extends BaseLogic
$data = BidDocumentExamination::field($field)->findOrEmpty($params['id']);
$project = Project::field('custom_id,name')->where('id',$data['project_id'])->findOrEmpty();
$custom = Custom::field('name')->where('id',$project['custom_id'])->findOrEmpty();
$bid_buy_doc = BidBuyBiddingDocument::field('bid_decision_id,bid_document_no,buyer,invite_tenders_company_name,bid_company_name,amount,buy_date,bid_address')->where('id',$data['buy_bidding_document_id'])->findOrEmpty();
$bid_buy_doc = BidBuyBiddingDocument::field('bid_decision_id,bid_document_no,buyer,invite_tenders_company_name,bid_company_name,amount,buy_date')->where('id',$data['buy_bidding_document_id'])->findOrEmpty();
$buyer = Admin::field('name')->where('id',$bid_buy_doc['buyer'])->findOrEmpty();
$bid_decision = BidBiddingDecision::field('bidding_project_fund_source,bidding_time,bid_type,is_margin,margin_amount,bid_opening_date,margin_amount_return_date,bid_project_overview,project_desc,annex')->where('id',$bid_buy_doc['bid_decision_id'])->findOrEmpty();
$data['project_name'] = $project['name'];
@ -116,7 +116,6 @@ class BidDocumentExaminationLogic extends BaseLogic
$data['bidding_time'] = $bid_decision['bidding_time'];
$data['buy_date'] = $bid_buy_doc['buy_date'];
$data['bid_type'] = $bid_decision->bid_type_text;
$data['bid_address'] = $bid_buy_doc['bid_address'];
$data['is_margin'] = $bid_decision->is_margin_text;
$data['margin_amount'] = $bid_decision['margin_amount'];
$data['bid_opening_date'] = $bid_decision['bid_opening_date'];