index.vm 8.54 KB
$page.setTitle("查看映射库房")
<title>查看映射库房</title>
<div class="xn-breadcrumb xn-width auto clearfix ">
    <ul class="breadcrumb">
        <li><a class="icon icon-home_page" href="$customizationLink.setTarget("index")"></a></li>
        <li><a href="$customizationLink.setTarget('setting')">设置</a></li>
        <li class="active">额度设置</li>
    </ul>
</div>
<div class="xn-main  auto xn-width  clearfix" ng-controller="SetCreditController">
    <div class="pm-task-bottom-top pm-plan-bottom-top  mt_10  mb_10 clearfix">
        <h3>额度设置</h3>
    </div>
    <!--搜索部分-->
    <div class="xn-input-line clearfix">
        <div class="xn_search_box auto">
            <div class="xn-input-line  clearfix">
                <label class="xn-col-sm-4 l-h-34 34 xn-text-right">员工:</label>
                <div class="xn-col-md-4 xn-flot-left-im">
                    <div xn-lookup ng-model="vm.employee" data-search-Val="number|name" required="required"
                         name="employee"
                         data-method="getEmployeeLists(data)" placeholder="请输入员工"></div>
                </div>

                <label class="xn-col-sm-4 l-h-34 34 xn-text-right">类型:</label>
                <div class="xn-col-md-4 xn-flot-left-im">
                    <select class="form-control" ng-model="vm.type"
                            ng-options="type.key as type.val for type in typeList">
                        <option value="">--请选择--</option>
                    </select>
                </div>
            </div>


            <div class="xn-input-line clearfix pt_10">
                <div class="xn-input-line  clearfix">
                    <button class="btn btn-success btn-sm w_80 f-right ml_10" onclick="javascript:location.href='import.vm' ">批量创建</button>
                    <button class="btn btn-success btn-sm w_80 f-right ml_10" ng-click="addEmployee()">新增</button>
                    <button class="btn btn-success btn-sm w_80 f-right ml_10" ng-click="doFind()">搜索</button>
                </div>
            </div>
        </div>
    </div>
    <!--搜索部分结束-->
    <div class="xn-table-wrap">
        <table class="table table-bordered table-striped ">
            <thead>
            <tr>
                <th class="col-md-1">创建时间</th>
                <th class="col-md-1">员工</th>
                <th class="col-md-1">所属部门</th>
                <th class="col-md-1">类型</th>
                <th class="col-md-1">额度限制</th>
                <th class="col-md-1">剩余金额</th>
                <th class="col-md-1">操作</th>

            </tr>
            </thead>
            <tbody id="tbody">
            <tr ng-repeat="employeeCredit in employeeCreditList">
                <td>{{employeeCredit.creationTime|timeReturnFormat}}</td>
                <td>{{employeeCredit.employeeName}}</td>
                <td>{{employeeCredit.organizationName}}</td>
                <td>{{employeeCredit.type}}</td>
                <td>{{employeeCredit.initCredit}}</td>
                <td>{{employeeCredit.currentCredit}}</td>
                <td><a class="view-a" ng-click="editEmployee(employeeCredit)">编辑</a>
                    <a class="view-a" ng-click="deleteEmployee(employeeCredit.id)">删除</a>
                </td>

            </tr>
            <tr ng-if="!vm.totalCount || vm.totalCount == 0">
                <td colspan="12" class="center">无法找到相应的记录</td>
            </tr>
            </tbody>
        </table>
        <div class="xn-table-wrap xn-text-center clearfix" ng-if="vm.totalCount ">
            <div class="f-left mt_20 mb_10">共{{vm.totalCount}}条</div>
            <pagination ng-show="vm.totalCount>vm.pageSize" ng-change="getList()" max-size="maxPageSize"
                        total-items="vm.totalCount"
                        ng-model="vm.pageNumber" items-per-page="vm.pageSize" class="pagination-sm"
                        boundary-links="true"
                        previous-text="&lsaquo;" next-text="&rsaquo;" first-text="&laquo;"
                        last-text="&raquo;"></pagination>
        </div>
    </div>
