custom-attribute-modal.html 9.62 KB
Newer Older
eddie.woo's avatar
eddie.woo committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137
<div class="attribute-modal-wrap">
    <!--自定义显示属性弹框-->
    <div class="modal fade addDimensionModal" id="addDimensionModal{{dimensionId}}" tabindex="-1" role="dialog" aria-labelledby="addDimensionModal">
        <div class="modal-dialog" style="width:500px; height:400px" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <div class="modal-title">{{'CustomSelectDimension'|translate}} </div>
                </div>
                <div class="modal-body">
                    <form class="form-horizontal">

                        <div class="custom-config">
                            <div class="select-box-list" ng-if="tabType!==3 && tabType!=2">
                                <table class="table table-bordered">
                                    <tr ng-repeat="statis in statisticAttrList  track by $index">
                                        <td class="center">{{$index + 1}}</td>
                                        <!--事业部 自定义显示框-->
                                        <td class="center">
                                            <div ng-if="$index==0" class="header">
                                                <select class="form-control select-box"
                                                        name="attrSetSelect" ng-model="statis.attrSelectedID" ng-disabled="isBUTabType">
                                                    <option ng-repeat=" x in dimensionList track by $index" value="{{x.id}}" title="{{x.name}}">
                                                        {{x.name | limitString:50}}
                                                    </option>
                                                </select>
                                            </div>
                                            <div ng-if="$index>0">
                                                <select class="form-control"
                                                        name="attrSetSelect" ng-model="statis.attrSelectedID">
                                                    <option ng-repeat=" x in dimensionList track by $index" value="{{x.id}}" title="{{x.name}}">
                                                        {{x.name | limitString:50}}
                                                    </option>
                                                </select>
                                            </div>
                                        </td>
                                        <td class="center">
                                            <span ng-if="$index>0 && !(tabType === 2)" ng-click="deleteAttr(statis)"><i class="material-icons button-icons icon-delete">delete</i></span>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="center" ng-hide="tabType === 2 && statisticAttrList && statisticAttrList.length >= 2"><span ng-click="AddAttr()"><i class="material-icons button-icons middle icon-add">add_circle_outline</i></span></td>
                                        <td></td>
                                        <td></td>
                                    </tr>
                                </table>
                            </div>
                            <div class="select-box-list orgStructure" ng-show="tabType===3">
                                <table class="table table-bordered">
                                    <!--机构层次 自定义显示框-->
                                    <!--第一行 机构的属性-->
                                    <tr>
                                        <td class="center">1</td>
                                        <td class="center first-row">
                                            <div class="org-attribute">
                                                <div style="float:left; width:50%; padding-right: 5px;" ng-repeat="item in firstRowList track by $index">
                                                    <select ng-model="item.attrSelectedID" class="form-control" name="selectedFirst">
                                                        <option ng-repeat="x in dimensionList track by $index" value="{{x.id}}" title="{{x.name}}">
                                                            {{x.name | limitString:50}}
                                                        </option>
                                                    </select>
                                                </div>
                                            </div>
                                        </td>
                                        <td></td>
                                    </tr>
                                    <!--第二行起 自定义的统计属性-->
                                    <tr ng-repeat="statis in statisticAttrList track by $index">
                                        <td class="center">{{$index + 2}}</td>
                                        <td class="center">
                                            <div class="custom-attribute">
                                                <select class="form-control" name="attrSetSelect" ng-model="statis.attrSelectedID">
                                                    <option ng-repeat=" x in withoutOrgAttrList track by $index" value="{{x.id}}" title="{{x.name}}">
                                                        {{x.name | limitString:50}}
                                                    </option>
                                                </select>
                                            </div>
                                        </td>
                                        <td class="center">
                                            <span ng-click="deleteAttr(statis)"><i class="material-icons button-icons icon-delete">delete</i></span>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="center"><span ng-click="AddAttr()"><i class="material-icons button-icons middle icon-add">add_circle_outline</i></span></td>
                                        <td></td>
                                        <td></td>
                                    </tr>
                                </table>
                            </div>
                              <div class="select-box-list orgStructure" ng-show="tabType===2">
                                <table class="table table-bordered">
                                    <!--机构层次 自定义显示框-->
                                    <!--第一行 机构的属性-->
                                    <tr>
                                        <td class="center">1</td>
                                        <td class="center first-row">
                                            <div class="org-attribute">
                                                <div style="float:left; width:50%; padding-right: 5px;" ng-repeat="item in firstRowList track by $index">
                                                    <select ng-model="item.attrSelectedID" class="form-control" name="selectedFirst">
                                                        <option ng-repeat="x in dimensionList track by $index" value="{{x.id}}" title="{{x.name}}">
                                                            {{x.name | limitString:50}}
                                                        </option>
                                                    </select>
                                                </div>
                                            </div>
                                        </td>
                                        <td></td>
                                    </tr>
                                    <!--第二行起 自定义的统计属性-->
                                    <tr ng-repeat="statis in statisticAttrList track by $index">
                                        <td class="center">{{$index + 2}}</td>
                                        <td class="center">
                                            <div class="custom-attribute">
                                                <select class="form-control" name="attrSetSelect" ng-model="statis.attrSelectedID">
                                                    <option ng-repeat=" x in dimensionList track by $index" value="{{x.id}}" title="{{x.name}}">
                                                        {{x.name | limitString:50}}
                                                    </option>
                                                </select>
                                            </div>
                                        </td>
                                        <td class="center">
                                            <!-- <span ng-click="deleteAttr(statis)"><i class="material-icons button-icons icon-delete">delete</i></span> -->
                                        </td>
                                    </tr>
                                    
                                </table>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-primary" ng-click="SaveAttr()">{{'Confirm' | translate }}</button>
                    <button type="button" class="btn btn-third" data-dismiss="modal" ng-click="closeModal()">{{'Cancel' | translate }}</button>
                </div>
            </div>
        </div>
    </div>
</div>