edit.html 11.7 KB
<include file="public@header"/>
</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li><a href="{:url('Collocation/index')}">保险类型列表</a></li>
        <li>
            <a href="{:url('Collocation/add')}">添加保险类型</a>
        </li>
        <li class="active"><a href="#">编辑保险类型</a></li>
    </ul>
    <form action="{:url('Collocation/edit')}" method="post" class="form-horizontal js-ajax-form margin-top-20">
        <div class="row">
            <div class="col-md-9">
                <table class="table table-bordered">
                    <tr>
                        <th width="100">保险公司<span class="form-required">*</span></th>
                        <td>
                            <input type="text" class="form-control" name="insurance_type_name" value="{$data.insurance_type_name}" placeholder="请输入保险公司..."/>
                        </td>
                    </tr>
                    <tr>
                        <th width="100">产品名称<span class="form-required">*</span></th>
                        <td>
                            <input type="text" class="form-control" name="insurance_type_name" value="{$data.product_name}" placeholder="请输入产品名称..."/>
                        </td>
                    </tr>
                    <tr>
                        <th width="100">保单类型<span class="form-required">*</span></th>
                        <td>
                            <input type="text" class="form-control" name="insurance_type_id" value="{$data.insurance_type_id}" placeholder="请输入保单类型..."/>
                        </td>
                    </tr>
                    <tr>
                        <th width="100">保险金额<span class="form-required">*</span></th>
                        <td>
                            <input type="text" class="form-control" name="insurance_price" value="{$data.insurance_price}" placeholder="请输入保险金额..."/>
                        </td>
                    </tr>
                    <tr>
                        <th width="100">保险金额<span class="form-required">*</span></th>
                        <td>
                            <input type="text" class="form-control" name="insurance_price" value="{$data.insurance_price}" placeholder="请输入保险金额..."/>
                        </td>
                    </tr>
                    <tr>
                        <th width="100">缴费期限<span class="form-required">*</span></th>
                        <td>
                            <label class="payment_time_type1"><input id="payment_time_type1" type="radio" name="payment_time_type" value="1" <if condition="$data.payment_time_type eq -1">checked</if>/>选择</label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                            <label class="payment_time_type2"><input id="payment_time_type2" type="radio" name="payment_time_type" value="2" <if condition="$data.payment_time_type eq 1">checked</if>/>手动填写</label>
                            <input type="text" class="form-control" name="payment_time" value="{$data.payment_time}" placeholder="请输入缴费期限..."/>
                            <input type="text" class="form-control" name="payment_time_id" value="{$data.payment_time_id}" placeholder="请输入缴费期限id..."/>
                        </td>
                    </tr>
                    <tr>
                        <th width="100">缴费方式<span class="form-required">*</span></th>
                        <td>
                            <input type="text" class="form-control" name="pay_method_id" value="{$data.pay_method_id}" placeholder="请输入缴费方式..."/>
                        </td>
                    </tr>
                    <tr>
                        <th width="100">期缴保费<span class="form-required">*</span></th>
                        <td>
                            <input type="text" class="form-control" name="pay_method_price" value="{$data.pay_method_price}" placeholder="请输入期缴保费..."/>
                        </td>
                    </tr>
                    <tr>
                        <th width="100">保障期限<span class="form-required">*</span></th>
                        <td>
                            <input type="text" class="form-control" name="guarantee_deadline" value="{$data.guarantee_deadline}" placeholder="请输入保障期限..."/>
                        </td>
                    </tr>
                    <tr>
                        <th width="100">保险单号<span class="form-required">*</span></th>
                        <td>
                            <input type="text" class="form-control" name="insurance_num" value="{$data.insurance_num}" placeholder="请输入保险单号..."/>
                        </td>
                    </tr>
                    <tr>
                        <th width="100">投保人<span class="form-required">*</span></th>
                        <td>
                            <input type="text" class="form-control" name="application" value="{$data.application}" placeholder="请输入投保人..."/>
                        </td>
                    </tr>
                    <tr>
                        <th width="100">保险人<span class="form-required">*</span></th>
                        <td>
                            <input type="text" class="form-control" name="insurer" value="{$data.insurer}" placeholder="请输入保险人..."/>
                        </td>
                    </tr>
                    <tr>
                        <th width="100">与保险人关系<span class="form-required">*</span></th>
                        <td>
                            <input type="text" class="form-control" name="relation" value="{$data.relation}" placeholder="请输入与保险人关系..."/>
                        </td>
                    </tr>
                    <tr>
                        <th width="100">保险人生日<span class="form-required">*</span></th>
                        <td>
                            <input type="text" class="form-control" name="insurer_birthday" value="{$data.insurer_birthday}" placeholder="请输入保险人生日..."/>
                        </td>
                    </tr>
                    <tr>
                        <th width="100">投保日期<span class="form-required">*</span></th>
                        <td>
                            <input type="text" class="form-control" name="insurer_time" value="{$data.insurer_time}" placeholder="请输入投保日期..."/>
                        </td>
                    </tr>
                    <tr>
                        <th width="100">合同生效日期<span class="form-required">*</span></th>
                        <td>
                            <input type="text" class="form-control" name="take_time" value="{$data.take_time}" placeholder="请输入合同生效日期..."/>
                        </td>
                    </tr>
                    <tr>
                        <th width="100">保险时间<span class="form-required">*</span></th>
                        <td>
                            <input type="text" class="form-control" name="insure_time" value="{$data.insure_time}" placeholder="请输入保险时间..."/>
                        </td>
                    </tr>
                    <tr>
                        <th width="100">保人豁免<span class="form-required">*</span></th>
                        <td>
                            <input type="text" class="form-control" name="remit" value="{$data.remit}" placeholder="请输入保人豁免..."/>
                        </td>
                    </tr>
                    <notempty name="$data.agent_name">
                        <tr>
                            <th width="100">代理人<span class="form-required">*</span></th>
                            <td>
                                <input type="text" class="form-control" name="agent_name" value="{$data.agent_name}" placeholder="请输入代理人..."/>
                            </td>
                        </tr>
                    </notempty>
                    <notempty name="$data.agent_phone">
                        <tr>
                            <th width="100">代理人电话<span class="form-required">*</span></th>
                            <td>
                                <input type="text" class="form-control" name="agent_phone" value="{$data.agent_phone}" placeholder="请输入代理人电话..."/>
                            </td>
                        </tr>
                    </notempty>
                    <notempty name="$data.remark">
                        <tr>
                            <th width="100">备注<span class="form-required">*</span></th>
                            <td>
                                <input type="text" class="form-control" name="remark" value="{$data.remark}" placeholder="请输入备注..."/>
                            </td>
                        </tr>
                    </notempty>

                </table>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-10">
                <input type="hidden" name="id" value="{$data.id}"/>
                <button type="submit" class="btn btn-primary js-ajax-submit">{:lang('SAVE')}</button>
                <a class="btn btn-default" href="javascript:history.back(-1);">{:lang('BACK')}</a>
            </div>
        </div>
    </form>
