info.html 16.1 KB
<div class="contentpanel">
    <form id="basicForm" role="form" class="form-horizontal form-bordered" method="get" action="/supplier/agreement/save">
        <div class="panel panel-default">
            <div class="panel-heading">
                <h4 class="panel-title">添加合同</h4>
            </div>
            <!-- panel-heading -->
            <div class="panel-body">

                <div class="row">
                    <div class="panel-body nopadding">
                        <div class="form-group">
                            <label class="col-sm-1 control-label">合同名称</label>
                            <div class="col-sm-6">
                                {{agreementName}}
                            </div>
                        </div>
                        <!-- form-group -->
                        <div class="form-group">
                            <label class="col-sm-1 control-label">有效期</label>
                            <div class="col-sm-2">
                                {{agreementStartTime}}
                            </div>
                            <div class="col-sm-2">
                                {{agreementEndTime}}
                            </div>
                        </div>
                        <!-- form-group -->
                        <div class="form-group">
                            <label class="col-sm-1 control-label">合同编号</label>
                            <div class="col-sm-6">
                                {{agreementCode}}
                            </div>
                        </div>
                        <!-- form-group -->
                        <div class="form-group">
                            <label class="col-sm-1 control-label">结算周期</label>
                            <div class="col-sm-6">
                                {{settlementPeriod}}
                            </div>
                        </div>
                        <!-- form-group -->
                        <div class="form-group">
                            <label class="col-sm-1 control-label">发票类型</label>
                            <div class="col-sm-6">
                                {{invoiceTypeName}}
                            </div>
                        </div>
                        <!-- form-group -->
                        <div class="form-group">
                            <label class="col-sm-1 control-label">合同条款</label>
                            <div class="col-sm-11">
                                <table id="formTable1" class="table table-bordered">
                                    <thead class="">
                                        <tr role="row">
                                            <th style="text-align: center">品牌名称</th>
                                            <th style="text-align: center">服务项</th>
                                            <th style="text-align: center">结算条款</th>
                                        </tr>
                                    </thead>
                                    <tbody id="clauseListBox"></tbody>
                                </table>
                            </div>
                        </div>
                        <!-- form-group -->
                        <div class="form-group">
                            <label class="col-sm-1 control-label">纸质合同</label>
                            <div class="col-sm-11">
                                <a href="{{agreementFile}}" target="_blank">查看纸质合同</a>
                            </div>
                        </div>
                        <!-- form-group -->
                    </div>
                    <div class="panel-footer">
                        <div class="row">
                            <div class="col-sm-9 col-sm-offset-3">
                                <input type="hidden" id="contractsDatas" value="{{contractsDatas}}">
                                <input type="hidden" id="agreementId" value="{{agreementId}}">
                            </div>
                        </div>
                    </div>
                    <!-- panel-footer -->
                </div>
                <!-- row -->
            </div>
            <!-- panel-body -->
        </div>
    </form>
</div>




<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog modal-lg" 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>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">È¡Ïû</button>
                <button type="button" class="btn btn-primary" data-toggle="saveRule">±£´æ</button>
            </div>
        </div>
    </div>
</div>

<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog modal-lg" 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>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                <button type="button" class="btn btn-primary" data-toggle="saveRule">保存</button>
            </div>
        </div>
    </div>