</div>
<script type="text/javascript" src="$customizationContent.getURI('dist/scripts/credit.js')"></script>
<script type="text/ng-template" id="addEmployee.htm">
    <div class="pm-task-bottom-top pm-plan-bottom-top  mt_10  mb_10 clearfix">
        <h3>新增</h3>
    </div>
    <form class="form-horizontal xn-form clearfix xn-move-listBox-dialog" role="form" xn-form-validate novalidate>
        <div class="dia_search_div">
            <div class="xn-input-line clearfix">
                <label class="xn-col-md-4 l-h-34 34 xn-text-right">员工:<i class="xn-required-i f-right"></i></label>
                <div class="xn-col-md-8 xn-flot-left-im">
                    <div xn-lookup ng-model="vm.employee" data-search-Val="number|name" required="required"
                         name="employee"
                         data-method="getEmployeeLists(data)" placeholder="请输入员工"></div>
                </div>
            </div>
            <div class="xn-input-line clearfix">
                <label class="xn-col-md-4 l-h-34 34 xn-text-right">所属部门:</label>
                <div class="xn-col-md-8 l-h-34">
                    {{vm.organizationName}}
                </div>
            </div>
            <div class="xn-input-line clearfix">
                <label class="xn-col-md-4 l-h-34 34 xn-text-right">类型:<i class="xn-required-i f-right"></i></label>
                <div class="xn-col-md-8 xn-flot-left-im">
                    <select class="form-control" ng-model="vm.type"
                            ng-options="type.key as type.val for type in typeList">
                        <option value="">--请选择--</option>
                    </select>
                </div>
            </div>
            <div class="xn-input-line clearfix">
                <label class="xn-col-md-4 l-h-34 34 xn-text-right">额度限制:<i class="xn-required-i f-right"></i></label>
                <div class="xn-col-md-8">
                    <input class="form-control" type="text" name="name"
                           ng-model="vm.initCredit"/>
                </div>
            </div>
        </div>
        <div class="dia_footer_cl">
            <button class="btn btn-primary" ng-click="ok()">保存</button>
            <button class="btn btn-default" ng-click="cancel()">取消</button>
        </div>
    </form>
</script>
<script type="text/ng-template" id="editEmployee.htm">
    <div class="pm-task-bottom-top pm-plan-bottom-top  mt_10  mb_10 clearfix">
        <h3>编辑额度</h3>
    </div>
    <form class="form-horizontal xn-form clearfix xn-move-listBox-dialog" role="form" xn-form-validate novalidate>
        <div class="dia_search_div">
            <div class="xn-input-line clearfix">
                <label class="xn-col-md-4 l-h-34 34 xn-text-right">员工:</label>
                <div class="xn-col-md-8 l-h-34">
                    {{vm.employeeName}}
                </div>
            </div>
            <div class="xn-input-line clearfix">
                <label class="xn-col-md-4 l-h-34 34 xn-text-right">所属部门:</label>
                <div class="xn-col-md-8 l-h-34">
                    {{vm.organizationName}}
                </div>
            </div>
            <div class="xn-input-line clearfix">
                <label class="xn-col-md-4 l-h-34 34 xn-text-right">类型:</label>
                <div class="xn-col-md-8 l-h-34">
                    {{vm.type}}
                </div>
            </div>
            <div class="xn-input-line clearfix">
                <label class="xn-col-md-4 l-h-34 34 xn-text-right">额度限制:<i class="xn-required-i f-right"></i></label>
                <div class="xn-col-md-8">
                    <input class="form-control" type="text" name="name"
                           ng-model="vm.initCredit"/>
                </div>
            </div>
            <div class="xn-input-line clearfix">
                <label class="xn-col-md-4 l-h-34 34 xn-text-right">剩余额度:<i class="xn-required-i f-right"></i></label>
                <div class="xn-col-md-8">
                    <input class="form-control" type="text" name="name"
                           ng-model="vm.currentCredit"/>
                </div>
            </div>
        </div>
        <div class="dia_footer_cl">
            <button class="btn btn-primary" ng-click="ok()">保存</button>
            <button class="btn btn-default" ng-click="cancel()">取消</button>
        </div>
    </form>
</script>