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
| $scope.itemGridCols = [
{
field : 'accountYr',
displayName : '年度',
cellClass: 'text-left',
width: '150px'
},
{
field : 'orgType',
displayName : 'orgType',
cellClass: 'text-left',
visible : false
},
{
field : 'orgTypeName',
displayName : '機關類別',
cellClass: 'text-left',
width: '250px'
},
{
field : 'masterAge',
displayName : 'masterAge',
cellClass: 'text-left',
visible : false
},
{
field : 'masterAgeName',
displayName : '主管機關名稱',
cellClass: 'text-left',
width: '250px'
},
{
field : 'ageName',
displayName : '機關名稱',
cellClass: 'text-left',
width: '250px'
},
{
field : 'age',
displayName : '機關代號',
cellClass: 'text-left',
width: '250px'
}
];
$scope.itemGrid = {
keepLastSelected: false,
selectedItems: $scope.selectedItem,
multiSelect : false,
data : 'itemData',
columnDefs : 'itemGridCols',
enableColumnResize: true,
afterSelectionChange : function(rowItem){
if (rowItem.selected) {
$scope.model.accountYr = rowItem.entity.accountYr;
$scope.model.orgType = rowItem.entity.orgType;
$scope.model.masterAge = rowItem.entity.masterAge;
$scope.model.ageNm = rowItem.entity.ageName;
$scope.model.age = rowItem.entity.age;
}else{
$scope.model = {};
$scope.model.accountYr = getCurrentYear()-1;
}
}
};
|