<?php

use home\assets\MainAsset;
use yii\helpers\Url;
use home\widgets\Alert;
use home\modules\statement\models\StatementAccount;
use yii\widgets\ActiveForm;
use yii\helpers\StringHelper;
use yii\helpers\ArrayHelper;
use common\assets\My97DatePickerAsset;
use home\modules\receivable\models\Bank;
use home\modules\receivable\models\Account;

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

$assetUrl = $this->getAssetManager()->getBundle(MainAsset::className())->baseUrl;
$this->registerJsFile($assetUrl . '/js/receivable.js', ['depends' => MainAsset::className()]);
$this->title = '对账单导入';
?>
<div class="modal-window">
        <?= Alert::widget(); ?>
        <form id="main-form" class="informationform f14" action="<?= Url::to([$this->context->id . '/import-map']) ?>" method="post" enctype="multipart/form-data">

            <table cellpadding="0" cellspacing="10" width="100%">
                <tbody>
                    <tr>
                        <td align="right">收款银行：</td>
                        <td class="field-receivable-rece_bank">
                            <select id="statementaccount-bank_id" class="form-control select_bank" name="bank_id">
                                <?php foreach (Bank::getBankList() as $key => $bank): ?>
                                    <option value="<?= $key ?>"><?= $bank ?></option>
                                <?php endforeach ?>
                            </select>

                        </td>			
                        <td><span class="redstar">*</span></td>
                    </tr>
                    <tr>
                        <td align="right">收款账号：</td>
                        <td class="field-receivable-rece_account">
                            <select class="form-control select_account" name="account_no"></select>
                        </td>			
                        <td><span class="redstar">*</span></td>
                    </tr>
                    <tr>
                        <td align="right" style="position:relative; top:-5px;">选择文件：</td>
                        <td style="padding-top:6px;">
                            <input type="file" name="excel" class="form-control" value="选择文件" class="input"/>&nbsp;
                            <input type="hidden" name="_csrf" value="<?= Yii::$app->request->getCsrfToken() ?>" class="input"/>&nbsp;
                        </td>            			
                        <td><span class="redstar">*</span></td>
                    </tr>
<!--                    <tr>
                        <td></td>
                        <td>
                            <input type="submit" title="提交"class="btn btn-primary fl btn-serch task-sou" value="提交"/>
                        </td>
                    </tr>-->

                </tbody>
            </table>

        </form>
    </div>
<script>
    var getAccount = "<?= Url::to(['/receivable/receivable/get-account']) ?>";
</script>