<?php
use wap\assets\AppAsset;
use yii\helpers\Html;
use yii\helpers\Url;
use yii\helpers\ArrayHelper;

$this->title = '选择费用申请单';

/* @var $this \yii\web\View */

$asset = $this->getAssetManager()->getBundle(AppAsset::className());
$this->registerJsFile($asset->baseUrl . '/js/reimbursement.application.js', ['depends' => [AppAsset::className()]]);
?>
<script>
var reimUrl = "<?= Url::to(['/reimbursement/create', 'link_id' => Yii::$app->request->get('link_id'), 'link_type' => Yii::$app->request->get('link_type')]) ?>";
</script>
<div class="mainbody">
    <div class="detail-content">
        <form class="detailform">
            <tbody>
                <table width="100%">
                    <tr>
                        <td width="50">用途</td>
                        <td colspan="2"><?= $model['name'] ?></td>
                        <td>￥<?= $model['money'] ?></td>
                    </tr>
                    <tr>
                        <?php $data = common\models\Common::getLinkData($model['link_type'], $model['link_id']); ?>
                        <td>关联</td>
                        <td colspan="3"><?= (isset($data['name'])) ? $data['name'] : '' ?></td>
                    </tr>
                    <tr>
                        <td>申请人</td>
                        <td><?= isset(Yii::$app->cache->get('user_list')[$model['user_id']]['realname'])?Yii::$app->cache->get('user_list')[$model['user_id']]['realname']:'' ?></td>
                        <td width="50">审核人</td>
                        <td><?= implode(',', ArrayHelper::getColumn(\common\models\User::getUserByDot($model['verify_ids']), 'realname')) ?></td>
                    </tr>
                    <tr>
                        <td valign="top">备注</td>
                        <td colspan="3"><?= $model['remark'] ?></td>
                    </tr>
                </table>
            </tbody>
            <p>
            <button type="button" onclick="javascript:window.history.go(-1);" class="btn btn-primary btn-back">返  回</button>
            <button type="button" id="cancel-btn" class="btn btn-default btn-jiechu">解  除</button>
            </p>
        </form>
    </div>
</div>

