<rt-form id="{{vm.form.name}}" name="{{vm.form.name}}" novalidate>
    <div class="row rt-margin-bottom-before-box">
        <div class="col-sm-2">
            <button class="btn btn-link" type="button" id="btnClose" ng-click="vm.form.hide()">
                <i class="fa fa-sign-out"></i> 关闭
            </button>
        </div>
        <!-- div[.col-sm-2] -->
        <div class="col-sm-10">
            <div class="pull-right">
                <rt-button id="btnSave" rt-style="link" rt-title="提交" rt-icon="floppy-o" ng-if="vm.form.canSubmit && vm.form.data.leads_state.Value==10"
                    ng-click="vm.form.submit()">
                </rt-button>
                <rt-button id="btnSave" rt-style="link" rt-title="撤销" rt-icon="floppy-o" ng-if="vm.form.canSubmit && vm.form.data.leads_state.Value==10"
                    ng-click="vm.form.flowRecall()">
                </rt-button>
                <rt-button id="btnSave" rt-style="link" rt-title="同意" rt-icon="floppy-o" ng-if="vm.form.type === 'Edit' &&vm.form.isFlowApprover"
                    ng-click="vm.form.flowApprove()">
                </rt-button>
                <rt-button id="btnSave" rt-style="link" rt-title="拒绝" rt-icon="floppy-o" ng-if="vm.form.type === 'Edit' &&vm.form.isFlowApprover"
                    ng-click="vm.form.flowReject()">
                </rt-button>
                <rt-button id="btnSave" rt-style="link" rt-title="转发" rt-icon="floppy-o" ng-if="vm.form.type === 'Edit' &&vm.form.isFlowApprover"
                    ng-click="vm.form.flowTransmit()">
                </rt-button>
                <rt-button id="btnSave" rt-style="link" rt-title="保存" rt-icon="floppy-o" ng-click="vm.form.newsave(false)" ng-show="(vm.form.type === 'Create' && vm.privilege.IsCreate) || (vm.form.type === 'Edit' && vm.form.data.StateCode.Value == 0 && vm.privilege.IsWrite)"
                    ng-if="!vm.form.canEdit">
                </rt-button>
                <rt-button id="btnSaveAndNew" rt-style="link" rt-title="保存并新建" rt-icon="floppy-o" ng-click="vm.form.newsave(true)" ng-show="(vm.form.type === 'Create' && vm.privilege.IsCreate) || (vm.form.type === 'Edit' && vm.form.data.StateCode.Value == 0 && vm.privilege.IsWrite)"
                    ng-if="!vm.form.canEdit">
                </rt-button>
                <rt-button id="btnDelete" rt-style="link" rt-title="删除" rt-icon="trash" ng-click="vm.form.del()" ng-show="vm.form.type === 'Edit' && vm.privilege.IsDelete"
                    ng-if="!vm.form.canEdit">
                </rt-button>
                <rt-button id="btnAssign" rt-style="link" rt-title="分派" rt-icon="share" ng-click="vm.form.assign(' 潜在代理商 ')" ng-show="vm.form.type === 'Edit' && vm.privilege.IsAssign">
                </rt-button>
            </div>
        </div>
        <!-- div[.col-sm-10] -->
    </div>
    <div class="nav-tabs-custom">
        <!-- @@表单 -->
        <ul class="nav nav-tabs" ng-if="vm.form.type === 'Edit'">
            <li class="active">
                <a href="#A1" onclick="return false;" data-toggle="tab">资料</a>
            </li>
            <li>
                <a href="#A2" onclick="return false;" data-toggle="tab">评估表</a>
            </li>
            <li>
                <a href="#A3" onclick="return false;" data-toggle="tab">协议</a>
            </li>
            <li>
                <a href="#A4" onclick="return false;" data-toggle="tab">附属协议</a>
            </li>
        </ul>
        <!-- ui[.nav] -->

        <div class="tab-content">
            <div class="tab-pane active" id="A1">
                <rt-section rt-title="基本信息">
                    <rt-section-row>
                        <rt-input rt-type="text" rt-title="名称" rt-disabled="vm.form.isFlowApprover||vm.form.canEdit" rt-required="true" rt-col="4"
                            ng-model="vm.form.data.name"></rt-input>
                        <rt-lookup2 rt-title="负责人" rt-disabled="true" ng-model="vm.form.data.OwnerId" rt-get-data-name="UserInfo.GetUserByBu" rt-order-by="code"
                            rt-col-list="[{Code:'name',Name:'负责人姓名'},{Code:'code',Name:'负责人编码'}]" rt-params="{'@businessunitid':vm.form.data.BusinessUnitId ? vm.form.data.BusinessUnitId.Id :''}"
                            rt-required="true" ng-click="vm.form.IsFromOwner=true" rt-col="4"></rt-lookup2>
                    </rt-section-row>
                    <rt-section-row>
                        <rt-input rt-type="text" rt-title="联系人姓名" rt-disabled="vm.form.isFlowApprover||vm.form.canEdit" rt-required="true" rt-col="4"
                            ng-model="vm.form.data.contact_name"></rt-input>
                        <rt-input rt-type="text" rt-title="联系电话" rt-disabled="vm.form.isFlowApprover||vm.form.canEdit" rt-required="true" rt-col="4"
                            ng-model="vm.form.data.telephone"></rt-input>
                    </rt-section-row>
                    <rt-section-row>
                        <rt-lookup2 rt-title="省份" rt-disabled="vm.form.isFlowApprover||vm.form.canEdit" ng-model="vm.form.data.provinceid" rt-get-data-name="Province.GetProvince"
                            rt-order-by="code" rt-col-list="[{Code:'name',Name:'省份名称'},{Code:'code',Name:'省份编码'}]" rt-required="true"
                            rt-col="4"></rt-lookup2>
                        <rt-lookup2 rt-title="城市" rt-disabled="vm.form.isFlowApprover||vm.form.data.provinceid==null||vm.form.canEdit" ng-model="vm.form.data.cityid"
                            rt-get-data-name="Province.GetCity" rt-order-by="code" rt-col-list="[{Code:'name',Name:'城市名称'},{Code:'code',Name:'城市编码'}]"
                            rt-params="{'@provinceid':vm.form.data.provinceid ? vm.form.data.provinceid.Id :''}" rt-required="true"
                            rt-col="4"></rt-lookup2>
                    </rt-section-row>
                    <rt-section-row>
                        <rt-lookup2 rt-title="区县" rt-disabled="vm.form.isFlowApprover||vm.form.data.cityid==null||vm.form.canEdit" ng-model="vm.form.data.countyid"
                            rt-get-data-name="Province.GetCounty" rt-order-by="code" rt-col-list="[{Code:'name',Name:'区县名称'},{Code:'code',Name:'区县编码'}]"
                            rt-params="{'@cityid':vm.form.data.cityid ? vm.form.data.cityid.Id :''}" rt-col="4"></rt-lookup2>
                        <rt-picklist rt-title="类别" rt-col="4" rt-disabled="vm.form.isFlowApprover||vm.form.canEdit" ng-model="vm.form.data.agent_type"
                            rt-required="true" rt-options="vm.picklist.agent_type"></rt-picklist>
                    </rt-section-row>
                </rt-section>
                <rt-section rt-title="详细信息">
                    <rt-section-row>
                        <rt-textarea rt-type="text" rt-title="描述" rt-disabled="vm.form.isFlowApprover||vm.form.canEdit" rt-col="10" rt-row="2" rt-required="false"
                            ng-model="vm.form.data.description"></rt-textarea>
                    </rt-section-row>
                </rt-section>
                <rt-section rt-title="状态">
                    <rt-section-row>
                        <rt-picklist rt-title="代理商状态" rt-col="4" rt-required="false" rt-disabled="true" ng-model="vm.form.data.leads_state" rt-options="vm.picklist.leads_state"></rt-picklist>
                    </rt-section-row>
                </rt-section>
                <rt-section rt-title="审核人" ng-if="vm.form.type === 'Edit'">
                    <rt-section-row ng-if="vm.form.canSubmit && vm.form.data.leads_state.Value==10">
                        <button class="btn btn-link" ng-click="vm.form.addApprover()">
                            <i class="fa fa-plus"></i> 添加审核人
                        </button>
                    </rt-section-row>
                    <rt-section-row>
                        <rt-data-grid-no-page rt-page-record-count="vm.page.recordCount" rt-page-index="vm.page.index" rt-page-size="vm.page.size"
                            rt-get-data="vm.view.search()" rt-sort-field="vm.view.sortField" rt-rows="vm.form.approverList" rt-selected-ids="vm.view.selectedapproverIds"
                            rt-auto-height="240">
                            <table class="table table-hover">
                                <thead>
                                    <tr>
                                        <!--<th>-->
                                        <!--<rt-header-checkbox></rt-header-checkbox>-->
                                        <!--</th>-->
                                        <!-- @@ 视图表头 -->
                                        <th rt-field-code="name">姓名
                                            <span class="rt-text-weak-02">(点击可删除)</span>
                                        </th>
                                        <th rt-field-code="name">状态</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <tr ng-repeat="row in vm.form.approverList" ng-click="vm.form.delApprover($index)">
                                        <!--<td>-->
                                        <!--<rt-data-checkbox value="{{row.OwnerId.Id}}"/>-->
                                        <!--</td>-->
                                        <!-- @@ 视图列表值 -->
                                        <td>
                                            <span>{{row.OwnerId.Name}}</span>
                                        </td>

                                        <td ng-show="vm.form.type === 'Edit' && row.approval_status.Value == 2">
                                            审批中
                                        </td>

                                        <td ng-show="vm.form.type === 'Edit'&&row.approval_status.Value == 3 && row.approval_result.Value == 2">
                                            {{row.approval_result.Name}}{{row.remark!=''&&row.remark!=null?"(":""}}{{row.remark}}{{row.remark!=''&&row.remark!=null?")":""}}
                                        </td>

                                        <td ng-show="vm.form.type === 'Edit'&&row.approval_status.Value == 3 && row.approval_result.Value == 3">
                                            {{row.approval_result.Name}}{{row.remark!=''&&row.remark!=null?"(":""}}{{row.remark}}{{row.remark!=''&&row.remark!=null?")":""}}
                                        </td>

                                        <td ng-show="vm.form.type === 'Edit'&&row.approval_status.Value == 3 && row.approval_result.Value == 4">
                                            {{row.approval_result.Name}}{{row.remark!=''&&row.remark!=null?"(":""}}{{row.remark}}{{row.remark!=''&&row.remark!=null?")":""}}
                                        </td>

                                        <td ng-show="vm.form.type === 'Edit'&&row.approval_status.Value == 3 && row.approval_result.Value == 5">
                                            {{row.approval_result.Name}}{{row.remark!=''&&row.remark!=null?"(":""}}{{row.remark}}{{row.remark!=''&&row.remark!=null?")":""}}
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                        </rt-data-grid-no-page>
                        <!-- rt-data-grid  -->

                    </rt-section-row>
                </rt-section>
            </div>

            <div class="tab-pane" id="A2">
                <rt-section rt-title="整体资质">
                    <rt-section-row>
                        <rt-picklist rt-title="法人背景" rt-col="4" rt-required="false" rt-disabled="vm.form.isFlowApprover||vm.form.canEdit" ng-model="vm.form.data.legal_person_background"
                            rt-options="vm.picklist.legal_person_background"></rt-picklist>
                        <rt-picklist rt-title="风险防范意识" rt-col="4" rt-required="false" rt-disabled="vm.form.isFlowApprover||vm.form.canEdit" ng-model="vm.form.data.awareness_of_risks"
                            rt-options="vm.picklist.awareness_of_risks"></rt-picklist>
                    </rt-section-row>
                    <rt-section-row>
                        <rt-picklist rt-title="当地口碑与人缘" rt-col="4" rt-required="false" rt-disabled="vm.form.isFlowApprover||vm.form.canEdit" ng-model="vm.form.data.popularity"
                            rt-options="vm.picklist.popularity"></rt-picklist>
                        <rt-picklist rt-title="税务处理能力" rt-col="4" rt-required="false" rt-disabled="vm.form.isFlowApprover||vm.form.canEdit" ng-model="vm.form.data.tax_process_ability"
                            rt-options="vm.picklist.tax_process_ability"></rt-picklist>
                    </rt-section-row>
                </rt-section>
                <rt-section rt-title="经营实力及理念">
                    <rt-section-row>
                        <rt-picklist rt-title="团队规模" rt-col="4" rt-required="false" rt-disabled="vm.form.isFlowApprover||vm.form.canEdit" ng-model="vm.form.data.team_size"
                            rt-options="vm.picklist.team_size"></rt-picklist>
                        <rt-picklist rt-title="类似产品的成功代理经验" rt-col="4" rt-required="false" rt-disabled="vm.form.isFlowApprover||vm.form.canEdit"
                            ng-model="vm.form.data.successful_experiences" rt-options="vm.picklist.successful_experiences"></rt-picklist>
                    </rt-section-row>
                    <rt-section-row>
                        <rt-textarea rt-type="text" rt-title="已操作过的品种" rt-col="10" rt-row="2" rt-disabled="vm.form.isFlowApprover||vm.form.canEdit"
                            rt-required="false" ng-model="vm.form.data.product_operated"></rt-textarea>
                    </rt-section-row>
                    <rt-section-row>
                        <rt-picklist rt-title="医院开发和上量能力" rt-col="4" rt-required="false" rt-disabled="vm.form.isFlowApprover||vm.form.canEdit" ng-model="vm.form.data.develop_ability"
                            rt-options="vm.picklist.develop_ability"></rt-picklist>
                        <rt-picklist rt-title="是否接受保证金和佣金模式" rt-col="4" rt-required="false" rt-disabled="vm.form.isFlowApprover||vm.form.canEdit"
                            ng-model="vm.form.data.is_acc_margin_commission" rt-options="vm.picklist.is_acc_margin_commission"></rt-picklist>
                    </rt-section-row>
                    <rt-section-row>
                        <rt-textarea rt-type="text" rt-title="年度业务销售额和主要产品" rt-col="10" rt-row="2" rt-required="false" rt-disabled="vm.form.isFlowApprover||vm.form.canEdit"
                            ng-model="vm.form.data.yearly_sales_products"></rt-textarea>
                    </rt-section-row>
                    <rt-section-row>
                        <rt-textarea rt-type="text" rt-title="主要覆盖区域" rt-col="10" rt-row="2" rt-required="false" rt-disabled="vm.form.isFlowApprover||vm.form.canEdit"
                            ng-model="vm.form.data.main_overlay_area"></rt-textarea>
                    </rt-section-row>
                </rt-section>
                <rt-section rt-title="业务吻合度">
                    <rt-section-row>
                        <rt-picklist rt-title="合作意向" rt-col="4" rt-required="false" rt-disabled="vm.form.isFlowApprover||vm.form.canEdit" ng-model="vm.form.data.cooperate_intent"
                            rt-options="vm.picklist.cooperate_intent"></rt-picklist>
                        <rt-picklist rt-title="能否覆盖区域70%以上的医院" rt-col="4" rt-required="false" rt-disabled="vm.form.isFlowApprover||vm.form.canEdit"
                            ng-model="vm.form.data.is_cover_70per_target" rt-options="vm.picklist.is_cover_70per_target"></rt-picklist>
                    </rt-section-row>
                    <rt-section-row>
                        <rt-picklist rt-title="目标科室吻合度" rt-col="4" rt-required="false" rt-disabled="vm.form.isFlowApprover||vm.form.canEdit" ng-model="vm.form.data.target_department_alignment"
                            rt-options="vm.picklist.target_department_alignment"></rt-picklist>
                    </rt-section-row>
                    <rt-section-row>
                        <rt-multiple-picklist rt-title="主营科室" rt-disabled="vm.form.isFlowApprover||vm.form.canEdit" rt-col="10" ng-model="vm.form.data.DepartmentList"
                            rt-options="vm.picklist.room_type">
                        </rt-multiple-picklist>
                    </rt-section-row>
                    <rt-section-row>
                        <rt-picklist rt-title="能否建立产品专属的推广队伍" rt-col="4" rt-required="false" rt-disabled="vm.form.isFlowApprover||vm.form.canEdit"
                            ng-model="vm.form.data.is_estabLish_team" rt-options="vm.picklist.is_estabLish_team"></rt-picklist>
                        <rt-picklist rt-title="学术推广能力" rt-col="4" rt-required="false" rt-disabled="vm.form.isFlowApprover||vm.form.canEdit" ng-model="vm.form.data.promotion_ability"
                            rt-options="vm.picklist.promotion_ability"></rt-picklist>
                    </rt-section-row>
                    <rt-section-row>
                        <rt-picklist rt-title="处理停药、限量的能力" rt-col="4" rt-required="false" rt-disabled="vm.form.isFlowApprover||vm.form.canEdit" ng-model="vm.form.data.limite_process_ability"
                            rt-options="vm.picklist.limite_process_ability"></rt-picklist>
                    </rt-section-row>
                </rt-section>
                <rt-section rt-title="政府事务能力">
                    <rt-section-row>
                        <rt-picklist rt-title="政府和社会关系资源" rt-col="4" rt-required="false" rt-disabled="vm.form.isFlowApprover||vm.form.canEdit" ng-model="vm.form.data.gover_social_relation"
                            rt-options="vm.picklist.gover_social_relation"></rt-picklist>
                        <rt-picklist rt-title="招投标能力" rt-col="4" rt-required="false" rt-disabled="vm.form.isFlowApprover||vm.form.canEdit" ng-model="vm.form.data.call_bidding_ability"
                            rt-options="vm.picklist.call_bidding_ability"></rt-picklist>
                    </rt-section-row>
                    <rt-section-row>
                        <rt-picklist rt-title="医保（支付价）能力" rt-col="4" rt-required="false" rt-disabled="vm.form.isFlowApprover||vm.form.canEdit" ng-model="vm.form.data.medical_insurance_ability"
                            rt-options="vm.picklist.medical_insurance_ability"></rt-picklist>
                        <rt-picklist rt-title="二次议价能力" rt-col="4" rt-required="false" rt-disabled="vm.form.isFlowApprover||vm.form.canEdit" ng-model="vm.form.data.bargaining_ability"
                            rt-options="vm.picklist.bargaining_ability"></rt-picklist>
                    </rt-section-row>
                    <rt-section-row>
                        <rt-picklist rt-title="临床路径进入能力" rt-col="4" rt-required="false" rt-disabled="vm.form.isFlowApprover||vm.form.canEdit" ng-model="vm.form.data.into_clinical_ability"
                            rt-options="vm.picklist.into_clinical_ability"></rt-picklist>
                    </rt-section-row>
                </rt-section>
            </div>

            <div class="tab-pane" id="A3">
                <rt-section rt-title="基本信息">
                    <rt-section-row>
                        <rt-input rt-type="text" rt-title="甲方全称" rt-col="4" rt-disabled="vm.form.isFlowApprover||vm.form.canEdit" ng-model="vm.salesAgreement.first_party_name"></rt-input>
                        <rt-input rt-type="text" rt-title="合同编号" rt-col="4" rt-disabled="vm.form.isFlowApprover||vm.form.canEdit" ng-model="vm.salesAgreement.agr_no"></rt-input>
                    </rt-section-row>
                    <rt-section-row>
                        <rt-input rt-type="text" rt-title="乙方全称" rt-col="4" rt-disabled="vm.form.isFlowApprover||vm.form.canEdit" ng-model="vm.salesAgreement.second_party_name"></rt-input>
                        <rt-input rt-type="text" ng-if="vm.form.data.agent_type.Value==2" rt-disabled="vm.form.isFlowApprover||vm.form.canEdit" rt-title="身份证号"
                            rt-col="4" ng-model="vm.salesAgreement.id_card_no"></rt-input>
                        <rt-input rt-type="text" ng-if="vm.form.data.agent_type.Value==1" rt-disabled="vm.form.isFlowApprover||vm.form.canEdit" rt-title="法人代表"
                            rt-col="4" ng-model="vm.salesAgreement.legal_rep_name"></rt-input>
                    </rt-section-row>
                    <rt-section-row>
                        <rt-input rt-type="text" rt-title="开户银行" rt-col="4" rt-disabled="vm.form.isFlowApprover||vm.form.canEdit" ng-model="vm.salesAgreement.bank_name"></rt-input>
                        <rt-input rt-type="text" rt-title="联系电话" rt-col="4" rt-disabled="vm.form.isFlowApprover||vm.form.canEdit" ng-model="vm.salesAgreement.telephone"></rt-input>
                    </rt-section-row>
                    <rt-section-row>
                        <rt-input rt-type="text" rt-title="账户名" rt-col="4" rt-disabled="vm.form.isFlowApprover||vm.form.canEdit" ng-model="vm.salesAgreement.bank_no_name"></rt-input>
                        <rt-input rt-type="text" rt-title="通讯地址" rt-col="4" rt-disabled="vm.form.isFlowApprover||vm.form.canEdit" ng-model="vm.salesAgreement.contact_addr"></rt-input>
                    </rt-section-row>
                    <rt-section-row>
                        <rt-input rt-type="text" rt-title="账号" rt-col="4" rt-disabled="vm.form.isFlowApprover||vm.form.canEdit" ng-model="vm.salesAgreement.bank_no"></rt-input>
                        <rt-input rt-type="email" ng-if="vm.form.data.agent_type.Value==2" rt-title="邮箱" rt-col="4" rt-disabled="vm.form.isFlowApprover||vm.form.canEdit"
                            ng-model="vm.salesAgreement.email"></rt-input>
                        <rt-input rt-type="text" ng-if="vm.form.data.agent_type.Value==1" rt-title="签约地" rt-col="4" rt-disabled="vm.form.isFlowApprover||vm.form.canEdit"
                            ng-model="vm.salesAgreement.signing_addr"></rt-input>
                    </rt-section-row>
                </rt-section>
                <rt-section rt-title="详细信息">
                    <rt-section-row ng-if="vm.form.data.agent_type.Value==1">
                        <rt-checkbox rt-title="《营业执照》复印件" rt-col="1" rt-disabled="vm.form.isFlowApprover||vm.form.canEdit" ng-model="vm.salesAgreement.qualified_license_copy"></rt-checkbox>
                        <rt-checkbox rt-title="《经营许可证》复印件" rt-col="1" rt-disabled="vm.form.isFlowApprover||vm.form.canEdit" ng-model="vm.salesAgreement.qualified_license2_copy"></rt-checkbox>
                        <rt-checkbox rt-title="授权代表授权书" rt-col="1" rt-disabled="vm.form.isFlowApprover||vm.form.canEdit" ng-model="vm.salesAgreement.qualified_proxy_book"></rt-checkbox>
                        <rt-checkbox rt-title="受托人居民身份证复印件" rt-col="1" rt-disabled="vm.form.isFlowApprover||vm.form.canEdit" ng-model="vm.salesAgreement.qualified_proxy_id_copy"></rt-checkbox>
                    </rt-section-row>
                    <rt-section-row>
                        <rt-lookup2 rt-label-col="2" rt-title="产品名称" ng-model="vm.salesAgreement.productid" rt-disabled="vm.form.isFlowApprover||vm.form.canEdit"
                            rt-get-data-name="Product.GetProductSize" rt-order-by="name asc" rt-col-list="[{Code:'name',Name:'产品名称'},{Code:'size',Name:'规格'},{Code:'code',Name:'产品编码'}]"
                            rt-col="4"></rt-lookup2>
                        <rt-input rt-type="text" rt-title="规格" rt-disabled="true" rt-col="4" ng-model="vm.salesAgreement.product_size"></rt-input>
                    </rt-section-row>
                    <rt-section-row>
                        <rt-input rt-type="text" rt-title="协议销售区域" rt-col="4" rt-disabled="vm.form.isFlowApprover||vm.form.canEdit" ng-model="vm.salesAgreement.agress_sales_region"></rt-input>
                    </rt-section-row>
                    <rt-section-row>
                        <rt-datetime rt-title="推广服务期开始时间" rt-disabled="vm.form.isFlowApprover||vm.form.canEdit" ng-model="vm.salesAgreement.startdate"
                            rt-type="date" rt-col="4"></rt-datetime>
                        <rt-datetime rt-title="推广服务期结束时间" rt-disabled="vm.form.isFlowApprover||vm.form.canEdit" ng-model="vm.salesAgreement.enddate"
                            rt-type="date" rt-col="4"></rt-datetime>
                    </rt-section-row>
                    <rt-section-row>
                        <rt-input rt-type="text" rt-title="包装" rt-col="4" rt-disabled="vm.form.isFlowApprover||vm.form.canEdit" ng-model="vm.salesAgreement.product_package"></rt-input>
                        <rt-input rt-type="text" rt-title="推广服务分包费用结算标准约定" rt-col="4" rt-disabled="vm.form.isFlowApprover||vm.form.canEdit" ng-model="vm.salesAgreement.service_fee_standard"></rt-input>
                    </rt-section-row>
                    <rt-section-row>
                        <rt-lookup2 rt-title="指定商业公司" rt-disabled="vm.form.isFlowApprover||vm.form.canEdit" ng-model="vm.salesAgreement.business_accountid"
                            readonly="readonly" rt-get-data-name="Account.GetAllBusiness" rt-order-by="accountnumber" rt-col-list="[{Code:'name',Name:'客户名称'},{Code:'accountnumber',Name:'客户编码'}]"
                            rt-col="4"></rt-lookup2>
                        <rt-input rt-type="decimal" rt-disabled="vm.form.isFlowApprover||vm.form.canEdit" rt-title="商业配送费率" rt-col="4" ng-model="vm.salesAgreement.delivery_rate"></rt-input>
                    </rt-section-row>
                </rt-section>
                <rt-section rt-title="年度销售指标约定">
                    <table class="table table-hover">
                        <thead>
                            <tr>
                                <th>季度</th>
                                <th>季度第一月</th>
                                <th>季度第二月</th>
                                <th>季度第三月</th>
                                <th>季度小计</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                                <td>Q1</td>
                                <td>
                                    <rt-input-no-label rt-type="decimal" rt-col="10" rt-disabled="vm.form.isFlowApprover||vm.form.canEdit" ng-model="vm.target[0].target_amount"></rt-input-no-label>
                                </td>
                                <td>
                                    <rt-input-no-label rt-type="decimal" rt-col="10" rt-disabled="vm.form.isFlowApprover||vm.form.canEdit" ng-model="vm.target[1].target_amount"></rt-input-no-label>
                                </td>
                                <td>
                                    <rt-input-no-label rt-type="decimal" rt-col="10" rt-disabled="vm.form.isFlowApprover||vm.form.canEdit" ng-model="vm.target[2].target_amount"></rt-input-no-label>
                                </td>
                                <td>
                                    {{vm.sum(vm.target[0].target_amount,vm.target[1].target_amount,vm.target[2].target_amount)}}
                                </td>
                            </tr>
                            <tr>
                                <td>Q2</td>
                                <td>
                                    <rt-input-no-label rt-type="decimal" rt-col="10" rt-disabled="vm.form.isFlowApprover||vm.form.canEdit" ng-model="vm.target[3].target_amount"></rt-input-no-label>
                                </td>
                                <td>
                                    <rt-input-no-label rt-type="decimal" rt-col="10" rt-disabled="vm.form.isFlowApprover||vm.form.canEdit" ng-model="vm.target[4].target_amount"></rt-input-no-label>
                                </td>
                                <td>
                                    <rt-input-no-label rt-type="decimal" rt-col="10" rt-disabled="vm.form.isFlowApprover||vm.form.canEdit" ng-model="vm.target[5].target_amount"></rt-input-no-label>
                                </td>
                                <td>
                                    {{vm.sum(vm.target[3].target_amount,vm.target[4].target_amount,vm.target[5].target_amount)}}
                                </td>
                            </tr>
                            <tr>
                                <td>Q3</td>
                                <td>
                                    <rt-input-no-label rt-type="decimal" rt-col="10" rt-disabled="vm.form.isFlowApprover||vm.form.canEdit" ng-model="vm.target[6].target_amount"></rt-input-no-label>
                                </td>
                                <td>
                                    <rt-input-no-label rt-type="decimal" rt-col="10" rt-disabled="vm.form.isFlowApprover||vm.form.canEdit" ng-model="vm.target[7].target_amount"></rt-input-no-label>
                                </td>
                                <td>
                                    <rt-input-no-label rt-type="decimal" rt-col="10" rt-disabled="vm.form.isFlowApprover||vm.form.canEdit" ng-model="vm.target[8].target_amount"></rt-input-no-label>
                                </td>
                                <td>
                                    {{vm.sum(vm.target[6].target_amount,vm.target[7].target_amount,vm.target[8].target_amount)}}
                                </td>
                            </tr>
                            <tr>
                                <td>Q4</td>
                                <td>
                                    <rt-input-no-label rt-type="decimal" rt-col="10" rt-disabled="vm.form.isFlowApprover||vm.form.canEdit" ng-model="vm.target[9].target_amount"></rt-input-no-label>
                                </td>
                                <td>
                                    <rt-input-no-label rt-type="decimal" rt-col="10" rt-disabled="vm.form.isFlowApprover||vm.form.canEdit" ng-model="vm.target[10].target_amount"></rt-input-no-label>
                                </td>
                                <td>
                                    <rt-input-no-label rt-type="decimal" rt-col="10" rt-disabled="vm.form.isFlowApprover||vm.form.canEdit" ng-model="vm.target[11].target_amount"></rt-input-no-label>
                                </td>
                                <td>
                                    {{vm.sum(vm.target[9].target_amount,vm.target[10].target_amount,vm.target[11].target_amount)}}
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </rt-section>
                <rt-section rt-title="保证金">
                    <rt-section-row>
                        <rt-input rt-type="int" rt-title="保证金缴纳时限" rt-col="4" rt-disabled="vm.form.isFlowApprover||vm.form.canEdit" ng-model="vm.salesAgreement.margin_dead_date"></rt-input>
                        <rt-input rt-type="PositiveNumber" rt-title="推广资质保证金" rt-col="4" rt-disabled="vm.form.isFlowApprover||vm.form.canEdit" ng-model="vm.salesAgreement.margin_promotion_qualified"></rt-input>
                    </rt-section-row>
                    <rt-section-row>
                        <rt-input rt-type="PositiveNumber" rt-title="医院开发保证金" rt-col="4" rt-disabled="vm.form.isFlowApprover||vm.form.canEdit" ng-model="vm.salesAgreement.margin_develop_hospital"></rt-input>
                        <rt-input rt-type="PositiveNumber" rt-title="推广任务保证金" rt-col="4" rt-disabled="vm.form.isFlowApprover||vm.form.canEdit" ng-model="vm.salesAgreement.margin_promotion_task"></rt-input>
                    </rt-section-row>
                    <rt-section-row>
                        <rt-input rt-type="PositiveNumber" rt-title="招投标保证金" rt-col="4" rt-disabled="vm.form.isFlowApprover||vm.form.canEdit" ng-model="vm.salesAgreement.margin_zhaobiao"></rt-input>
                        <rt-input rt-type="PositiveNumber" rt-title="医保目录进入保证金" rt-col="4" rt-disabled="vm.form.isFlowApprover||vm.form.canEdit"
                            ng-model="vm.salesAgreement.margin_hospital_dir"></rt-input>
                    </rt-section-row>
                    <rt-section-row>
                        <rt-input rt-type="text" rt-title="甲方保证金收款账户" rt-col="4" rt-disabled="vm.form.isFlowApprover||vm.form.canEdit" ng-model="vm.salesAgreement.margin_bank_no"></rt-input>
                    </rt-section-row>
                    <rt-section-row>
                        <rt-input rt-type="int" rt-title="乙方学术人员配备" rt-col="4" rt-disabled="vm.form.isFlowApprover||vm.form.canEdit" ng-model="vm.salesAgreement.second_party_promoters"></rt-input>
                        <rt-input rt-type="text" rt-title="同类竞品" rt-col="4" rt-disabled="vm.form.isFlowApprover||vm.form.canEdit" ng-model="vm.salesAgreement.competitive_products"></rt-input>
                    </rt-section-row>
                </rt-section>
            </div>

            <div class="tab-pane" id="A4">
                <div ng-if="vm.form.type === 'Edit'" rt-include rt-template="Module/SalesAgreementToAccountForLeads/salesagreementtoaccountForLeadsListView.html"
                    rt-controller="salesagreementtoaccountForLeadsListController" rt-include-params='{"relatedAttr": "sales_agreementId","formAttrValue":vm.salesAgreement.Id,"formAttrName": "test"}'></div>
            </div>
        </div>
        <!-- div[.tab-content] -->
    </div>
</rt-form>
<!-- rt-form -->