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
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: zhuxianfei
$Date: 2018年7月25日 下午3:35:07
$Revision: 1.0
$Purpose:
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true"
trace="true">
<a:init-procedure/>
<a:view>
<a:link id="con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code"
modelaction="update"/>
<a:link id="${/parameter/@layout_code}${/parameter/@pre_layout}_invoice_cdd_uploadFile_id"
url="${/request/@context_path}/downloadFile.lview"/>
<a:link id="acp_invoice_confirm_link" model="acp.ACP520.acp_invoice_confirm"
modelaction="batch_update"/>
<script type="text/javascript"><![CDATA[
//确认签收
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function () {
var acp_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'acp_invoice_ln');
var records = $(acp_ds_id).getSelected();
if (records.length == 0) {
Leaf.showMessage('${l:PROMPT}', '请至少选择一条数据!');
return;
}
var param_list = [];
var param = {};
for (var i = 0; i < records.length; i++) {
param = {};
param['invoice_line_id'] = records[i].get('invoice_line_id');
param['_status'] = 'update';
param_list.push(param);
}
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
Leaf.request({
url: $('acp_invoice_confirm_link').getUrl(),
para: param_list,
success: function (res) {
$(acp_ds_id).query();
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
failure: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
sync: true,
scope: this
});
}
//超链接渲染
window['${/parameter/@bp_seq}${/parameter/@layout_code}_dynamic_link_renderer'] = function (value, record, name, config_record, bp_seq) {
//
var link_function = '';
var invoice_line_id = record.get('invoice_line_id');
window['${/parameter/@bp_seq}${/parameter/@layout_code}_hls_link_render_record'][record.id + '---' + name] = record;
if (name == 'attachment') {
return '<a href="javascript:attachment_window_open(\'' + invoice_line_id + '\',\'' + record.id + '\',\'' + record.ds.id + '\');">' + '上传' + '</a>';
}
};
function attachment_window_open(invoice_line_id, record_id, ds_id) {
url = $('${/parameter/@layout_code}${/parameter/@pre_layout}_invoice_cdd_uploadFile_id').getUrl() + '?table_name=ACP_INVOICE_LN&header_id=' + invoice_line_id;
wd = new Leaf.Window({
id: 'open_attachment_window',
url: url,
title: '附件上传',
height: 350,
width: 850
});
}
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
</a:view>
</a:screen>