更新修复投标决策

This commit is contained in:
yaooo 2023-12-11 15:20:39 +08:00
parent eac4d8c755
commit e38480a8f5
2 changed files with 34 additions and 15 deletions

View File

@ -41,23 +41,23 @@ class BidBuyBiddingDocumentLogic extends BaseLogic
Db::startTrans();
try {
BidBuyBiddingDocument::create([
'project_id' => $params['project_id'],
'approve_id' => $params['approve_id'],
'bid_document_no' => $params['bid_document_no'],
'invite_tenders_company_name' => $params['invite_tenders_company_name'],
'bid_company_name' => $params['bid_company_name'],
'buyer' => $params['buyer'],
'amount' => $params['amount'],
'project_fund_source' => $params['project_fund_source'],
'project_id' => $params['project_id'] ?? 0,
'approve_id' => $params['approve_id'] ?? 0,
'bid_document_no' => $params['bid_document_no'] ?? '',
'invite_tenders_company_name' => $params['invite_tenders_company_name'] ?? '',
'bid_company_name' => $params['bid_company_name'] ?? '',
'buyer' => $params['buyer'] ?? 0,
'amount' => $params['amount'] ?? 0,
'project_fund_source' => $params['project_fund_source'] ?? 0,
'bid_date' => strtotime($params['bid_date']),
'buy_date' => strtotime($params['buy_date']),
'invite_tenders_type' => $params['invite_tenders_type'],
'bid_address' => $params['bid_address'],
'is_margin' => $params['is_margin'],
'margin_amount' => $params['margin_amount'],
'bid_project_overview' => $params['bid_project_overview'],
'project_desc' => $params['project_desc'],
'annex' => $params['annex']
'invite_tenders_type' => $params['invite_tenders_type'] ?? 0,
'bid_address' => $params['bid_address'] ?? '',
'is_margin' => $params['is_margin'] ?? 0,
'margin_amount' => $params['margin_amount'] ?? 0,
'bid_project_overview' => $params['bid_project_overview'] ?? '',
'project_desc' => $params['project_desc'] ?? '',
'annex' => $params['annex'] ?? '',
]);
Db::commit();

View File

@ -35,5 +35,24 @@ class BidBiddingDecision extends BaseModel
return $this->belongsTo(\app\common\model\project\Project::class, 'project_id');
}
public function getBiddingTimeAttr($value)
{
return empty($value) ? '' : date('Y-m-d H:i:s', $value);
}
public function getBuyBidDocumentDateAttr($value)
{
return empty($value) ? '' : date('Y-m-d H:i:s', $value);
}
public function getBidOpeningDateAttr($value)
{
return empty($value) ? '' : date('Y-m-d H:i:s', $value);
}
public function getMarginAmountReturnDateAttr($value)
{
return empty($value) ? '' : date('Y-m-d H:i:s', $value);
}
}