<!-- 财务管理--现金流管理--出入账管理--查看出入账 -->
<link rel="stylesheet" type="text/css" href="/css/external/fileUploadBase.css">
<style>
    .edui-editor-toolbarbox.edui-default {
        display: none !important;
    }

    .edui-default .edui-editor-toolbarbox {
        position: relative !important;
    }
</style>
<div class="base-extend">
    <div class="modal fade businessDialog" id="myModal-viewOutInfo" data-backdrop="static">
        <div class="modal-dialog" style="width:12rem;">
            <form class="form-horizontal" id="addUpdateBillingRecordForm">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal">
                        <span aria-hidden="true" style="font-size:0.18rem">×</span><span class="sr-only">关闭</span>
                    </button>
                    <span class="modal-title">查看出账信息</span>
                </div>
                <div class="modal-content"
                     style="max-height:5.5rem;overflow-y:auto;overflow-x:hidden;width:100%;padding:0 0.2rem !important;">
                    <div class="newTabAddUpdateBox"
                         style="position:static;border:none;padding-left:0.2rem;padding-right:0.2rem;padding-bottom:0;">
                        <div class="row">

                            <table class="factoringBusinessLoanTable" tip="保理出账">
                                <tr>
                                    <td width="15%">
                                        <span class="required_fileds_star">核心企业名称</span>：
                                    </td>
                                    <td width="35%" class="enter">
                                        <input type="text" readonly name="purchaser"
                                               th:value="${cashFlowDealOutInfoVo?.cashFlowManageBaseVo?.customerName}"
                                               class="form-control">
                                    </td>
                                    <td width="15%">
                                        <span class="required_fileds_star">业务名称</span>：
                                    </td>
                                    <td width="35%" class="enter">
                                        <input type="text" readonly name="businessName"
                                               th:value="${cashFlowDealOutInfoVo?.cashFlowManageBaseVo?.businessName}"
                                               class="form-control">
                                    </td>
                                </tr>
                                <tr>
                                    <td width="15%">
                                        <span class="required_fileds_star">业务编号</span>：
                                    </td>
                                    <td width="35%" class="enter">
                                        <input type="text" name="businessNumber" class="form-control" readonly
                                               th:value="${cashFlowDealOutInfoVo?.cashFlowManageBaseVo?.businessNumber}">
                                    </td>
                                    <td width="15%">
                                        <span class="required_fileds_star">供应商名称</span>：
                                    </td>
                                    <td width="35%" class="enter">
                                        <input type="text" name="supplierName" class="form-control" readonly
                                               th:value="${cashFlowDealOutInfoVo?.cashFlowManageBaseVo?.supplierName}">
                                    </td>
                                </tr>
                                <tr>
                                    <td width="15%">
                                        <span class="required_fileds_star">采购合同编号</span>：
                                    </td>
                                    <td width="35%" class="enter">
                                        <input type="text" name="purchContractNumber" readonly class="form-control"
                                               th:value="${cashFlowDealOutInfoVo?.cashFlowManageBaseVo?.contractNumber}">
                                    </td>
                                    <td width="15%">
                                        <span class="required_fileds_star">类型</span>：
                                    </td>
                                    <td width="35%" class="enter">
                                        <input type="text" name="cashType" readonly class="form-control"
                                               th:value="${cashFlowDealOutInfoVo?.cashFlowManageBaseVo?.cashTypeDict?.name}">
                                    </td>
                                </tr>
                                <tr>
                                    <td width="15%">
                                        <span class="required_fileds_star">金额</span>：
                                    </td>
                                    <td width="35%" class="enter">
                                        <input type="text" id="amountMoney" name="amount" readonly
                                               class="form-control amountInput"
                                               th:value="${cashFlowDealOutInfoVo?.cashFlowManageBaseVo?.amount}">
                                    </td>
                                    <td width="15%">
                                        <span class="required_fileds_star">日期</span>：
                                    </td>
                                    <td width="35%" class="enter">
                                        <input type="text" name="cashDate" readonly class="form-control"
                                               th:value="${#calendars.format(cashFlowDealOutInfoVo?.cashFlowManageBaseVo?.cashDate,'yyyy-MM-dd')}">
                                    </td>
                                </tr>
                            </table>
                            <table class="factoringBusinessLoanTable factoringBusinessLoanEachTable">
                                <tr>
                                    <td rowspan="2" width="5%" style="border-bottom:none;"><span class="">序号</span></td>
                                    <td rowspan="2" width="10%" style="border-bottom:none;"><span class="required_fileds_star">此次放款日期</span></td>
                                    <td rowspan="2" width="10%" style="border-bottom:none;"><span class="required_fileds_star">此次放款金额</span></td>
                                    <td colspan="3" style="border-bottom:none;text-align: center"><span>打款账户</span></td>
                                    <td colspan="2" style="border-bottom:none;text-align: center"><span>收款账户</span></td>
                                    <td rowspan="2" width="9%" style="border-bottom:none;"><span class="required_fileds_star">当前执行人</span></td>
                                </tr>
                                <tr>
                                    <td width="10%" style="border-bottom:none;">
                                        <span class="required_fileds_star">公司归属</span>
                                        <select id="companyOwnership" name="companyBelong" style="display:none;"></select>
                                    </td>
                                    <td width="11%" style="border-bottom:none;"><span class="required_fileds_star">银行名称</span></td>
                                    <td width="13%" style="border-bottom:none;"><span class="required_fileds_star">银行卡号</span></td>
                                    <td width="11%" style="border-bottom:none;"><span class="required_fileds_star">银行名称</span></td>
                                    <td width="13%" style="border-bottom:none;"><span class="required_fileds_star">银行卡号</span></td>
                                </tr>
                                <tbody class="factoringBusinessLoanEachTbody"
                                       th:each="factoringLoanRecord,factoringLoanRecords:${cashFlowDealOutInfoVo?.cashFlowManageOutInfoList}">
                                <tr>
                                    <td style="background:#fff;" rowspan="2"
                                        th:text="${factoringLoanRecords?.index}+1"></td>
                                    <td style="background:#fff;"
                                        th:text="${#calendars.format(factoringLoanRecord?.loanDate,'yyyy-MM-dd')}"></td>
                                    <td style="background:#fff;" class="aamountComm"
                                        th:text="${factoringLoanRecord?.loanAmount}"></td>
                                    <td style="background:#fff;"
                                        th:text="${factoringLoanRecord?.fromCompanyBelongName}"></td>
                                    <td style="background:#fff;"
                                        th:text="${factoringLoanRecord?.fromBankName}"></td>
                                    <td style="background:#fff;"
                                        th:text="${factoringLoanRecord?.fromBankAccount}"></td>
                                    <td style="background:#fff;"
                                        th:text="${factoringLoanRecord?.toBankName}"></td>
                                    <td style="background:#fff;"
                                        th:text="${factoringLoanRecord?.toBankAccount}"></td>
                                    <td style="background:#fff;"
                                        th:text="${factoringLoanRecord?.currExecutor}"></td>
                                </tr>
                                <tr>
                                    <td colspan="8" class="enter">
                                        <textarea class="factoringBusinessLoanEditor" style="height:250px;width:100%;"
                                                  th:utext="${factoringLoanRecord?.fileText}"></textarea>
                                    </td>
                                </tr>
                                </tbody>
                            </table>

                        </div>

                    </div>
                </div>
                <div class="modal-footer">
                    <button class="btn btn-default btn-white btn-info canclebtn" data-dismiss="modal"
                            style='margin-bottom:0;'>关闭
                    </button>
                </div>
            </form>
        </div>
    </div>
</div>
<script>
    $(function () {

        // 保理出账  附件
        $('.factoringBusinessLoanEditor').each(function (i, ele) {
            $(ele).attr('id', 'loanUnifiedEditor_' + i);
            if ($(ele).val() == '') {
                $(ele).parent().append('<span style="padding:0.05rem 0.1rem;display:inline-block;">无附件</span>');
                $(ele).remove();
            } else {
                var editor = new UE.ui.Editor({
                    'fullscreen': false
                });
                editor.render('loanUnifiedEditor_' + i);
                editor.addListener('ready', function () {
                    editor.setDisabled();
                });
            }
            ;
        });

        $('.aamountComm').each(function (i, ele) {
            $(ele).text(commaDelimiter($(ele).text()))
        });
        $('.amountInput').each(function (i, ele) {
            $(ele).val(commaDelimiter($(ele).val()))
        });


    });
</script>
