contract.html 13.2 KB

<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    <div class="row">
        <div class="col-md-4 col-xs-12 form-group">
            <label for="c-number" class="control-label col-xs-12 col-sm-2">{:__('合同编号')}:</label>
            <div class="col-xs-12 col-sm-10">
                <input id="c-number" data-rule="required" type="text" class="form-control" name="row[number]" value="{$row.number|htmlentities}" disabled />
            </div>
        </div>
        <div class="col-md-4 col-xs-12 form-group">
            <label for="c-name" class="control-label col-xs-12 col-sm-2">{:__('合同名称')}:</label>
            <div class="col-xs-12 col-sm-10">
                <input id="c-name" data-rule="required" type="text" class="form-control" name="row[name]" value="{$row.name|htmlentities}" disabled />
            </div>
        </div>

        <div class="col-md-4 col-xs-12 form-group">
            <label for="c-customer_id" class="control-label col-xs-12 col-sm-2">{:__('选择客户')}:</label>
            <div class="col-xs-12 col-sm-10">
                <input id="c-customer_id" data-rule="required" data-source="facrm/customer/index"
                       class="form-control selectpage"  type="text" value="{$row.customer_id|htmlentities}" disabled>

            </div>
        </div>
        <div class="col-md-4 col-xs-12 form-group business_id_div" >
            <label for="c-business_id" class="control-label col-xs-12 col-sm-2">{:__('选择商机')}:</label>
            <div class="col-xs-12 col-sm-10">


                <input id="c-business_id" data-rule="required" data-source="facrm/business/index/index"
                       class="form-control selectpage" name="" type="text" value="{$row.business_id|htmlentities}"  disabled>

            </div>
        </div>

        <div class="col-md-4 col-xs-12 form-group">
            <label for="c-money" class="control-label col-xs-12 col-sm-2">{:__('合同金额')}:</label>
            <div class="col-xs-12 col-sm-10">
                <input id="c-money" type="number"  class="form-control" name="row[money]" value="{$row.money|htmlentities}" disabled  />
            </div>
        </div>
        <div class="col-md-4 col-xs-12 form-group">
            <label for="c-order_time" class="control-label col-xs-12 col-sm-2">{:__('下单时间')}:</label>
            <div class="col-xs-12 col-sm-10">
                <input id="c-order_time"  value="{:datetime($row.order_time)}"  class="form-control datetimepicker" data-date-format="YYYY-MM-DD" data-use-current="true" name="row[order_time]" type="text" disabled >
            </div>
        </div>
        <div class="col-md-4 col-xs-12 form-group">
            <label for="c-start_time" class="control-label col-xs-12 col-sm-2">{:__('合同开始时间')}:</label>
            <div class="col-xs-12 col-sm-10">
                <input id="c-start_time"  value="{:datetime($row.start_time)}"  class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm" data-use-current="true" name="row[start_time]" type="text" disabled >
            </div>
        </div>
        <div class="col-md-4 col-xs-12 form-group">
            <label for="c-end_time" class="control-label col-xs-12 col-sm-2">{:__('合同结束时间')}:</label>
            <div class="col-xs-12 col-sm-10">
                <input id="c-end_time"  value="{:datetime($row.end_time)}"  class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm" data-use-current="true" name="row[end_time]" type="text" disabled >
            </div>
        </div>


        <div class="col-md-4 col-xs-12 form-group">
            <label for="c-contract_id" class="control-label col-xs-12 col-sm-2">{:__('客户签约人')}:</label>
            <div class="col-xs-12 col-sm-10">
                <input id="c-contacts_id" data-rule="required" data-source="facrm/contract/index/selectcontact"
                       class="form-control selectpage" name="row[contacts_id]" type="text" value="{$row.contacts_id|htmlentities}" disabled >

            </div>
        </div>

        <div class="col-md-4 col-xs-12 form-group">
            <label for="c-order_admin_id" class="control-label col-xs-12 col-sm-2">{:__('公司签约人')}:</label>
            <div class="col-xs-12 col-sm-10">
                <input id="c-order_admin_id" data-rule="required" data-source="facrm/common/selectpage/model/admin/type/all" data-field="nickname"
                       class="form-control selectpage" name="row[order_admin_id]" type="text" value="{$row.order_admin_id|htmlentities}"  disabled >

            </div>
        </div>
        <div class="col-md-4 col-xs-12 form-group">
            <label for="c-flow_admin_id" class="control-label col-xs-12 col-sm-2">{:__('待审批人')}:</label>
            <div class="col-xs-12 col-sm-10">
                <input id="c-flow_admin_id"   data-source="facrm/common/selectpage/model/admin/type/all" data-field="nickname" data-multiple="true"  {$flow->config==1?'disabled':''}
                class="form-control selectpage" name="row[flow_admin_id]" type="text" value="{$row->flow_admin_id|htmlentities}">
            </div>
        </div>
        <div id="extend"></div>
        <div class="col-md-4 col-xs-12 form-group">
            <label for="c-remark" class="control-label col-xs-12 col-sm-2">{:__('备注')}:</label>
            <div class="col-xs-12 col-sm-10">
                <textarea id="c-remark" class="form-control" name="row[remark]" disabled>{$row.remark|htmlentities}</textarea>
            </div>
        </div>
    </div>

    <div class="row">
            <div class="col-md-10 col-xs-12 form-group">
                <label  class="control-label col-xs-12 col-sm-2">{:__('产品列表')}:</label>
                <div class="col-xs-12 col-sm-10">
                    <div class="table-responsive" >
                        <table id="table" class="table table-striped table-bordered table-hover table-nowrap">
                            <thead>
                            <th>{:__('序号')}</th>
                            <th>{:__('编码')}</th>
                            <th style="width: 100px">{:__('商品')}</th>
                            <th>{:__('规格')}</th>
                            <th>{:__('属性')}</th>
                            <th >{:__('单位')}</th>
                            <th style="width: 80px">{:__('数量')}</th>
                            <th style="width: 80px">{:__('售价')}</th>
                            <th>{:__('小计')}</th>
                            <th>{:__('备注')}</th>

                            </thead>
                            <tbody>
                            {foreach name="product_list" item="vo"  index="i" }
                            <tr>
                                <td>{$i|htmlentities}</td>
                                <td>{$vo.sku|htmlentities}</td>
                                <td>
                                    <input date-rule="required;" style="width: 100px" value="{$vo.name|htmlentities}"  type="text" name="product[{$i|htmlentities}][name]" data-index="{$i|htmlentities}" class="find" class="" data-toggle="modal" data-target="#modelProduct" disabled >
                                </td>
                                <td class="gg">{$vo.specification|htmlentities}</td>
                                <td>
                                    {$vo.prop|htmlentities}
                                </td>
                                <td class="unit">{$vo.unit|htmlentities}</td>
                                <td>
                                    {$vo.nums|htmlentities}
                                </td>
                                <td>
                                    {$vo.sales_price|htmlentities} / <span style="text-decoration: line-through;">{$vo.price|htmlentities}</span>
                                </td>
                                <td class="subtotal">
                                    {$vo.subtotal|htmlentities}
                                </td>
                                <td> {$vo.remarks|htmlentities}</td>
                            </tr>
                            {/foreach}

                            </tbody>
                        </table>
                    </div>
                    <div>

                        <div class="row">
                            <div class="col-md-6 col-xs-6">
                                <label class="control-label col-xs-12 col-sm-6">{:__('优惠率%')}:</label>
                                <div class="col-xs-12 col-sm-6">
                                    <label class="control-label "> {$row.discount_rate|htmlentities}</label>
                                </div>
                            </div>
                            <div class="col-md-6 col-xs-6">
                                <label class="control-label col-xs-12 col-sm-6"> {:__('总额 $')}:</label>
                                <div class="col-xs-12 col-sm-6">
                                    <label class="control-label "> {$row.total_price|htmlentities}</label>

                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
    </div>


    <div class="row">
        <div class="col-md-10 col-xs-12 form-group">
            <label  class="control-label col-xs-12 col-sm-2">{:__('审核日志')}:</label>
            <div class="col-xs-12 col-sm-10">
                <div class="table-responsive">
                    <table id="table11" class="table table-striped table-bordered table-hover table-nowrap">
                        <thead>
                        <th>{:__('顺序')}</th>
                        <th>{:__('审核人')}</th>
                        <th>{:__('意见')}</th>
                        <th>{:__('状态')}</th>
                        </thead>
                        <tbody>
                        {foreach name="log_list" item="v"  index="j" }
                        <tr>
                            <td>{$j|htmlentities}</td>
                            <td>
                                {$v.nickname|htmlentities}({$v.admin_id|htmlentities})
                            </td>
                            <td>
                                {$v.remark|htmlentities}{$v.is_end==1?"(审核结束)":""}
                            </td>
                            <td>
                                {$v.status==1?"通过":"未通过"}
                            </td>
                        </tr>
                        {/foreach}
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>

    {if $flow->config==0}
    <!-- Modal -->
    <style>
        .modal-backdrop{z-index: 1;}
        .modal {z-index: 2;}
    </style>
    <div class="modal fade" id="modelProduct"  role="dialog" aria-labelledby="myModalLabel">
        <div class="modal-dialog" role="document" >
            <div class="modal-content" >
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span>
                    </button>
                    <h4 class="modal-title" id="myModalLabel">{:__('审核提示')}</h4>
                </div>
                <div class="modal-body">
                    <div id="lays-row" class="row">

                        <div class="col-md-4 col-xs-12 form-group">
                            <label for="c-next_admin_id" class="control-label col-xs-12 col-sm-4">{:__('下个审批人')}:</label>
                            <div class="col-xs-12 col-sm-8">
                                <input id="c-next_admin_id"   data-source="facrm/common/selectpage/model/admin/type/all" data-field="nickname" data-multiple="true"
                                class="form-control selectpage" name="next_admin_id" type="text" value="">
                                <span class="text-red">*如果要结束审批请不要选择审批人</span>
                            </div>
                        </div>

                        <div class="col-md-4 col-xs-12 form-group">
                            <label class="control-label col-xs-12 col-sm-4"></label>
                            <div class="col-xs-12 col-sm-8">
                                <button type="button" class="btn btn-success btn-embossed  ">{:__('审核通过')}</button>
                            </div>
                        </div>

                    </div>
                </div>
            </div>
        </div>
    </div>
    {/if}

    <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">
            {if $flow->config==0}
            <button type="button" class="btn btn-primary btn-embossed  " data-toggle="modal"  data-target="#modelProduct">{:__('审核')}</button>
            {else/}
            <button type="button" class="btn btn-success btn-embossed  ">{:__('审核通过')}</button>
            {/if}


            <button type="button" class="btn btn-danger btn-embossed btn-reject">{:__('驳回')}</button>
        </div>
    </div>
</form>
<script>
    var ids={:input('ids')};
    var types="{:input('types')}";
</script>