</div>
<script type="text/javascript" src="__STATIC__/js/admin.js"></script>
<script type="text/javascript">
    //编辑器路径定义
    var editorURL = GV.WEB_ROOT;
</script>
<script type="text/javascript" src="__STATIC__/js/ueditor/ueditor.config.js"></script>
<script type="text/javascript" src="__STATIC__/js/ueditor/ueditor.all.min.js"></script>
<script type="text/javascript">
    $(function () {

        editorcontent = new baidu.editor.ui.Editor();
        editorcontent.render('content');
        try {
            editorcontent.sync();
        } catch (err) {
        }

        $('.btn-cancel-thumbnail').click(function () {
            $('#thumbnail-preview').attr('src', '__TMPL__/public/assets/images/default-thumbnail.png');
            $('#thumbnail').val('');
        });

        $('#more-template-select').val("{$post.more.template|default=''}");

        //判断是否为推荐
        if($('#recommended_yes').is(":checked")==true){
            $('#title').show()
        }
        $('#aaa').click(function(){
            // alert($('#recommended_yes').is(":checked"))
            if($('#recommended_yes').is(":checked")==true){
                $('#title').show()
            }else{
                $('#title').hide()
            }
        })
    });

    function doSelectCategory() {
        var selectedCategoriesId = $('#js-categories-id-input').val();
        openIframeLayer("{:url('AdminCategory/select')}?ids=" + selectedCategoriesId, '请选择分类', {
            area: ['700px', '400px'],
            btn: ['确定', '取消'],
            yes: function (index, layero) {
                //do something

                var iframeWin          = window[layero.find('iframe')[0]['name']];
                var selectedCategories = iframeWin.confirm();
                if (selectedCategories.selectedCategoriesId.length == 0) {
                    layer.msg('请选择分类');
                    return;
                }
                $('#js-categories-id-input').val(selectedCategories.selectedCategoriesId.join(','));
                $('#js-categories-name-input').val(selectedCategories.selectedCategoriesName.join(' '));
                //console.log(layer.getFrameIndex(index));
                layer.close(index); //如果设定了yes回调,需进行手工关闭
            }
        });
    }
</script>
</body>
</html>