<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">


    <div class=" form-group">
        <label for="c-customer_id" class="control-label col-xs-12 col-sm-2">{:__('选择客户')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-customer_id" data-rule="required" data-source="facrm/customer/index/selectpage/{$addtype=='add'?'type/all':''}"
                   class="form-control selectpage" name="row[customer_id]" type="text" value="{:htmlentities(isset($contract_r['customer_id'])?$contract_r['customer_id']:input('customer_id'))}">

        </div>
    </div>
    <div class=" form-group business_id_div ">
        <label for="c-contract_id" class="control-label col-xs-12 col-sm-2">{:__('选择合同')}:</label>
        <div class="col-xs-12 col-sm-8">

            <div class="clickbox">

                <label class="control-label">
                    <a href="javascript:;" data-url="{$addtype=='add'?'facrm/contract/receivables/selectcontract':'facrm/contract/index/lists/select/1'}" id="select-resources" >
                        {:isset($contract_r['name'])?htmlentities($contract_r['name']):__('选择合同')}</a>
                </label>
                <input type="hidden" id="c-contract_id" name="row[contract_id]" id="c-eventkey" class="form-control" value="{:isset($contract_r['id'])?htmlentities($contract_r['id']):''}" data-rule="required" readonly/>
            </div>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('计划名称')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" ta-rule="required" class="form-control" name="row[name]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label for="c-customer_id" class="control-label col-xs-12 col-sm-2">{:__('收款帐户')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_select('row[account_id]', $account_list,0, ['class'=>'form-control selectpicker', 'data-rule'=>'required'])}

        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Money')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-money"   class="form-control" step="0.01" name="row[money]" type="number">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Remind_day')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-remind_day" data-rule="required" class="form-control" name="row[remind_day]" type="number" value="1">
        </div>
    </div>


    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Remarks')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-remarks" class="form-control" name="row[remarks]" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Plan_time')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-plan_time"  data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD" data-use-current="true" name="row[plan_time]" type="text" value="">
        </div>
    </div>


    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
        </div>
    </div>
</form>