<style>
    .contact-grade-table {
        border: 1px solid #f0f0f0;
        color: #555;
        vertical-align: middle;
        width: 100%;
        padding: 5px;
    }
</style>
<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 class="col-sm-10">
            <div class="pull-right">
                <rt-button id="btnSave" rt-style="link" rt-title="提交" rt-icon="floppy-o" ng-click="vm.form.showFlowUserList()" ng-show="(vm.form.type === 'Create' && vm.privilege.IsCreate) || (vm.form.type === 'Edit' && vm.privilege.IsWrite)">
                </rt-button>
            </div>
        </div>
    </div>
    <div class="nav-tabs-custom">
        <div class="tab-content">
            <div class="tab-pane active">
                <rt-section rt-title="基本信息">
                    <rt-section-row>
                        <rt-lookup2 rt-title="医院" ng-model="vm.form.data.accountId" rt-get-data-name="Account.GetHospital" rt-order-by="accountnumber"
                            rt-col-list="[{Code:'name',Name:'客户名称'},{Code:'accountnumber',Name:'客户编码'}]" rt-required="true" rt-col="4"></rt-lookup2>
                        <rt-lookup2 rt-title="科室" ng-model="vm.form.data.departmentid" rt-get-data-name="Depart.GetDepart" rt-order-by="name" rt-col-list="[{Code:'name',Name:'科室'}]"
                            rt-params="{'@accountid':vm.form.data.accountId ? vm.form.data.accountId.Id :''}" rt-required="true"
                            rt-col="4"></rt-lookup2>
                    </rt-section-row>
                    <rt-section-row>
                        <rt-lookup2 rt-title="医生" ng-model="vm.form.data.contactId" rt-get-data-name="Contact.GetContactByAccountAndDepartment" rt-order-by="name"
                            rt-params="{'@accountid':vm.form.data.accountId ? vm.form.data.accountId.Id :'','@deparmentid':vm.form.data.departmentid ? vm.form.data.departmentid.Id :''}"
                            rt-col-list="[{Code:'name',Name:'医生姓名'},{Code:'jobtitle',Name:'职务'}]" rt-required="true" rt-col="4"></rt-lookup2>
                    </rt-section-row>
                </rt-section>

                <rt-section rt-title="品种评级项目">
                    <div class="tab-pane">
                        <div>
                            <div class="listview">
                                <div class="row">
                                    <div class="col-sm-8">
                                        <div class="btn-group">
                                            <button class="btn btn-link" ng-click="vm.form.addProductCategory('Module/ContactGradeApp/evalItemEditView.html', 'contactGradeAppEditController')">
                                                            <i class="fa fa-plus"></i> 增加
                                                        </button>
                                        </div>
                                    </div>
                                </div>

                                <div style="padding:15px;" ng-repeat="eval in vm.form.data.evalList track by $index">
                                    <div>
                                        <p>
                                            <span class="rt-text-important-01">品种：{{eval.product_categoryId.Name}}</span>
                                            <button class="btn btn-link" ng-click="vm.form.deleteDetail($index)">删除</button>
                                        </p>

                                        <table style="width:100%;table-layout:fixed;">
                                            <tbody>
                                                <tr ng-repeat="item in eval.itemList track by $index">
                                                    <td class="contact-grade-table" style="text-align: left"><span>{{item.name}}</span></td>
                                                    <td class="contact-grade-table" style="text-align: left"><span>{{item.eval_item_value_type.Value==='1'?item.pickValue.name:item.numberValue}}</span></td>
                                                </tr>
                                            </tbody>
                                        </table>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </rt-section>
            </div>
        </div>
    </div>
</rt-form>