index.vm
8.52 KB
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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
$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" ng-click="reportExport()">批量创建</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="‹" next-text="›" first-text="«"
last-text="»"></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>