<script type="text/html" template lay-done="layui.data.done(d);">
    <table class="layui-table layui-form" lay-filter="LAY-app-CoreCmsBillPayments-detailsForm" id="LAY-app-CoreCmsBillPayments-detailsForm">
        <colgroup>
            <col width="150">
            <col>
        </colgroup>
        <tbody>

            <tr>
                <td>
                    <label for="paymentId">支付单号</label>
                </td>
                <td>
                    {{ d.params.data.model.paymentId || '' }}
                </td>
            </tr>

            <tr>
                <td>
                    <label for="money">支付金额</label>
                </td>
                <td>
                    {{ d.params.data.model.money || '' }}
                </td>
            </tr>

            <tr>
                <td>
                    <label for="userId">用户ID</label>
                </td>
                <td>
                    {{ d.params.data.model.userId || '' }}
                </td>
            </tr>

            <tr>
                <td>
                    <label for="type">资源类型</label>
                </td>
                <td>
                    {{ d.params.data.paymentsResourceTypes || '' }}
                </td>
            </tr>

            <tr>
                <td>
                    <label for="status">支付状态</label>
                </td>
                <td>
                    {{ d.params.data.paymentsStatus || '' }}
                </td>
            </tr>

            <tr>
                <td>
                    <label for="paymentCode">支付类型</label>
                </td>
                <td>
                    {{ d.params.data.paymentCode || '' }}
                </td>
            </tr>

            <tr>
                <td>
                    <label for="ip">支付单生成IP</label>
                </td>
                <td>
                    {{ d.params.data.model.ip || '' }}
                </td>
            </tr>

            <tr>
                <td>
                    <label for="payedMsg">支付回调后的状态描述</label>
                </td>
                <td>
                    {{ d.params.data.model.payedMsg || '' }}
                </td>
            </tr>

            <tr>
                <td>
                    <label for="tradeNo">第三方平台交易流水号</label>
                </td>
                <td>
                    {{ d.params.data.model.tradeNo || '' }}
                </td>
            </tr>

            <tr>
                <td>
                    <label for="createTime">创建时间</label>
                </td>
                <td>
                    {{ d.params.data.model.createTime || '' }}
                </td>
            </tr>

            <tr>
                <td>
                    <label for="updateTime">更新时间</label>
                </td>
                <td>
                    {{ d.params.data.model.updateTime || '' }}
                </td>
            </tr>

            <tr>
                <td>
                    <label for="updateTime">资源明细</label>
                </td>
                <td>
                    <table>
                        <tr>
                            <th>编号</th>
                            <th>金额</th>
                        </tr>

                        {{# layui.each(d.params.data.rel, function(index, item){ }}

                        <tr>
                            <td>{{ item.sourceId }}</td>
                            <td>{{ item.money }}</td>
                        </tr>
                        {{# }); }}
                    </table>
                </td>
            </tr>
        </tbody>
    </table>
</script>
<script>
    var debug = layui.setter.debug;
    layui.data.done = function (d) {
        //开启调试情况下获取接口赋值数据
        if (debug) { console.log(d.params.data); }

        layui.use(['admin', 'form', 'coreHelper'], function () {
            var $ = layui.$
                , setter = layui.setter
                , admin = layui.admin
                , coreHelper = layui.coreHelper
                , form = layui.form;
            form.render(null, 'LAY-app-CoreCmsBillPayments-detailsForm');
        });
    };
</script>