前端代码优化,及后端按钮状态优化

This commit is contained in:
Dev
2026-09-30 11:28:43 +08:00
parent 34177dfe86
commit f13a5e682a
9 changed files with 469 additions and 46 deletions
+12 -2
View File
@@ -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) {