<rt-form id="{{vm.form.name}}" name="{{vm.form.name}}" novalidate>
    <style>
        .inputnoLable {
            padding: 6px 12px;
            box-shadow: none;
            border: 1px solid #ccc;
            width: 100%;
        }

        .inputnoLable:focus {
            outline: none;
            border: 1px solid #337ab7;
        }
    </style>
    <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.hideForm()">
                        <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.saveItem()">
                </rt-button>
            </div>
        </div>
    </div>
    <div class="nav-tabs-custom">
        <div class="tab-content">
            <div class="col-sm-12">
                <rt-lookup2 rt-title="品类选择" rt-disabled="vm.form.data.StateCode.Value == 1" ng-model="vm.product_category" rt-get-data-name="Product.GetProductCategory"
                    rt-required="true" rt-order-by="code" rt-col-list="[{Code:'name',Name:'药品类别名称'},{Code:'code',Name:'药品类别编码'}]"
                    rt-col="8"></rt-lookup2>
            </div>
            <rt-section rt-title="潜力项目权重及分值" style="display: inline-block;">
                <div class="listview">
                    <div class="row">
                        <div class="col-sm-8">
                            <div class="btn-group">
                                <button class="btn btn-link" ng-click="vm.addItem(vm.potentialItemList,'1')"> <i class="fa fa-plus"></i> 新建项目</button>
                                <button class="btn btn-link" ng-click="vm.delItem(vm.potentialItemList,'1')"><i class="fa fa-trash"></i> 删除项目</button>
                            </div>
                        </div>
                    </div>
                    <div class="viewlist">
                        <rt-data-grid-no-page rt-rows="vm.potentialItemList" rt-selected-ids="vm.view.selectedIds">
                            <table class="table table-hover">
                                <thead>
                                    <tr>
                                        <!-- @@ 视图表头 -->
                                        <th>
                                            <rt-header-checkbox></rt-header-checkbox>
                                        </th>
                                        <th style="text-align: center; width: 20%;">项目</th>
                                        <th style="text-align: center; width: 13%;">权重</th>
                                        <th style="text-align: center; width: 16%;">项目值类型</th>
                                        <th style="text-align: center;width: 20%;">项目值</th>
                                        <th style="text-align: center; width: 13%;">分数</th>
                                        <th style="text-align:center; width: 16%;">操作</th>
                                    </tr>
                                </thead>
                                <tbody ng-repeat="potentialItem in vm.potentialItemList">
                                    <tr ng-repeat="itemOptionList in potentialItem.itemOptionList track by $index">
                                        <td ng-if="$index ==0" rowspan={{potentialItem.itemOptionList.length}}>
                                            <!-- <input type="checkbox" id="{{$index}}" ng-click="updateSelection($event,$index)"> -->
                                            <rt-data-checkbox value="{{potentialItem.name}}" />
                                        </td>
                                        <td ng-if="$index ==0" rowspan={{potentialItem.itemOptionList.length}}>
                                            <input type="text" class="inputnoLable" ng-model="potentialItem.name" />
                                        </td>
                                        <td ng-if="$index ==0" rowspan={{potentialItem.itemOptionList.length}}>
                                            <input type="text" style="width: 100%;" class="inputnoLable" ng-model="potentialItem.eval_item_weight" />
                                        </td>
                                        <td ng-if="$index ==0" rowspan={{potentialItem.itemOptionList.length}}>
                                            <rt-picklist rt-title="" rt-col="4" ng-model="potentialItem.eval_item_value_type" rt-options="vm.picklist.eval_item_value_type"></rt-picklist>
                                        </td>
                                        <td>
                                            <input type="text" ng-if="potentialItem.eval_item_value_type.Value==1" class="inputnoLable" ng-model="itemOptionList.name"
                                            />
                                            <input type="text" style="width: 45%;" ng-if="potentialItem.eval_item_value_type.Value==2" class="inputnoLable" ng-model="itemOptionList.eval_item_value_low"
                                            />
                                            <span ng-if="potentialItem.eval_item_value_type.Value==2">~</span>
                                            <input type="text" style="width: 45%;" ng-if="potentialItem.eval_item_value_type.Value==2" class="inputnoLable" ng-model="itemOptionList.eval_item_value_hight"
                                            />
                                        </td>
                                        <td>
                                            <input type="text" class="inputnoLable" ng-disabled="potentialItem.eval_item_value_type.Value==3" ng-model="itemOptionList.score">
                                        </td>
                                        <td style="text-align: center;">
                                            <a ng-if="$index==0" style="color:#3c8dbc" href="javascript:" ng-click="vm.additemOptionList(potentialItem)">新增</a>
                                            <a href="javascript:" style="color:#3c8dbc" ng-click="vm.delitemOptionList(vm.potentialItemList,potentialItem,$index)">删除</a>
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                        </rt-data-grid-no-page>
                    </div>
                </div>
            </rt-section>
            <rt-section rt-title="处方态度项目权重及分值">
                <div class="listview">
                    <div class="row">
                        <div class="col-sm-8">
                            <div class="btn-group">
                                <button class="btn btn-link" ng-click="vm.addItem(vm.attitudeItemList,'2')"> <i class="fa fa-plus"></i> 新建项目</button>
                                <button class="btn btn-link" ng-click="vm.delAttitudeItem()"><i class="fa fa-trash"></i> 删除项目</button>
                            </div>
                        </div>
                    </div>
                    <div class="viewlist">
                        <table class="table table-hover" id="attitudeItemList">
                            <thead>
                                <tr>
                                    <!-- @@ 视图表头 -->
                                    <th>
                                        <rt-header-checkbox id="checkboxAll" ng-click="vm.selectAll()"></rt-header-checkbox>
                                    </th>
                                    <th style="text-align: center; width: 20%;">项目</th>
                                    <th style="text-align: center; width: 13%;">权重</th>
                                    <th style="text-align: center; width: 16%;">项目值类型</th>
                                    <th style="text-align: center;width: 20%;">项目值</th>
                                    <th style="text-align: center; width: 13%;">分数</th>
                                    <th style="text-align:center; width: 16%;">操作</th>
                                </tr>
                            </thead>
                            <tbody ng-repeat="attitudeItem in vm.attitudeItemList" ng-init="outerIndex = $index">
                                <tr ng-repeat="itemOptionList in attitudeItem.itemOptionList track by $index">                                    
                                    <td ng-if="$index ==0" rowspan={{attitudeItem.itemOptionList.length}}>
                                        <input type="checkbox" id="{{$index}}" ng-click="updateSelection($event,outerIndex)">
                                    </td>
                                    <td ng-if="$index ==0" rowspan={{attitudeItem.itemOptionList.length}}>
                                        <input type="text" class="inputnoLable" ng-model="attitudeItem.name" />
                                    </td>
                                    <td ng-if="$index ==0" rowspan={{attitudeItem.itemOptionList.length}}>
                                        <input type="text" style="width: 100%;" class="inputnoLable" ng-model="attitudeItem.eval_item_weight" />
                                    </td>
                                    <td ng-if="$index ==0" rowspan={{attitudeItem.itemOptionList.length}}>
                                        <rt-picklist rt-title="" rt-col="4" ng-model="attitudeItem.eval_item_value_type" rt-options="vm.picklist.eval_item_value_type"></rt-picklist>
                                    </td>
                                    <td>
                                        <input type="text" ng-if="attitudeItem.eval_item_value_type.Value==1" class="inputnoLable" ng-model="itemOptionList.name"
                                        />
                                        <input type="text" style="width: 45%;" ng-if="attitudeItem.eval_item_value_type.Value==2" class="inputnoLable" ng-model="itemOptionList.eval_item_value_low"
                                        />
                                        <span ng-if="attitudeItem.eval_item_value_type.Value==2">~</span>
                                        <input type="text" style="width: 45%;" ng-if="attitudeItem.eval_item_value_type.Value==2" class="inputnoLable" ng-model="itemOptionList.eval_item_value_hight"
                                        />
                                    </td>
                                    <td>
                                        <input type="text" class="inputnoLable" ng-disabled="attitudeItem.eval_item_value_type.Value==3" ng-model="itemOptionList.score">
                                    </td>
                                    <td style="text-align: center;">
                                        <a ng-if="$index==0" href="javascript:" style="color:#3c8dbc" ng-click="vm.additemOptionList(attitudeItem)">新增</a>
                                        <a href="javascript:" style="color:#3c8dbc" ng-click="vm.delitemOptionList(vm.attitudeItemList,attitudeItem,$index)">删除</a>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </rt-section>
        </div>
        <!-- div[.tab-content] -->
    </div>
</rt-form>
<!-- rt-form -->