<?php
use yii\widgets\ActiveForm;
use yii\helpers\ArrayHelper;
use yii\helpers\Html;
use yii\helpers\Url;
use home\modules\receivable\models\Plan;


/* @var $this \yii\web\View */
/* @var $form yii\bootstrap\ActiveForm */
/* @var $model \home\modules\project\models\Project */

$this->title = '计划详情';
?>

<!--container-->
<div class="container manage-project fix">


    <!--manage-left -->
    <div class="manage-right">
        <div class="mgt10">
            <table class="table task-table taskdetail-table">
                <tr>
                    <td width="20%" class="table-blue">客户名称</td>
                    <td width="30%">
                        <a target="_blank" href="<?= isset($contract->customer->name)?Url::to(['/customer/customer/detail', 'id' => $contract->customer->customer_id]):'javascript:;' ?>">
                            <?= isset($contract->customer->name)?$contract->customer->name:'' ?>
                        </a>
                    </td>
                    <td width="20%" class="table-blue">项目名称</td>
                    <?php if (empty($contract->project->name)) : ?>
                        <td width="30%"></td>
                    <?php else : ?>
                        <td width="30%">
                            <a target="_blank" href="<?= isset($contract->project->name)?Url::to(['/project/project/detail', 'id' => $contract->project->project_id]):'javascript:;' ?>">
                                <?= isset($contract->project->name)?$contract->project->name:'' ?>
                            </a>
                        </td>
                    <?php endif; ?>
                </tr>
                <tr>
                    <td width="20%" class="table-blue">计划编号</td>
                    <td width="30%"><?= $model->plan_no ?></td>
                    <td width="20%" class="table-blue">计划回款金额</td>
                    <td width="30%"><?= $model->plan_money ?></td>
                </tr>
                <tr>
                    <td width="20%" class="table-blue">计划回款时间</td>
                    <td width="30%"><?= date('Y-m-d', $model->plan_time) ?></td>
                    <td width="20%" class="table-blue">登记人</td>
                    <td width="30%"><?= $model->registrant ?></td>
                </tr>
                <tr>
                    <td width="20%" class="table-blue">是否提示</td>
                    <td width="30%"><?= ($model->prompt == Plan::PROMPT_ENABLE) ? '<font color="green">提示</font>' : '<font color="red">不提示</font>' ?></td>
                    <td width="20%" class="table-blue">状态</td>
                    <td width="30%"><?= ($model->status == Plan::STATUS_ENABLE) ? '<font color="green">已完成</font>' : '<font color="red">未完成</font>' ?></td>
                </tr>
                <tr>
                    <td width="20%" class="table-blue">备注</td>
                    <td colspan="3"><?= $model->remark ?></td>
                </tr>
            </table>
        </div>
    <!--manage-right-->
</div>
<!--container-->
</div>