需求按钮状态优化
This commit is contained in:
@@ -142,9 +142,15 @@ class Demand extends Api
|
||||
} else {
|
||||
$button = ['key' => DemandService::BUTTON_DELIVER_GOODS, 'name' => '去发货', 'theme' => 'danger'];
|
||||
}
|
||||
} elseif ((int)$item->status === DemandService::STATUS_ACCEPTING && $item->isMyWin && (int)$item->accept_status === CommonService::ONGOING) {
|
||||
// 与「我投标的」一致:接单开发者等待客户验收
|
||||
$button = ['key' => '', 'name' => '待验收', 'theme' => 'light'];
|
||||
} elseif (in_array((int)$item->status, [DemandService::STATUS_NO, DemandService::STATUS_CANCEL], true)) {
|
||||
// 已关闭、已取消不再因为投过标而显示「已投标」
|
||||
$button = ['name' => '查看详情', 'theme' => 'light'];
|
||||
} elseif ($item->is_bid) {
|
||||
$button = ['key' => '', 'name' => '已投标', 'theme' => 'light'];
|
||||
} elseif ($item->status == 1) {
|
||||
} elseif ((int)$item->status === DemandService::STATUS_BIDDING && !$item->isMy) {
|
||||
$button = ['key' => 'bid', 'name' => '参与投标', 'theme' => 'danger'];
|
||||
}
|
||||
} elseif ($opType == 'myQuote') {
|
||||
@@ -159,7 +165,7 @@ class Demand extends Api
|
||||
}
|
||||
} elseif ($item->status == 3 && $item->isMyWin && $item->winBidding->bidding_status == 2 && $item->winBidding->process_status == 2) {
|
||||
$button = ['key' => DemandService::BUTTON_COMPLETE_WORK, 'name' => '工作完成', 'theme' => 'danger'];
|
||||
} elseif ($item->status == 4 && $item->accept_status == 1) {
|
||||
} elseif ((int)$item->status === DemandService::STATUS_ACCEPTING && $item->isMyWin && (int)$item->accept_status === CommonService::ONGOING) {
|
||||
$button = ['key' => '', 'name' => '待验收', 'theme' => 'light'];
|
||||
} elseif ($item->status == 5 && $item->isMyWin && $item->winBidding->bidding_status == 2 && $item->winBidding->process_status == 2) {
|
||||
//客户支付尾款后,开发者发货交付
|
||||
@@ -168,7 +174,7 @@ class Demand extends Api
|
||||
} else {
|
||||
$button = ['key' => DemandService::BUTTON_DELIVER_GOODS, 'name' => '去发货', 'theme' => 'danger'];
|
||||
}
|
||||
} elseif ($item->status == 5 && $item->accept_status == 2) {
|
||||
} elseif ((int)$item->status === DemandService::STATUS_CONFIRM_RECEIPT && $item->isMyWin && (int)$item->accept_status === CommonService::SUCCESS) {
|
||||
$button = ['key' => '', 'name' => '待收货', 'theme' => 'light'];
|
||||
}
|
||||
} elseif ($opType == 'my') {
|
||||
|
||||
Reference in New Issue
Block a user