前端代码优化,及后端按钮状态优化
This commit is contained in:
@@ -120,7 +120,12 @@ class Demand extends Api
|
||||
if ($item->status == 1 && $item->isMyWin && $item->winBidding->bidding_status == 2 && $item->winBidding->process_status == 1) {
|
||||
$button = ['name' => '确认接单', 'theme' => 'danger'];
|
||||
} elseif ($item->status == 2 && $item->isMyWin && $item->winBidding->bidding_status == 2 && $item->winBidding->process_status == 2) {
|
||||
$button = ['name' => '合同签约', 'theme' => 'danger'];
|
||||
if ($item->demand_contracts && $item->demand_contracts->status == ContractService::STATUS_FINISHED && $item->demand_contracts->status2 == ContractService::STATUS_ONGOING) {
|
||||
// 开发者已签约,等待客户签约
|
||||
$button = ['name' => '签约中', 'theme' => 'light'];
|
||||
} else {
|
||||
$button = ['name' => '合同签约', 'theme' => 'danger'];
|
||||
}
|
||||
} elseif ($item->status == 3 && $item->isMyWin && $item->winBidding->bidding_status == 2 && $item->winBidding->process_status == 2) {
|
||||
$button = ['name' => '工作完成', 'theme' => 'danger'];
|
||||
} elseif ($item->is_bid) {
|
||||
@@ -132,7 +137,12 @@ class Demand extends Api
|
||||
if ($item->status == 1 && $item->isMyWin && $item->winBidding->bidding_status == 2 && $item->winBidding->process_status == 1) {
|
||||
$button = ['name' => '确认接单', 'theme' => 'danger'];
|
||||
} elseif ($item->status == 2 && $item->isMyWin && $item->winBidding->bidding_status == 2 && $item->winBidding->process_status == 2) {
|
||||
$button = ['name' => '合同签约', 'theme' => 'danger'];
|
||||
if ($item->demand_contracts && $item->demand_contracts->status == ContractService::STATUS_FINISHED && $item->demand_contracts->status2 == ContractService::STATUS_ONGOING) {
|
||||
// 开发者已签约,等待客户签约
|
||||
$button = ['name' => '签约中', 'theme' => 'light'];
|
||||
} else {
|
||||
$button = ['name' => '合同签约', 'theme' => 'danger'];
|
||||
}
|
||||
} elseif ($item->status == 3 && $item->isMyWin && $item->winBidding->bidding_status == 2 && $item->winBidding->process_status == 2) {
|
||||
$button = ['name' => '工作完成', 'theme' => 'danger'];
|
||||
} elseif ($item->status == 4 && $item->accept_status == 1) {
|
||||
|
||||
Reference in New Issue
Block a user