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
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: zhangyu
$Date: 2016-11-22 下午17:20:11
$Revision: 1.0
$Purpose: 工作流选择部门审批
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application">
<a:init-procedure/>
<a:view>
<a:link id="wfl_workflow_assigned_unit_id_link" url="${/request/@context_path}/modules/wfl_screen/hn_wfl_unit_assigned.lsc"/>
<script type="text/javascript"><![CDATA[
function assign_wfl_unit_assign() {
var ds = $('assigned_unit_id_ds');
var records = ds.getAll();
var param = {};
var saveData = [];
for (var i = 0;i < records.length;i++) {
var lineData = {};
lineData['unit_id'] = records[i].get('unit_id');
lineData['instance_id'] = '${/parameter/@instance_id}';
saveData.push(lineData);
}
param['details'] = saveData;
Leaf.showConfirm('${l:HLS.PROMPT}', '是否确定由已选择的部门审批?', function() {
Leaf.Masker.mask(Ext.getBody(), '${l:HLS.EXECUTING}');
Leaf.request({
url: $('wfl_workflow_assigned_unit_id_link').getUrl(),
para: {
param: param,
instance_id:'${/parameter/@instance_id}'
},
success: function(response) {
Leaf.Masker.unmask(Ext.getBody());
zjwfl5110_approvePage_close();
},
failure: function() {
Leaf.Masker.unmask(Ext.getBody());
},
error: function() {
Leaf.Masker.unmask(Ext.getBody());
},
scope: this
});
});
}
function unit_query() {
$('assigned_unit_id_ds').query();
$('un_assign_unit_id_ds').query();
}
function win_close() {
$('zj_wfl_workflow_service_window').close();
}
function right_selected() {
var left_selectedAll = $('un_assign_unit_id_ds').getSelected();
for (var i = 0;i < left_selectedAll.length;i++) {
$('assigned_unit_id_ds').add(left_selectedAll[i]);
}
$('un_assign_unit_id_ds_id').clear();
}
function left_selected() {
var right_selectedAll = $('assigned_unit_id_ds').getSelected();
for (var i = 0;i < right_selectedAll.length;i++) {
$('un_assign_unit_id_ds').add(right_selectedAll[i]);
}
$('assigned_unit_id_ds_id').clear();
}
]]></script>
<a:dataSets>
<a:dataSet id="query_unit_ds" autoCreate="true">
<a:fields>
<a:field name="unit_code"/>
<a:field name="unit_name"/>
</a:fields>
</a:dataSet>
<a:dataSet id="assigned_unit_id_ds" autoQuery="true" queryDataSet="query_unit_ds" queryUrl="${/request/@context_path}/autocrud/wfl_screen.WORKFLOW_ASSIGN.hn_wfl_unit_assigned/query?instance_id=${/parameter/@instance_id}" selectable="true"/>
<a:dataSet id="un_assign_unit_id_ds" autoQuery="true" model="wfl_screen.WORKFLOW_ASSIGN.hn_wfl_unit_un_assigned" queryDataSet="query_unit_ds" queryUrl="${/request/@context_path}/autocrud/wfl_screen.WORKFLOW_ASSIGN.hn_wfl_unit_un_assigned/query?instance_id=${/parameter/@instance_id}" selectable="true"/>
</a:dataSets>
<a:screenBody>
<a:screenTopToolbar>
<a:screenTitle/>
<a:gridButton click="win_close" text="关闭"/>
<a:gridButton click="unit_query" text="查询"/>
<a:gridButton click="assign_wfl_unit_assign" text="确定"/>
</a:screenTopToolbar>
<a:form title="查询条件" width="605">
<a:hBox>
<a:textField name="unit_code" bindTarget="query_unit_ds" prompt="部门代码"/>
<a:textField name="unit_name" bindTarget="query_unit_ds" prompt="部门名称"/>
</a:hBox>
</a:form>
<a:hBox>
<a:form title="未选择部门">
<a:grid id="un_assign_unit_id_ds_id" bindTarget="un_assign_unit_id_ds" height="300" navBar="true" width="250">
<a:columns>
<a:column name="unit_code" prompt="部门代码" width="100"/>
<a:column name="unit_name" prompt="部门名称" width="100"/>
</a:columns>
</a:grid>
</a:form>
<a:vBox>
<a:button click="right_selected" height="25" style="margin-top:30px;" text=">"/>
<a:button click="left_selected" height="25" style="margin-top:10px;" text="<"/>
</a:vBox>
<a:form title="已选择部门">
<a:grid id="assigned_unit_id_ds_id" bindTarget="assigned_unit_id_ds" height="300" navBar="true" width="250">
<a:columns>
<a:column name="unit_code" prompt="部门代码" width="100"/>
<a:column name="unit_name" prompt="部门名称" width="100"/>
</a:columns>
</a:grid>
</a:form>
</a:hBox>
</a:screenBody>
</a:view>
</a:screen>