</div>
<script id="brand-tpl" type="x-tmpl-handlebars">
    <div class="form-group">
                <label class="col-sm-2 control-label">品牌</label>
                <div class="col-sm-4">
                  <select name="supplier_id" id="supplier_name" style="width:280px;" tabindex="-1" title="" class="select2-offscreen">
                  <option value="">选择供应商</option>
                  {{# filterName}}
                  <option value="{{value}}">{{name}}</option> 
                  {{/ filterName}}        
                  </select>
                </div>
    </div><!-- form-group -->
    <div class="form-group">
        <label class="col-sm-2 control-label">信息处理及店铺运营扣点</label>
        <div class="col-sm-2">
            <select class="form-control input-sm" id="operation_service" value="\{{operation_service.type}}">
                <option value="1" >代运营-YOHO运营</option>
                <option value="0">商家自运营</option>
            </select>
        </div>
        <div class="col-sm-2">
            <input type="text" min="0.0001" max="1" class="form-control input-sm" value="\{{operation_service.value}}" id="operation_service_koudian" >
        </div>
        <div class="col-sm-3" style="padding-top: 10px">注:扣点最多4位小数。</div>
    </div><!-- form-group -->
    <div class="form-group">
        <label class="col-sm-2 control-label">拍摄服务扣点</label>
        <div class="col-sm-2">
            <select class="form-control input-sm" id="photographic_service" value="\{{operation_service.type}}">
                <option value="0">不使用</option>
                <option value="1" selected="">使用摄影服务</option>
                <option value="2">特殊摄影服务</option>
            </select>
        </div>
        <div class="col-sm-2">
            <input type="text" min="0.0001" max="1" class="form-control input-sm" value="\{{photographic_service.value}}"  id="photographic_service_koudian" > 
        </div>
        <div class="col-sm-3" style="padding-top: 10px">注:扣点最多4位小数。</div>
    </div><!-- form-group -->
    <div class="form-group">
        <label class="col-sm-2 control-label">测量服务扣点</label>
        <div class="col-sm-2">
          <select id="size_service" class="form-control input-sm" value="\{{size_service.type}}">
                <option value="0">不使用尺码测量</option>
                <option value="1" selected="">使用尺码测量</option>
          </select> 
        </div>
        <div class="col-sm-2">
            <input type="text" min="0.0001" max="1" class="form-control input-sm" value="\{{size_service.value}}"  id="size_service_koudian"> 
        </div>
        <div class="col-sm-3" style="padding-top: 10px">注:扣点最多4位小数。</div>
    </div><!-- form-group -->
    <div class="form-group">
        <label class="col-sm-2 control-label">仓储服务扣点</label>
        <div class="col-sm-2">
            <input type="text" min="0.0001" max="1" class="form-control input-sm" value="\{{storage_service_koudian}}"  id="storage_service_koudian"> 
        </div>
        <div class="col-sm-3" style="padding-top: 10px">注:扣点最多4位小数。</div>
    </div><!-- form-group -->
    <div class="form-group">
        <label class="col-sm-2 control-label">类目</label>
       <div class="col-sm-2">
          <select class="form-control input-sm" name="max_sort_id" id="maxSort">
          </select>
       </div>
       <div class="col-sm-2">
            <select class="form-control input-sm" name="middle_sort_id" id="middleSort">
            </select>
       </div>
       <div class="col-sm-2">
            <select class="form-control input-sm" name="small_sort_id" id="smallSort">
            </select>
       </div>
       <div class="col-sm-2">
            <select class="form-control input-sm" name="sort_id" id="sort">
            </select>
       </div>
       <div class="col-sm-2">
            <button type="button" class="btn btn-success btn-xs" style="clear:both;float:left;" data-toggle="addRule">添加规则</button>
       </div>
    </div><!-- form-group -->
    <div class="form-group">
        <div class="col-sm-12">
            <table id="formTable1" class="table table-bordered">
                <thead class="">
                    <tr role="row">
                        <th style="text-align: center">一级类目</th>
                        <th style="text-align: center">二级类目</th>
                        <th style="text-align: center">三级类目</th>
                        <th style="text-align: center">四级类目</th>
                        <th style="text-align: center">交易佣金</th>
                        <th style="text-align: center">平台运营扣点</th>
                        <th style="text-align: center">操作</th>
                    </tr>
                </thead>
                <tbody id="clauseBox">
                    \{{#each ruledatas}}
                        <tr>
                            <td>\{{maxSort.name}}</td>
                            <td>\{{middleSort.name}}</td>
                            <td>\{{smallSort.name}}</td>
                            <td>\{{sort.name}}</td>
                            <td>
                                \{{#each commissions}}
                                    <table id="formTable1" class="table table-bordered">
                                        <thead class="">
                                            <tr role="row">
                                                <th>条款</th>
                                                <th>操作</th>
                                            </tr>
                                        </thead>
                                        <tbody>
                                            
                                            <tr>
                                                <td>
                                                    <input type="hidden"  value="\{{zhe}}">
                                                    &gt;=<input type="text" style="width:40px;padding-left:2px;" value="0">, 
                                                    <input placeholder="扣点" type="text" style="width:40px;padding-left:2px;" value="{{kou}}" >个点</td>
                                                <td>
                                                \{{# isdel}}
                                                <button class="btn btn-warning btn-xs" type="button" data-toggle="deleteSettlement">删除</button>
                                                \{{/ isdel}}
                                                </td>
                                            </tr>
                                            
                                        </tbody>
                                    </table>
                                \{{/ each}}
                                <button type="button" class="btn btn-info btn-xs" data-toggle="addSettlement">添加一条结算规则</button></td>
                            <td><input type="text" value="\{{discount}}" ></td>
                            <td>
                                <button type="button" class="btn btn-danger btn-xs" data-toggle="deleteRule">删除</button>
                            </td>
                        </tr>
                    \{{/ each}}
                </tbody>
            </table>
        </div>
    </div><!-- form-group -->
</script>

<script id="tr-tpl" type="x-tmpl-handlebars">
    <tr>
        <td>\{{maxSort}}</td>
        <td>\{{middleSort}}</td>
        <td>\{{smallSort}}</td>
        <td>\{{sort}}</td>
        <td>\{{{subtable}}}
            <button type="button" class="btn btn-info btn-xs" data-toggle="addSettlement">添加一条结算规则</button></td>
        <td><input type="text" value="0.00"></td>
        <td>
            <button type="button" class="btn btn-danger btn-xs" data-toggle="deleteRule">删除</button>
        </td>
    </tr>
</script>

<script id="subtable-tpl" type="x-tmpl-handlebars">
    <table id="formTable1" class="table table-bordered">
            <thead class="">
                <tr role="row">
                    <th>条款</th>
                    <th>操作</th>
                </tr>
            </thead>
            <tbody>
                
                <tr>
                    <td>
                        <input type="hidden"  value="">
                        &gt;=<input type="text" style="width:40px;padding-left:2px;" value="0">, 
                        <input placeholder="扣点" type="text" style="width:40px;padding-left:2px;" value="0.00" >个点</td>
                    <td>
                    \{{# isdel}}
                    <button class="btn btn-warning btn-xs" type="button" data-toggle="deleteSettlement">删除</button>
                    \{{/ isdel}}
                    </td>
                </tr>
                
            </tbody>
        </table>
</script>

<script id="clauselist-tpl" type="x-tmpl-handlebars">
\{{#each clauselist}}
<tr >
    <td>\{{supplier_name.name}}</td>
    <td style="text-align:right">
        信息处理及店铺运营扣点(\{{operation_service.value}})
        <br>拍摄服务扣点(\{{photographic_service.value}})
        <br>测量服务扣点(\{{size_service.value}})
        <br>仓储服务扣点(\{{storage_service_koudian}})
    </td>
    <td>
        <table class="table table-bordered">
            <thead>
                <tr role="row">
                    <th>类目</th>
                    <th>交易佣金</th>
                    <th>平台运营折扣点</th>
                </tr>
            </thead>
            <tbody>
            \{{#each ruledatas}}
                <tr>
                    <td rowspan="1">
                        \{{maxSort.name}} / \{{middleSort.name}} / \{{smallSort.name}} / \{{sort.name}}
                    </td>
                    <td>
                        \{{#each commissions}}
                        <p>&gt;= \{{zhe}} 折,扣 \{{kou}} 个点</p>
                        \{{/ each}}
                    </td>
                    <td rowspan="1">
                        \{{discount}}
                    </td>
                </tr>
               \{{/ each}}
            </tbody>
        </table>
        
    </td>
 
</tr>
\{{/ each}}
</script>